public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot
@ 2024-11-12 10:26 Heinrich Schuchardt
  2024-11-13 13:39 ` Simon Glass
  2025-03-06  3:38 ` Leo Liang
  0 siblings, 2 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2024-11-12 10:26 UTC (permalink / raw)
  To: Paul Walmsley, Green Wan
  Cc: Yong-Xuan Wang, u-boot, Yuri Zaporozhets, Simon Glass,
	Heinrich Schuchardt

Without 'nvme scan' the ESP on the NVMe drive is not found early.
EFI variables cannot be persisted.

    Hit any key to stop autoboot:  0
    Cannot persist EFI variables without system partition
    ** Booting bootflow '<NULL>' with efi_mgr
    Loading Boot0000 'mmc 0' failed
    EFI boot manager: Cannot load any image
    Boot failed (err=-14)
    scanning bus for devices...
    ** Booting bootflow 'nvme#1.blk#1.bootdev.part_1' with efi
    Booting /\EFI\BOOT\BOOTRISCV64.EFI
    error: no suitable video mode found.
    GNU GRUB  version 2.12

With 'nmve scan' booting works as expected.

    Hit any key to stop autoboot:  0
    ** Booting bootflow '<NULL>' with efi_mgr
    Loading Boot0000 'mmc 0' failed
    Loading Boot0001 'nvme 0' failed
    Booting: nvme 1
    error: no suitable video mode found.
    GNU GRUB  version 2.12

Reported by Yuri Zaporozhets <yuriz@vodafonemail.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	mention board in subject
---
 configs/sifive_unmatched_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
index 058e5fab683..1ea744ffa80 100644
--- a/configs/sifive_unmatched_defconfig
+++ b/configs/sifive_unmatched_defconfig
@@ -27,7 +27,7 @@ CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
 CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};"
