Orange PI Zero2 and FreeBSD 13.2

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:
# 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
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:
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
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:
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>>>
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:
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
Now I can see on the console instead of:
Code:
"Using DTB provided by EFI at 0x47f00000."
The string:
Code:
"Using DTB from loaded file '/boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb'."
So, looks like DTB has been loaded, but I got the same message:
Code:
awg0: cannot get ahb reset
device_attach: awg0 attach returned 2
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.
 
Ok, here is the other stuff until the booting stuck forever:

---Stuff starts here--------------------------------------------------------------------------
musbotg0: <Allwinner USB DRD> mem 0x5100000-0x51003ff irq 35 on simplebus0
device_attach: musbotg0 attach returned 19
ehci0: <Generic EHCI Controller> mem 0x5200000-0x52000ff irq 38 on simplebus0
usbus0: EHCI version 0.0
usbus0 on ehci0
ohci0: <Generic OHCI Controller> mem 0x5200400-0x52004ff irq 39 on simplebus0
usbus1 on ohci0
iicbus0: <unknown card> at addr 0xe8a
iic0: <I2C generic I/O> on iicbus0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led-0> failed to map pin
gpioled0: <led-1> failed to map pin
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
usbus1: 12Mbps Full Speed USB v1.0
ugen0.1: <Generic EHCI root HUB> at usbus0
uhub0 on usbus0
uhub0: <Generic EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus0: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub0 on usbus1
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus1: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
nfs_diskless: no interface
CPU 0: ARM Cortex-A53 r0p4 affinity: 0
Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG>
Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Instruction Set Attributes 1 = <>
Instruction Set Attributes 2 = <>
Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
Processor Features 1 = <>
Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
Memory Model Features 1 = <8bit VMID>
Memory Model Features 2 = <32bit CCIDX,48bit VA>
Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
Debug Features 1 = <>
Auxiliary Features 0 = <>
Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP DP Conv,SIMDHP SP Conv,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU 1: ARM Cortex-A53 r0p4 affinity: 1
CPU 2: ARM Cortex-A53 r0p4 affinity: 2
CPU 3: ARM Cortex-A53 r0p4 affinity: 3
Release APs...Trying to mount root from nfs:<tftp_and_nfs_server_ip_address>:/exports/orangepizero2.freebsd13 [rw]...
done
---Stuff ends here--------------------------------------------------------------------------

That it is, stuck here forever

So, the loader is able to read root mount point from the file on nfs: /etc/fstab and told it to the kernel but the kernel can not mount root. I think that is because the kernel can not see the ethernet interface as per initial post:
-----------------------
awg0: <Allwinner Gigabit Ethernet> mem 0x5020000-0x502ffff irq 34 on simplebus0
awg0: cannot get ahb reset
device_attach: awg0 attach returned 2
-----------------------
 
Strange indeed. Did you try to exclude it from the kernel? What happens if it doesn't exist? I'd also try to find the "cannot get ahb reset" in the system source for a clue.
Does a GENERIC aarch64 binary kernel show the same problem?
 
Call me old fashioned but why would you not get this debugged on microSD card booting then try and network boot? Did I miss something?

Also make sure your custom dtb makes it to /boot/dtb/ as well as your /EFI/dtb/ directory.
I also like to eliminate all other unneeded dtb just to make sure it is using what I want.
I dont need RPi dtb when building rock.
 
Call me old fashioned but why would you not get this debugged on microSD card booting then try and network boot? Did I miss something?

Also make sure your custom dtb makes it to /boot/dtb/ as well as your /EFI/dtb/ directory.
I also like to eliminate all other unneeded dtb just to make sure it is using what I want.
I dont need RPi dtb when building rock.
I tried on microSD - the story is the same: kernel can not see not ethernet not microSD.
Why I am explaining the network here: just because for me it is more quick to rebuild the kernel on the server and have it ready straight away on the network, so not bother to copy it after building to microSD.
And yes, I am absolutely sure that the kernel loading and using my DTB. For example: I have successfully boot "Linux Debian 10" on that Orange PI Zero2 and I tried to use the binary file sun50i-h616-orangepi-zero2.dtb from the "Linux Debian 10" for boot the Freebsd (that is silly, I agree, but I am desperate), so, using sun50i-h616-orangepi-zero2.dtb from the Debian was the result that FreeBSD kernel stuck forever from the very start without any messages at all, so, the process of loading the DTB file is obviously working!

