qemu-riscv64_smode: Load custom envitonment if possible
authorŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 2 Aug 2023 13:08:30 +0000 (15:08 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 11:02:46 +0000 (20:02 +0900)
Check if loadbootenv and importbootenv environment variables are available
and use them to load additional environment variables.

Change-Id: I4e85a6a248cb6e1b5314771fda2e0f9df406417a
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
configs/qemu-riscv64_smode_defconfig

index 1d0f021..c6a20e1 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_RISCV_SMODE=y
 CONFIG_FIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr}; test -n \"${loadbootenv}\" -a -n \"${importbootenv}\" && run loadbootenv && run importbootenv;"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_SYS_CBSIZE=256