Bug 275655 - sysutils/u-boot-rpi-arm64: 2023.10 doesn't find mmc0
Summary: sysutils/u-boot-rpi-arm64: 2023.10 doesn't find mmc0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-uboot (Nobody)
URL:
Keywords:
: 275656 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-09 13:54 UTC by Helge Oldach
Modified: 2023-12-10 08:40 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (uboot)


Attachments
patch as suggested by https://lists.denx.de/pipermail/u-boot/2023-October/533298.html (909 bytes, patch)
2023-12-09 17:59 UTC, Helge Oldach
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helge Oldach 2023-12-09 13:54:35 UTC
Since the recent port update to U-BOOT 2023.10, mmc0 is no longer found and my RPi4/8G reverts to Ethernet boot (which fails below due to no link):

----------------------------------------------------------------------
U-Boot 2023.10 (Dec 09 2023 - 13:58:21 +0100)

DRAM:  948 MiB (effective 7.9 GiB)
RPI 4 Model B (0xd03114)
Core:  210 devices, 16 uclasses, devicetree: board
MMC:   mmc@7e300000: 3, mmc@7e340000: 0
Loading Environment from FAT... ** Bad device specification mmc 1 **
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... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
U-Boot>
----------------------------------------------------------------------

U-Boot 2023.07.02 works fine on the same machine:

----------------------------------------------------------------------
U-Boot 2023.07.02 (Aug 09 2023 - 18:56:25 +0200)

DRAM:  948 MiB (effective 7.9 GiB)
RPI 4 Model B (0xd03114)
Core:  209 devices, 16 uclasses, devicetree: board
MMC:   mmc@7e300000: 3, mmc@7e340000: 0
Loading Environment from FAT... ** Bad device specification mmc 1 **
In:    serial
Out:   vidconsole
Err:   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... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
No EFI system partition
No EFI system partition
Failed to persist EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootaa64.efi
1186852 bytes read in 86 ms (13.2 MiB/s)
Booting /efi\boot\bootaa64.efi
console comconsole failed to initialize
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1
----------------------------------------------------------------------
Comment 1 Mark Millard 2023-12-09 14:43:26 UTC
The issue is not FreeBSD specific. FYI: See

https://lists.denx.de/pipermail/u-boot/2023-October/533298.html

as the start of a sequence of messages.
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2023-12-09 15:13:58 UTC
*** Bug 275656 has been marked as a duplicate of this bug. ***
Comment 3 Helge Oldach 2023-12-09 17:59:01 UTC
Created attachment 246934 [details]
patch as suggested by https://lists.denx.de/pipermail/u-boot/2023-October/533298.html
Comment 4 Helge Oldach 2023-12-09 18:00:43 UTC
U-Boot 2023.10 (Dec 09 2023 - 17:52:46 +0100)

DRAM:  948 MiB (effective 7.9 GiB)
RPI 4 Model B (0xd03114)
Core:  210 devices, 16 uclasses, devicetree: board
MMC:   mmc@7e300000: 3, mmc@7e340000: 0
Loading Environment from FAT... ** Bad device specification mmc 1 **
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... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
** Booting bootflow 'mmc@7e340000.bootdev.part_1' with efi
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Booting /efi\boot\bootaa64.efi
Comment 5 Emmanuel Vadot freebsd_committer freebsd_triage 2023-12-10 06:52:48 UTC
Can you try this instead : https://patchwork.ozlabs.org/project/uboot/patch/20230923205017.1754340-1-sjg@chromium.org/ please ?
Comment 6 Helge Oldach 2023-12-10 08:19:47 UTC
(In reply to Emmanuel Vadot from comment #5)
Works as well:

U-Boot 2023.10 (Dec 10 2023 - 09:11:28 +0100)

DRAM:  948 MiB (effective 7.9 GiB)
RPI 4 Model B (0xd03114)
Core:  210 devices, 16 uclasses, devicetree: board
MMC:   mmc@7e300000: 3, mmc@7e340000: 0
Loading Environment from FAT... ** Bad device specification mmc 1 **
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... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
** Booting bootflow 'mmc@7e340000.bootdev.part_1' with efi
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Booting /efi\boot\bootaa64.efi
console comconsole failed to initialize
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-10 08:40:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8b9b8aae81be653e37160b9f23ca4a18b99f4b51

commit 8b9b8aae81be653e37160b9f23ca4a18b99f4b51
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-12-10 08:38:31 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-12-10 08:38:31 +0000

    sysutils/u-boot-rpi*: Fix sd boot after v2023.10 update

    U-Boot update broke sd boot for rpi* models, use upstream patch that fixes it.

    PR:             275655
    Sponsored by:   Beckhoff Automation GmbH & Co.KG

 sysutils/u-boot-master/distinfo    | 4 +++-
 sysutils/u-boot-rpi-0-w/Makefile   | 4 ++++
 sysutils/u-boot-rpi-arm64/Makefile | 3 +++
 sysutils/u-boot-rpi/Makefile       | 4 ++++
 sysutils/u-boot-rpi2/Makefile      | 4 ++++
 sysutils/u-boot-rpi3/Makefile      | 3 +++
 sysutils/u-boot-rpi4/Makefile      | 3 +++
 7 files changed, 24 insertions(+), 1 deletion(-)