mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
rpi-kernel: update to 6.1.69, adopt.
- add rpi5 support and optimised kernel - add support for BTRFS root - add /proc/config.gz by default
This commit is contained in:
parent
6d129b5ebf
commit
f7bef1aa89
5 changed files with 239 additions and 81 deletions
91
srcpkgs/rpi-kernel/patches/irqsoff-tracer.patch
Normal file
91
srcpkgs/rpi-kernel/patches/irqsoff-tracer.patch
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
From 342c7ee49e862edc30c893f141f55b9211b7a43b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yangyu Chen <cyy@cyyself.name>
|
||||||
|
Date: Mon, 18 Dec 2023 23:26:59 +0800
|
||||||
|
Subject: [PATCH] configs: rpi: Disable CONFIG_IRQSOFF_TRACER by default
|
||||||
|
|
||||||
|
This configuration hindered performance by ~74% measured from RPI 4B
|
||||||
|
from ~680Mbps to ~390Mbps when benchmarking wireguard locally using
|
||||||
|
netns and iperf3. Remove it by default for better performance.
|
||||||
|
|
||||||
|
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
|
||||||
|
---
|
||||||
|
arch/arm/configs/bcm2709_defconfig | 1 -
|
||||||
|
arch/arm/configs/bcm2711_defconfig | 1 -
|
||||||
|
arch/arm/configs/bcmrpi_defconfig | 1 -
|
||||||
|
arch/arm64/configs/bcm2711_defconfig | 1 -
|
||||||
|
arch/arm64/configs/bcm2712_defconfig | 1 -
|
||||||
|
arch/arm64/configs/bcmrpi3_defconfig | 1 -
|
||||||
|
6 files changed, 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig
|
||||||
|
index 980e70d0178fa..c8aa65e82d8bb 100644
|
||||||
|
--- a/arch/arm/configs/bcm2709_defconfig
|
||||||
|
+++ b/arch/arm/configs/bcm2709_defconfig
|
||||||
|
@@ -1586,7 +1586,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
||||||
|
diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig
|
||||||
|
index 806c6d81590a6..2578d23b1886e 100644
|
||||||
|
--- a/arch/arm/configs/bcm2711_defconfig
|
||||||
|
+++ b/arch/arm/configs/bcm2711_defconfig
|
||||||
|
@@ -1613,7 +1613,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
||||||
|
diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
|
||||||
|
index fad465fe4c70e..a2519b5abb6d6 100644
|
||||||
|
--- a/arch/arm/configs/bcmrpi_defconfig
|
||||||
|
+++ b/arch/arm/configs/bcmrpi_defconfig
|
||||||
|
@@ -1580,7 +1580,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
||||||
|
diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig
|
||||||
|
index 819c442e5acfe..afbd8ef3e8d3b 100644
|
||||||
|
--- a/arch/arm64/configs/bcm2711_defconfig
|
||||||
|
+++ b/arch/arm64/configs/bcm2711_defconfig
|
||||||
|
@@ -1675,7 +1675,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
||||||
|
diff --git a/arch/arm64/configs/bcm2712_defconfig b/arch/arm64/configs/bcm2712_defconfig
|
||||||
|
index 15a0aa6c77137..76effcbc199b5 100644
|
||||||
|
--- a/arch/arm64/configs/bcm2712_defconfig
|
||||||
|
+++ b/arch/arm64/configs/bcm2712_defconfig
|
||||||
|
@@ -1678,7 +1678,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
||||||
|
diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig
|
||||||
|
index d3d879d03ff45..6fca561ba4084 100644
|
||||||
|
--- a/arch/arm64/configs/bcmrpi3_defconfig
|
||||||
|
+++ b/arch/arm64/configs/bcmrpi3_defconfig
|
||||||
|
@@ -1561,7 +1561,6 @@ CONFIG_DETECT_HUNG_TASK=y
|
||||||
|
CONFIG_LATENCYTOP=y
|
||||||
|
CONFIG_FUNCTION_PROFILER=y
|
||||||
|
CONFIG_STACK_TRACER=y
|
||||||
|
-CONFIG_IRQSOFF_TRACER=y
|
||||||
|
CONFIG_SCHED_TRACER=y
|
||||||
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
# CONFIG_UPROBE_EVENTS is not set
|
|
@ -12,19 +12,21 @@
|
||||||
#
|
#
|
||||||
# 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.54
|
version=6.1.69
|
||||||
revision=1
|
revision=1
|
||||||
_githash=fad58933544bb2a7b7db92847c25c79a83171fa6
|
_githash=aabc6f6d0b13ac177f9b383e59a542ddb6c32e59
|
||||||
archs="armv6l* armv7l* aarch64*"
|
archs="armv6l* armv7l* aarch64*"
|
||||||
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)"
|
||||||
maintainer="Piraty <mail@piraty.dev>"
|
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=1bd02902fae49351fb16ac0d5ccc3bf4d67aa0640006dbbf8846963519b01ab8
|
checksum=31a39457e4f3075bf7a1113aae17f9a17241b425aa194639c886bc639cf1da5d
|
||||||
python_version=3
|
python_version=3
|
||||||
|
provides="rpi-kernel-${version}_${revision}"
|
||||||
|
replaces="rpi5-kernel>=0"
|
||||||
|
|
||||||
_kernver="${version}_${revision}"
|
_kernver="${version}_${revision}"
|
||||||
|
|
||||||
|
@ -51,28 +53,20 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
*) broken="No Raspberry Pi exists for this arch" ;;
|
*) broken="No Raspberry Pi exists for this arch" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
make_build_args=("-j$XBPS_MAKEJOBS" "ARCH=$_arch")
|
||||||
|
make_install_args=("-j$XBPS_MAKEJOBS" "ARCH=$_arch")
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
make_build_args+=("CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-")
|
||||||
else
|
|
||||||
_cross=
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_configure() {
|
_configure() {
|
||||||
local target defconfig
|
local target="$1" defconfig
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
# for zero, 1
|
|
||||||
armv6l*) target=bcmrpi_defconfig ;;
|
|
||||||
# for 2
|
|
||||||
armv7l*) target=bcm2709_defconfig ;;
|
|
||||||
# for 3, 4, zero 2
|
|
||||||
aarch64*) target=bcm2711_defconfig ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
defconfig="arch/${_arch}/configs/${target}"
|
defconfig="arch/${_arch}/configs/${target}"
|
||||||
cp "$defconfig" .config
|
cp "$defconfig" .config
|
||||||
|
|
||||||
cat <<-! > "foo"
|
cat <<-! > void.config
|
||||||
CONFIG_CONNECTOR=y
|
CONFIG_CONNECTOR=y
|
||||||
CONFIG_HID_STEAM=y
|
CONFIG_HID_STEAM=y
|
||||||
CONFIG_PROC_EVENTS=y
|
CONFIG_PROC_EVENTS=y
|
||||||
|
@ -113,15 +107,21 @@ do_configure() {
|
||||||
CONFIG_LZ4_COMPRESS=y
|
CONFIG_LZ4_COMPRESS=y
|
||||||
CONFIG_CRYPTO_RNG=y
|
CONFIG_CRYPTO_RNG=y
|
||||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||||
|
CONFIG_BTRFS_FS=y
|
||||||
|
CONFIG_BTRFS_POSIX_ACL=y
|
||||||
|
CONFIG_IKCONFIG=y
|
||||||
|
CONFIG_IKCONFIG_PROC=y
|
||||||
|
CONFIG_LEDS_TRIGGER_ACTIVITY=m
|
||||||
!
|
!
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
|
local option="" str="" cmd=""
|
||||||
# skip comments
|
# skip comments
|
||||||
case "$line" in
|
case "$line" in
|
||||||
"#"*) continue;;
|
"#"*) continue;;
|
||||||
esac
|
esac
|
||||||
local option=${line%%=*} str=
|
option="${line%%=*}"
|
||||||
local cmd="$(echo "$line" | cut -d= -f2)"
|
cmd="$(echo "$line" | cut -d= -f2)"
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
y) cmd="enable";;
|
y) cmd="enable";;
|
||||||
n) cmd="disable";;
|
n) cmd="disable";;
|
||||||
|
@ -135,31 +135,27 @@ do_configure() {
|
||||||
./scripts/config \
|
./scripts/config \
|
||||||
--file .config \
|
--file .config \
|
||||||
"--$cmd" "$option" "${str//\"/}"
|
"--$cmd" "$option" "${str//\"/}"
|
||||||
done < foo
|
done < void.config
|
||||||
|
|
||||||
make "${makejobs}" "${_cross}" ARCH="${_arch}" olddefconfig
|
make "${make_build_args[@]}" olddefconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
_install() {
|
||||||
make "${makejobs}" "${_cross}" ARCH="${_arch}" prepare
|
local _pkg="$1" _destdir="$2"
|
||||||
make "${makejobs}" "${_cross}" ARCH="${_arch}" "${_image_target}" modules dtbs
|
local hdrdest="usr/src/${_pkg}-headers-${_kernver}"
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
local hdrdest="${DESTDIR}/usr/src/${sourcepkg}-headers-${_kernver}"
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Install kernel, firmware and modules
|
# Install kernel, firmware and modules
|
||||||
make "${makejobs}" ARCH="${_arch}" INSTALL_MOD_PATH="${DESTDIR}" modules_install
|
make "${make_install_args[@]}" INSTALL_MOD_PATH="${_destdir}" modules_install
|
||||||
|
|
||||||
# Install device tree blobs
|
# Install device tree blobs
|
||||||
make "${makejobs}" "ARCH=${_arch}" INSTALL_DTBS_PATH="${DESTDIR}/boot" dtbs_install
|
make "${make_install_args[@]}" INSTALL_DTBS_PATH="${_destdir}/boot" dtbs_install
|
||||||
|
|
||||||
# move dtbs that ended up in /boot/broadcom
|
# move dtbs that ended up in /boot/broadcom
|
||||||
if [ -d "${DESTDIR}/boot/broadcom" ]; then
|
if [ -d "${_destdir}/boot/broadcom" ]; then
|
||||||
mv "${DESTDIR}"/boot/broadcom/*dtb "${DESTDIR}/boot"
|
mv "${_destdir}"/boot/broadcom/*dtb "${_destdir}/boot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install kernel image
|
# Install kernel image
|
||||||
|
@ -167,96 +163,118 @@ do_install() {
|
||||||
|
|
||||||
# Switch to /usr.
|
# Switch to /usr.
|
||||||
vmkdir usr
|
vmkdir usr
|
||||||
mv "${DESTDIR}/lib" "${DESTDIR}/usr"
|
mv "${_destdir}/lib" "${_destdir}/usr"
|
||||||
|
|
||||||
pushd "${DESTDIR}/usr/lib/modules/${_kernver}"
|
pushd "${_destdir}/usr/lib/modules/${_kernver}"
|
||||||
rm -f source build
|
rm -f source build
|
||||||
ln -sf "../../../src/${sourcepkg}-headers-${_kernver}" build
|
ln -sf "../../../src/${_pkg}-headers-${_kernver}" build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Install required headers to build external modules
|
# Install required headers to build external modules
|
||||||
install -Dm644 Makefile "${hdrdest}/Makefile"
|
vinstall Makefile 644 "${hdrdest}"
|
||||||
install -Dm644 Kbuild "${hdrdest}/Kbuild"
|
vinstall Kbuild 644 "${hdrdest}"
|
||||||
install -Dm644 kernel/Makefile "${hdrdest}/kernel/Makefile"
|
vinstall kernel/Makefile 644 "${hdrdest}/kernel"
|
||||||
install -Dm644 .config "${hdrdest}/.config"
|
vinstall .config 644 "${hdrdest}"
|
||||||
while read -r file; do
|
find . -name 'Kconfig*' | \
|
||||||
mkdir -p "${hdrdest}/$(dirname "$file")"
|
while read -r file; do
|
||||||
install -Dm644 "$file" "${hdrdest}/${file}"
|
vinstall "$file" 644 "${hdrdest}/$(dirname "$file")"
|
||||||
done < <(find . -name 'Kconfig*')
|
done
|
||||||
while read -r file; do
|
find "arch/${_arch}" scripts -name module.lds -o -name Kbuild.platforms -o -name Platform | \
|
||||||
mkdir -p "${hdrdest}/$(dirname $file)"
|
while read -r file; do
|
||||||
install -Dm644 "$file" "${hdrdest}/${file}"
|
vinstall "$file" 644 "${hdrdest}/$(dirname "$file")"
|
||||||
done < <(find "arch/${_arch}" scripts -name module.lds -o -name Kbuild.platforms -o -name Platform)
|
done
|
||||||
mkdir -p "${hdrdest}/include"
|
vmkdir "${hdrdest}/include"
|
||||||
|
|
||||||
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
||||||
rm -rf "${DESTDIR}/usr/lib/firmware"
|
rm -rf "${_destdir}/usr/lib/firmware"
|
||||||
|
|
||||||
for i in acpi asm-generic clocksource config crypto drm dt-bindings generated linux \
|
for d in acpi asm-generic clocksource config crypto drm dt-bindings generated linux \
|
||||||
math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
|
math-emu media net pcmcia scsi sound trace uapi vdso video xen; do
|
||||||
[ -d include/$i ] && cp -a "include/$i" "${hdrdest}/include"
|
[ -d include/$d ] && vcopy "include/$d" "${hdrdest}/include"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove helper binaries built for host,
|
# Remove helper binaries built for host,
|
||||||
# if generated files from the scripts/ directory need to be included,
|
# if generated files from the scripts/ directory need to be included,
|
||||||
# they need to be copied to ${hdrdest} before this step
|
# they need to be copied to ${hdrdest} before this step
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
make "${makejobs}" ARCH="${_arch}" _mrproper_scripts
|
make "${make_install_args[@]}" _mrproper_scripts
|
||||||
# remove host specific objects as well
|
# remove host specific objects as well
|
||||||
find scripts -name '*.o' -delete
|
find scripts -name '*.o' -delete
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy files necessary for later builds.
|
# Copy files necessary for later builds.
|
||||||
cp Module.symvers "${hdrdest}"
|
vinstall Module.symvers 644 "${hdrdest}"
|
||||||
cp -a scripts "${hdrdest}"
|
vcopy scripts "${hdrdest}"
|
||||||
mkdir -p "${hdrdest}/security/selinux"
|
vmkdir "${hdrdest}/security/selinux"
|
||||||
cp -a security/selinux/include "${hdrdest}/security/selinux"
|
vcopy security/selinux/include "${hdrdest}/security/selinux"
|
||||||
mkdir -p "${hdrdest}/tools/include"
|
vmkdir "${hdrdest}/tools/include"
|
||||||
cp -a tools/include/tools "${hdrdest}/tools/include"
|
vcopy tools/include/tools "${hdrdest}/tools/include"
|
||||||
if [ -d "arch/${_arch}/tools" ]; then
|
if [ -d "arch/${_arch}/tools" ]; then
|
||||||
cp -a "arch/${_arch}/tools" "${hdrdest}/arch/${_arch}"
|
vcopy "arch/${_arch}/tools" "${hdrdest}/arch/${_arch}"
|
||||||
fi
|
fi
|
||||||
cp -a kernel/time/timeconst.bc "${hdrdest}/kernel/time"
|
vinstall kernel/time/timeconst.bc 644 "${hdrdest}/kernel/time"
|
||||||
cp -a kernel/bounds.c "${hdrdest}/kernel"
|
vinstall kernel/bounds.c 644 "${hdrdest}/kernel"
|
||||||
mkdir -p "${hdrdest}/arch/x86/entry/syscalls"
|
vinstall arch/x86/entry/syscalls/syscall_32.tbl 644 "${hdrdest}/arch/x86/entry/syscalls"
|
||||||
cp -a arch/x86/entry/syscalls/syscall_32.tbl "${hdrdest}/arch/x86/entry/syscalls"
|
|
||||||
|
|
||||||
# copy arch includes for external modules
|
# copy arch includes for external modules
|
||||||
mkdir -p "${hdrdest}/arch/${_arch}"
|
vmkdir "${hdrdest}/arch/${_arch}"
|
||||||
cp -a "arch/${_arch}/include" "${hdrdest}/arch/${_arch}"
|
vcopy "arch/${_arch}/include" "${hdrdest}/arch/${_arch}"
|
||||||
|
|
||||||
mkdir -p "${hdrdest}/arch/${_arch}/kernel"
|
mkdir -p "${hdrdest}/arch/${_arch}/kernel"
|
||||||
cp "arch/${_arch}/Makefile" "${hdrdest}/arch/${_arch}"
|
vinstall "arch/${_arch}/Makefile" 644 "${hdrdest}/arch/${_arch}"
|
||||||
cp "arch/${_arch}/kernel/asm-offsets.s" "${hdrdest}/arch/${_arch}/kernel"
|
vinstall "arch/${_arch}/kernel/asm-offsets.s" 644 "${hdrdest}/arch/${_arch}/kernel"
|
||||||
if [ "$_arch" = "arm64" ] ; then
|
if [ "$_arch" = "arm64" ] ; then
|
||||||
cp -a "arch/${_arch}/kernel/vdso" "${hdrdest}/arch/${_arch}/kernel/"
|
vcopy "arch/${_arch}/kernel/vdso" "${hdrdest}/arch/${_arch}/kernel/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add md headers
|
# Add md headers
|
||||||
mkdir -p "${hdrdest}/drivers/md"
|
vmkdir "${hdrdest}/drivers/md"
|
||||||
cp drivers/md/*.h "${hdrdest}/drivers/md"
|
vcopy drivers/md/*.h "${hdrdest}/drivers/md"
|
||||||
|
|
||||||
# Add inotify.h
|
# Add inotify.h
|
||||||
mkdir -p "${hdrdest}/include/linux"
|
vinstall include/linux/inotify.h 644 "${hdrdest}/include/linux"
|
||||||
cp include/linux/inotify.h "${hdrdest}/include/linux"
|
|
||||||
|
|
||||||
# Add wireless headers
|
# Add wireless headers
|
||||||
mkdir -p "${hdrdest}/net/mac80211/"
|
vmkdir "${hdrdest}/net/mac80211/"
|
||||||
cp net/mac80211/*.h "${hdrdest}/net/mac80211"
|
vcopy net/mac80211/*.h "${hdrdest}/net/mac80211"
|
||||||
|
|
||||||
# Compress all modules with xz to save a few MBs.
|
# Compress all modules with xz to save a few MBs.
|
||||||
msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
|
msg_normal "$_pkg-$version: compressing kernel modules with gzip, please wait...\n"
|
||||||
find "${DESTDIR}" -name '*.ko' | xargs -n1 -P0 gzip -9
|
find "${_destdir}" -name '*.ko' | xargs -n1 -P0 gzip -9
|
||||||
|
|
||||||
# ... and run depmod again.
|
# ... and run depmod again.
|
||||||
depmod -b "${DESTDIR}/usr" -F System.map "${_kernver}"
|
depmod -b "${_destdir}/usr" -F System.map "${_kernver}"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
local target
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
# for zero, 1
|
||||||
|
armv6l*) target=bcmrpi_defconfig ;;
|
||||||
|
# for 2
|
||||||
|
armv7l*) target=bcm2709_defconfig ;;
|
||||||
|
# for 3, 4, zero 2, 5
|
||||||
|
aarch64*) target=bcm2711_defconfig ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_configure "$target"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
make "${make_build_args[@]}" prepare
|
||||||
|
make "${make_build_args[@]}" "${_image_target}" modules dtbs
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
_install "$pkgname" "$DESTDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
subpackages="rpi-kernel-headers"
|
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" ;;
|
aarch64*) subpackages+=" rpi3-kernel rpi3-kernel-headers rpi4-kernel rpi4-kernel-headers rpi5-kernel rpi5-kernel-headers" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
rpi-kernel-headers_package() {
|
rpi-kernel-headers_package() {
|
||||||
|
@ -264,9 +282,54 @@ rpi-kernel-headers_package() {
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
noshlibprovides=yes
|
noshlibprovides=yes
|
||||||
short_desc="${short_desc/kernel/kernel headers}"
|
short_desc="${short_desc/kernel/kernel headers}"
|
||||||
|
provides="rpi-kernel-headers-${version}_${revision}"
|
||||||
|
replaces="rpi5-kernel-headers>=0"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/src
|
vmove usr/src
|
||||||
vmove usr/lib/modules/${_kernver}/build
|
vmove "usr/lib/modules/${_kernver}/build"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_rpi5_short_desc="Linux kernel for Raspberry Pi 5 (${version%.*} series)"
|
||||||
|
|
||||||
|
rpi5-kernel_package() {
|
||||||
|
nodebug=yes
|
||||||
|
nostrip=yes
|
||||||
|
noverifyrdeps=yes
|
||||||
|
noshlibprovides=yes
|
||||||
|
python_version=3
|
||||||
|
triggers="kernel-hooks"
|
||||||
|
# These files could be modified when an external module is built.
|
||||||
|
mutable_files="
|
||||||
|
/usr/lib/modules/${_kernver}/modules.dep
|
||||||
|
/usr/lib/modules/${_kernver}/modules.dep.bin
|
||||||
|
/usr/lib/modules/${_kernver}/modules.symbols
|
||||||
|
/usr/lib/modules/${_kernver}/modules.symbols.bin
|
||||||
|
/usr/lib/modules/${_kernver}/modules.alias
|
||||||
|
/usr/lib/modules/${_kernver}/modules.alias.bin
|
||||||
|
/usr/lib/modules/${_kernver}/modules.devname"
|
||||||
|
short_desc="$_rpi5_short_desc"
|
||||||
|
provides="rpi-kernel-${version}_${revision}"
|
||||||
|
replaces="rpi-kernel>=0"
|
||||||
|
pkg_install() {
|
||||||
|
_configure "bcm2712_defconfig"
|
||||||
|
make "${make_build_args[@]}" prepare
|
||||||
|
make "${make_build_args[@]}" "${_image_target}" modules dtbs
|
||||||
|
_install "rpi5-kernel" "$PKGDESTDIR"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rpi5-kernel-headers_package() {
|
||||||
|
nostrip=yes
|
||||||
|
noverifyrdeps=yes
|
||||||
|
noshlibprovides=yes
|
||||||
|
short_desc="${_rpi5_short_desc/kernel/kernel headers}"
|
||||||
|
provides="rpi-kernel-headers-${version}_${revision}"
|
||||||
|
replaces="rpi-kernel-headers>=0"
|
||||||
|
pkg_install() {
|
||||||
|
mv "${PKGDESTDIR}/../rpi5-kernel-${version}/usr/src" "${PKGDESTDIR}"/usr/src
|
||||||
|
vmkdir "usr/lib/modules/${_kernver}"
|
||||||
|
mv "${PKGDESTDIR}/../rpi5-kernel-${version}/usr/lib/modules/${_kernver}/build" "${PKGDESTDIR}/usr/lib/modules/${_kernver}/build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
srcpkgs/rpi-kernel/update
Normal file
2
srcpkgs/rpi-kernel/update
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
site="https://github.com/raspberrypi/linux/commits/rpi-6.1.y/"
|
||||||
|
pattern=">Linux \K[\d.]+(?=</a>)"
|
1
srcpkgs/rpi5-kernel
Symbolic link
1
srcpkgs/rpi5-kernel
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
rpi-kernel
|
1
srcpkgs/rpi5-kernel-headers
Symbolic link
1
srcpkgs/rpi5-kernel-headers
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
rpi-kernel
|
Loading…
Add table
Reference in a new issue