Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2022 18:32:43 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        Klaus K??chemann <maciphone2@googlemail.com>, freebsd-arm@freebsd.org
Subject:   Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it
Message-ID:  <304AC869-3B6F-4302-A206-73BA6B8E6B95@yahoo.com>
In-Reply-To: <1199E8C4-81E4-43F4-82BD-EE98C8CAC83E@yahoo.com>
References:  <3D6CF13E-261D-41D2-AC5B-923C0BF54087@yahoo.com> <20220927160328.GA71742@www.zefox.net> <67C09E9F-AD1D-4D0D-9E6F-9C1B046D8952@googlemail.com> <4154AFCB-7428-4005-843A-4EF8C0EBCCB8@googlemail.com> <D8708275-D396-4D2F-9461-B305E522BCCE@yahoo.com> <9A3609DF-D873-4712-A61D-C351C162EF2A@googlemail.com> <61CFA9D4-8DFD-41C5-A2B4-E5B3CD78C327@yahoo.com> <650FD030-783D-46C4-8CC9-50D608569898@yahoo.com> <81C8A094-8492-41DC-A74E-486A9225A2A3@googlemail.com> <760FE9D5-7A1D-40C2-B4CC-E90B300F5B3B@yahoo.com> <20220927232930.GC72077@www.zefox.net> <1199E8C4-81E4-43F4-82BD-EE98C8CAC83E@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I got a sysutils/u-boot-rpi-arm64 build to work based on
standard ports-style patching (otw files are not related
but are present):

# ls -C1 /usr/ports/sysutils/u-boot-rpi-arm64/files/*
/usr/ports/sysutils/u-boot-rpi-arm64/files/patch-common_usb.c
/usr/ports/sysutils/u-boot-rpi-arm64/files/patch-common_usb__hub.c
/usr/ports/sysutils/u-boot-rpi-arm64/files/patch-common_usb__storage.c
/usr/ports/sysutils/u-boot-rpi-arm64/files/patch-include_configs_rpi.h
=
/usr/ports/sysutils/u-boot-rpi-arm64/files/patch-lib_efi__loader_efi__cons=
ole.c
/usr/ports/sysutils/u-boot-rpi-arm64/files/rpi_arm64_fragment

The rpi_arm64_fragment is updated by adding lines for:

CONFIG_LOG=3Dy
CONFIG_LOG_MAX_LEVEL=3D7
CONFIG_LOG_CONSOLE=3Dy

The 3 patch-common_usb*.c files are patches adding the
following 2 lines just before each #include <log.h>

#define LOG_DEBUG
#define DEBUG

I've included attachments for the above 4 files.

The patch-include_configs_rpi.h is my patch for allowing
my media to work. This may well do Bob no good but is
useful for me. I've not included it.

patch-lib_efi__loader_efi__console.c is unchanged.

I do have a different vintage of RPi* firmware in use
than sysutils/rpi-firmware uses.


The U-Boot part of the boot output looks like what
follows. But I can not replicate Bob's problem so
the output is just for reference. It gives a clue
just how much output to expect.


U-Boot 2022.04 (Sep 28 2022 - 00:42:50 +0000)

DRAM:  size=3D30, ptr=3D8a0, limit=3D2000: 7ffe690
size=3D8, ptr=3D8a8, limit=3D2000: 7ffe6c0
7.9 GiB
bind node psci
   - attempt to match compatible string 'arm,psci-0.2'
No match for node 'psci'
bind node system
Device 'system' has no compatible string
bind node axi
Device 'axi' has no compatible string
bind node aliases
Device 'aliases' has no compatible string
bind node chosen
Device 'chosen' has no compatible string
bind node reserved-memory
Device 'reserved-memory' has no compatible string
bind node thermal-zones
Device 'thermal-zones' has no compatible string
bind node soc
   - attempt to match compatible string 'simple-bus'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-bus'
bind node timer@7e003000
   - attempt to match compatible string 'brcm,bcm2835-system-timer'
