Hi All!
I am trying to run FreeBSD 13.2 on Orange PI Zero2.
1. Successfully built from sources u-boot v2023.04, put it on microSD card by command:
Insert card into Orange PI Zero2, connect serial console to my desctop PC, turn power on.
U-boot started successfully, I got u-boot prompt "=>" on the serial console.
2. Successfully built from github sources FreeBSD 13.2:
3. Made the directory /exports/orangepizero2.freebsd13/boot accessible by tftp
Made the directory /exports/orangepizero2.freebsd13 accessible by nfs
4. Manually trying to boot Orange PI Zero2 from serial console:
U-Boot:
So far so good, everything is ok, I see FreeBSD boot menu and press key "3" to get to FreeBSD loader prompt "OK"
5. Continue manual boot at FreeBSD loader prompt:
That it is! End of story.
Looks like kernel can not see ethernet interface, USB, microsd card.
However, as far as you can mention: u-boot and FreeBSD loader can successfully use the ethernet.
I also tried to get DTS file sun50i-h616-orangepi-zero2.dts from the main branch of the FreeBSD sources, copied it to 13.2 sources,
rebuild kernel and I successfully got compiled binary file /boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb
Then I tried to boot kernel like that:
Now I can see on the console instead of:
The string:
So, looks like DTB has been loaded, but I got the same message:
and still kernel see nothing.
So, what can I do now?
I would be happy if kernel would be able to see only the ethernet interface, that is enough!
Thank you all in advance for any help!
Cheers!
SLE.
I am trying to run FreeBSD 13.2 on Orange PI Zero2.
1. Successfully built from sources u-boot v2023.04, put it on microSD card by command:
# dd if=u-boot-sunxi-with-spl.bin of=<mmc_card_device> bs=1k seek=8 conv=sync
Insert card into Orange PI Zero2, connect serial console to my desctop PC, turn power on.
U-boot started successfully, I got u-boot prompt "=>" on the serial console.
2. Successfully built from github sources FreeBSD 13.2:
Code:
$ git clone [URL]https://github.com/freebsd/freebsd.git[/URL] src
$ export BASEDIR=$(pwd)
$ export MAKEOBJDIRPREFIX=$BASEDIR/obj
$ cd $BASEDIR/src
$ git checkout release/13.2.0
$ NJOBS=`sysctl hw.ncpu|awk '{print $2-1}'`
$ make -j$NJOBS buildworld TARGET_ARCH=aarch64
$ make -j$NJOBS buildkernel TARGET_ARCH=aarch64 KERNCONF=GENERIC
$ DD=/exports/orangepizero2.freebsd13
$ sudo mkdir $DD
$ sudo -E make installworld TARGET_ARCH=aarch64 DESTDIR=$DD
$ sudo -E make distribution TARGET_ARCH=aarch64 DESTDIR=$DD
$ sudo -E make installkernel TARGET_ARCH=aarch64 KERNCONF=GENERIC DESTDIR=$DD
Made the directory /exports/orangepizero2.freebsd13 accessible by nfs
4. Manually trying to boot Orange PI Zero2 from serial console:
U-Boot:
Code:
=> setenv ipaddr <orangepizero2_ip_address>
=> setenv netmask 255.255.255.0
=> setenv serverip <tftp_and_nfs_server_ip_address>
=> tftpboot 0x44000000 loader.efi
=> bootefi 0x44000000
5. Continue manual boot at FreeBSD loader prompt:
Code:
OK netserver nfs://<tftp_and_nfs_server_ip_address>/exports/orangepizero2.freebsd13
OK load /boot/kernel/kernel
/boot/kernel/kernel text=0x2a8 text=0x8d52b0 text=0x21329c data=0x1ae510 data=0x0+0x2a9000 0x8+0x1295d0+0x8+0x14e631|
OK boot
Using DTB provided by EFI at 0x47f00000.
EFI framebuffer information:
addr, size 0x0, 0x0
dimensions 0 x 0
stride 0
masks 0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.2-RELEASE #7 n254617-525ecfdad597-dirty: Wed May 31 16:37:21 NZST 2023
build@freebsdbuild:/usr/home/build/fbsd/obj/usr/home/build/fbsd/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 14.0.5 ([URL]https://github.com/llvm/llvm-project.git[/URL] llvmorg-14.0.5-0-gc12386ae247c)
VT: init without driver.
module firmware already present!
real memory = 1073479680 (1023 MB)
avail memory = 1023569920 (976 MB)
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before_seeding' was enabled.
random: entropy device external interface
MAP 7af0f000 mode 2 pages 1
MAP 7af13000 mode 2 pages 1
MAP 7af15000 mode 2 pages 6
MAP 7ff40000 mode 2 pages 16
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
clk_fixed0: <Fixed clock> on ofwbus0
simplebus0: <Flattened device tree simple bus> on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller> mem 0x3021000-0x3021fff,0x3022000-0x3023fff,0x3024000-0x3025fff,0x3026000-0x3027fff irq 17 on simplebus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 192
generic_timer0: <ARMv8 Generic Timer> irq 4,5,6,7 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
iichb0: <Allwinner RSB> mem 0x7083000-0x70833ff irq 47 on simplebus0
iicbus0: <OFW I2C bus> on iichb0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
pmu0: <Performance Monitoring Unit> irq 0,1,2,3 on ofwbus0
aw_wdog0: <Allwinner A31 Watchdog> mem 0x30090a0-0x30090bf irq 8 on simplebus0
��uart2: <Non-standard ns8250 class UART with FIFOs> mem 0x5000000-0x50003ff irq 21 on simplebus0
uart2: console (-1,n,8,1)
awg0: <Allwinner Gigabit Ethernet> mem 0x5020000-0x502ffff irq 34 on simplebus0
awg0: cannot get ahb reset
device_attach: awg0 attach returned 2
<<Lots of other stuff skipped>>>
Looks like kernel can not see ethernet interface, USB, microsd card.
However, as far as you can mention: u-boot and FreeBSD loader can successfully use the ethernet.
I also tried to get DTS file sun50i-h616-orangepi-zero2.dts from the main branch of the FreeBSD sources, copied it to 13.2 sources,
rebuild kernel and I successfully got compiled binary file /boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb
Then I tried to boot kernel like that:
Code:
OK netserver nfs://<tftp_and_nfs_server_ip_address>/exports/orangepizero2.freebsd13
OK load /boot/kernel/kernel
OK load -t dtb /boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb
OK boot -s
Code:
"Using DTB provided by EFI at 0x47f00000."
Code:
"Using DTB from loaded file '/boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb'."
Code:
awg0: cannot get ahb reset
device_attach: awg0 attach returned 2
So, what can I do now?
I would be happy if kernel would be able to see only the ethernet interface, that is enough!
Thank you all in advance for any help!
Cheers!
SLE.