Booting FreeBSD on Rock64

Denis Polygalov dpolyg at gmail.com
Sat Jul 13 10:16:40 UTC 2019


Here is my attempt to advance this thread:
http://freebsd.1045724.x6.nabble.com/Booting-FreeBSD-on-Rock64-td6312109.html

by using new release of ayufan's u-boot:
2017.09-rockchip-ayufan-1063-g29843fbd42

and most recent FreeBSD image:
FreeBSD-13.0-CURRENT-arm64-aarch64-20190711-r349909-memstick.img

Booting from USB drive lead to near the same infinite reset loop:
...
Found 3 disks
Consoles: EFI console
     Reading loader env vars from /efi/freebsd/loader.env
FreeBSD/arm64 EFI loader, Revision 1.1

    Command line arguments: loader.efi
    EFI version: 2.05
    EFI Firmware: Das U-boot (rev 0.00)
    Console: efi (0)
    Load Path: \efi\boot\bootaa64.efi
    Load Device: UNKNOWN(0001,0004)
"Synchronous Abort" handler, esr 0x96000210
ELR:     fbec72c4
LR:      fbe97500
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : 0000000000000000
x4 : 00000000fbecf890 x5 : 00000000fbec6838
x6 : 00000000fbeea150 x7 : 0000000000000000
x8 : 0000000000000000 x9 : 0000000000000074
x10: 00000000fbeef8a8 x11: 0000000000000296
x12: 0000000000000296 x13: 0000000000000000
x14: 00000000f9f68b90 x15: 0000000000000000
x16: 0000000000000045 x17: 0000000000000000
x18: 0000000000000000 x19: 00000000fbee9e48
x20: 00000000fbece8d3 x21: 0000000000000000
x22: 0000000000000000 x23: 00000000fbeef8b0
x24: 0000000000000000 x25: 0000000000000000
x26: 00000000fbeeeb40 x27: 0000000020001000
x28: 8000000000000005 x29: 00000000fbee9e00

Resetting CPU ...

Notice however absence of line
"Failed to find bootable partition"
comparing to the first post in original thread.

As of the network boot it reaches screen
with ASCII art of the FreeBSD loader and then hangs here:

Autoboot in 0 seconds, hit [Enter] to boot or any other key to stop
Loading kernel...
/boot/kernel/kernel text=0x93951c data=0x1914c8+0x84ab1c 
syms=[0x8+0x1387f8+0x8+0x124a11]
Loading configured modules...
can't find '/boot/entropy'
Using DTB provided by EFI at 0x8200000.
/

For the network boot I'm using the same image as for USB boot:
FreeBSD-13.0-CURRENT-arm64-aarch64-20190711-r349909-memstick.img
unpacked and served via NFS.
Can someone suggest what is going on here?
Full USB and network boot logs are attached.

Regards,
Denis.







-------------- next part --------------
DDR version 1.13 20180428
ID:0x805 N
In
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT

U-Boot SPL 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:08)
board_init_sdmmc_pwr_en
setup_ddr_param  1
booted from SPI flash
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):9d3f591
NOTICE:  BL31: Built : 14:39:02, Jan 17 2018
NOTICE:  BL31:Rockchip release version: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:26 +0000)

Model: Pine64 Rock64
DRAM:  4 GiB
MMC:   rksdmmc at ff520000: 0, rksdmmc at ff500000: 1
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial at ff130000
Out:   serial at ff130000
Err:   serial at ff130000
Model: Pine64 Rock64
misc_init_r
cpuid=XXX
serial=XXX
Net:   eth0: ethernet at ff540000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
mmc_init: -95, time 9
Card did not respond to voltage select!
mmc_init: -95, time 9
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   Core Release: 3.10a
USB3:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: Sony     Rev: PMAP Prod: Storage Media
            Type: Removable Hard Disk
            Capacity: 7416.0 MB = 7.2 GB (15187968 x 512)
