asus-p024: new device (MR 2976)

[ci:skip-build] Already built fine on CI in MR
This commit is contained in:
user 2022-03-03 21:20:27 +05:00 committed by Dylan Van Assche
parent 096cd05d1c
commit 1e530ec655
No known key found for this signature in database
GPG key ID: 8642571587897EA1
9 changed files with 3918 additions and 0 deletions

View file

@ -0,0 +1,35 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-asus-p024
pkgdesc="ASUS ZenPad 8.0"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-asus-p024
mesa-dri-gallium
mkbootimg
postmarketos-base
msm-fb-refresher
"
makedepends="devicepkg-dev"
source="
deviceinfo
brightness
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm755 "$srcdir"/brightness "$pkgdir"/etc/local.d/brightness.start
}
sha512sums="
efedbf63729981da4ed75477be062ce9f2fe77eb0ed1f8586cc8abf093fabad5a1f962c37eee125237e3706a3f9b643b079c843aaba4efbd02b35e26edb54246 deviceinfo
857eef36b14b009915001d9ada91d2762588ecd5122b9c8e7238244e9e94fbdacc13bab867862b81eb64767efb1ca3e12949e94a364979745ac61a54957b2872 brightness
"

View file

@ -0,0 +1,2 @@
#!/bin/bash
echo 255 > /sys/class/leds/lcd-backlight/brightness

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="ASUS ZenPad 8.0"
deviceinfo_manufacturer="ASUS"
deviceinfo_codename="asus-p024"
deviceinfo_year="2015"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="800"
deviceinfo_screen_height="1280"
deviceinfo_dev_touchscreen="/dev/input/event1"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 androidboot.selinux=enforcing buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,69 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/P024_defconfig
pkgname=linux-asus-p024
pkgver=3.10.49
pkgrel=0
pkgdesc="ASUS ZenPad 8.0 kernel fork"
arch="armv7"
_carch="arm"
_flavor="asus-p024"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
dtbtool
flex
openssl-dev
perl
linux-headers
"
# Source
_repository="android_kernel_asus_P024"
_commit="99aa3ac76ea33164d500c8fa53125298680aec5e"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch
kernel-use-the-gnu89-standard-explicitly.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Master DTB (deviceinfo_bootimg_qcdt)
dtbTool -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot"/dt.img \
"$_outdir/arch/$_carch/boot/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
"$pkgdir"/boot/dt.img
}
sha512sums="
8534e6830defe27e75aa1b8c7a64e9aa78d8f331f914bd36d34123daeece28845228319c25f11f3527195b89281fe6474e44ffb123ce6d5158eeaaeff4d1f061 linux-asus-p024-99aa3ac76ea33164d500c8fa53125298680aec5e.tar.gz
acbd7a4e28e69fc6451184d53224adf3aab4318addb237b4b4669715927ea856a158b19f4ddfe93058228e2e20471ce639e5c00a6c3d0ab81333d7be22b5698f config-asus-p024.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch