* [PATCH] starfive: visionfive2: switch to standard boot
@ 2024-02-21 12:00 Nam Cao
2024-03-12 6:31 ` Leo Liang
2024-03-13 18:42 ` Milan P. Stanić
0 siblings, 2 replies; 6+ messages in thread
From: Nam Cao @ 2024-02-21 12:00 UTC (permalink / raw)
To: ycliang, yanhong.wang, chanho61.park, wiagn233, namcao, sjg,
inindev, rick, mps, bmeng, u-boot
Distro boot scripts are deprecated. Use standard boot instead.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
configs/starfive_visionfive2_defconfig | 2 +-
include/configs/starfive-visionfive2.h | 14 +-------------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig
index b11be7ac86..aec751f871 100644
--- a/configs/starfive_visionfive2_defconfig
+++ b/configs/starfive_visionfive2_defconfig
@@ -31,8 +31,8 @@ CONFIG_RISCV_SMODE=y
# CONFIG_OF_BOARD_FIXUP is not set
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_FIT=y
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_SYS_BOOTM_LEN=0x4000000
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTSTAGE=y
CONFIG_QSPI_BOOT=y
CONFIG_SD_BOOT=y
diff --git a/include/configs/starfive-visionfive2.h b/include/configs/starfive-visionfive2.h
index 29c74470c7..049b0a0630 100644
--- a/include/configs/starfive-visionfive2.h
+++ b/include/configs/starfive-visionfive2.h
@@ -15,17 +15,6 @@
#define __io
-/* Environment options */
-
-#define BOOT_TARGET_DEVICES(func) \
- func(NVME, nvme, 0) \
- func(USB, usb, 0) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(DHCP, dhcp, na)
-
-#include <config_distro_bootcmd.h>
-
#define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985"
#define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172"
#define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
@@ -48,7 +37,6 @@
"type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \
"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
"partitions=" PARTS_DEFAULT "\0" \
- "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
- BOOTENV
+ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
#endif /* _STARFIVE_VISIONFIVE2_H */
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] starfive: visionfive2: switch to standard boot
2024-02-21 12:00 [PATCH] starfive: visionfive2: switch to standard boot Nam Cao
@ 2024-03-12 6:31 ` Leo Liang
2024-03-13 18:42 ` Milan P. Stanić
1 sibling, 0 replies; 6+ messages in thread
From: Leo Liang @ 2024-03-12 6:31 UTC (permalink / raw)
To: Nam Cao
Cc: yanhong.wang, chanho61.park, wiagn233, sjg, inindev, rick, mps,
bmeng, u-boot
On Wed, Feb 21, 2024 at 01:00:14PM +0100, Nam Cao wrote:
> Distro boot scripts are deprecated. Use standard boot instead.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> configs/starfive_visionfive2_defconfig | 2 +-
> include/configs/starfive-visionfive2.h | 14 +-------------
> 2 files changed, 2 insertions(+), 14 deletions(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] starfive: visionfive2: switch to standard boot
2024-02-21 12:00 [PATCH] starfive: visionfive2: switch to standard boot Nam Cao
2024-03-12 6:31 ` Leo Liang
@ 2024-03-13 18:42 ` Milan P. Stanić
2024-03-14 12:04 ` Nam Cao
1 sibling, 1 reply; 6+ messages in thread
From: Milan P. Stanić @ 2024-03-13 18:42 UTC (permalink / raw)
To: Nam Cao
Cc: ycliang, yanhong.wang, chanho61.park, wiagn233, sjg, inindev,
rick, bmeng, u-boot
On Wed, 2024-02-21 at 13:00, Nam Cao wrote:
> Distro boot scripts are deprecated. Use standard boot instead.
I had to enable 'CONFIG_CMD_SYSBOOT=y' in
configs/starfive_visionfive2_defconfig because it doesn't boot without
it. With this option it boots fine with this patch.
Tested on u-boot version 2024.04-rc4-dirty
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
> ---
> configs/starfive_visionfive2_defconfig | 2 +-
> include/configs/starfive-visionfive2.h | 14 +-------------
> 2 files changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig
> index b11be7ac86..aec751f871 100644
> --- a/configs/starfive_visionfive2_defconfig
> +++ b/configs/starfive_visionfive2_defconfig
> @@ -31,8 +31,8 @@ CONFIG_RISCV_SMODE=y
> # CONFIG_OF_BOARD_FIXUP is not set
> # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> CONFIG_FIT=y
> +CONFIG_BOOTSTD_DEFAULTS=y
> CONFIG_SYS_BOOTM_LEN=0x4000000
> -CONFIG_DISTRO_DEFAULTS=y
> CONFIG_BOOTSTAGE=y
> CONFIG_QSPI_BOOT=y
> CONFIG_SD_BOOT=y
> diff --git a/include/configs/starfive-visionfive2.h b/include/configs/starfive-visionfive2.h
> index 29c74470c7..049b0a0630 100644
> --- a/include/configs/starfive-visionfive2.h
> +++ b/include/configs/starfive-visionfive2.h
> @@ -15,17 +15,6 @@
>
> #define __io
>
> -/* Environment options */
> -
> -#define BOOT_TARGET_DEVICES(func) \
> - func(NVME, nvme, 0) \
> - func(USB, usb, 0) \
> - func(MMC, mmc, 0) \
> - func(MMC, mmc, 1) \
> - func(DHCP, dhcp, na)
> -
> -#include <config_distro_bootcmd.h>
> -
> #define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985"
> #define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172"
> #define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
> @@ -48,7 +37,6 @@
> "type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \
> "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
> "partitions=" PARTS_DEFAULT "\0" \
> - "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
> - BOOTENV
> + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
>
> #endif /* _STARFIVE_VISIONFIVE2_H */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] starfive: visionfive2: switch to standard boot
2024-03-13 18:42 ` Milan P. Stanić
@ 2024-03-14 12:04 ` Nam Cao
2024-03-18 20:34 ` Milan P. Stanić
0 siblings, 1 reply; 6+ messages in thread
From: Nam Cao @ 2024-03-14 12:04 UTC (permalink / raw)
To: Milan P. Stanić
Cc: ycliang, yanhong.wang, chanho61.park, wiagn233, sjg, inindev,
rick, bmeng, u-boot, minda.chen
On 13/Mar/2024 Milan P. Stanić wrote:
> On Wed, 2024-02-21 at 13:00, Nam Cao wrote:
> > Distro boot scripts are deprecated. Use standard boot instead.
> I had to enable 'CONFIG_CMD_SYSBOOT=y' in
> configs/starfive_visionfive2_defconfig because it doesn't boot without
> it. With this option it boots fine with this patch.
You should not have to do that for it to work, otherwise this patch
introduced a bug.
CONFIG_CMD_SYSBOOT adds the "sysboot" command, which is only used by
distroboot. So I suspect that you were actually still using distro boot,
because you didn't "update" your environment variable (that can be checked
with "printenv bootcmd"). For this patch to work, the environment variables
also need to be updated with:
env default
env save -a
This makes me realize that the patch breaks boards if the users forget to
update the environment variables. I am not sure if this is considered a
bug. What do maintainers think?
Best regards,
Nam
> Tested on u-boot version 2024.04-rc4-dirty
>
> > Signed-off-by: Nam Cao <namcao@linutronix.de>
> > Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
> Tested-by: Milan P. Stanić <mps@arvanta.net>
>
> > ---
> > configs/starfive_visionfive2_defconfig | 2 +-
> > include/configs/starfive-visionfive2.h | 14 +-------------
> > 2 files changed, 2 insertions(+), 14 deletions(-)
> >
> > diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig
> > index b11be7ac86..aec751f871 100644
> > --- a/configs/starfive_visionfive2_defconfig
> > +++ b/configs/starfive_visionfive2_defconfig
> > @@ -31,8 +31,8 @@ CONFIG_RISCV_SMODE=y
> > # CONFIG_OF_BOARD_FIXUP is not set
> > # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> > CONFIG_FIT=y
> > +CONFIG_BOOTSTD_DEFAULTS=y
> > CONFIG_SYS_BOOTM_LEN=0x4000000
> > -CONFIG_DISTRO_DEFAULTS=y
> > CONFIG_BOOTSTAGE=y
> > CONFIG_QSPI_BOOT=y
> > CONFIG_SD_BOOT=y
> > diff --git a/include/configs/starfive-visionfive2.h b/include/configs/starfive-visionfive2.h
> > index 29c74470c7..049b0a0630 100644
> > --- a/include/configs/starfive-visionfive2.h
> > +++ b/include/configs/starfive-visionfive2.h
> > @@ -15,17 +15,6 @@
> >
> > #define __io
> >
> > -/* Environment options */
> > -
> > -#define BOOT_TARGET_DEVICES(func) \
> > - func(NVME, nvme, 0) \
> > - func(USB, usb, 0) \
> > - func(MMC, mmc, 0) \
> > - func(MMC, mmc, 1) \
> > - func(DHCP, dhcp, na)
> > -
> > -#include <config_distro_bootcmd.h>
> > -
> > #define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985"
> > #define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172"
> > #define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
> > @@ -48,7 +37,6 @@
> > "type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \
> > "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
> > "partitions=" PARTS_DEFAULT "\0" \
> > - "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
> > - BOOTENV
> > + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
> >
> > #endif /* _STARFIVE_VISIONFIVE2_H */
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] starfive: visionfive2: switch to standard boot
2024-03-14 12:04 ` Nam Cao
@ 2024-03-18 20:34 ` Milan P. Stanić
2024-03-28 5:02 ` E Shattow
0 siblings, 1 reply; 6+ messages in thread
From: Milan P. Stanić @ 2024-03-18 20:34 UTC (permalink / raw)
To: Nam Cao
Cc: ycliang, yanhong.wang, chanho61.park, wiagn233, sjg, inindev,
rick, bmeng, u-boot, minda.chen
On Thu, 2024-03-14 at 13:04, Nam Cao wrote:
> On 13/Mar/2024 Milan P. Stanić wrote:
> > On Wed, 2024-02-21 at 13:00, Nam Cao wrote:
> > > Distro boot scripts are deprecated. Use standard boot instead.
> > I had to enable 'CONFIG_CMD_SYSBOOT=y' in
> > configs/starfive_visionfive2_defconfig because it doesn't boot without
> > it. With this option it boots fine with this patch.
>
> You should not have to do that for it to work, otherwise this patch
> introduced a bug.
>
> CONFIG_CMD_SYSBOOT adds the "sysboot" command, which is only used by
> distroboot. So I suspect that you were actually still using distro boot,
> because you didn't "update" your environment variable (that can be checked
> with "printenv bootcmd"). For this patch to work, the environment variables
> also need to be updated with:
> env default
> env save -a
>
> This makes me realize that the patch breaks boards if the users forget to
> update the environment variables. I am not sure if this is considered a
> bug. What do maintainers think?
Rebuild it again and it worked out of the box.
Tested-by: Milan P. Stanić <mps@arvanta.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] starfive: visionfive2: switch to standard boot
2024-03-18 20:34 ` Milan P. Stanić
@ 2024-03-28 5:02 ` E Shattow
0 siblings, 0 replies; 6+ messages in thread
From: E Shattow @ 2024-03-28 5:02 UTC (permalink / raw)
To: u-boot
Cc: Nam Cao, Milan P. Stanić, ycliang, yanhong.wang,
chanho61.park, wiagn233, sjg, inindev, rick, bmeng, minda.chen
Hi, does this standard boot no longer try to boot from the configured
EFI list? I have a boot listing (for Debian's grub EFI loader)
configured with u-boot eficonfig but it does not seem to be attempting
EFI boot anymore, there is a message about card select error but I
think that must be trying the eMMC (mmc 1) and not the SD Card (mmc
0).
StarFive # mmc list
mmc@16010000: 0 (SD)
mmc@16020000: 1
StarFive # help bootflow
bootflow - Boot flows
Usage:
bootflow scan - boot first available bootflow
StarFive # bootflow scan
Card did not respond to voltage select! : -110
No working controllers found
ethernet@16030000 Waiting for PHY auto negotiation to complete....... done
BOOTP broadcast 1
StarFive # bootefi bootmgr
Card did not respond to voltage select! : -110
Booting: Debian bootloader GRUB
error: no suitable video mode found.
" GNU GRUB version 2.12-1+b1"...
The documentation for bootflow command seems to have a lot more
options than what I'm seeing now?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-28 5:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 12:00 [PATCH] starfive: visionfive2: switch to standard boot Nam Cao
2024-03-12 6:31 ` Leo Liang
2024-03-13 18:42 ` Milan P. Stanić
2024-03-14 12:04 ` Nam Cao
2024-03-18 20:34 ` Milan P. Stanić
2024-03-28 5:02 ` E Shattow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox