Skip to content

Commit

Permalink
u-boot-imx: Add resin envvars and checks
Browse files Browse the repository at this point in the history
Changelog-entry: Add resin envvars and checks
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
  • Loading branch information
ajlennon committed Nov 20, 2023
1 parent fb5c3a2 commit 09aa9ea
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--- git.org/include/configs/imx8mm_evk.h 2023-11-20 10:23:22.490132843 +0000
+++ git/include/configs/imx8mm_evk.h 2023-11-20 12:34:36.580202049 +0000
@@ -148,19 +148,21 @@
"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
"mmcautodetect=yes\0" \
- "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \
+ "mmcargs=setenv bootargs ${jh_clk} console=${console} ${resin_kernel_root} ${os_cmdline}\0 " \
"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bsp_script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}\0" \
+ "loadimage=if load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${loadaddr} boot/${image}; then run balena_kernel_load_crc_save; else false; fi;\0" \
+ "loadfdt=if load ${resin_dev_type} ${resin_dev_index}:${resin_root_part} ${fdt_addr} boot/${fdtfile}; then run balena_fdt_load_crc_save; else false; fi;\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
"bootm ${loadaddr}; " \
"else " \
"if run loadfdt; then " \
- "booti ${loadaddr} - ${fdt_addr_r}; " \
+ "run balena_kernel_load_crc_check;" \
+ "run balena_fdt_load_crc_check;" \
+ "booti ${loadaddr} - ${fdt_addr}; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
@@ -186,6 +188,7 @@
"fi; " \
"fi;\0" \
"bsp_bootcmd=echo Running BSP bootcmd ...; " \
+ "setenv resin_kernel_load_addr ${loadaddr}; run resin_set_kernel_root; run set_os_cmdline; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SRC_URI:append:imx8mm-lpddr4-evk = " \
file://0001-nitrogen8mm_env-common-Force-using-default-environment.patch \
file://0002-fix-return-vaue-propagatin-out-of-environ.patch \
file://0002-fixup-imx8mm-evk-fdt-addr.patch \
file://0003-add-imx8mm-resin-hooks.patch \
file://balenaos_tweaks-imx.cfg \
file://increase-early-malloc.cfg \
"

0 comments on commit 09aa9ea

Please sign in to comment.