diff --git a/device/raspberry/rpi5/mkosi.conf b/device/raspberry/rpi5/mkosi.conf index ad1c21a..f9f8987 100644 --- a/device/raspberry/rpi5/mkosi.conf +++ b/device/raspberry/rpi5/mkosi.conf @@ -6,6 +6,7 @@ Architecture=arm64 [Output] Format=disk CompressOutput=xz +ImageId=rosapi # RPI firmware does not support # 4k sectors SectorSize=512 diff --git a/device/raspberry/rpi5/mkosi.extra/boot/cmdline.txt b/device/raspberry/rpi5/mkosi.extra/boot/firmware/cmdline.txt similarity index 100% rename from device/raspberry/rpi5/mkosi.extra/boot/cmdline.txt rename to device/raspberry/rpi5/mkosi.extra/boot/firmware/cmdline.txt diff --git a/device/raspberry/rpi5/mkosi.extra/boot/config.txt b/device/raspberry/rpi5/mkosi.extra/boot/firmware/config.txt similarity index 100% rename from device/raspberry/rpi5/mkosi.extra/boot/config.txt rename to device/raspberry/rpi5/mkosi.extra/boot/firmware/config.txt diff --git a/device/raspberry/rpi5/mkosi.postinst.d/10-boot.sh b/device/raspberry/rpi5/mkosi.postinst.d/10-boot.sh index 72d1e3e..1ccdfde 100755 --- a/device/raspberry/rpi5/mkosi.postinst.d/10-boot.sh +++ b/device/raspberry/rpi5/mkosi.postinst.d/10-boot.sh @@ -1,4 +1,9 @@ #!/bin/bash +set -x +set -e +BOOTDIR=${BUILDROOT}/boot/firmware +ls -la ${BOOTDIR} +mkdir -p ${BOOTDIR} # Find vmlinuz and initrd files in the /boot directory vmlinuz_file=$(find ${BUILDROOT}/boot -name 'vmlinuz-*' -type f | head -n 1) initrd_file=$(find ${BUILDROOT}/boot -name 'initrd-*.img' -type f | head -n 1) @@ -13,10 +18,15 @@ fi kernel_name=$(basename "$vmlinuz_file") initrd_name=$(basename "$initrd_file") -# Append the required lines to /boot/config.txt +printf "move kernel, initrd and dtb files to /boot/firmware/" +mv ${vmlinuz_file} ${BOOTDIR} +mv ${initrd_file} ${BOOTDIR} +mv ${BUILDROOT}/boot/dtb-*/broadcom/bcm*.dtb ${BOOTDIR} + +# Append the required lines to /boot/firmware/config.txt# { printf "kernel=%s\n" "$kernel_name" printf "initramfs %s followkernel\n" "$initrd_name" -} >> ${BUILDROOT}/boot/config.txt + } >> ${BOOTDIR}/config.txt -printf "The kernel and initrd entries have been added to /boot/config.txt.\n" +printf "The kernel and initrd entries have been added to /boot/firmware/config.txt.\n" diff --git a/device/raspberry/rpi5/mkosi.repart/00-boot.conf b/device/raspberry/rpi5/mkosi.repart/00-boot.conf index 9daddcc..291457d 100644 --- a/device/raspberry/rpi5/mkosi.repart/00-boot.conf +++ b/device/raspberry/rpi5/mkosi.repart/00-boot.conf @@ -2,6 +2,6 @@ Type=esp Label=bootfs Format=vfat -CopyFiles=/boot/:/ +CopyFiles=/boot/firmware:/firmware SizeMinBytes=256M SizeMaxBytes=256M