101 lines
2.7 KiB
Text
101 lines
2.7 KiB
Text
# Maintainer: Martijn Braam <martijn@brixit.nl>
|
|
|
|
# This is seperate from linux-edge so we can control the release cycle better.
|
|
# If this kernel is updated and fails to boot it's quite hard to recover the
|
|
# rk3399 devices due to the boot order. This kernel also has a kconfig that has
|
|
# more modules built-in that are required for successfully booting on these
|
|
# devices.
|
|
|
|
# It's important that CONFIG_ROCKCHIP_CDN_DP is _disabled_ because it causes
|
|
# boot failure
|
|
|
|
pkgname=linux-postmarketos-rockchip
|
|
pkgver=5.18
|
|
pkgrel=3
|
|
pkgdesc="Mainline kernel for rockchip devices"
|
|
arch="aarch64 armv7"
|
|
_flavor="${pkgname#linux-}"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps
|
|
pmb:cross-native
|
|
pmb:kconfigcheck-anbox
|
|
pmb:kconfigcheck-nftables
|
|
pmb:kconfigcheck-containers
|
|
pmb:kconfigcheck-zram
|
|
"
|
|
makedepends="
|
|
bison
|
|
devicepkg-dev
|
|
findutils
|
|
flex
|
|
installkernel
|
|
openssl-dev
|
|
perl
|
|
rsync
|
|
gzip
|
|
xz
|
|
gmp-dev
|
|
mpc1-dev
|
|
mpfr-dev
|
|
"
|
|
|
|
case "$CARCH" in
|
|
aarch64*) _carch="arm64" ;;
|
|
arm*) _carch="arm" ;;
|
|
esac
|
|
|
|
# Source
|
|
_config="config-$_flavor.$CARCH"
|
|
case $pkgver in
|
|
*.*.*) _kernver=${pkgver%.0};;
|
|
*.*) _kernver=$pkgver;;
|
|
esac
|
|
|
|
source="
|
|
https://cdn.kernel.org/pub/linux/kernel/v${_kernver%%.*}.x/linux-$_kernver.tar.xz
|
|
0007-block-partitions-efi-Add-support-for-IGNOREME-GPT-si.patch
|
|
|
|
config-$_flavor.aarch64
|
|
config-$_flavor.armv7
|
|
"
|
|
builddir="$srcdir/linux-$_kernver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
REPLACE_GCCH=0 \
|
|
. downstreamkernel_prepare
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
|
|
|
}
|
|
|
|
package() {
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
|
|
|
make -j1 modules_install dtbs_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_MOD_STRIP=1 \
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs-$_flavor"
|
|
|
|
# not all armv7 devices (google-veyon-jerry) support booting gzipped kernels yet
|
|
if [ $_carch = arm64 ]; then
|
|
gzip -v "$pkgdir"/boot/vmlinuz
|
|
mv "$pkgdir"/boot/vmlinuz.gz "$pkgdir"/boot/vmlinuz
|
|
else
|
|
mv "$pkgdir"/boot/vmlinuz "$pkgdir"/boot/vmlinuz
|
|
fi
|
|
}
|
|
|
|
|
|
sha512sums="
|
|
dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5 linux-5.18.tar.xz
|
|
265b05bc542edb290ec15cd5f50132698a32e80d30ce28ce3ad7e990b7c07df92c4556122505b07a6aa582a919459872d1d874f4ed422d2aff2cdfb51889e720 0007-block-partitions-efi-Add-support-for-IGNOREME-GPT-si.patch
|
|
babc357811cab42a0c2ea7d7187aa5d1603be6dea012423b3afde9318f2d797b2e1ba7650aef9c64f2a3ca1396cf713da2639cecee38ccfaacbb2e28c5856524 config-postmarketos-rockchip.aarch64
|
|
4eb095196a5e8e8e42de6d3e362c99498d1c7601c7ce91ea532abe9288e2e71ef20549dec22825ff547129c7c615a6a837e39dc64e9260ccadaf5c6bcf52bf58 config-postmarketos-rockchip.armv7
|
|
"
|