Hi Bryan,

Le 08/05/2019 à 20:14, Bryan O'Donoghue a écrit :
Reusing the loadaddr to load the boot script breaks some of the logic we
want to have around the bootscript/FIT load addresses. Making a dedicated
bootscript address allows us to differentiate the bootscript load address
from the Linux Kernel or OPTEE load address, thus ensuring that no matter
what the load sequence the bootscript and Kernel/OPTEE binary load
addresses do not conflict.

Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org>
---
  include/configs/warp7.h | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 95955fd626..0c63050833 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -50,6 +50,7 @@
        "script=boot.scr\0" \
        "bootscr_fitimage_name=bootscr\0" \
        "script_signed=boot.scr.imx-signed\0" \
+       "bootscriptaddr=0x83200000\0" \
        "image=zImage\0" \
        "console=ttymxc0\0" \
        "ethact=usb_ether\0" \
@@ -70,16 +71,16 @@
        "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 
0;\0" \
        "do_bootscript_hab=" \
                "if test ${hab_enabled} -eq 1; then " \
-                       "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \
+                       "setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; 
" \
                        "setenv script ${script_signed}; " \
                        "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; 
" \
                        "run warp7_auth_or_fail; " \
                        "run bootscript; "\
                "fi;\0" \
        "loadbootscript=" \
-               "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+               "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
-               "source\0" \
+               BOOT_SCR_STRING \
        "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
        "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
        "mmcboot=echo Booting from mmc ...; " \

Instead of implementing a new variable (bootscriptaddr), I think (IMHO) it's time to migrate

to distroboot for the WaRP7 (like pico imx7 for instance).


In fact, in this specific case, this allows to use the common scriptaddr[1] variable. FYI, this is a task I am currently working on [2] (work in progress). Maybe we could integrate this migration into this series ?

[1] http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro;h=ab6e6f4e74be1407001add427fcabab6253a81fc;hb=HEAD#l256 [2] https://github.com/texierp/u-boot/commit/a141f9bfe379bad8ae6864aa25b51f35d2cfd9fd


Thanks!


BR

Pierre-Jean

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to