2020-04-07 17:56:30 +00:00
|
|
|
# Maintainer: Martijn Braam <martijn@brixit.nl>
|
|
|
|
|
2020-08-28 13:50:27 +00:00
|
|
|
# This is seperate from linux-edge so we can control the release cycle better.
|
2021-04-18 21:56:40 +00:00
|
|
|
# If this kernel is updated and fails to boot it's quite hard to recover the
|
2020-08-28 13:50:27 +00:00
|
|
|
# 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
|
|
|
|
|
2020-04-07 17:56:30 +00:00
|
|
|
pkgname=linux-postmarketos-rockchip
|
2022-05-29 22:34:17 +00:00
|
|
|
pkgver=5.18
|
2022-06-09 23:38:22 +00:00
|
|
|
pkgrel=3
|
2020-08-28 13:50:27 +00:00
|
|
|
pkgdesc="Mainline kernel for rockchip devices"
|
2021-07-23 15:37:08 +00:00
|
|
|
arch="aarch64 armv7"
|
2020-08-28 13:50:27 +00:00
|
|
|
_flavor="${pkgname#linux-}"
|
2020-04-07 17:56:30 +00:00
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL-2.0-only"
|
2021-07-01 22:55:21 +00:00
|
|
|
options="!strip !check !tracedeps
|
|
|
|
pmb:cross-native
|
|
|
|
pmb:kconfigcheck-anbox
|
|
|
|
pmb:kconfigcheck-nftables
|
|
|
|
pmb:kconfigcheck-containers
|
|
|
|
pmb:kconfigcheck-zram
|
|
|
|
"
|
2020-08-28 13:50:27 +00:00
|
|
|
makedepends="
|
|
|
|
bison
|
|
|
|
devicepkg-dev
|
|
|
|
findutils
|
|
|
|
flex
|
|
|
|
installkernel
|
|
|
|
openssl-dev
|
|
|
|
perl
|
|
|
|
rsync
|
2021-07-01 22:55:21 +00:00
|
|
|
gzip
|
2020-08-28 13:50:27 +00:00
|
|
|
xz
|
2021-07-23 15:37:08 +00:00
|
|
|
gmp-dev
|
|
|
|
mpc1-dev
|
|
|
|
mpfr-dev
|
2020-08-28 13:50:27 +00:00
|
|
|
"
|
2020-04-07 17:56:30 +00:00
|
|
|
|
2021-07-23 15:37:08 +00:00
|
|
|
case "$CARCH" in
|
|
|
|
aarch64*) _carch="arm64" ;;
|
|
|
|
arm*) _carch="arm" ;;
|
|
|
|
esac
|
|
|
|
|
2020-04-07 17:56:30 +00:00
|
|
|
# Source
|
2021-07-23 15:37:08 +00:00
|
|
|
_config="config-$_flavor.$CARCH"
|
2020-08-28 13:50:27 +00:00
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.0};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
2021-07-01 22:55:21 +00:00
|
|
|
|
2020-04-07 17:56:30 +00:00
|
|
|
source="
|
2020-08-28 13:50:27 +00:00
|
|
|
https://cdn.kernel.org/pub/linux/kernel/v${_kernver%%.*}.x/linux-$_kernver.tar.xz
|
2021-07-23 15:37:08 +00:00
|
|
|
0007-block-partitions-efi-Add-support-for-IGNOREME-GPT-si.patch
|
2021-12-17 15:31:23 +00:00
|
|
|
|
2021-07-23 15:37:08 +00:00
|
|
|
config-$_flavor.aarch64
|
|
|
|
config-$_flavor.armv7
|
2020-04-07 17:56:30 +00:00
|
|
|
"
|
2020-08-28 13:50:27 +00:00
|
|
|
builddir="$srcdir/linux-$_kernver"
|
2020-04-07 17:56:30 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
|
|
|
REPLACE_GCCH=0 \
|
|
|
|
. downstreamkernel_prepare
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
2021-07-21 18:06:40 +00:00
|
|
|
make ARCH="$_carch" \
|
2020-08-28 13:50:27 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
2021-07-01 22:55:21 +00:00
|
|
|
|
2020-04-07 17:56:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
|
|
|
|
|
|
|
make -j1 modules_install dtbs_install \
|
|
|
|
ARCH="$_carch" \
|
2020-08-28 13:50:27 +00:00
|
|
|
INSTALL_MOD_STRIP=1 \
|
2020-04-07 17:56:30 +00:00
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
2020-08-28 13:50:27 +00:00
|
|
|
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs-$_flavor"
|
2021-07-23 15:37:08 +00:00
|
|
|
|
|
|
|
# not all armv7 devices (google-veyon-jerry) support booting gzipped kernels yet
|
|
|
|
if [ $_carch = arm64 ]; then
|
2021-08-25 19:35:59 +00:00
|
|
|
gzip -v "$pkgdir"/boot/vmlinuz
|
|
|
|
mv "$pkgdir"/boot/vmlinuz.gz "$pkgdir"/boot/vmlinuz
|
2021-07-23 15:37:08 +00:00
|
|
|
else
|
2021-08-25 19:35:59 +00:00
|
|
|
mv "$pkgdir"/boot/vmlinuz "$pkgdir"/boot/vmlinuz
|
2021-07-23 15:37:08 +00:00
|
|
|
fi
|
2020-04-07 17:56:30 +00:00
|
|
|
}
|
|
|
|
|
2020-08-28 13:50:27 +00:00
|
|
|
|
2021-07-01 22:55:21 +00:00
|
|
|
sha512sums="
|
2022-05-29 22:34:17 +00:00
|
|
|
dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5 linux-5.18.tar.xz
|
2022-02-09 17:45:25 +00:00
|
|
|
265b05bc542edb290ec15cd5f50132698a32e80d30ce28ce3ad7e990b7c07df92c4556122505b07a6aa582a919459872d1d874f4ed422d2aff2cdfb51889e720 0007-block-partitions-efi-Add-support-for-IGNOREME-GPT-si.patch
|
2022-06-09 23:38:22 +00:00
|
|
|
babc357811cab42a0c2ea7d7187aa5d1603be6dea012423b3afde9318f2d797b2e1ba7650aef9c64f2a3ca1396cf713da2639cecee38ccfaacbb2e28c5856524 config-postmarketos-rockchip.aarch64
|
2022-06-02 19:52:56 +00:00
|
|
|
4eb095196a5e8e8e42de6d3e362c99498d1c7601c7ce91ea532abe9288e2e71ef20549dec22825ff547129c7c615a6a837e39dc64e9260ccadaf5c6bcf52bf58 config-postmarketos-rockchip.armv7
|
2021-07-01 22:55:21 +00:00
|
|
|
"
|