Skip to content

Commit

Permalink
rpi-u-boot-scr: Add crc32 checks for fdt
Browse files Browse the repository at this point in the history
... in the u-boot scripts. This depends on the
crc32 checks PR in meta-balena.

We only check that the kernel did not overlap
the fdt, because no other operation is performed
after unzipping the kernel image, apart from
booting.

Changelog-entry: rpi-u-boot-scr: Add crc32 checks for fdt
Signed-off-by: Alexandru Costache <alexandru@balena.io>
  • Loading branch information
acostach committed Aug 23, 2023
1 parent 347ea0c commit b804123
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
env set bootargs "${bootargs} ${resin_kernel_root} rootwait"
fdt rm /chosen bootargs
run balena_fdt_load_crc_save;
load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${resin_kernel_load_addr} /boot/@@KERNEL_IMAGETYPE@@
run balena_fdt_load_crc_check;
@@KERNEL_BOOTCMD@@ ${resin_kernel_load_addr} - ${fdt_addr}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
env set bootargs "${bootargs} ${resin_kernel_root} rootwait"
fdt rm /chosen bootargs
run balena_fdt_load_crc_save;
load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${resin_tmp_loadaddr} /boot/@@KERNEL_IMAGETYPE@@
unzip ${fileaddr} ${resin_kernel_load_addr}
run balena_fdt_load_crc_check;
@@KERNEL_BOOTCMD@@ ${resin_kernel_load_addr} - ${fdt_addr}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
env set bootargs "${bootargs} ${resin_kernel_root} rootwait"
fdt rm /chosen bootargs
run balena_fdt_load_crc_save;
load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${resin_tmp_loadaddr} /boot/@@KERNEL_IMAGETYPE@@
unzip ${fileaddr} ${resin_kernel_load_addr}
run balena_fdt_load_crc_check;
@@KERNEL_BOOTCMD@@ ${resin_kernel_load_addr} - ${fdt_addr}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
env set bootargs "${bootargs} ${resin_kernel_root} rootwait"
fdt rm /chosen bootargs
run balena_fdt_load_crc_save;
load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${resin_tmp_loadaddr} /boot/@@KERNEL_IMAGETYPE@@
unzip ${fileaddr} ${resin_kernel_load_addr}
run balena_fdt_load_crc_check;
@@KERNEL_BOOTCMD@@ ${resin_kernel_load_addr} - ${fdt_addr}

0 comments on commit b804123

Please sign in to comment.