Bug 1216036 - [RPi4] RPi4 fails to boot with U-Boot 2023.10
Summary: [RPi4] RPi4 fails to boot with U-Boot 2023.10
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Bootloader (show other bugs)
Version: Current
Hardware: aarch64 Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Ivan Ivanov
QA Contact: E-mail List
URL: https://openqa.opensuse.org/tests/363...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-09 07:16 UTC by Guillaume GARDET
Modified: 2023-11-02 08:15 UTC (History)
3 users (show)

See Also:
Found By: openQA
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments
u-boot log (1.98 KB, text/plain)
2023-10-09 07:16 UTC, Guillaume GARDET
Details
boot from usb fails (2.28 KB, text/plain)
2023-10-19 08:38 UTC, Ivan Ivanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume GARDET 2023-10-09 07:16:24 UTC
Created attachment 869994 [details]
u-boot log

Since u-boot 2023.10, RPi4 fails to boot from uSD with:
  Card did not respond to voltage select! : -110
Comment 1 Ivan Ivanov 2023-10-09 08:58:48 UTC
Funny enough is working fine with Raspberry Pi 3 Model B Plus.
Comment 2 Ivan Ivanov 2023-10-09 09:15:59 UTC
Raspberry Pi Zero 2 W is also fine with new U-Boot.
Comment 3 Guillaume GARDET 2023-10-10 08:45:12 UTC
'git bisect' points to:

commit c771e5b8c2a186fb072b6c6f571d4a3cc86efba9
Author: Simon Glass <sjg@chromium.org>
Date:   Thu Jul 27 15:54:28 2023 -0600

    arm: rpi: Switch to standard boot

    Drop use of the distro scripts and use standard boot instead.

    We don't need to specify the mmc devices individually, since they are
    used in order from 0 to 2, and standard boot uses that order anyway.

    Signed-off-by: Simon Glass <sjg@chromium.org>