No match for node 'timer@7e003000'
bind node cprman@7e101000
   - attempt to match compatible string 'brcm,bcm2711-cprman'
No match for node 'cprman@7e101000'
bind node mailbox@7e00b880
   - attempt to match compatible string 'brcm,bcm2835-mbox'
No match for node 'mailbox@7e00b880'
bind node gpio@7e200000
   - attempt to match compatible string 'brcm,bcm2711-gpio'
   - found match at 'bcm283x_pinctrl': 'brcm,bcm2835-gpio' matches =
'brcm,bcm2711-gpio'
bind node serial@7e201000
   - attempt to match compatible string 'arm,pl011'
   - found match at 'serial_pl01x': 'arm,pl011' matches 'arm,pl011'
   - seq=3D0
bind node spi@7e204000
   - attempt to match compatible string 'brcm,bcm2835-spi'
No match for node 'spi@7e204000'
bind node aux@7e215000
   - attempt to match compatible string 'brcm,bcm2835-aux'
No match for node 'aux@7e215000'
bind node i2c@7e804000
   - attempt to match compatible string 'brcm,bcm2711-i2c'
   - attempt to match compatible string 'brcm,bcm2835-i2c'
No match for node 'i2c@7e804000'
bind node local_intc@40000000
   - attempt to match compatible string 'brcm,bcm2836-l1-intc'
No match for node 'local_intc@40000000'
bind node interrupt-controller@40041000
   - attempt to match compatible string 'arm,gic-400'
No match for node 'interrupt-controller@40041000'
bind node avs-monitor@7d5d2000
   - attempt to match compatible string 'brcm,bcm2711-avs-monitor'
   - attempt to match compatible string 'syscon'
   - attempt to match compatible string 'simple-mfd'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-mfd'
bind node thermal
   - attempt to match compatible string 'brcm,bcm2711-thermal'
No match for node 'thermal'
bind node dma@7e007000
   - attempt to match compatible string 'brcm,bcm2835-dma'
No match for node 'dma@7e007000'
bind node watchdog@7e100000
   - attempt to match compatible string 'brcm,bcm2835-pm'
   - attempt to match compatible string 'brcm,bcm2835-pm-wdt'
No match for node 'watchdog@7e100000'
bind node rng@7e104000
   - attempt to match compatible string 'brcm,bcm2711-rng200'
   - found match at 'iproc_rng200-rng': 'brcm,bcm2711-rng200' matches =
'brcm,bcm2711-rng200'
bind node firmware
   - attempt to match compatible string 'raspberrypi,bcm2835-firmware'
   - attempt to match compatible string 'simple-mfd'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-mfd'
bind node clocks
   - attempt to match compatible string 'raspberrypi,firmware-clocks'
No match for node 'clocks'
bind node gpio
   - attempt to match compatible string 'raspberrypi,firmware-gpio'
No match for node 'gpio'
bind node reset
   - attempt to match compatible string 'raspberrypi,firmware-reset'
   - found match at 'raspberrypi-reset': 'raspberrypi,firmware-reset' =
matches 'raspberrypi,firmware-reset'
bind node power
   - attempt to match compatible string 'raspberrypi,bcm2835-power'
No match for node 'power'
bind node mailbox@7e00b840
   - attempt to match compatible string 'brcm,bcm2711-vchiq'
No match for node 'mailbox@7e00b840'
bind node mmc@7e300000
   - attempt to match compatible string 'brcm,bcm2835-mmc'
   - attempt to match compatible string 'brcm,bcm2835-sdhci'
   - found match at 'sdhci-bcm2835': 'brcm,bcm2835-sdhci' matches =
'brcm,bcm2835-sdhci'
bind node gpiomem
   - attempt to match compatible string 'brcm,bcm2835-gpiomem'
No match for node 'gpiomem'
bind node fb
   - attempt to match compatible string 'brcm,bcm2708-fb'
   - found match at 'bcm2835_video': 'brcm,bcm2835-hdmi' matches =