Thank you anyway!
Cheers!
 
Strange indeed. Did you try to exclude it from the kernel? What happens if it doesn't exist? I'd also try to find the "cannot get ahb reset" in the system source for a clue.
Does a GENERIC aarch64 binary kernel show the same problem?
Yes, that is GENERIC aarch64 kernel, just compiled by myself

Well, exclude what ? The enternet interface? What the reason?
My goal is: to boot the kernel and to mount the root filesystem from any source, microSD, or network or whatever else.
Now I can not mount any root filesystem by the kernel.

Of course, the first thing I did: I found "cannot get ahb reset" in the kernel sources, that is pretty simple, then I am digging now down to the kernel sources but I am not the kernel source expert, so, not
much success yet. What I have found so far: the message is appearing only one time in the file:
sys/arm/allwinner/if_awg.c
That is appearing after call of the function hwreset_get_by_ofw_name(in the file sys/dev/extres/hwreset/hwreset.c) with the parameter "stmmaceth" returns code 19 and following after that the same function return 2 with the parameter "ahb".

So, inside of hwreset_get_by_ofw_name there is the call of function hwreset_get_by_ofw_idx which calls the function OF_device_from_xref(xnode); which can not find the device by xnode.
So, some internal kernel structures does not contain the ethernet device, that mean the kernel can not see it.

I am digging down more without success yet, just hoping to find some kernel experts here.
I suspect that is no full kernel support yet for Orange PI Zero2, is that ???
Hoping that it should be some simple changes in DTS files taking in account that I have successfully run Freebsd on Orange PI Zero already, however, it is 32 bit!

Thank you anyone in advance for any help!
 
so not bother to copy it after building to microSD.
What you missing is the whole uboot/bios experience.

Just like a regular PC that has problems booting you might want to pop into u-boot and make sure everything is OK.
Consider it a diagnostic tool. U-boot command prompt is the nerve center.
 
What you missing is the whole uboot/bios experience.

Just like a regular PC that has problems booting you might want to pop into u-boot and make sure everything is OK.
Consider it a diagnostic tool. U-boot command prompt is the nerve center.
Well, as far as I told already, there is no any issue with u-boot.
That is u-boot start:
------------------------------------------------------------------
U-Boot SPL 2023.04 (May 21 2023 - 16:26:06 +1200)
DRAM: 1024 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.8(debug):v2.8
NOTICE: BL31: Built : 16:14:30, May 21 2023
NOTICE: BL31: Detected Allwinner H616 SoC (1823)
NOTICE: BL31: Found U-Boot DTB at 0x4a0964f0, model: OrangePi Zero2
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
INFO: PMIC: Probing AXP305 on RSB
INFO: PMIC: aldo1 voltage: 3.300V
INFO: PMIC: aldo2 voltage: 3.300V
INFO: PMIC: aldo3 voltage: 3.300V
INFO: PMIC: bldo1 voltage: 1.800V
INFO: PMIC: dcdcd voltage: 1.500V
INFO: PMIC: dcdce voltage: 3.300V
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: cortex_a53: CPU workaround for 1530924 was applied
INFO: PSCI: Suspend is unavailable
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
INFO: Changed devicetree.


U-Boot 2023.04 (May 21 2023 - 16:26:06 +1200) Allwinner Technology

CPU: Allwinner H616 (SUN50I)
Model: OrangePi Zero2
DRAM: 1 GiB
Core: 48 devices, 18 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Net: eth0: ethernet@5020000
Hit any key to stop autoboot: 0
=>
---------------------------------------------------------------------------------

That is info about the hardware from u-boot:
---------------------------------------------------------------------------------
=> mmc info
Device: mmc@4020000
Manufacturer ID: 3
OEM: 5344
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> net list
eth0 : ethernet@5020000 02:00:0b:a2:82:57 active
=>
---------------------------------------------------------------------------------
So, everything in fine.
Even FreeBSD loader can perfectly see mmc and ethernet and can read from the root system.
 
Call me old fashioned but why would you not get this debugged on microSD card booting then try and network boot? Did I miss something?

Also make sure your custom dtb makes it to /boot/dtb/ as well as your /EFI/dtb/ directory.
I also like to eliminate all other unneeded dtb just to make sure it is using what I want.
I dont need RPi dtb when building rock.
Ok, I have managed put the u-boot on SPI-FLASH and now I can boot up to u-boot prompt even without any microSD card if I need.

So, for completely clear experiment I have downloaded binary images from here:
https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/
I tried three images:
FreeBSD-13.2-RELEASE-arm64-aarch64-mini-memstick.img
FreeBSD-13.2-RELEASE-arm64-aarch64-memstick.img
FreeBSD-13.2-RELEASE-arm64-aarch64-bootonly.iso

I just put the image on microSD card by dd command, turn the OrangePI zero 2 on and I can see on
the serial console u-boot starting from SPI-FLASH then booting FreeBSD loader then booting the kernel.

Final of the story the same: kernel do not see not microSD card not ethernet interface.
The booting ends by kernel prompt:

mountroot>


Here is the full output from the serial interface when I tried to boot from the image FreeBSD-13.2-RELEASE-arm64-aarch64-bootonly.iso
I did not press any key during the boot until I got the prompt: "mountroot>"

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
U-Boot SPL 2023.04 (May 21 2023 - 16:26:06 +1200)
DRAM: 1024 MiB
Trying to boot from sunxi SPI
NOTICE: BL31: v2.8(debug):v2.8
NOTICE: BL31: Built : 16:14:30, May 21 2023
NOTICE: BL31: Detected Allwinner H616 SoC (1823)
NOTICE: BL31: Found U-Boot DTB at 0x4a0964f0, model: OrangePi Zero2
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
INFO: PMIC: Probing AXP305 on RSB
INFO: PMIC: aldo1 voltage: 3.300V
INFO: PMIC: aldo2 voltage: 3.300V
INFO: PMIC: aldo3 voltage: 3.300V
INFO: PMIC: bldo1 voltage: 1.800V
INFO: PMIC: dcdcd voltage: 1.500V
INFO: PMIC: dcdce voltage: 3.300V
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: cortex_a53: CPU workaround for 1530924 was applied
INFO: PSCI: Suspend is unavailable
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
INFO: Changed devicetree.


U-Boot 2023.04 (May 21 2023 - 16:26:06 +1200) Allwinner Technology