... is now current device
Scanning usb 0:1...
Found EFI removable media binary efi/boot/bootaa64.efi
reading efi/boot/bootaa64.efi
641560 bytes read in 60 ms (10.2 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 02000000 ...
Card did not respond to voltage select!
mmc_init: -95, time 9
Scanning disk rksdmmc at ff520000.blk...
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
Card did not respond to voltage select!
mmc_init: -95, time 9
Scanning disk rksdmmc at ff500000.blk...
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
Scanning disk usb_mass_storage.lun0...
Found 3 disks
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
FreeBSD/arm64 EFI loader, Revision 1.1

   Command line arguments: loader.efi
   EFI version: 2.05
   EFI Firmware: Das U-boot (rev 0.00)
   Console: efi (0)
   Load Path: \efi\boot\bootaa64.efi
   Load Device: UNKNOWN(0001,0004)
"Synchronous Abort" handler, esr 0x96000210
ELR:     fbec72c4
LR:      fbe97500
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : 0000000000000000
x4 : 00000000fbecf890 x5 : 00000000fbec6838
x6 : 00000000fbeea150 x7 : 0000000000000000
x8 : 0000000000000000 x9 : 0000000000000074
x10: 00000000fbeef8a8 x11: 0000000000000296
x12: 0000000000000296 x13: 0000000000000000
x14: 00000000f9f68b90 x15: 0000000000000000
x16: 0000000000000045 x17: 0000000000000000
x18: 0000000000000000 x19: 00000000fbee9e48
x20: 00000000fbece8d3 x21: 0000000000000000
x22: 0000000000000000 x23: 00000000fbeef8b0
x24: 0000000000000000 x25: 0000000000000000
x26: 00000000fbeeeb40 x27: 0000000020001000
x28: 8000000000000005 x29: 00000000fbee9e00

Resetting CPU ...
-------------- next part --------------
DDR version 1.13 20180428
ID:0x805 N
In
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT

U-Boot SPL 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:08)
board_init_sdmmc_pwr_en
setup_ddr_param  1
booted from SPI flash
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):9d3f591
NOTICE:  BL31: Built : 14:39:02, Jan 17 2018
NOTICE:  BL31:Rockchip release version: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:26 +0000)

Model: Pine64 Rock64
DRAM:  4 GiB
MMC:   rksdmmc at ff520000: 0, rksdmmc at ff500000: 1
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial at ff130000
Out:   serial at ff130000
Err:   serial at ff130000
Model: Pine64 Rock64
misc_init_r
cpuid=XXX
serial=XXX
Net:   eth0: ethernet at ff540000
Hit any key to stop autoboot:  0
=> dhcp
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.201 (1 ms)
Using ethernet at ff540000 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.201
Filename 'boot/loader.efi'.
Load address: 0x800800
Loading: ############################################
         2.2 MiB/s
done
Bytes transferred = 641560 (9ca18 hex)
=> tftpboot ${kernel_addr_r} boot/loader.efi
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.201
Filename 'boot/loader.efi'.
Load address: 0x2000000
Loading: ############################################
         2.2 MiB/s
done
Bytes transferred = 641560 (9ca18 hex)
=> tftpboot ${fdt_addr_r} boot/dtb/rockchip/rk3399-rockpro64.dtb
Speed: 1000, full duplex
Using ethernet at ff540000 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.201
Filename 'boot/dtb/rockchip/rk3399-rockpro64.dtb'.
Load address: 0x1f00000
Loading: #####
         1.8 MiB/s
done
Bytes transferred = 72977 (11d11 hex)
=> bootefi ${kernel_addr_r} ${fdt_addr_r}
## Starting EFI application at 02000000 ...
Card did not respond to voltage select!
mmc_init: -95, time 9
Scanning disk rksdmmc at ff520000.blk...
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
Card did not respond to voltage select!
mmc_init: -95, time 10
Scanning disk rksdmmc at ff500000.blk...
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
Found 2 disks
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
FreeBSD/arm64 EFI loader, Revision 1.1

   Command line arguments: loader.efi
   EFI version: 2.05
   EFI Firmware: Das U-boot (rev 0.00)
   Console: efi (0)
   Load Path: boot\dtb\rockchip\rk3399-rockpr
Setting currdev to net0:
Speed: 1000, full duplex
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
|
|  ______               ____   _____ _____
  |  ____|             |  _ \ / ____|  __ \
  | |___ _ __ ___  ___ | |_) | (___ | |  | |
  |  ___| '__/ _ \/ _ \|  _ < \___ \| |  | |
  | |   | | |  __/  __/| |_) |____) | |__| |
  | |   | | |    |    ||     |      |      |
  |_|   |_|  \___|\___||____/|_____/|_____/
...
Autoboot in 0 seconds, hit [Enter] to boot or any other key to stop
Loading kernel...
/boot/kernel/kernel text=0x93951c data=0x1914c8+0x84ab1c syms=[0x8+0x1387f8+0x8+0x124a11]
Loading configured modules...
can't find '/boot/entropy'
Using DTB provided by EFI at 0x8200000.
/


More information about the freebsd-arm mailing list