From 132ce6a1a53c527520052cb619d28ae3fb756a64 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sat, 20 Jul 2024 18:04:55 +0200 Subject: [PATCH] Deploy and clean rpi-resizerootfs hook and script. Another way could be to install the Raspberry Pi kernel first, compare the contents of the initramfses for the Debian and the Raspberry Pi kernels, and fix the missing files in the latter. Duplicating hook and script seems a little more straightforward. --- raspberrypi/recipes/pi5.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/raspberrypi/recipes/pi5.sh b/raspberrypi/recipes/pi5.sh index ac2a9e5..d606cb9 100644 --- a/raspberrypi/recipes/pi5.sh +++ b/raspberrypi/recipes/pi5.sh @@ -41,6 +41,15 @@ toast_me() { # below will take care of it. sed '/^#CMA=/a CMA=0' -i $MNT/etc/default/raspi-firmware + # Make sure the resize happens during the first boot: the image-specs build + # deletes the hooks after deploying them in the initramfs (for the Debian + # kernel), and we need them back to include everything we need for the new + # initramfs (for the Raspberry Pi kernel). + install -m 755 -o root -g root files/rpi-resizerootfs.hook \ + $MNT/etc/initramfs-tools/hooks/rpi-resizerootfs + install -m 755 -o root -g root files/rpi-resizerootfs.script \ + $MNT/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs + # Configure Raspberry Pi repository cat > $MNT/etc/apt/sources.list.d/raspberrypi.list <