Re: KHADAS EDGE V booting hangs if I install UEFI instead of u-boot

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Aug 8, 2025, at 08:46, Mario Marietto <[email protected]> wrote:

> ---> You might want to pastebin such for 13.0 on KHADAS with the panfrost enabled. How different is it from the RockPro64 output ?
> 
> This goes beyond my abilities.

sysctl hw.clock >somefile.txt

with the fully working 13.0 FreeBSD running on the
KHADAS board is beyond your abilities? Getting the
file content to pastebin is beyond your abilities?

I'm unclear here but okay.

> The patches I have work for the kernel 14.2 AFAIK.

I do not think my attempts to help explore your issues
are actually helping you, not even by eliminating some
possibilities. So I'll stop taking your time.

> --> I would expect that the entries needed would be more like what 13.0 on KHADAS with the panfrost
> enabled shows: matching board to actually be used instead of matching a different board.
> 
> Sorry for the mistake that I made before. I didn't attach my monitor,so the "hw.clock.*" list of the FreeBSD 14.2 for RockPro64 running on KHADAS (with the panfrost enabled) appeared very short. 
> But since I'm using the same kernel and user land for both the boards,the log file have the same exact entries :
> 
> https://pastebin.ubuntu.com/p/tPV3XzWV26/
> https://pastebin.ubuntu.com/p/bQpgD3H2KQ/
> 
>  @covacat compared clocks relevant to hdmi and vop and he said that they look the same clock freqs depend on dtb, u-boot and factory reset settings
> 
> --- rk 2025-08-08 12:42:27.210035000 +0300
> +++ kh 2025-08-08 12:42:03.157102000 +0300
> 
> -hw.clock.bpll.frequency: 1416000000
> +hw.clock.bpll.frequency: 408000000
> -hw.clock.lpll.frequency: 1416000000
> +hw.clock.lpll.frequency: 408000000
> 
> There are other diffs that propagate from the plls above ; these are not directly linked to hdmi and vop but he does not know if they can have secondary effects or whatever.
> 
> On the KHADAS I have used the dtb files of the rockpro64. I have exchanged the dtb dir with the dtb dir used by FreeBSD 13 [on the UFS partition,not on the msdos partition],but the screen is still trembling. I suspect that the DTB files are the same. Anyway,this is the result of the command "sysctl hw.clock >somefile.txt" :
> 
> https://pastebin.ubuntu.com/p/BrtSsyJSRT/
> 
> There is a file that's present only on the ms dos / efi partition of the sd card where I have installed FreeBSD 13 that's called "u-boot-spi.bin",that I don't have on the sd card where I have installed FreeBSD 14.2 for the RockPro64. What is this ?

SPI is a different type of non-volatile flash/EEPROM
memory on some boards. Normally something like a
u-boot-spi.bin to store in a SPI is not compatible
with use of that content on microsd cards, usb drives,
or the like. Or, that is my understanding anyway.

SPI is named for its communication interface protocol:
Serial Peripheral Interface protocol. Both SPI EEPROMs
and SPI Flash exist. I've no clue which type is involved
here.

Good luck.

