Files
pmaports-rtwo/device/testing/device-asus-flo/APKBUILD
T
Eric Anderson e9aa99192e device-asus-flo: Use lk2nd
The generic kernels are too large to be booted by the stock bootloader,
as the boot partition is only 16 MiB. While this commit increases the
kernel size you can use today, the linux-postmarketos kernels are still
too big to boot from extlinux.conf until the [boot memory increase of
lk2nd][1] is released.

lk2nd also provides a better fastboot implementation which doesn't
fully-buffer the image to be written, and thus can write larger images
than the stock bootloader. Forcing fastboot mode requires [flo support
in lk2nd][2], which also requires a lk2nd release. Right now you'll only
get the better fastboot when lk2nd fails to find a kernel, which means a
dance like "use stock bootloader to wipe userdata, then start to lk2nd".

The reason to keep android image support is just for netbooting which
makes testing easier. But netbooting does _not_ work with lk2nd right
now as lk2nd has trouble finding the dtb for some reason; use the stock
boot loader when running "pmbootstrap flasher boot". Changing
flash_offset_ramdisk is to give more space for the kernel to decompress.

1. https://github.com/msm8916-mainline/lk2nd/pull/703
2. https://github.com/msm8916-mainline/lk2nd/pull/697

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9031>
2026-07-15 15:20:03 +00:00

87 lines
2.9 KiB
Bash

# Reference: <https://postmarketos.org/devicepkg>
maintainer="Eric Anderson <ejona86@gmail.com>"
pkgname=device-asus-flo
pkgver=11
pkgrel=0
pkgdesc="Google Nexus 7 2013 (flo)"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
depends="
firmware-asus-flo
lk2nd-msm8960
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
subpackages="
$pkgname-kernel-next:kernel_next
$pkgname-kernel-stable:kernel_stable
$pkgname-kernel-lts:kernel_lts
$pkgname-udev
"
# $pkgname-kernel-mainline-old:kernel_mainline_old
source="
90-android-touch-dev.rules
deviceinfo
kernel-cmdline-workaround.conf
kernel-cmdline.conf
pointercal
wpa_supplicant.conf
"
options="!check !archcheck"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -D -m644 "$srcdir"/wpa_supplicant.conf \
"$pkgdir"/etc/wpa_supplicant/wpa_supplicant.conf
# Feed the whacky bootloader that eats 26 characters.
# Must sort before 00-base.conf
install -D -m644 "$srcdir/kernel-cmdline-workaround.conf" \
"$pkgdir/usr/lib/kernel-cmdline.d/00-aaa-$pkgname-workaround.conf"
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
"$pkgdir"/usr/lib/udev/rules.d/90-android-touch-dev.rules
install -D -m644 "$srcdir"/pointercal \
"$pkgdir"/etc/pointercal
}
# Uncomment to use archived/linux-asus-flo, and add an entry to subpackages=
# kernel_mainline_old() {
# pkgdesc="Old 4.11 mainline kernel, GPU works somehow"
# depends="linux-asus-flo"
# devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
# }
kernel_next() {
pkgdesc="Unstable next kernel (linux-next)"
depends="linux-next"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_stable() {
pkgdesc="Stable kernel from Alpine Linux (linux-stable)"
depends="linux-stable"
provides="$pkgname-kernel-edge=$pkgver-r$pkgrel"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_lts() {
pkgdesc="Long term support (LTS) kernel from Alpine Linux (linux-lts)"
depends="linux-lts"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
sha512sums="
5ac89b627f52d2f1103c3329bd905cdbb906cae5bb332d52e6805d7971fbcc0faabe1fd9d2beb7c6de4e4487c05047eaa17852dbf9e114ee3c5d4b0d57d73859 90-android-touch-dev.rules
70d0fb5192772c597968e1609ccf86b0d5290fb27b40a5f6dbaa6481b26b3846fb682c4302748dc821f12c9e55d98d3a0dc170db703265dc0faae53f34179d35 deviceinfo
ebc11da9dbafca1b7052ff58d1782e9e48508e3f338656e817f42e6da40cbed198ee9ec3093909012733b82ca26b0f9b07e3f1aea63500a90855823aa31ee465 kernel-cmdline-workaround.conf
18f40d7308eb327de4b8ea5552fef3874e6f3f2e2da7dba4244e954ce866ed8658a6809177488aca6387149c0014782d5a10634881f72301fbefbe3743702faa kernel-cmdline.conf
cf913217b41a3dde8bc2a16a5bc82013c85679de0e81db1cfc36f2409ea034fec430082ddcb207c16746453601cf8381300b049cd2fb131f1916dc7dbcc247e3 pointercal
3278921cc1617d10fdd13dfbeaf213cda0078d069e727acd8cfac10bd8ade6f373be1e22fd1e4b50ae71cd2eae09f7d6aad5de42338d9ea9f8c1a34f0b60cb69 wpa_supplicant.conf
"