rpi-kernel: update to 6.6.31.

This commit is contained in:
classabbyamp 2024-06-01 04:15:35 -04:00 committed by classabbyamp
parent 34cbbd9317
commit ead5773368

View file

@ -1,9 +1,9 @@
# Template file for 'rpi-kernel' # Template file for 'rpi-kernel'
# #
# We track the latest Raspberry Pi LTS kernel as that is what is used in the # We track the latest Raspberry Pi LTS kernel as that is what is used in the
# official Raspberry Pi OS distribution. This is currently 6.1: # official Raspberry Pi OS distribution. This is currently 6.6:
# #
# https://forums.raspberrypi.com/viewtopic.php?t=344246 # https://forums.raspberrypi.com/viewtopic.php?t=361116
# #
# Commit hash is picked from latest tag [1], if appropriate, or from latest # Commit hash is picked from latest tag [1], if appropriate, or from latest
# "Merge remote-tracking branch 'stable/linux-6.x.y' into rpi-6.x.y" commit. # "Merge remote-tracking branch 'stable/linux-6.x.y' into rpi-6.x.y" commit.
@ -12,10 +12,11 @@
# #
# Upstream documentation: https://www.raspberrypi.com/documentation/computers/linux_kernel.html # Upstream documentation: https://www.raspberrypi.com/documentation/computers/linux_kernel.html
pkgname=rpi-kernel pkgname=rpi-kernel
version=6.1.77 version=6.6.31
revision=1 revision=1
_githash=fdd0eca49f6d09d4520d9d9827abfef1c605ce74 _githash=1ac74d2f9773922731a11bc329ae2710fce172d4
archs="armv6l* armv7l* aarch64*" archs="armv6l* armv7l* aarch64*"
build_wrksrc="build-rpi"
hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex xz" hostmakedepends="perl kmod uboot-mkimage openssl-devel bc bison flex xz"
makedepends="ncurses-devel" makedepends="ncurses-devel"
short_desc="Linux kernel for Raspberry Pi (${version%.*} series)" short_desc="Linux kernel for Raspberry Pi (${version%.*} series)"
@ -23,7 +24,7 @@ maintainer="classabbyamp <void@placeviolette.net>"
license="GPL-2.0-only" license="GPL-2.0-only"
homepage="http://www.kernel.org" homepage="http://www.kernel.org"
distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz" distfiles="https://github.com/raspberrypi/linux/archive/${_githash}.tar.gz"
checksum=611dd843760ea80753ed8c67e665dbe923827e79a381c27c353d33b1da52e211 checksum=961ce72e339ca024c6dd1ae57c0dfc25ab1f39eee9699813a535f138b31d670c
python_version=3 python_version=3
provides="rpi-kernel-${version}_${revision}" provides="rpi-kernel-${version}_${revision}"
replaces="rpi5-kernel>=0" replaces="rpi5-kernel>=0"
@ -35,6 +36,15 @@ nostrip=yes
noverifyrdeps=yes noverifyrdeps=yes
noshlibprovides=yes noshlibprovides=yes
build_options="rpi5"
desc_option_rpi5="build large page-size rpi5-kernel"
if [[ "$XBPS_TARGET_MACHINE" = aarch64* ]]; then
build_options_default+=" rpi5"
elif [ "$build_option_rpi5" ]; then
broken="rpi5 build option only works on aarch64*"
fi
triggers="kernel-hooks" triggers="kernel-hooks"
# These files could be modified when an external module is built. # These files could be modified when an external module is built.
mutable_files=" mutable_files="
@ -58,11 +68,22 @@ make_install_args=("-j$XBPS_MAKEJOBS" "ARCH=$_arch")
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
make_build_args+=("CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-") make_build_args+=("CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-")
make_install_args+=("CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-")
fi fi
post_extract() {
mkdir build-rpi
mv * build-rpi || true
if [ "$build_option_rpi5" ]; then
cp -a build-rpi build-rpi5
fi
}
_configure() { _configure() {
local target="$1" defconfig local target="$1" defconfig
msg_normal "configuring for ${target} in ${PWD##*/}\n"
defconfig="arch/${_arch}/configs/${target}" defconfig="arch/${_arch}/configs/${target}"
cp "$defconfig" .config cp "$defconfig" .config
@ -113,6 +134,7 @@ _configure() {
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LEDS_TRIGGER_ACTIVITY=m CONFIG_LEDS_TRIGGER_ACTIVITY=m
CONFIG_MACVTAP=m CONFIG_MACVTAP=m
CONFIG_IPV6=y
! !
while read -r line; do while read -r line; do
@ -141,10 +163,18 @@ _configure() {
make "${make_build_args[@]}" olddefconfig make "${make_build_args[@]}" olddefconfig
} }
_build() {
msg_normal "building in ${PWD##*/}\n"
make "${make_build_args[@]}" prepare
make "${make_build_args[@]}" "${_image_target}" modules dtbs
}
_install() { _install() {
local _pkg="$1" _destdir="$2" local _pkg="$1" _destdir="$2"
local hdrdest="usr/src/${_pkg}-headers-${_kernver}" local hdrdest="usr/src/${_pkg}-headers-${_kernver}"
msg_normal "installing ${_pkg} from ${PWD##*/} into ${_destdir}\n"
# Run depmod after compressing modules. # Run depmod after compressing modules.
vsed -i -e '2iexit 0' scripts/depmod.sh vsed -i -e '2iexit 0' scripts/depmod.sh
@ -260,11 +290,20 @@ do_configure() {
esac esac
_configure "$target" _configure "$target"
if [ "$build_option_rpi5" ]; then
cd "$wrksrc"/build-rpi5
_configure "bcm2712_defconfig"
fi
} }
do_build() { do_build() {
make "${make_build_args[@]}" prepare _build
make "${make_build_args[@]}" "${_image_target}" modules dtbs
if [ "$build_option_rpi5" ]; then
cd "$wrksrc"/build-rpi5
_build
fi
} }
do_install() { do_install() {
@ -275,9 +314,13 @@ subpackages="rpi-kernel-headers"
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
armv7l*) subpackages+=" rpi2-kernel rpi2-kernel-headers" ;; armv7l*) subpackages+=" rpi2-kernel rpi2-kernel-headers" ;;
aarch64*) subpackages+=" rpi3-kernel rpi3-kernel-headers rpi4-kernel rpi4-kernel-headers rpi5-kernel rpi5-kernel-headers" ;; aarch64*) subpackages+=" rpi3-kernel rpi3-kernel-headers rpi4-kernel rpi4-kernel-headers" ;;
esac esac
if [ "$build_option_rpi5" ]; then
subpackages+=" rpi5-kernel rpi5-kernel-headers"
fi
rpi-kernel-headers_package() { rpi-kernel-headers_package() {
nostrip=yes nostrip=yes
noverifyrdeps=yes noverifyrdeps=yes
@ -313,9 +356,7 @@ rpi5-kernel_package() {
provides="rpi-kernel-${version}_${revision}" provides="rpi-kernel-${version}_${revision}"
replaces="rpi-kernel>=0" replaces="rpi-kernel>=0"
pkg_install() { pkg_install() {
_configure "bcm2712_defconfig" cd "$wrksrc"/build-rpi5
make "${make_build_args[@]}" prepare
make "${make_build_args[@]}" "${_image_target}" modules dtbs
_install "rpi5-kernel" "$PKGDESTDIR" _install "rpi5-kernel" "$PKGDESTDIR"
} }
} }