CPU: Allwinner H616 (SUN50I)
Model: OrangePi Zero2
DRAM: 1 GiB
Core: 48 devices, 18 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0
Loading Environment from SPIFlash... SF: Detected mx25l1606e with page size 256 Bytes, erase size 4 KiB, total 2 MiB
*** Warning - bad CRC, using default environment

Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Net: eth0: ethernet@5020000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Failed to load EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootaa64.efi
1180860 bytes read in 51 ms (22.1 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

Command line arguments: loader.efi
Image base: 0x7adeb000
EFI version: 2.100
EFI Firmware: Das U-Boot (rev 8227.1024)
Console: efi,comconsole (0)
Load Path: /efi\boot\bootaa64.efi
Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,GPT,59052562-d502-11ed-8f91-0cc47ad8b808,0x50,0x1000)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,GPT,59052562-d502-11ed-8f91-0cc47ad8b808,0x50,0x1000)
Setting currdev to disk0p1:
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`:. :eek: `+-
| 1. Boot Multi user [Enter] | y/ -/` -o/
| 2. Boot Single user | .- ::/sy+:.
| 3. Escape to loader prompt | / `-- /
| 4. Reboot | `: :`
| 5. Cons: Video | `: :`
| | / /
| Options: | .- -.
| 6. Kernel: default/kernel (1 of 1) | -- -.
| 7. Boot Options | `:` `:`
| | .-- `--.
| | .---.....----.
+-----------------------------------------+
Autoboot in 0 seconds. [Space] to pause

Loading kernel...
/boot/kernel/kernel text=0x2a8 text=0x8d5250 text=0x212d5c data=0x1ae510 data=0x0+0x2a9000 0x8+0x1295d0+0x8+0x14e631-
Loading configured modules...
can't find '/boot/entropy'
can't find '/etc/hostid'
Using DTB provided by EFI at 0x47ef8000.
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 releng/13.2-n254617-525ecfdad597 GENERIC arm64
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
VT: init without driver.
module firmware already present!
real memory = 1073479680 (1023 MB)
avail memory = 1024159744 (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 7af14000 mode 2 pages 1
MAP 7af18000 mode 2 pages 1
MAP 7af1a000 mode 2 pages 2
MAP 7af1d000 mode 2 pages 4
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
��uart0: <Non-standard ns8250 class UART with FIFOs> mem 0x5000000-0x50003ff irq 21 on simplebus0
uart0: 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
musbotg0: <Allwinner USB DRD> mem 0x5100000-0x51003ff irq 35 on simplebus0
device_attach: musbotg0 attach returned 19
ehci0: <Generic EHCI Controller> mem 0x5200000-0x52000ff irq 38 on simplebus0
usbus0: EHCI version 0.0
usbus0 on ehci0
ohci0: <Generic OHCI Controller> mem 0x5200400-0x52004ff irq 39 on simplebus0
usbus1 on ohci0
iicbus0: <unknown card> at addr 0xe8a
iic0: <I2C generic I/O> on iicbus0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led-0> failed to map pin
gpioled0: <led-1> failed to map pin
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
CPU 0: ARM Cortex-A53 r0p4 affinity: 0
Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG>
Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Instruction Set Attributes 1 = <>
Instruction Set Attributes 2 = <>
Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
Processor Features 1 = <>
Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
Memory Model Features 1 = <8bit VMID>
Memory Model Features 2 = <32bit CCIDX,48bit VA>
Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
Debug Features 1 = <>
Auxiliary Features 0 = <>
Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP DP Conv,SIMDHP SP Conv,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU 1: ARM Cortex-A53 r0p4 affinity: 1
CPU 2: ARM Cortex-A53 r0p4 affinity: 2
CPU 3: ARM Cortex-A53 r0p4 affinity: 3
Release APs...done
usbus0: 480Mbps High Speed USB v2.0
usbus1: 12Mbps Full Speed USB v1.0
Trying to mount root from cd9660:/dev/iso9660/13_2_RELEASE_AARCH64_BO [ro]...
ugen0.1: <Generic EHCI root HUB> at usbus0
uhub0 on usbus0
uhub0: <Generic EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus0: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub0 on usbus1
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus1: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
mountroot: waiting for device /dev/iso9660/13_2_RELEASE_AARCH64_BO...
Mounting from cd9660:/dev/iso9660/13_2_RELEASE_AARCH64_BO failed with error 19.

Loader variables:
vfs.root.mountfrom=cd9660:/dev/iso9660/13_2_RELEASE_AARCH64_BO
vfs.root.mountfrom.options=ro

Manual root filesystem specification:
<fstype>:<device> [options]
Mount <device> using filesystem <fstype>
and with the specified (optional) option list.

eg. ufs:/dev/da0s1a
zfs:zroot/ROOT/default
cd9660:/dev/cd0 ro
(which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

? List valid disk boot devices
. Yield 1 second (for background tasks)
<empty line> Abort manual input

mountroot> ?

List of GEOM managed disk devices:


mountroot> random: unblocking device.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

As you can see, I have entered "?" at the "mountroot>" prompt and I got the empty list.

Thank you for any help possible!
 
Scanning mmc 0:1...
For the microSD card you should run mmc tools from u-boot.
mmc info
mmc list
mmc dev
mmc dev 0
mmc part (This should show a file structure of your microSD card if ok)

Same with loader prompt. See if your filesystem is showing up.
lsdev
ls /

Regarding networking you can see the ethernet device is showing up in u-boot.
Net: eth0: ethernet@5020000
So does FreeBSD support the device?
With an unsupported board you are probably best off trying -CURRENT.

Supported H6 boards.
 
Just to set the bar, H6 and H616 support is alpha quality. H5 is the latest SoC in the series that's been used for development so you might see quirks etc with newer ones.
 
stop the loader and type
fdt prop /soc/ethernet
OK fdt prop /soc/ethernet
Using DTB provided by EFI at 0x47ef8000.
local-mac-address = [0x02 0x00 0x0b 0xa2 0x82 0x57]
compatible = "allwinner,sun50i-h616-emac0", "allwinner,sun50i-a64-emac"
reg = <0x05020000 0x00010000>
interrupts = <0x00000000 0x0000000e 0x00000004>
interrupt-names = "macirq"
clocks = <0x00000002 0x00000052>
clock-names = "stmmaceth"
resets = <0x00000002 0x0000001e>
reset-names = "stmmaceth"
syscon = <0x00000014>
status = "okay"
pinctrl-names = "default"
pinctrl-0 = <0x00000015>
phy-mode = "rgmii"
phy-handle = <0x00000016>
phy-supply = <0x0000000c>
allwinner,rx-delay-ps = <0x00000c1c>
allwinner,tx-delay-ps = <0x000002bc>
phandle = <0x00000030>
OK
 
For the microSD card you should run mmc tools from u-boot.
mmc info
mmc list
mmc dev
mmc dev 0
mmc part (This should show a file structure of your microSD card if ok)

Same with loader prompt. See if your filesystem is showing up.
lsdev
ls /

Regarding networking you can see the ethernet device is showing up in u-boot.

So does FreeBSD support the device?
With an unsupported board you are probably best off trying -CURRENT.

Supported H6 boards.
=>
=> mmc info
Device: mmc@4020000
Manufacturer ID: 3
OEM: 5344
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> mmc list
mmc@4020000: 0 (SD)
=> mmc dev
switch to partitions #0, OK
mmc0 is current device
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> mmc part

Partition Map for MMC device 0 -- Partition Type: EFI

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000003 0x0001041a ""
attrs: 0x0000000000000000
type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
guid: 6290e585-d506-11ed-8f91-0cc47ad8b808
2 0x0001041b 0x000b8d9a ""
attrs: 0x0000000000000000
type: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
guid: 6290e58a-d506-11ed-8f91-0cc47ad8b808
=>

---------------------------------------------------------------------------------

For loader prompt:
OK lsdev
disk devices:
disk0: 62333952 X 512 blocks (removable)
disk0p1: EFI
disk0p2: FreeBSD UFS
http: (unknown)
net devices:
net0:
OK ls /
/
d tmp
d mnt
d proc
d root
d rescue
d var
d dev
.cshrc
d boot
.profile
d usr
d bin
d sbin
COPYRIGHT
d etc
d net
d libexec
d media
d lib
OK

You were saying: "With an unsupported board you are probably best off trying -CURRENT."
What does it mean?
 
U-Boot SPL 2023.04 (May 21 2023 - 16:26:06 +1200)
It looks like you have built your own version of u-boot.
Ports version is 2023.01
Are you sure you have the FreeBSD patches needed inplace?
Why don't you try the ports version of u-boot for Similar H6 platform.
Scrape the dtb from u-boot after compiling in /arch/arm/dts/*
 
It looks like you have built your own version of u-boot.
Ports version is 2023.01
Are you sure you have the FreeBSD patches needed inplace?
Why don't you try the ports version of u-boot for Similar H6 platform.
Scrape the dtb from u-boot after compiling in /arch/arm/dts/*
I would be happy to use u-boot from ports but there is no u-boot port for OrangePI zero2.
In version 13.2 are only that ones:
$ find /usr/ports -name 'u-boot*zero*'
/usr/ports/sysutils/u-boot-orangepi-zero
/usr/ports/sysutils/u-boot-orangepi-zero-plus
$

My u-boot and freebsd loader has no issues with recognizing the ethernet interface.
What is also strange: I tried the file sun50i-h616-orangepi-zero2.dtb which I got from my own built u-boot version and I got the same: "awg0: cannot get ahb reset"

BUT! I got some progress!
I tried the file sun50i-h6-pine-h64.dtb which in release 13.2 in the directory /boot/dtb/allwinner
And I pass that point !
------------------------------------------------------------------------------------------
Using DTB from loaded file '/boot/dtb/allwinner/sun50i-h6-pine-h64.dtb'.
Loading DTB overlays: 'sun50i-a64-timer,sun50i-a64-opp'
/boot/dtb/overlays/sun50i-a64-timer.dtbo size=0x175
/boot/dtb/overlays/sun50i-a64-opp.dtbo size=0x74f
DTB overlay '/boot/dtb/overlays/sun50i-a64-timer.dtbo' not compatible
DTB overlay '/boot/dtb/overlays/sun50i-a64-opp.dtbo' not compatible
EFI framebuffer information:
addr, size 0x0, 0x0
dimensions 0 x 0
stride 0
masks 0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
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 releng/13.2-n254617-525ecfdad597 GENERIC arm64
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
VT: init without driver.
module firmware already present!
real memory = 1073479680 (1023 MB)
avail memory = 1024253952 (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 7af12000 mode 2 pages 1
MAP 7af16000 mode 2 pages 1
MAP 7af18000 mode 2 pages 2
MAP 7af1b000 mode 2 pages 4
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
clk_fixed1: <Fixed clock> on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
rtc0: <Allwinner RTC> mem 0x7000000-0x70003ff irq 44,45 on simplebus0
rtc0: registered as a time-of-day clock, resolution 1.000000s
ccu_h6ng0: <Allwinner H6 Clock Control Unit NG> mem 0x3001000-0x3001fff on simplebus0
ccu_sun50i_h6_r0: <Allwinner SUN50I_H6_R Clock Control Unit NG> mem 0x7010000-0x70103ff on simplebus0
gic0: <ARM Generic Interrupt Controller> mem 0x3021000-0x3021fff,0x3022000-0x3023fff,0x3024000-0x3025fff,0x3026000-0x3027fff irq 20 on simplebus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 192
aw_r_intc_gicp0: <Allwinner R INTC> mem 0x7021000-0x70213ff irq 47 on simplebus0
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x300b000-0x300b3ff irq 16,17,18,19 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <Allwinner GPIO/Pinmux controller> mem 0x7022000-0x70223ff irq 48,49 on simplebus0
gpiobus1: <OFW GPIO bus> on gpio1
iichb0: <Allwinner Integrated I2C Bus Controller> mem 0x7081400-0x70817ff irq 51 on simplebus0
iicbus0: <OFW I2C bus> on iichb0
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
aw_syscon0: <Allwinner syscon> mem 0x3000000-0x3000fff on simplebus0
awusbphy0: <Allwinner USB PHY> mem 0x5100400-0x5100423,0x5101800-0x5101803,0x5311800-0x5311803 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpufreq_dt0: no regulator for cpu@0
device_attach: cpufreq_dt0 attach returned 6
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
gpioc0: <GPIO controller> on gpio0
aw_mmc0: <Allwinner Integrated MMC/SD controller> mem 0x4020000-0x4020fff irq 22 on simplebus0
aw_mmc1: <Allwinner Integrated MMC/SD controller> mem 0x4022000-0x4022fff irq 24 on simplebus0
�uart0: <Non-standard ns8250 class UART with FIFOs> mem 0x5000000-0x50003ff irq 25 on simplebus0
uart0: console (-1,n,8,1)
awg0: <Allwinner Gigabit Ethernet> mem 0x5020000-0x502ffff irq 34 on simplebus0
miibus0: <MII bus> on awg0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
awg0: Ethernet address: 02:00:0b:a2:82:57
musbotg0: <Allwinner USB DRD> mem 0x5100000-0x51003ff irq 36 on simplebus0
musbotg0: setting phy mode 1
usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus0 on musbotg0
ehci0: <Generic EHCI Controller> mem 0x5101000-0x51010ff irq 37 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci0
ohci0: <Generic OHCI Controller> mem 0x5101400-0x51014ff irq 38 on simplebus0
usbus2 on ohci0
ehci1: <Generic EHCI Controller> mem 0x5311000-0x53110ff irq 40 on simplebus0
usbus3: EHCI version 1.0
usbus3 on ehci1
ohci1: <Generic OHCI Controller> mem 0x5311400-0x53114ff irq 41 on simplebus0
usbus4 on ohci1
aw_wdog0: <Allwinner A31 Watchdog> mem 0x7020400-0x702041f irq 46 on simplebus0
gpioc1: <GPIO controller> on gpio1
aw_ir0: <Allwinner CIR controller> mem 0x7040000-0x70403ff irq 50 on simplebus0
aw_ir0: Cannot get IR clock
device_attach: aw_ir0 attach returned 6
iicbus0: <unknown card> at addr 0x6c
nxprtc0: <NXP PCF8563 RTC> at addr 0xa2 irq 54 on iicbus0
iic0: <I2C generic I/O> on iicbus0
gpioled0: <GPIO LEDs> on ofwbus0
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
-----------------------------------------------------------------------------------------------------------------------------------------------------

So, looks like awg0 was successfully initialized: "awg0: Ethernet address: 02:00:0b:a2:82:57" !
But it is stuck forever at that point: after armv8crypto0.

So, I have now:

1. sun50i-h616-orangepi-zero2.dts which can not initialize the ethernet interface.
2. sun50i-h6-pine-h64.dts which has initialized the ethernet interface but stuck afterwards.

Trying to join them together to get worked dts/dtb file.
 
CURRENT is our development version. All the new stuff goes in CURRENT first.

It is an unsupported version on forum because it is a development version.

Currently -CURRENT is at version 14.
Yes, I tried to build "main" from github and I got kernel crash, whereas 13.2 built from the same github does work as I described: up to "cannot get ahb reset"
 
From your printout everything looks good. U-boot sees the microSD card and the partitions.
The loader shows the device and its partitions and the files show correctly.
So your u-boot is OK.
14.0-CURRENT is going to be your best bet. This is definatly a newer unsupported device.
That don't mean it wont run in some form as you have found.
 
Here is an approach to try.

Burn your platforms u-boot onto a microSD card.

Burn the FreeBSD-14-CURRENT Image (Like The H6 Wiki shows) on a USB stick since microSD card is not working.

Make sure that your boards DTB resides in both FAT/EFI Partition /dtb and in root drive/boot/dtb/ of the USB stick.

u-boot on microSD may require you to set USB drive to boot.

So boot to u-boot command prompt and type
usb storage
usb dev
usb dev 0
boot
 
sle123, I want to be like you and know what you now know. Here is my little blog https://ghostbsd-arm64.blogspot.com/2022/09/freebsd-140-compiling-kernel-for.html
FreeBSD libc.so.7 fbsd17 error

my interest is in getting uart serial ports 3, 4, 5 working on the Raspberry Pi 4B with 8 gigs, This so I can test a Adafruit GPS module at 9600 baud to get exact time into the FreeBSD 14.0-CURRENT O/S.

sle123, If you can document your files and process of porting to the Orange Pi Zero 2, I want to know where you download the sources, how you set up the makefile, etc. Any little bit of documents you can share, will help us all arm64 developers in our respective areas. I am interested in the sources for DAS U-Boot 2023.4 that is used in FreeBSD.

https://marcin.juszkiewicz.com.pl/2021/02/22/aarch64-boards-and-perception/ Marcin J. blog. You might find interesting knowledge here.

Marcin Juszkiewicz


Random mumblings of ARM developer

You are so close to get a working Orange Pi Zero 2 booting, sle123.
 
So, eventually, with some patches, I was able to build dtb file which allows the kernel see network interface!

Will post full step-by-step guide later.

However, the kernel still can not see mmc but for now it is not critical, my goal is: to get diskless working.
Now there is the further problem: the kernel is booting only in single-user mode and I do not know how to switch it to
normal multi-user mode.
Here is the full boot log from the console.
What did I miss?

The log is started from freebsd loader prompt "OK":
-------------------------------------------------------------------
Type '?' for a list of commands, 'help' for more detailed help.
OK netserver nfs://192.168.1.60/exports/m
OK load /boot/kernel/kernel
/boot/kernel/kernel text=0x2a8 text=0x8d5250 text=0x21337c data=0x1ae510 data=0x0+0x2a9000 0x8+0x1295d0+0x8+0x14e631|
OK load -t dtb /boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb
/boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb size=0x4153
OK boot -s
Using DTB from loaded file '/boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb'.
EFI framebuffer information:
addr, size 0x0, 0x0
dimensions 0 x 0
stride 0
masks 0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
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 #0 n254617-525ecfdad597-dirty: Fri Jun 9 19:41:17 NZST 2023
build@freebsdbuild:/usr/home/build/fbsd_new/obj/usr/home/build/fbsd_new/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
VT: init without driver.
module firmware already present!
real memory = 1073479680 (1023 MB)
avail memory = 1024028672 (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 7af13000 mode 2 pages 1
MAP 7af17000 mode 2 pages 1
MAP 7af19000 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
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
rtc0: <Allwinner RTC> mem 0x7000000-0x70003ff irq 35 on simplebus0
rtc0: registered as a time-of-day clock, resolution 1.000000s
ccu_h6ng0: <Allwinner H6 Clock Control Unit NG> mem 0x3001000-0x3001fff on simplebus0
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 38 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: <16x50 with 256 byte FIFO> mem 0x5000000-0x50003ff irq 21 on simplebus0
uart2: console (115384,n,8,1)
awg0: <Allwinner Gigabit Ethernet> mem 0x5020000-0x502ffff irq 34 on simplebus0
awg0: Failed to find syscon node
awg0: cannot get syscon driver handle
miibus0: <MII bus> on awg0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
awg0: Ethernet address: 02:00:be:9b:71:c6
iicbus0: <unknown card> at addr 0xe8a
iic0: <I2C generic I/O> on iicbus0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led-0> failed to map pin
gpioled0: <led-1> failed to map pin
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
usb_needs_explore_all: no devclass
Trying to mount root from nfs:192.168.1.60:/exports/m [rw]...
CPU 0: ARM Cortex-A53 r0p4 affinity: 0
Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG>
Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Instruction Set Attributes 1 = <>
Instruction Set Attributes 2 = <>
Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
Processor Features 1 = <>
Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
Memory Model Features 1 = <8bit VMID>
Memory Model Features 2 = <32bit CCIDX,48bit VA>
Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
Debug Features 1 = <>
Auxiliary Features 0 = <>
Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP DP Conv,SIMDHP SP Conv,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU 1: ARM Cortex-A53 r0p4 affinity: 1
CPU 2: ARM Cortex-A53 r0p4 affinity: 2
CPU 3: ARM Cortex-A53 r0p4 affinity: 3
Release APs...done
awg0: link state changed to DOWN
NFS ROOT: 192.168.1.60:/exports/m
awg0: link state changed to UP
Warning: bad time from time-of-day clock, system time will not be set accurately
Warning: bad time from time-of-day clock, system time will not be set accurately
Enter full pathname of shell or RETURN for /bin/sh:
resizewin: timeout reading from terminal
root@:/ #
root@:/ # cd
root@:~ #
root@:~ # ls -al
total 80
drwxr-xr-x 2 root wheel 8 Jun 10 2023 .
drwxr-xr-x 18 root wheel 21 Jun 10 2023 ..
-rw-r--r-- 2 root wheel 1023 Jun 9 2023 .cshrc
-rw-r--r-- 1 root wheel 80 Jun 9 2023 .k5login
-rw-r--r-- 1 root wheel 328 Jun 9 2023 .login
-rw-r--r-- 2 root wheel 507 Jun 9 2023 .profile
-rw------- 1 root wheel 358 Jun 10 2023 .sh_history
-rw-r--r-- 1 root wheel 1186 Jun 9 2023 .shrc
root@:~ #
root@:~ # echo >test
-sh: cannot create test: Read-only file system
root@:~ #
root@:~ # mount -u /
root@:~ #
root@:~ # echo >test
root@:~ #
root@:~ # ls -al
total 81
drwxr-xr-x 2 root wheel 9 Jun 10 2023 .
drwxr-xr-x 18 root wheel 21 Jun 10 2023 ..
-rw-r--r-- 2 root wheel 1023 Jun 9 2023 .cshrc
-rw-r--r-- 1 root wheel 80 Jun 9 2023 .k5login
-rw-r--r-- 1 root wheel 328 Jun 9 2023 .login
-rw-r--r-- 2 root wheel 507 Jun 9 2023 .profile
-rw------- 1 root wheel 358 Jun 10 2023 .sh_history
-rw-r--r-- 1 root wheel 1186 Jun 9 2023 .shrc
-rw-r--r-- 1 root wheel 1 Jun 10 2023 test
root@:~ #
root@:~ # cat /etc/fstab
# Device Mountpoint FSType Options Dump Pass
192.168.1.60:/exports/m / nfs rw 1 1
root@:~ #
root@:~ # df -h
Filesystem Size Used Avail Capacity Mounted on
192.168.1.60:/exports/m 388G 22G 366G 6% /
devfs 1.0K 1.0K 0B 100% /dev
root@:~ #
root@:~ # init 3
init: invalid run-level ``3''
root@:~ #
root@:~ # init 2
init: invalid run-level ``2''
root@:~ #
root@:~ # init 1
Enter full pathname of shell or RETURN for /bin/sh:
root@:/ #
---------------------------------------------------------------------------------------------------------------------------------------------------------

So, why it not in runlevel 3 and how to switch to it?

Thank you in advance for any help!
 
Back
Top