> Should I dd the msdos / efi partition of the sd card where I have installed FreeBSD 13 to the msdos / efi partition of the sd card where I have installed FreeBSD 14.2 for the Rockpro64 ?
> 
> This is what happened when I have removed the uefi var file and I copied the u-boot-spi.bin to the msdos / efi partition of the sd card where I have installed FreeBSD 14.2 for the Rockpro64 :
> 
> Welcome to minicom 2.10
> 
> OPTIONS: I18n
> Compiled on Apr 4 2025, 15:33:54.
> Port /dev/ttyU0, 17:10:14 [U]
> 
> Press CTRL-A Z for help on special keys 
> 
> ## Checking hash(es) for Image u-boot ... sha256+ OK 
> ## Checking hash(es) for Image fdt-1 ... sha256+ OK 
> ## Checking hash(es) for Image atf-2 ... sha256+ OK 
> ## Checking hash(es) for Image atf-3 ... sha256+ OK
> ## Checking hash(es) for Image atf-4 ... sha256+ OK
> load_simple_fit: Skip load 'atf-5': image size is 0!
> 
> 
> U-Boot 2024.04 (Sep 05 2024 - 04:32:21 +0000)
> 
> SoC: Rockchip rk3399
> Reset cause: POR
> Model: Pine64 RockPro64 v2.1
> DRAM: 4 GiB (effective 3.9 GiB)
> Core: 311 devices, 35 uclasses, devicetree: separate 
> MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0 
> Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ef, 60, 18 
> *** Warning - spi_flash_probe_bus_cs() failed, using default environment 
> 
> In: serial,usbkbd 
> Out: serial,vidconsole 
> Err: serial,vidconsole 
> Model: Pine64 RockPro64 v2.1 
> Net: eth0: ethernet@fe300000 
> starting USB... 
> Bus usb@fe380000: USB EHCI 1.00 
> Bus usb@fe3a0000: USB OHCI 1.0 
> Bus usb@fe3c0000: USB EHCI 1.00 
> Bus usb@fe3e0000: USB OHCI 1.0 
> Bus usb@fe800000: Register 2000140 NbrPorts 2 
> Starting the controller 
> USB XHCI 1.10 
> Bus usb@fe900000: Register 2000140 NbrPorts 2 
> Starting the controller 
> USB XHCI 1.10 
> scanning bus usb@fe380000 for devices... 1 USB Device(s) found 
> scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found 
> scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found 
> scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found 
> scanning bus usb@fe800000 for devices... 1 USB Device(s) found 
> scanning bus usb@fe900000 for devices... 1 USB Device(s) found 
> scanning usb for storage devices... 0 Storage Device(s) found 
> Hit any key to stop autoboot: 0 
> Scanning for bootflows in all bootdevs 
> Seq Method State Uclass Part Name Filename 
> --- ----------- ------ -------- ---- ------------------------ ---------------- 
> Scanning global bootmeth 'efi_mgr': 
> Card did not respond to voltage select! : -110 
> Failed to load EFI variables 
> 0 efi_mgr ready (none) 0 <NULL> 
> ** Booting bootflow '<NULL>' with efi_mgr 
> Booting: mmc 1 
> 
> 
> Consoles: EFI console 
> Reading loader env vars from /efi/freebsd/loader.env
> Setting currdev to disk0p1:
> FreeBSD/arm64 EFI loader, Revision 1.1
> 
> Command line arguments: loader.efi
> Image base: 0xf0c4d000
> EFI version: 2.100
> EFI Firmware: Das U-Boot (rev 8228.1024)
> Console: comconsole (0)
> Load Path: /\EFI\BOOT\BOOTAA64.EFI
> Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/SD(1)/SD(1)/HD(1,GPT,224c5)
> BootCurrent: 0000
> BootOrder: 0000[*] 0001
> BootInfo Path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/SD(1)/SD(1)
> Ignoring Boot0000: Only one DP found
> Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/SD(1)/SD(1)/HD(1,GPT,224c5b5c-)
> Setting currdev to disk0p1:
> Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/SD(1)/SD(1)/HD(2,GPT,224d3741-6b6b)
> Setting currdev to disk0p2:
> \
> 
> 
> Loading /boot/defaults/loader.conf 
> Loading /boot/defaults/loader.conf 
> Loading /boot/device.hints 
> Loading /boot/loader.conf 
> Loading /boot/loader.conf.local 
> c-
> | ______ ____ _____ _____ 
> | ____| | _ \ / ____| __ \
> | |___ _ __ ___ ___ | |_) | (___ | | | |
> | ___| '__/ _ \/ _ \| _ < \___ \| | | |
> | | | | | __/ __/| |_) |____) | |__| |
> | | | | | | || | | |
> |_| |_| \___|\___||____/|_____/|_____/ ``` `
> s` `.....---.......--.``` -/
> +---------- Welcome to FreeBSD -----------+ +o .--` /y:` +.
> | | yo`:. :o `+-
> | 1. Boot Multi user [Enter] | y/ -/` -o/
> | 2. Boot Single user | .- ::/sy+:.
> | 3. Escape to loader prompt | / `-- /
> | 4. Reboot | `: :`
> | 5. Cons: Dual (Serial primary) | `: :`
> | | / /
> | Options: | .- -.
> | 6. Kernel: default/kernel (1 of 5) | -- -.
> | 7. Boot Options | `:` `:`
> | | .-- `--.
> | | .---.....----.
> +-----------------------------------------+
> Autoboot in 0 seconds. [Space] to pause 
> Loading kernel... 
> /boot/kernel/kernel text=0x2a8 text=0x9ecb90 text=0x2675f4 data=0x1520f8 data=0x0+0x2bc000 syms=[0x8+0x]-
> Loading configured modules... 
> /etc/hostid size=0x25 
> /boot/kernel/umodem.ko text=0x1aa0 text=0xef0 data=0x5f0 syms=[0x8+0xd80+0x8+0xa31] 
> loading required module 'ucom' 
> /boot/kernel/ucom.ko text=0x2140 text=0x2d40 data=0x8e8+0x850 syms=[0x8+0x1230+0x8+0xb6e] 
> loading required module 'kernel' 
> module 'kernel' exists but with wrong version 
> "Synchronous Abort" handler, esr 0x96000004, far 0x656b2f746f6f622f 
> elr: fffffffffcf852c4 lr : fffffffffcf3bd1c (reloc) 
> elr: 00000000f0ca42c4 lr : 00000000f0c5ad1c 
> x0 : 00000000edc9db50 x1 : 656b2f746f6f622f 
> x2 : 0000000000000014 x3 : 00000000f3fdf3d0 
> x4 : 00000000f3fdf3d0 x5 : 00000000f0d6f368 
> x6 : 00000000edd62600 x7 : 0000000080000014 
> x8 : 00000000fffffffd x9 : 000000000000002f 
> x10: 0000000000000000 x11: 000000006f6f622f 
> x12: 0000000000001fff x13: 00000000edc9ddf0 
> x14: 00000000edc9db70 x15: 0000000000000250 
> x16: 0000000000000000 x17: 0000000000000030 
> x18: 0000000000000000 x19: 00000000edc9db50 
> x20: 00000000edc9d8c0 x21: 0000000000000000 
> x22: 00000000edc9dfa0 x23: 00000000edc9ce20 
> x24: 00000000f0d71648 x25: 0000000000000003 
> x26: 00000000edc9db20 x27: 00000000edd1a8c0 
> x28: 0000000000000003 x29: 00000000f0d6f9f0 
> 
> Code: d65f03c0 aa1f03e0 d65f03c0 39400009 (39400028) 
> UEFI image [0x00000000f0c4d000:0x00000000f0d80697] pc=0x572c4 '/\EFI\BOOT\BOOTAA64.EFI' 
> Resetting CPU ... 
> 
> resetting ... 
> 
> U-Boot TPL 2024.04 (Sep 05 2024 - 04:32:21) 
> lpddr4_set_rate: change freq to 400MHz 0, 1 
> Channel 0: LPDDR4, 400MHz 
> BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB 
> Channel 1: LPDDR4, 400MHz 
> BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB 
> 256B stride 
> lpddr4_set_rate: change freq to 800MHz 1, 0 
> Trying to boot from BOOTROM 
> Returning to boot ROM... 
> 
> U-Boot SPL 2024.04 (Sep 05 2024 - 04:32:21 +0000) 
> Trying to boot from MMC2 
> ## Checking hash(es) for config config-1 ... OK 
> ## Checking hash(es) for Image atf-1 ... sha256+ OK 
> ## Checking hash(es) for Image u-boot ... sha256+ OK 
> ## Checking hash(es) for Image fdt-1 ... sha256+ OK 
> ## Checking hash(es) for Image atf-2 ... sha256+ OK 
> ## Checking hash(es) for Image atf-3 ... sha256+ OK 
> ## Checking hash(es) for Image atf-4 ... sha256+ OK 
> load_simple_fit: Skip load 'atf-5': image size is 0!
> 
> 
> Now it's a mess.
> 
> On Fri, Aug 8, 2025 at 4:35 PM Mark Millard <[email protected]> wrote:
> On Aug 7, 2025, at 23:07, Mario Marietto <[email protected]> wrote:
> 
> > >Well, the above for /dev/mmcsd1 (the eMMC) is very interesting. It indicates another place that a
> > ->uboot and other things might be found and used,independent of the microsd card in the slot.
> > 
> > I know. It's the internal eMMC of the board. At the beginning,when I bought it,Android was installed there. Android boots as default until I have destroyed it and then,I was able to boot FreeBSD installed on the sd card.
> > 
> > ->Does the system appear to do any initial boot activity when there is no microsd card in the slot ?
> > ->Does it still report those kinds of messages ?
> > 
> > nothing activity,no messages on the serial console.
> > 
> > Since I want to use a 14.x kernel that hasn't been patched and 
> > configured to work for the KHADAS,but for the RockPro64 and I know when,
> > more or less,the trembling of the screen starts,I did something like this:
> > 
> > 
> > sysctl hw.clock >somefile.txt on both boards using 14.x
> 
> What about for 13.0 on KHADAS with the panfrost enabled:
> the fully working context?
> 
> > This is what I've got :
> > 
> > FreeBSD 14.2 for RockPro64 : (with the panfrost enabled) : 
> > 
> > https://pastebin.ubuntu.com/p/tPV3XzWV26/
> 
> You might want to pastebin such for 13.0 on KHADAS with
> the panfrost enabled. How different such it from the
> RockPro64 output?
> 
> > FreeBSD 14.2 for RockPro64 running on KHADAS (with the panfrost enabled) : the same image as before).
> > 
> > hw.clock.emmc_cardclock.enable_cnt: 0
> > hw.clock.emmc_cardclock.childrens:
> > hw.clock.emmc_cardclock.parents: clk_emmc
> > hw.clock.emmc_cardclock.parent: clk_emmc
> > hw.clock.emmc_cardclock.frequency: 198000000
> > hw.clock.rk808-clkout2.enable_cnt: 0
> > hw.clock.rk808-clkout2.childrens:
> > hw.clock.rk808-clkout2.parents:
> > hw.clock.rk808-clkout2.parent:
> > hw.clock.rk808-clkout2.gate: unimplemented
> > hw.clock.rk808-clkout2.frequency: 32768
> > hw.clock.hclk_i2s0.enable_cnt: 1
> > hw.clock.hclk_i2s0.childrens:
> > hw.clock.hclk_i2s0.parents: hclk_perilp1
> > hw.clock.hclk_i2s0.parent: hclk_perilp1
> > hw.clock.hclk_i2s0.gate: unimplemented
> > 
> > 
> > How can I add the missing entries ?
> 
> I would expect that the entries needed would be
> more like what 13.0 on KHADAS with the panfrost
> enabled shows: matching board to actually be
> used instead of matching a different board.
> 

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.