diff options
author | Marek Behún <marek.behun@nic.cz> | 2021-06-07 16:34:47 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-06-10 07:18:06 +0200 |
commit | ec3784d62646c8f765310d564a3fc898d9945088 (patch) | |
tree | 81a74b3a2534590e6b4dc914b126c45b7e03262f /include | |
parent | e04bf43681c205d73a50eb0cfa13d20667d7666e (diff) | |
download | u-boot-ec3784d62646c8f765310d564a3fc898d9945088.tar.gz u-boot-ec3784d62646c8f765310d564a3fc898d9945088.tar.xz u-boot-ec3784d62646c8f765310d564a3fc898d9945088.zip |
arm: mvebu: turris_mox: add support for board rescue mode
Add necessary config options and board code to support board factory
reset / rescue mode on Turris MOX.
In order to also support invoking rescue mode from U-Boot console,
without having to press the factory reset button, put the rescue command
into `bootcmd_rescue` default environment variable. When factory reset
button is pressed, invoke rescue mode via distroboot by setting
`boot_targets` to `rescue`.
Rescue boot from console can be invoked by running
run bootcmd_rescue
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/turris_mox.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 51445ec60a..b148b1621a 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -75,12 +75,21 @@ #include <config_distro_bootcmd.h> +#define TURRIS_MOX_BOOTCMD_RESCUE \ + "setenv bootargs \"console=ttyMV0,115200 " \ + "earlycon=ar3700_uart,0xd0012000\" && " \ + "sf probe && " \ + "sf read 0x5000000 0x190000 && " \ + "lzmadec 0x5000000 0x5800000 && " \ + "bootm 0x5800000" + #define CONFIG_EXTRA_ENV_SETTINGS \ "scriptaddr=0x4d00000\0" \ "pxefile_addr_r=0x4e00000\0" \ "fdt_addr_r=0x4f00000\0" \ "kernel_addr_r=0x5000000\0" \ "ramdisk_addr_r=0x8000000\0" \ + "bootcmd_rescue=" TURRIS_MOX_BOOTCMD_RESCUE "\0" \ BOOTENV #endif /* _CONFIG_TURRIS_MOX_H */ |