Skip to content

Commit 098f4c4

Browse files
authored
Merge pull request #3765 from cmitu/bookworm
helpers: add support for the Bookworm Linux kernel header packages
2 parents edf23d7 + 3807ed4 commit 098f4c4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scriptmodules/helpers.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,19 @@ function _mapPackage() {
248248
# handle our custom package alias LINUX-HEADERS
249249
LINUX-HEADERS)
250250
if isPlatform "rpi"; then
251-
pkg="raspberrypi-kernel-headers"
251+
if [[ "$__os_debian_ver" -lt 12 ]]; then
252+
pkg="raspberrypi-kernel-headers"
253+
else
254+
# on RaspiOS bookworm and later, kernel packages are separated by arch and model
255+
isPlatform "rpi0" || isPlatform "rpi1" && pkg="linux-headers-rpi-v6"
256+
if isPlatform "32bit"; then
257+
isPlatform "rpi2" || isPlatform "rpi3" && pkg="linux-headers-rpi-v7"
258+
isPlatform "rpi4" && pkg="linux-headers-rpi-v7l"
259+
else
260+
isPlatform "rpi3" || isPlatform "rpi4" && pkg="linux-headers-rpi-v8"
261+
isPlatform "rpi5" && pkg="linux-headers-rpi-2712"
262+
fi
263+
fi
252264
elif [[ -z "$__os_ubuntu_ver" ]]; then
253265
pkg="linux-headers-$(uname -r)"
254266
else

0 commit comments

Comments
 (0)