+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};nvme scan"
 CONFIG_DEFAULT_FDT_FILE="sifive/hifive-unmatched-a00.dtb"
 CONFIG_SYS_CBSIZE=256
 CONFIG_SYS_PBSIZE=276
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot
  2024-11-12 10:26 [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot Heinrich Schuchardt
@ 2024-11-13 13:39 ` Simon Glass
  2025-02-07  7:43   ` Heinrich Schuchardt
  2025-03-06  3:38 ` Leo Liang
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2024-11-13 13:39 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Paul Walmsley, Green Wan, Yong-Xuan Wang, u-boot,
	Yuri Zaporozhets

Hi Heinrich,

On Tue, 12 Nov 2024 at 03:26, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Without 'nvme scan' the ESP on the NVMe drive is not found early.
> EFI variables cannot be persisted.
>
>     Hit any key to stop autoboot:  0
>     Cannot persist EFI variables without system partition
>     ** Booting bootflow '<NULL>' with efi_mgr
>     Loading Boot0000 'mmc 0' failed
>     EFI boot manager: Cannot load any image
>     Boot failed (err=-14)
>     scanning bus for devices...
>     ** Booting bootflow 'nvme#1.blk#1.bootdev.part_1' with efi
>     Booting /\EFI\BOOT\BOOTRISCV64.EFI
>     error: no suitable video mode found.
>     GNU GRUB  version 2.12
>
> With 'nmve scan' booting works as expected.
>
>     Hit any key to stop autoboot:  0
>     ** Booting bootflow '<NULL>' with efi_mgr
>     Loading Boot0000 'mmc 0' failed
>     Loading Boot0001 'nvme 0' failed
>     Booting: nvme 1
>     error: no suitable video mode found.
>     GNU GRUB  version 2.12
>
> Reported by Yuri Zaporozhets <yuriz@vodafonemail.de>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         mention board in subject
> ---
>  configs/sifive_unmatched_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
> index 058e5fab683..1ea744ffa80 100644
> --- a/configs/sifive_unmatched_defconfig
> +++ b/configs/sifive_unmatched_defconfig
> @@ -27,7 +27,7 @@ CONFIG_FIT=y
>  CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
>  CONFIG_BOOTSTD_DEFAULTS=y
>  CONFIG_USE_PREBOOT=y
> -CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};"
> +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};nvme scan"
>  CONFIG_DEFAULT_FDT_FILE="sifive/hifive-unmatched-a00.dtb"
>  CONFIG_SYS_CBSIZE=256
>  CONFIG_SYS_PBSIZE=276
> --
> 2.45.2
>

This is handled automatically by bootstd. It uses 'hunters' to scan
devices as it goes. So this scan would not be wanted unless the device
is booting from nvme.

It seems that bootmgr is very-much doing its own thing in U-Boot. Can
we make it run the hunters, instead, perhaps?

Regards,
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot
  2024-11-13 13:39 ` Simon Glass
@ 2025-02-07  7:43   ` Heinrich Schuchardt
  0 siblings, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2025-02-07  7:43 UTC (permalink / raw)
  To: Simon Glass
  Cc: Paul Walmsley, Green Wan, Yong-Xuan Wang, u-boot,
	Yuri Zaporozhets

On 11/13/24 14:39, Simon Glass wrote:
> Hi Heinrich,
> 
> On Tue, 12 Nov 2024 at 03:26, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> Without 'nvme scan' the ESP on the NVMe drive is not found early.
>> EFI variables cannot be persisted.
>>
>>      Hit any key to stop autoboot:  0
>>      Cannot persist EFI variables without system partition
>>      ** Booting bootflow '<NULL>' with efi_mgr
>>      Loading Boot0000 'mmc 0' failed
>>      EFI boot manager: Cannot load any image
>>      Boot failed (err=-14)
>>      scanning bus for devices...
>>      ** Booting bootflow 'nvme#1.blk#1.bootdev.part_1' with efi
>>      Booting /\EFI\BOOT\BOOTRISCV64.EFI
>>      error: no suitable video mode found.
>>      GNU GRUB  version 2.12
>>
>> With 'nmve scan' booting works as expected.
>>
>>      Hit any key to stop autoboot:  0
>>      ** Booting bootflow '<NULL>' with efi_mgr
>>      Loading Boot0000 'mmc 0' failed
>>      Loading Boot0001 'nvme 0' failed
>>      Booting: nvme 1
>>      error: no suitable video mode found.
>>      GNU GRUB  version 2.12
>>
>> Reported by Yuri Zaporozhets <yuriz@vodafonemail.de>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>> v2:
>>          mention board in subject
>> ---
>>   configs/sifive_unmatched_defconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
>> index 058e5fab683..1ea744ffa80 100644
>> --- a/configs/sifive_unmatched_defconfig
>> +++ b/configs/sifive_unmatched_defconfig
>> @@ -27,7 +27,7 @@ CONFIG_FIT=y
>>   CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
>>   CONFIG_BOOTSTD_DEFAULTS=y
>>   CONFIG_USE_PREBOOT=y
>> -CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};"
>> +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};nvme scan"
>>   CONFIG_DEFAULT_FDT_FILE="sifive/hifive-unmatched-a00.dtb"
>>   CONFIG_SYS_CBSIZE=256
>>   CONFIG_SYS_PBSIZE=276
>> --
>> 2.45.2
>>
> 
> This is handled automatically by bootstd. It uses 'hunters' to scan
> devices as it goes. So this scan would not be wanted unless the device
> is booting from nvme.
> 
> It seems that bootmgr is very-much doing its own thing in U-Boot. Can
> we make it run the hunters, instead, perhaps?
> 
> Regards,
> Simon

The bootstd runs the NVMe hunter *after* executing the EFI bootmgr bootmeth.

We must scan NVMe before running the EFI bootmgr bootmeth to find the 
ESP on it.

Best regards

Heinrich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot
  2024-11-12 10:26 [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot Heinrich Schuchardt
  2024-11-13 13:39 ` Simon Glass
@ 2025-03-06  3:38 ` Leo Liang
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Liang @ 2025-03-06  3:38 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Paul Walmsley, Green Wan, Yong-Xuan Wang, u-boot,
	Yuri Zaporozhets, Simon Glass

On Tue, Nov 12, 2024 at 11:26:44AM +0100, Heinrich Schuchardt wrote:
> Without 'nvme scan' the ESP on the NVMe drive is not found early.
> EFI variables cannot be persisted.
> 
>     Hit any key to stop autoboot:  0
>     Cannot persist EFI variables without system partition
>     ** Booting bootflow '<NULL>' with efi_mgr
>     Loading Boot0000 'mmc 0' failed
>     EFI boot manager: Cannot load any image
>     Boot failed (err=-14)
>     scanning bus for devices...
>     ** Booting bootflow 'nvme#1.blk#1.bootdev.part_1' with efi
>     Booting /\EFI\BOOT\BOOTRISCV64.EFI
>     error: no suitable video mode found.
>     GNU GRUB  version 2.12
> 
> With 'nmve scan' booting works as expected.
> 
>     Hit any key to stop autoboot:  0
>     ** Booting bootflow '<NULL>' with efi_mgr
>     Loading Boot0000 'mmc 0' failed
>     Loading Boot0001 'nvme 0' failed
>     Booting: nvme 1
>     error: no suitable video mode found.
>     GNU GRUB  version 2.12
> 
> Reported by Yuri Zaporozhets <yuriz@vodafonemail.de>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
> 	mention board in subject
> ---
>  configs/sifive_unmatched_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-06  3:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 10:26 [PATCH v2 1/1] configs: SiFive Unmatched: add 'nvme scan' to preboot Heinrich Schuchardt
2024-11-13 13:39 ` Simon Glass
2025-02-07  7:43   ` Heinrich Schuchardt
2025-03-06  3:38 ` Leo Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox