diff options
author | Tom Rini <trini@konsulko.com> | 2018-10-10 13:35:17 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-10-10 13:35:17 -0400 |
commit | 3d5ced9e22d32112a20f9dc0f5fb1f22ef088079 (patch) | |
tree | 2c1e1f34c4dad05dfd08bd3687e6aee634c58500 /arch/sandbox/cpu/start.c | |
parent | 98068b3be51a77d8b931a2f5097b5c22c57bcea5 (diff) | |
parent | 41b781ddf1869f5349e05ace888979f3673fe8c6 (diff) |
Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dm
Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
Various dm-related improvements
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r-- | arch/sandbox/cpu/start.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 59c68a20c52..2ee3b485657 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -177,7 +177,7 @@ static int sandbox_cmdline_cb_memory(struct sandbox_state *state, err = os_read_ram_buf(arg); if (err) { - printf("Failed to read RAM buffer\n"); + printf("Failed to read RAM buffer '%s': %d\n", arg, err); return err; } @@ -273,6 +273,16 @@ static int sandbox_cmdline_cb_verbose(struct sandbox_state *state, } SANDBOX_CMDLINE_OPT_SHORT(verbose, 'v', 0, "Show test output"); +static int sandbox_cmdline_cb_log_level(struct sandbox_state *state, + const char *arg) +{ + state->default_log_level = simple_strtol(arg, NULL, 10); + + return 0; +} +SANDBOX_CMDLINE_OPT_SHORT(log_level, 'L', 1, + "Set log level (0=panic, 7=debug)"); + int board_run_command(const char *cmdline) { printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n"); @@ -304,15 +314,14 @@ int main(int argc, char *argv[]) if (ret) goto err; - /* Remove old memory file if required */ - if (state->ram_buf_rm && state->ram_buf_fname) - os_unlink(state->ram_buf_fname); - memset(&data, '\0', sizeof(data)); gd = &data; #if CONFIG_VAL(SYS_MALLOC_F_LEN) gd->malloc_base = CONFIG_MALLOC_F_ADDR; #endif +#if CONFIG_IS_ENABLED(LOG) + gd->default_log_level = state->default_log_level; +#endif setup_ram_buf(state); /* Do pre- and post-relocation init */ |