mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
board: sl28: support dynamic prompts
Depending on the boot source, set different CLI prompts. This will help the user to figure out in which mode the bootloader was started. There are two special modes: failsafe and SDHC boot. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
9f46117123
commit
865176417a
2 changed files with 21 additions and 0 deletions
|
@ -126,8 +126,28 @@ static void stop_recovery_watchdog(void)
|
||||||
wdt_stop(dev);
|
wdt_stop(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sl28_set_prompt(void)
|
||||||
|
{
|
||||||
|
enum boot_source src = sl28_boot_source();
|
||||||
|
|
||||||
|
switch (src) {
|
||||||
|
case BOOT_SOURCE_SPI:
|
||||||
|
env_set("PS1", "[FAILSAFE] => ");
|
||||||
|
break;
|
||||||
|
case BOOT_SOURCE_SDHC:
|
||||||
|
env_set("PS1", "[SDHC] => ");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
env_set("PS1", NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int fsl_board_late_init(void)
|
int fsl_board_late_init(void)
|
||||||
{
|
{
|
||||||
|
if (IS_ENABLED(CONFIG_CMDLINE_PS_SUPPORT))
|
||||||
|
sl28_set_prompt();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Usually, the after a board reset, the watchdog is enabled by
|
* Usually, the after a board reset, the watchdog is enabled by
|
||||||
* default. This is to supervise the bootloader boot-up. Therefore,
|
* default. This is to supervise the bootloader boot-up. Therefore,
|
||||||
|
|
|
@ -55,6 +55,7 @@ CONFIG_SPL_SPI_LOAD=y
|
||||||
CONFIG_SYS_CBSIZE=256
|
CONFIG_SYS_CBSIZE=256
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_SYS_BOOTM_LEN=0x800000
|
CONFIG_SYS_BOOTM_LEN=0x800000
|
||||||
|
CONFIG_CMDLINE_PS_SUPPORT=y
|
||||||
CONFIG_CMD_ASKENV=y
|
CONFIG_CMD_ASKENV=y
|
||||||
CONFIG_CMD_GREPENV=y
|
CONFIG_CMD_GREPENV=y
|
||||||
CONFIG_CMD_NVEDIT_EFI=y
|
CONFIG_CMD_NVEDIT_EFI=y
|
||||||
|
|
Loading…
Add table
Reference in a new issue