samsung-royss: new device (Samsung Galaxy Young) (!670)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Muhammad Firman Yassin 2019-10-09 00:27:18 +08:00 committed by Oliver Smith
parent eb097dab35
commit 692f088c8e
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 3638 additions and 0 deletions

View file

@ -0,0 +1,29 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-royss"
pkgdesc="Samsung Galaxy Young"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-royss mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="
deviceinfo
fb.modes
initfs-hook.sh
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="d90a28e57a244472ba0d8a7a5f3a961be503143bab8152a8b687031fc6225430c98303a5ddfca59998283f6b9c5480f8f3ea26edc7b43d13b58b2f35cb191779 deviceinfo
b246f5832618356e4519e6cac15b3700a219eba625a16799e80acf85f62e33bf3c110c35f63007479e1caf2ff8a87f169a3dcdc6ba0980fa0ac5781d63cbd40d fb.modes
b3d8e6d90b9996c444738f3bda1fa2afc411cfab9506f20f72bb7b16ca03f4db844138e4443c27d00f4ae809d9b28f4313c5c54512524aa86300efbb54907725 initfs-hook.sh"

View file

@ -0,0 +1,35 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy Young"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-royss"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="320"
deviceinfo_screen_height="480"
deviceinfo_dev_touchscreen="/dev/input/event1"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="androidboot.hardware=qcom loglevel=1 vmalloc=200M"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_flash_offset_base="0x00200000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01300000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_heimdall_partition_kernel="APPS"
deviceinfo_flash_heimdall_partition_system="SYSTEM"

View file

@ -0,0 +1,8 @@
mode "320x480-0"
# D: 0.002 MHz, H: 0.004 kHz, V: 0.007 Hz
geometry 320 480 320 480 16
timings 500000000 100 100 20 20 8 1
accel false
rgba 5/11,6/5,5/0,0/0
endmode

View file

@ -0,0 +1,6 @@
#!/bin/sh
# enable display
echo 120 > /sys/class/leds/lcd-backlight/brightness
echo "U:320x480p-0" > /sys/class/graphics/fb0/mode

View file

@ -0,0 +1,65 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/cyanogenmod_royss_defconfig
pkgname="linux-samsung-royss"
pkgver=3.4.0
pkgrel=0
pkgdesc="Samsung Galaxy Young kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-royss"
url="https://github.com/Nothing-Dev/android_kernel_samsung_royss"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc4 lzo lzop"
## Compiler: GCC 4 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_samsung_royss"
_commit="3169160cd6b23e0325fb5117cc347fc6acb2bc48"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/Nothing-Dev/${_repository}/archive/${_commit}.tar.gz
$_config
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
[ -e "$_zimg" ] || continue
msg "zImage found: $_zimg"
install -Dm644 "$_zimg" "$_target"
break
done
if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi
}
sha512sums="5dd49d41297247788d5b33815ec74f02ecc2566a9045102df63579dbc360f7c4c08fc4a28251efa02959137e7ed0f92a91b694145d40ee52bb0bf99557a7320a linux-samsung-royss-3169160cd6b23e0325fb5117cc347fc6acb2bc48.tar.gz
70163ceed1e5e3f6c6f57700d2538bbb9ae7270a874612cb63559c93e9f05c77f72994656f8b0a17e3b6146eaea644aa52eb128a2ec76dd8b087b8a23f178a36 config-samsung-royss.armv7"

File diff suppressed because it is too large Load diff