https://source.denx.de/u-boot/u-boot/-/commit/c771e5b8c2a186fb072b6c6f571d4a3cc86efba9
Comment 4 Guillaume GARDET 2023-10-10 09:03:36 UTC
(In reply to Guillaume GARDET from comment #3)
> 'git bisect' points to:
> 
> commit c771e5b8c2a186fb072b6c6f571d4a3cc86efba9
> Author: Simon Glass <sjg@chromium.org>
> Date:   Thu Jul 27 15:54:28 2023 -0600
> 
>     arm: rpi: Switch to standard boot
> 
>     Drop use of the distro scripts and use standard boot instead.
> 
>     We don't need to specify the mmc devices individually, since they are
>     used in order from 0 to 2, and standard boot uses that order anyway.

Looks like the commit message is wrong since the following patch fixes the boot on RPi4 (_not_ tested on RPi3 or RPi Zero 2 W, though).

diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
index 30228285ed..02210b97b5 100644
--- a/board/raspberrypi/rpi/rpi.env
+++ b/board/raspberrypi/rpi/rpi.env
@@ -74,4 +74,4 @@ pxefile_addr_r=0x02500000
 fdt_addr_r=0x02600000
 ramdisk_addr_r=0x02700000

-boot_targets=mmc usb pxe dhcp
+boot_targets=mmc0 mmc1 mmc2 usb pxe dhcp
Comment 5 Guillaume GARDET 2023-10-10 09:26:15 UTC
FTR, I notified upstream here:
https://lists.denx.de/pipermail/u-boot/2023-October/533298.html
Comment 6 Ivan Ivanov 2023-10-10 14:05:36 UTC
Hi, 

I have teested with u-boot-rpiarm64-2023.10-557.1 from 
hardware:boot:staging/u-boot.

RPi Zero 2W, RPi 3B+ and  RPi 4B are booting fine. 

FTR. I still see following message:

"Card did not respond to voltage select! : -110"

Thanks!
Comment 7 OBSbugzilla Bot 2023-10-10 14:33:45 UTC
This is an autogenerated message for OBS integration:
This bug (1216036) was mentioned in
https://build.opensuse.org/request/show/1116669 Factory:ARM / u-boot
Comment 8 Stefan Seyfried 2023-10-17 17:58:45 UTC
The latest version u-boot-rpiarm64-2023.10-3.2.aarch64 (Tumbleweed version 20231016) does no longer boot from USB, instead it does try to boot tftp and is stuck there
I have reverted to u-boot-rpiarm64-2023.10-3.1.aarch64 (Tumbleweed version 20231011)'s u-boot.bin and that one boots again from USB.
Comment 9 Guillaume GARDET 2023-10-18 07:56:42 UTC
(In reply to Stefan Seyfried from comment #8)
> The latest version u-boot-rpiarm64-2023.10-3.2.aarch64 (Tumbleweed version
> 20231016) does no longer boot from USB, instead it does try to boot tftp and
> is stuck there
> I have reverted to u-boot-rpiarm64-2023.10-3.1.aarch64 (Tumbleweed version
> 20231011)'s u-boot.bin and that one boots again from USB.

So, it seems that upstream patch breaks USB boot:
https://github.com/openSUSE/u-boot/commit/ab50ce2798c3a39dd186a72c3862ef923d4d713a

since the USB boot problem started with this SR: 
https://build.opensuse.org/request/show/1117636
Comment 10 Ivan Ivanov 2023-10-19 08:38:05 UTC
Created attachment 870321 [details]
boot from usb fails

Yep, it happens. It will need closer look.
Comment 11 Ivan Ivanov 2023-10-19 14:26:55 UTC
For the record this is U-Boot environment:

U-Boot> print
arch=arm
baudrate=115200
board=rpi
board_name=4 Model B
board_rev=0x11
board_rev_scheme=1
board_revision=0xC03111
boot_targets=mmc usb pxe dhcp
bootcmd=bootflow scan
bootdelay=2
cpu=armv8
dhcpuboot=usb start; dhcp u-boot.uimg; bootm
ethaddr=dc:a6:32:3c:18:25
fdt_addr=2eff2600
fdt_addr_r=0x02600000
fdt_high=ffffffffffffffff
fdtcontroladdr=3d83b3c0
fdtfile=broadcom/bcm2711-rpi-4-b.dtb
initrd_high=ffffffffffffffff
kernel_addr_r=0x00080000
loadaddr=0x1000000
preboot=pci enum; usb start;
pxefile_addr_r=0x02500000
ramdisk_addr_r=0x02700000
scriptaddr=0x02400000
serial#=10000000796feb95
soc=bcm283x
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole
usbethaddr=dc:a6:32:3c:18:25
vendor=raspberrypi
Comment 12 Ivan Ivanov 2023-10-23 09:26:26 UTC
I have build new u-boot with patches discussed here [1] on top of 
2023.10 release. Then installed it in the latest TW image.

RPi4 boots fine from uSD and USB now. It is little bit chatty when
booting form USB, but well....

---

 U-Boot 2023.10 (Oct 23 2023 - 00:00:00 +0000)

DRAM:  991 MiB (effective 3.9 GiB)
RPI 4 Model B (0xc03111)
Core:  213 devices, 17 uclasses, devicetree: board
MMC:   mmcnr@7e300000: 1, mmc@7e340000: 0
Loading Environment from FAT... Card did not respond to voltage select! : -110
** Bad device specification mmc 0 **
In:    serial,usbkbd
Out:   serial,vidconsole
Err:   serial,vidconsole
Net:   eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout increasing to: 200 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 400 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 800 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 1600 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 3200 ms.
sdhci_send_command: MMC: 1 busy timeout.
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout.
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout.
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout.
Card did not respond to voltage select! : -110
** Booting bootflow 'usb_mass_storage.lun0.bootdev.part_1' with efi
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout.
Card did not respond to voltage select! : -110
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Booting /efi\boot\bootaa64.efi
Please press 't' to show the boot menu on this console

---

[1] https://lore.kernel.org/u-boot/20231023070216.394709-1-sjg@chromium.org/#t
Comment 13 Ivan Ivanov 2023-10-23 09:28:59 UTC
Submit request [1] for u-boot send to hardware:boot/u-boot project

[1] https://build.opensuse.org/request/show/1119578
Comment 14 Ivan Ivanov 2023-10-23 14:37:23 UTC
Well, it turns out that we are using Github for U-boot pull requests ...

https://github.com/openSUSE/u-boot/pull/28
Comment 15 Guillaume GARDET 2023-11-02 08:15:36 UTC
Fixed now.