-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u-boot-imx: Add resin envvars and checks
Changelog-entry: Add resin envvars and checks Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
layers/meta-balena-fsl-arm/recipes-bsp/u-boot/files/0003-add-imx8mm-resin-hooks.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; " \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters