[PATCH 1/5] arm: mvebu: turris_omnia: Fix RESET button message

Signed-off-by: Pali Rohár pali@kernel.org --- board/CZ.NIC/turris_omnia/turris_omnia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 83cfc80d1930..97292456f148 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -488,7 +488,7 @@ static void handle_reset_button(void) /* Ensure bootcmd_rescue is used by distroboot */ env_set("boot_targets", "rescue");
- printf("RESET button was pressed, overwriting bootcmd!\n"); + printf("RESET button was pressed, overwriting boot_targets!\n"); } else { /* * In case the user somehow managed to save environment with

CONFIG_ETHPRIME defines primary ethernet device and env variable $ethact stores currently active ethernet device.
So there is no point to set ethact= in default environment. Instead set CONFIG_ETHPRIME properly.
Signed-off-by: Pali Rohár pali@kernel.org --- include/configs/turris_omnia.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index b35299b2fbb3..15f874ea22e1 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -26,6 +26,8 @@ "fdt_high=0x10000000\0" \ "initrd_high=0x10000000\0"
+#define CONFIG_ETHPRIME "ethernet@34000" + /* Defines for SPL */ #define CONFIG_SPL_SIZE (140 << 10) #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000)) @@ -119,7 +121,6 @@ LOAD_ADDRESS_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "console=ttyS0,115200\0" \ - "ethact=ethernet@34000\0" \ "bootcmd_rescue=" TURRIS_OMNIA_BOOTCMD_RESCUE "\0" \ BOOTENV

On Wed, 6 Apr 2022 11:39:33 +0200 Pali Rohár pali@kernel.org wrote:
CONFIG_ETHPRIME defines primary ethernet device and env variable $ethact stores currently active ethernet device.
So there is no point to set ethact= in default environment. Instead set CONFIG_ETHPRIME properly.
Signed-off-by: Pali Rohár pali@kernel.org
Reviewed-by: Marek Behún marek.behun@nic.cz

On 06.04.22 11:39, Pali Rohár wrote:
CONFIG_ETHPRIME defines primary ethernet device and env variable $ethact stores currently active ethernet device.
So there is no point to set ethact= in default environment. Instead set CONFIG_ETHPRIME properly.
Signed-off-by: Pali Rohár pali@kernel.org
include/configs/turris_omnia.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index b35299b2fbb3..15f874ea22e1 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -26,6 +26,8 @@ "fdt_high=0x10000000\0" \ "initrd_high=0x10000000\0"
+#define CONFIG_ETHPRIME "ethernet@34000"
This was moved to Kconfig in the meantime. I'll make the necessary myself, no need to resend.
Thanks, Stefan
/* Defines for SPL */ #define CONFIG_SPL_SIZE (140 << 10) #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000)) @@ -119,7 +121,6 @@ LOAD_ADDRESS_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "console=ttyS0,115200\0" \
- "ethact=ethernet@34000\0" \ "bootcmd_rescue=" TURRIS_OMNIA_BOOTCMD_RESCUE "\0" \ BOOTENV
Viele Grüße, Stefan Roese

On 06.04.22 11:39, Pali Rohár wrote:
CONFIG_ETHPRIME defines primary ethernet device and env variable $ethact stores currently active ethernet device.
So there is no point to set ethact= in default environment. Instead set CONFIG_ETHPRIME properly.
Signed-off-by: Pali Rohár pali@kernel.org
include/configs/turris_omnia.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index b35299b2fbb3..15f874ea22e1 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -26,6 +26,8 @@ "fdt_high=0x10000000\0" \ "initrd_high=0x10000000\0"
+#define CONFIG_ETHPRIME "ethernet@34000"
- /* Defines for SPL */ #define CONFIG_SPL_SIZE (140 << 10) #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000))
@@ -119,7 +121,6 @@ LOAD_ADDRESS_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "console=ttyS0,115200\0" \
- "ethact=ethernet@34000\0" \ "bootcmd_rescue=" TURRIS_OMNIA_BOOTCMD_RESCUE "\0" \ BOOTENV
Applied to u-boot-marvell/master
Thanks, Stefan

U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
Signed-off-by: Pali Rohár pali@kernel.org --- include/configs/turris_omnia.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 15f874ea22e1..25aa0d0f9075 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -54,28 +54,10 @@ /* Include the common distro boot environment */ #ifndef CONFIG_SPL_BUILD
-#ifdef CONFIG_MMC -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -#else -#define BOOT_TARGET_DEVICES_MMC(func) -#endif - -#ifdef CONFIG_USB_STORAGE -#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) -#else -#define BOOT_TARGET_DEVICES_USB(func) -#endif - -#ifdef CONFIG_SCSI -#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) -#else -#define BOOT_TARGET_DEVICES_SCSI(func) -#endif - #define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_DEVICES_MMC(func) \ - BOOT_TARGET_DEVICES_SCSI(func) \ - BOOT_TARGET_DEVICES_USB(func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \ + func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)

On Wed, 6 Apr 2022 11:39:34 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
This is not true. Attaching config where scsi is disabled.
If we want to enforce MMC, SCSI and USB, we should add select MMC and others to Kconfig under TURRIS_OMNIA. But do we want to enfore these?
Marek

On Wednesday 06 April 2022 21:31:18 Marek Behún wrote:
On Wed, 6 Apr 2022 11:39:34 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
This is not true. Attaching config where scsi is disabled.
If we want to enforce MMC, SCSI and USB, we should add select MMC and others to Kconfig under TURRIS_OMNIA. But do we want to enfore these?
Marek
IIRC macro BOOT_TARGET_DEVICES just defines default values for ENV. So in default ENV would be macros for booting from SCSI, MMC and USB targets. Which means that if you call saveenv on U-Boot compiled with all these options and then replace U-Boot with the one without e.g. MMC support, it does not replace env variables for MMC booting.
Anyway, does not defining e.g. SCSI booting env variables on U-Boot without SCSI support result in the same state as defining SCSI booting env variables on U-Boot with SCSI support with disconnected SCSI controllers or disks? In both cases there would be no SCSI suitable boot device.

On Friday 08 April 2022 11:00:24 Pali Rohár wrote:
On Wednesday 06 April 2022 21:31:18 Marek Behún wrote:
On Wed, 6 Apr 2022 11:39:34 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
This is not true. Attaching config where scsi is disabled.
If we want to enforce MMC, SCSI and USB, we should add select MMC and others to Kconfig under TURRIS_OMNIA. But do we want to enfore these?
Marek
IIRC macro BOOT_TARGET_DEVICES just defines default values for ENV. So in default ENV would be macros for booting from SCSI, MMC and USB targets. Which means that if you call saveenv on U-Boot compiled with all these options and then replace U-Boot with the one without e.g. MMC support, it does not replace env variables for MMC booting.
Anyway, does not defining e.g. SCSI booting env variables on U-Boot without SCSI support result in the same state as defining SCSI booting env variables on U-Boot with SCSI support with disconnected SCSI controllers or disks? In both cases there would be no SCSI suitable boot device.
So, any issues with it?

On Sun, 1 May 2022 16:52:31 +0200 Pali Rohár pali@kernel.org wrote:
On Friday 08 April 2022 11:00:24 Pali Rohár wrote:
On Wednesday 06 April 2022 21:31:18 Marek Behún wrote:
On Wed, 6 Apr 2022 11:39:34 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
This is not true. Attaching config where scsi is disabled.
If we want to enforce MMC, SCSI and USB, we should add select MMC and others to Kconfig under TURRIS_OMNIA. But do we want to enfore these?
Marek
IIRC macro BOOT_TARGET_DEVICES just defines default values for ENV. So in default ENV would be macros for booting from SCSI, MMC and USB targets. Which means that if you call saveenv on U-Boot compiled with all these options and then replace U-Boot with the one without e.g. MMC support, it does not replace env variables for MMC booting.
Anyway, does not defining e.g. SCSI booting env variables on U-Boot without SCSI support result in the same state as defining SCSI booting env variables on U-Boot with SCSI support with disconnected SCSI controllers or disks? In both cases there would be no SCSI suitable boot device.
So, any issues with it?
No. If this cannot cause compilation failures, then I am okay with it.

On 06.04.22 11:39, Pali Rohár wrote:
U-Boot for Turris Omnia is always compiled with MMC, SCSI and USB support, so always enable macros for booting from these devices.
Signed-off-by: Pali Rohár pali@kernel.org
include/configs/turris_omnia.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 15f874ea22e1..25aa0d0f9075 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -54,28 +54,10 @@ /* Include the common distro boot environment */ #ifndef CONFIG_SPL_BUILD
-#ifdef CONFIG_MMC -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -#else -#define BOOT_TARGET_DEVICES_MMC(func) -#endif
-#ifdef CONFIG_USB_STORAGE -#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) -#else -#define BOOT_TARGET_DEVICES_USB(func) -#endif
-#ifdef CONFIG_SCSI -#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) -#else -#define BOOT_TARGET_DEVICES_SCSI(func) -#endif
- #define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_DEVICES_MMC(func) \
- BOOT_TARGET_DEVICES_SCSI(func) \
- BOOT_TARGET_DEVICES_USB(func) \
- func(MMC, mmc, 0) \
- func(SCSI, scsi, 0) \
- func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Applied to u-boot-marvell/master
Thanks, Stefan

U-Boot for Turris Omnia has already enabled NVMe support. So add NVMe to boot targets.
Signed-off-by: Pali Rohár pali@kernel.org --- include/configs/turris_omnia.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 25aa0d0f9075..99e39531509f 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -56,6 +56,7 @@
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ + func(NVME, nvme, 0) \ func(SCSI, scsi, 0) \ func(USB, usb, 0) \ func(PXE, pxe, na) \

On Wed, 6 Apr 2022 11:39:35 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Omnia has already enabled NVMe support. So add NVMe to boot targets.
As in my previous message, an user may want to compile U-Boot without NVMe support. They can do this now with menuconfig. If NVME support is to be mandatory, it should be enforced in Kconfig.
But I don't think it should be mandatory.
Marek

On 06.04.22 11:39, Pali Rohár wrote:
U-Boot for Turris Omnia has already enabled NVMe support. So add NVMe to boot targets.
Signed-off-by: Pali Rohár pali@kernel.org
include/configs/turris_omnia.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 25aa0d0f9075..99e39531509f 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -56,6 +56,7 @@
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \
- func(NVME, nvme, 0) \ func(SCSI, scsi, 0) \ func(USB, usb, 0) \ func(PXE, pxe, na) \
Applied to u-boot-marvell/master
Thanks, Stefan

U-Boot for Turris Mox has already enabled NVMe and SCSI support. So add NVMe and SCSI to boot targets.
Signed-off-by: Pali Rohár pali@kernel.org --- include/configs/turris_mox.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 3cfad7cca985..69f295b5cefe 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -28,6 +28,8 @@
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ + func(NVME, nvme, 0) \ + func(SCSI, scsi, 0) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)

On Wed, 6 Apr 2022 11:39:36 +0200 Pali Rohár pali@kernel.org wrote:
U-Boot for Turris Mox has already enabled NVMe and SCSI support. So add NVMe and SCSI to boot targets.
Signed-off-by: Pali Rohár pali@kernel.org
And for MOX I am not sure whether NVME and SCSI can be disabled in menuconfig. Either we need to update the BOOT_TARET macro or enforce all of these (MMC, NVME, SCSI, USB, NET) in Kconfig.
Marek

On 06.04.22 11:39, Pali Rohár wrote:
U-Boot for Turris Mox has already enabled NVMe and SCSI support. So add NVMe and SCSI to boot targets.
Signed-off-by: Pali Rohár pali@kernel.org
include/configs/turris_mox.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 3cfad7cca985..69f295b5cefe 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -28,6 +28,8 @@
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \
- func(NVME, nvme, 0) \
- func(SCSI, scsi, 0) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Applied to u-boot-marvell/master
Thanks, Stefan

On Wed, 6 Apr 2022 11:39:32 +0200 Pali Rohár pali@kernel.org wrote:
Signed-off-by: Pali Rohár pali@kernel.org
nitpick: if you don't have anything to say in commit message, don't leave it empty. At least copy the commit title.
Reviewed-by: Marek Behún marek.behun@nic.cz

On 06.04.22 11:39, Pali Rohár wrote:
Signed-off-by: Pali Rohár pali@kernel.org
board/CZ.NIC/turris_omnia/turris_omnia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 83cfc80d1930..97292456f148 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -488,7 +488,7 @@ static void handle_reset_button(void) /* Ensure bootcmd_rescue is used by distroboot */ env_set("boot_targets", "rescue");
printf("RESET button was pressed, overwriting bootcmd!\n");
} else { /*printf("RESET button was pressed, overwriting boot_targets!\n");
- In case the user somehow managed to save environment with
Applied to u-boot-marvell/master
Thanks, Stefan
participants (3)
-
Marek Behún
-
Pali Rohár
-
Stefan Roese