pmaports/device/linux-purism-librem5dev/APKBUILD
Bhushan Shah e9f8f27b51 linux-purism-librem5dev: Disable CONFIG_FW_LOADER_USER_HELPER (!237)
When working on Librem5 devkit we had issue with touchscreen driver not
probing fast enough and taking ~70 seconds to finish initialization.

Touchscreen driver for the Librem5 devkit uses goodix driver, roughly
speaking device initialization is done in following sequence,

- start kernel and load driver
- attempt to request firmware
- if no firmware is found use defaults value
- initialize touchscreen

Now, on Librem 5 no firmware is provided (of course!) which makes 2nd
step 4 step process,

- attempt to load firmware at initramfs level
- fail, wait for it userspace to finish loading
- userspace attempts to load firmware
- fail and tell kernel to stop looking for firmware.

Step 2 to 4 is done after udev is loaded in userspace, which easily
takes 40-50 seconds. Since Purism Librem 5 devkit is never going to have
userspace level firmware, it is safe bet to disable this altogether.

[skip ci] tested locally and this is going to take more then hour on CI
and fail
2019-02-25 20:29:00 +00:00

76 lines
2.2 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/librem5-evk_defconfig
pkgname="linux-purism-librem5dev"
pkgver=4.18.11
pkgrel=2
pkgdesc="Purism Librem 5 devkit kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="purism-librem5dev"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps !pmb:kconfigcheck"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
devicepkg-dev bison flex openssl-dev"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="linux-emcraft"
_commit="bcc9a4658624009ce94abeb19b1be07b55d6da21"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://source.puri.sm/Librem5/${_repository}/-/archive/${_commit}.tar.gz
$_config
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
REPLACE_GCCH=0 \
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
cd "$builddir"
local _install
case "$CARCH" in
aarch64*|arm*) _install="modules_install dtbs_install" ;;
*) _install="modules_install" ;;
esac
make -j1 $_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
}
sha512sums="51fd07402e63ce7538e65c01deba51faaf60cbb853d0af2d362aceb710e608d0cdee4b53524d32b4217b7da7cc827270c427207e7bd34b8b5f87b43791aa81db linux-purism-librem5dev-bcc9a4658624009ce94abeb19b1be07b55d6da21.tar.gz
b5d9f27826355814479cad9673452bc648733b3779c2856eed7d60127c8cd83cdf3c23ad2fab6c81a1adf05ef2d14dac36250053cfa2e730659059e5bdb7c093 config-purism-librem5dev.aarch64"