Solved Orange Pi Zero - diskless PXE-boot attempt

After a few weeks of trying, I prepared a Orange Pi Zero without SD-card by flashing the internal eMMC with a bootloader using this howto: https://hackaday.io/project/181169-orange-pi-zero-native-network-boot
We now have a loaded 13.2 ARMv7 GENERIC kernel but it hangs after loading.

Code:
Loading kernel...
/boot/kernel/kernel text=0x1b4 text=0x719e9c text=0x19a610 data=0xb1f60 data=0x0+0x1e8000 0x4+0xa4160+0x4+0x116be3|
Loading configured modules...
/boot/kernel/umodem.ko text=0x1540 text=0xe90 data=0x230+0x4 0x4+0xe70+0x4+0xa7c
loading required module 'ucom'
/boot/kernel/ucom.ko text=0x19f8 text=0x2d18 data=0x494+0x838 0x4+0x1480+0x4+0xbcf
can't find '/boot/entropy'
can't find '/etc/hostid'

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...           
Using DTB provided by EFI at 0x47f00000.
Kernel entry at 0x54e00200...
Kernel args: (null)
EHCI failed to shut down host controller.

Who knows what's happening here? I have the idea the EHCI fail isn't the actual problem since we're booting from LAN and don't use any local storage. The kernel just doesn't start without giving a problem. A problem is that compiling a full world takes 4 days on this system I have to decide where to look..

I think this is the last barrier after many before actual login. If this eventually works, I might post a complete howto somewhere, which is a very long story.
 
args: (null) looks like a problem.

What does your dhcpd.conf entry look like? Did you test your PXE serving with an easier target such as amd64 and BIOS-driven PXE?
 
args: (null) looks like a problem.

What does your dhcpd.conf entry look like? Did you test your PXE serving with an easier target such as amd64 and BIOS-driven PXE?

The pxe-boot is already succesful at this point. The loader.efi seems to work and take it to the kernel loading. Also, dhcp-requests and nfs-mounts from other systems on the LAN work. Qemu started without local disk tries to PXE-boot the server too, so it's visible to a vm configured as LAN node. Still have to try pxe-booting a x86 world.

My dhcpd.conf:
Code:
option domain-name "example.org";
option domain-name-servers 192.168.2.254;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.33 192.168.2.66;
  option routers 192.168.2.254;
  option root-path "/Orangepi_pxe/nfs_root";
  next-server 192.168.2.100;  # TFTP server address
  filename "/boot/loader.efi";   # PXE boot loader filename
}

This DHCP-server is secondary, otherwise I have to shutdown the primary server of my modem or put it in bridge mode and run my own router. It seems to work without problems, though.

Do I need something in loader.conf on the nfs-server? No idea what missing arguments it needs.

edit: I didn't look at it before: the "kernel args (null)" also happens while booting a full system from SD-card. It seems normal.
 
I found the problem. The Armbian version of the u-boot bin file for Orange Pi Zero is different than what comes with the FreeBSD ports. So I scp'ed and dd'ed the fbsd version to the emmc memory again. Now it works, we have a serial CLI. Strangely, this ehci shutdown message also exists in the FreeBSD port source but it doesn't get triggered. I was planning on commenting out the calls to ehci_shutdown() and try that but no need to. It works without changing any source. Not sure what was the problem, though. Has it to do with the transition from primitive pre-boot USB-driver to FreeBSD's kernel ehci?

Nice would be to reach this internal flash on FreeBSD but I can't see a device to write an image to with flashrom. I might be missing something...
 
Back
Top