diff mbox series

[15/18] warp7: Make load command an environment variable

Message ID 1522419526-29494-16-git-send-email-bryan.odonoghue@linaro.org
State New
Headers show
Series warp7: Enable automated OPTEE/HAB boot flow | expand

Commit Message

Bryan O'Donoghue March 30, 2018, 2:18 p.m. UTC
This patch replaces the current "fatload" command with an environment
variable. Making the load command into an environment variable means we can
change filesystem type in boot.scr and reuse existing commands within that
boot script.

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

Comments

Fabio Estevam March 30, 2018, 3:05 p.m. UTC | #1
Hi Bryan,

On Fri, Mar 30, 2018 at 11:18 AM, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
> This patch replaces the current "fatload" command with an environment
> variable. Making the load command into an environment variable means we can
> change filesystem type in boot.scr and reuse existing commands within that
> boot script.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@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 c957b2d..712850e 100644
> --- a/include/configs/warp7.h
> +++ b/include/configs/warp7.h
> @@ -51,12 +51,13 @@
>         "mmcargs=setenv bootargs console=${console},${baudrate} " \
>                 "root=PARTUUID=${uuid} rootwait rw\0" \
>         "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
> +       "loadcmd=fatload\0" \
>         "loadbootscript=" \
> -               "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
> +               "${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${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} ${fdt_file}\0" \
> +       "loadimage=${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
> +       "loadfdt=${loadcmd} mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
>         "mmcboot=echo Booting from mmc ...; " \

This will conflict with Pierre-Jean's recent patch series that makes
use of the generic load command:

https://lists.denx.de/pipermail/u-boot/2018-March/324065.html

and

https://lists.denx.de/pipermail/u-boot/2018-March/324066.html

Would his approach work for you?
Bryan O'Donoghue March 30, 2018, 4:11 p.m. UTC | #2
On 30/03/18 16:05, Fabio Estevam wrote:

> This will conflict with Pierre-Jean's recent patch series that makes
> use of the generic load command:
> 
> https://lists.denx.de/pipermail/u-boot/2018-March/324065.html
> 
> and
> 
> https://lists.denx.de/pipermail/u-boot/2018-March/324066.html
> 
> Would his approach work for you?

If it does I'll redo my patchset on top of that and give a RB-tag on the 
series.

Thanks for point this out

---
bod
diff mbox series

Patch

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index c957b2d..712850e 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -51,12 +51,13 @@ 
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
+	"loadcmd=fatload\0" \
 	"loadbootscript=" \
-		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+		"${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${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} ${fdt_file}\0" \
+	"loadimage=${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+	"loadfdt=${loadcmd} mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run finduuid; " \
 		"run mmcargs; " \