'brcm,bcm2708-fb'
bind node vcsm
   - attempt to match compatible string 'raspberrypi,bcm2835-vcsm'
No match for node 'vcsm'
bind node clocks
Device 'clocks' has no compatible string
bind node phy
   - attempt to match compatible string 'usb-nop-xceiv'
No match for node 'phy'
bind node clk-27M
   - attempt to match compatible string 'fixed-clock'
No match for node 'clk-27M'
bind node clk-108M
   - attempt to match compatible string 'fixed-clock'
No match for node 'clk-108M'
bind node emmc2bus
   - attempt to match compatible string 'simple-bus'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-bus'
bind node emmc2@7e340000
   - attempt to match compatible string 'brcm,bcm2711-emmc2'
   - found match at 'sdhci-bcm2835': 'brcm,bcm2835-sdhci' matches =
'brcm,bcm2711-emmc2'
   - seq=3D0
bind node arm-pmu
   - attempt to match compatible string 'arm,cortex-a72-pmu'
   - attempt to match compatible string 'arm,armv8-pmuv3'
No match for node 'arm-pmu'
bind node timer
   - attempt to match compatible string 'arm,armv8-timer'
No match for node 'timer'
bind node cpus
Device 'cpus' has no compatible string
bind node scb
   - attempt to match compatible string 'simple-bus'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-bus'
bind node pcie@7d500000
   - attempt to match compatible string 'brcm,bcm2711-pcie'
   - found match at 'pcie_brcm': 'brcm,bcm2711-pcie' matches =
'brcm,bcm2711-pcie'
   - seq=3D0
bind node pci@1,0
Device 'pci@1,0' has no compatible string
bind node ethernet@7d580000
   - attempt to match compatible string 'brcm,bcm2711-genet-v5'
   - found match at 'eth_bcmgenet': 'brcm,genet-v5' matches =
'brcm,bcm2711-genet-v5'
   - seq=3D0
bind node dma@7e007b00
   - attempt to match compatible string 'brcm,bcm2711-dma'
No match for node 'dma@7e007b00'
bind node hevc-decoder@7eb00000
   - attempt to match compatible string =
'raspberrypi,rpivid-hevc-decoder'
No match for node 'hevc-decoder@7eb00000'
bind node rpivid-local-intc@7eb10000
   - attempt to match compatible string 'raspberrypi,rpivid-local-intc'
No match for node 'rpivid-local-intc@7eb10000'
bind node h264-decoder@7eb20000
   - attempt to match compatible string =
'raspberrypi,rpivid-h264-decoder'
No match for node 'h264-decoder@7eb20000'
bind node vp9-decoder@7eb30000
   - attempt to match compatible string 'raspberrypi,rpivid-vp9-decoder'
No match for node 'vp9-decoder@7eb30000'
bind node leds
   - attempt to match compatible string 'gpio-leds'
No match for node 'leds'
bind node memory@0
Device 'memory@0' has no compatible string
bind node sd_io_1v8_reg
   - attempt to match compatible string 'regulator-gpio'
No match for node 'sd_io_1v8_reg'
bind node sd_vcc_reg
   - attempt to match compatible string 'regulator-fixed'
No match for node 'sd_vcc_reg'
bind node __overrides__
Device '__overrides__' has no compatible string
bind node fixedregulator_3v3
   - attempt to match compatible string 'regulator-fixed'
No match for node 'fixedregulator_3v3'
bind node fixedregulator_5v0
   - attempt to match compatible string 'regulator-fixed'
No match for node 'fixedregulator_5v0'
bind node v3dbus
   - attempt to match compatible string 'simple-bus'
   - found match at 'simple_bus': 'simple-bus' matches 'simple-bus'
bind node __symbols__
Device '__symbols__' has no compatible string
bind node bootloader
Device 'bootloader' has no compatible string
bind node clk-osc
   - attempt to match compatible string 'fixed-clock'
No match for node 'clk-osc'
bind node clk-usb
   - attempt to match compatible string 'fixed-clock'
