From ec3784d62646c8f765310d564a3fc898d9945088 Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Mon, 7 Jun 2021 16:34:47 +0200 Subject: arm: mvebu: turris_mox: add support for board rescue mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Pali Rohár Reviewed-by: Stefan Roese --- include/configs/turris_mox.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') 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 +#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 */ -- cgit From 8805647ed0f8c50bc47de4da04e85a62deea20ff Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Mon, 7 Jun 2021 16:34:49 +0200 Subject: arm: mvebu: configs: turris_mox: add fdtfile default env variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add default fdtfile environment variable with value marvell/armada-3720-turris-mox.dtb. This can be useful for some boot scenarios. Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Stefan Roese --- include/configs/turris_mox.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index b148b1621a..9c021a1ef9 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -89,6 +89,7 @@ "fdt_addr_r=0x4f00000\0" \ "kernel_addr_r=0x5000000\0" \ "ramdisk_addr_r=0x8000000\0" \ + "fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "bootcmd_rescue=" TURRIS_MOX_BOOTCMD_RESCUE "\0" \ BOOTENV -- cgit From c64e2bd55883ede3dc29421f1f297d741ae5b137 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 8 Jun 2021 12:00:35 +0200 Subject: arm64: mvebu: correct Armada 8K addresses 0x04000000- 0x06000000 is reserved memory. We cannot load to anything here. Signed-off-by: Heinrich Schuchardt Reviewed-by: Stefan Roese --- include/configs/mvebu_armada-8k.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h index 38f50468c5..493e3de9b9 100644 --- a/include/configs/mvebu_armada-8k.h +++ b/include/configs/mvebu_armada-8k.h @@ -91,11 +91,11 @@ #include #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" \ + "scriptaddr=0x6d00000\0" \ + "pxefile_addr_r=0x6e00000\0" \ + "fdt_addr_r=0x6f00000\0" \ + "kernel_addr_r=0x7000000\0" \ + "ramdisk_addr_r=0xa000000\0" \ "fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ BOOTENV -- cgit