U-boot script for RPI with boot partition of ext4 type
Antoni Jankowski
antoni.s.jankowski at gmail.com
Thu May 2 12:35:05 CEST 2024
Hi,
I'm working with a Raspberry Pi Compute Module 4 and RAUC update tool for
embedded linux.
The problem I'm struggling with is to update both the rootfs and the boot
partition. The approach I'm trying to apply is based on an architecture of
two boot partitions and two rootfs partitions.
The boot and rootfs partitions are supposed to get updated in pairs.
boot_A (/dev/mmcblk0p1)
boot_B (/dev/mmcblk0p2)
rootfs_A (/dev/mmcblk0p3)
rootfs_B (/dev/mmcblk0p4)
For RAUC to be able to write an update to a boot partition it has to be of
*ext4* type and this is the real problem. What should be the u-boot
*boot.scr* script to handle this?
I've read that *fatload* should be replaced with *ext4load* instruction,
however such a simple swap does not work well, the board does not boot at
all.
Are there any other steps I should take to make the board bootable with an
ext4 boot partition?
Below is the source of my original *boot.scr* script:
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
>
> setenv bootpart "/dev/mmcblk0p3"
> setenv raucslot "A"
> setenv bootargs "${bootargs} root=${bootpart} rauc.slot=${raucslot}"
> fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
> if test ! -e mmc 0:1 uboot.env; then saveenv; fi;
> @@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
>
Best regards,
Antoni
More information about the U-Boot
mailing list