No match for node 'clk-usb'
RPI 4 Model B (0xd03114)
0
   - 0 'serial@7e201000'
   - found
0
   - 0 'gpio@7e200000'
   - found
0
   - 0 'gpio@7e200000'
   - found
bcm283x_pinctrl gpio@7e200000: set_state_simple op missing
simple_bus soc: set_state_simple op missing
0
   - 0 'gpio@7e200000'
   - found
pinconfig uart0_pins: set_state_simple op missing
serial_pl01x serial@7e201000: pinctrl_select_state_full: =
pinctrl_config_one: err=3D-22
Core:  198 devices, 13 uclasses, devicetree: board
MMC:   0
   - 3 'mmc@7e300000'
   - 0 'emmc2@7e340000'
   - found
0
   - 0 'gpio@7e200000'
   - found
simple_bus emmc2bus: set_state_simple op missing
0
   - 0 'gpio@7e200000'
   - found
sdhci-bcm2835 emmc2@7e340000: set_state_simple op missing
1
   - 3 'mmc@7e300000'
   - 0 'emmc2@7e340000'
   - not found
0
   - 0 'gpio@7e200000'
   - found
pinconfig mmc_pins: set_state_simple op missing
mmc@7e300000: 3, emmc2@7e340000: 0
Loading Environment from FAT... 0
   - 0 'fb'
   - found
0
   - 0 'gpio@7e200000'
   - found
bcm2835_video fb: set_state_simple op missing
In:    serial
Out:   vidconsole
Err:   vidconsole
0
   - 0 'ethernet@7d580000'
   - found
Net:   0
   - 0 'gpio@7e200000'
   - found
simple_bus scb: set_state_simple op missing
0
   - 0 'gpio@7e200000'
   - found
eth_bcmgenet ethernet@7d580000: set_state_simple op missing
eth0: ethernet@7d580000
0
   - 0 'gpio@7e200000'
   - found
pcie_brcm pcie@7d500000: set_state_simple op missing
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
bind node usb@1,0
Device 'usb@1,0' has no compatible string
0
   - 0 'gpio@7e200000'
   - found
pci_bridge_drv pci_0:0.0: set_state_simple op missing
starting USB...
Bus xhci_pci: 0
   - 0 'gpio@7e200000'
   - found
xhci_pci xhci_pci: set_state_simple op missing
Looking for reset
Looking for reset
   - result for reset: reset (ret=3D0)
   - result for reset: reset (ret=3D0)
0
   - 0 'gpio@7e200000'
   - found
simple_bus firmware: set_state_simple op missing
0
   - 0 'gpio@7e200000'
   - found
raspberrypi-reset reset: set_state_simple op missing
Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 0
   - 0 'gpio@7e200000'
   - found
usb_hub usb_hub: set_state_simple op missing
4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  2 1 0=20
Card did not respond to voltage select! : -110
MMC Device 1 not found
no mmc device at slot 1
MMC Device 2 not found
no mmc device at slot 2

Device 0: Vendor: Samsung  Rev: 0    Prod: PSSD T7 Touch  =20
            Type: Hard Disk
            Capacity: 1907729.0 MB =3D 1863.0 GB (3907029168 x 512)
... is now current device
Scanning usb 0:1...
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
8Scanning disk mmc@7e300000.blk...
Disk mmc@7e300000.blk not ready
Card did not respond to voltage select! : -110
Scanning disk emmc2@7e340000.blk...
Disk emmc2@7e340000.blk not ready
Scanning disk usb_mass_storage.lun0...
unhandled device class: xhci_pci (usb)
unhandled device class: pci_0:0.0 (pci)
unhandled device class: pcie@7d500000 (pci)
 <2, 0, 1024>
Unrecognized filesystem type
 <2, 0, 1024>
Unrecognized filesystem type
 <2, 0, 1024>
Unrecognized filesystem type
 <2, 0, 1024>
Unrecognized filesystem type
 <2, 0, 1024>
