[PATCH v1 0/2] mem_test: Support to save mtest result in environment

1. Set mtest_result in environment after doing mtest in u-boot so that user can check the result in user space. 2. Revise CONFIG_ENV_SIZE and Add CONFIG_USE_PREBOOT
DelphineCCChiu (2): mem_test: Support to save mtest result in environment configs: openbmc: Revise size of environment and use preboot
cmd/mem.c | 8 ++++++++ configs/ast2600_openbmc_spl_defconfig | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-)

Set mtest_result in environment after doing mtest in u-boot so that user can check the result in user space.
Signed-off-by: DelphineCCChiu delphine_cc_chiu@wiwynn.com --- cmd/mem.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/cmd/mem.c b/cmd/mem.c index 392ed1756b..bb6a3d2e60 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -21,6 +21,7 @@ #include <watchdog.h> #include <asm/io.h> #include <linux/compiler.h> +#include <environment.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -943,6 +944,13 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, ret = errs != 0; }
+ if (errs == 0) + env_set("memtest_result", "pass"); + else + env_set("memtest_result", "fail"); + + env_save(); + return ret; } #endif /* CONFIG_CMD_MEMTEST */

Revise CONFIG_ENV_SIZE and Add CONFIG_USE_PREBOOT
Signed-off-by: DelphineCCChiu delphine_cc_chiu@wiwynn.com --- configs/ast2600_openbmc_spl_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/ast2600_openbmc_spl_defconfig b/configs/ast2600_openbmc_spl_defconfig index efd683570f..f930108e1c 100644 --- a/configs/ast2600_openbmc_spl_defconfig +++ b/configs/ast2600_openbmc_spl_defconfig @@ -14,7 +14,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y -CONFIG_ENV_SIZE=0x10000 +CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0xE0000 CONFIG_SPL=y CONFIG_SPL_STACK_R_ADDR=0x90300000 @@ -58,7 +58,6 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_XIMG is not set CONFIG_CMD_MEMTEST=y -CONFIG_SYS_ALT_MEMTEST=y CONFIG_CMD_CLK=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y @@ -140,3 +139,5 @@ CONFIG_SPL_TINY_MEMSET=y CONFIG_TPM=y CONFIG_SPL_TPM=y # CONFIG_EFI_LOADER is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT=""
participants (1)
-
DelphineCCChiu