Unrecognized filesystem type
Found 7 disks
0
   - 0 'gpio@7e200000'
   - found
iproc_rng200-rng rng@7e104000: set_state_simple op missing
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
** Unable to read file ubootefi.var **
Failed to load EFI variables
Initializing EFI driver framework
Adding EFI driver 'EFI block driver'
0
   - 0 'ethernet@7d580000'
   - found
smbios_version =3D 0000000039c2403f: '2022.04'
BootOrder not defined
EFI boot manager: Cannot load any image
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D163), clust_size=3D32, read_size=3D32
FAT read(sect=3D4963), clust_size=3D32, read_size=3D32
Found EFI removable media binary efi/boot/bootaa64.efi
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D163), clust_size=3D32, read_size=3D32
FAT read(sect=3D4963), clust_size=3D32, read_size=3D32
FAT read(sect=3D131), clust_size=3D32, read_size=3D32
FAT read(sect=3D163), clust_size=3D32, read_size=3D32
FAT read(sect=3D4963), clust_size=3D32, read_size=3D32
dev=3Dusb, devnr=3D0:1, path=3Defi/boot/bootaa64.efi, =
buffer=3D0000000000080000, size=3Dd18dc
unhandled device class: xhci_pci (usb)
unhandled device class: pci_0:0.0 (pci)
unhandled device class: pcie@7d500000 (pci)
unhandled device class: xhci_pci (usb)
unhandled device class: pci_0:0.0 (pci)
unhandled device class: pcie@7d500000 (pci)
- recorded device =
/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/UsbClass(0x0,0x0,0x9,0x0,0x3)=
/UsbClass(0x4e8,0x4001,0x0,0x0,0x0)/HD(1,GPT,9cdadf2a-de3c-11ec-8f37-a0cec=
8d68fdc,0x800,0x82000)
- and image /efi\boot\bootaa64.efi
858332 bytes read in 31 ms (26.4 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Loaded from disk
Booting /efi\boot\bootaa64.efi



=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556
Content-Disposition: attachment;
	filename=patch-common_usb__hub.c
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="patch-common_usb__hub.c"
Content-Transfer-Encoding: 7bit

--- common/usb_hub.c.orig	2022-04-04 07:31:32.000000000 -0700
+++ common/usb_hub.c	2022-09-27 17:31:36.202280000 -0700
@@ -26,6 +26,8 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#define LOG_DEBUG
+#define DEBUG
 #include <log.h>
 #include <malloc.h>
 #include <memalign.h>

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556
Content-Disposition: attachment;
	filename=patch-common_usb__storage.c
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="patch-common_usb__storage.c"
Content-Transfer-Encoding: 7bit

--- common/usb_storage.c.orig	2022-04-04 07:31:32.000000000 -0700
+++ common/usb_storage.c	2022-09-27 17:31:49.314637000 -0700
@@ -37,6 +37,8 @@
 #include <command.h>
 #include <dm.h>
 #include <errno.h>
+#define LOG_DEBUG
+#define DEBUG
 #include <log.h>
 #include <mapmem.h>
 #include <memalign.h>

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556
Content-Disposition: attachment;
	filename=patch-common_usb.c
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="patch-common_usb.c"
Content-Transfer-Encoding: 7bit

--- common/usb.c.orig	2022-04-04 07:31:32.000000000 -0700
+++ common/usb.c	2022-09-27 17:31:25.890219000 -0700
@@ -28,6 +28,8 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#define LOG_DEBUG
+#define DEBUG
 #include <log.h>
 #include <malloc.h>
 #include <memalign.h>

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556
Content-Disposition: attachment;
	filename=rpi_arm64_fragment
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="rpi_arm64_fragment"
Content-Transfer-Encoding: 7bit

CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_RPI_EFI_NR_SPIN_PAGES=2
CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=7
CONFIG_LOG_CONSOLE=y

--Apple-Mail=_F45195DF-0924-4905-B203-6182F2010556--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?304AC869-3B6F-4302-A206-73BA6B8E6B95>