Jump to content

Orange Pi PC PXE boot (Boot Over Network)


Armin Ranjbar

Recommended Posts

Hello everyone and thank you for wonderful work on Armbian.

 

i was wondering if anyone has any experiences to share on booting orange pi pc over network, i know it's possible to do this using Raspberry pi, but what's the latest status on Orange PI PC? is there a u-boot build capable of doing so? is this even possible?

 

Link to comment
Share on other sites

Hello armbian community

 

I'm also interested in this topic. So far I found following links describing FEL boot:

 

https://docs.armbian.com/Developer-Guide_FEL-boot/

http://linux-sunxi.org/FEL/USBBoot

 

I managed to load kernel, initrd and dtb to RAM (all files from /boot of armbian image):

 

sunxi-fel uboot u-boot-sunxi-with-spl.bin write 0x43300000 uInitrd write 0x42000000 zImage write 0x43000000 sun8i-h3-orangepi-pc.dtb

 

And start the kernel:

 

bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

 

Right now there are no kernel parameters so it hangs in initramfs.

 

 

Anybody who managed to NFS boot OPi PC without SD-card?

Link to comment
Share on other sites

Full PXE boot and FEL/NFS boot are slightly different things.

 

FEL/NFS boot works fine for sunxi boards, it is used as an option for the quick testing of the WIP images during the development.

 

Please check this boot script for the additional kernel parameters, and this script for a working FEL/NFS boot implementation on top of our build system (uses this boot script template)

 

TL;DR you have to pass at least "ip=dhcp root=/dev/nfs nfsroot=<ip_or_hostname>:<path>" to the kernel command line

Link to comment
Share on other sites

so, FEL+NFS is possible, it's good enough. but, is Full PXE is possible as well?

Well, for a full PXE setup where do you want to load the u-boot from?

For example if you load only the u-boot with FEL without giving it a boot script, it will fall back to the TFTP/PXE boot, so if you can supply it with a correct image, it should work. You'll need to find more info for the "pxe boot" command and what image format does it need.

Alternatively you can change the u-boot environment to use TFTP without DHCP/PXE setup.

Link to comment
Share on other sites

hmm...

 

this is all too much for me as i lack background in how u-boot exactly works, anyone interested in joining and helping out our project? we pay in bitcoin :)

 

Our goal is to:

1> have total PXE boot on Orange pi PC

2> can not hardcode NFS or TFTP, so it should use nfs, kernel,initrd info from information provided by pxelinux

3> should mount rootfs using aufs

Link to comment
Share on other sites

Our goal is to:

1> have total PXE boot on Orange pi PC

2> can not hardcode NFS or TFTP, so it should use nfs, kernel,initrd info from information provided by pxelinux

Then your first priority is determining the primary boot media. H3, as most other Allwinner SoCs, can boot from:

  • SD
  • eMMC
  • NAND
  • SPI
  • FEL

After that you can take a look at the PXE readme.

And after that you can just load the u-boot and try to experiment with it.

 

3> should mount rootfs using aufs

AUFS on top of NFS? For what purpose? AFAIK this will require recompiling the kernel with AUFS support.

Link to comment
Share on other sites

AUFS on top of NFS? For what purpose? AFAIK this will require recompiling the kernel with AUFS support.

 

NFS will be read-only, but we actually need boards to be able to temporarily write to it...

 

so, with orange pi pc without sdcard, my only options are either SPI (i guess) and FEL, correct?

i can use either of them to start uboot, and starting from that point, i need to figure out a way to make pxe work.

Link to comment
Share on other sites

OK, managed to boot over PXE, now my question is:

how can i make this permanent? guess i have to write it using sunxi-fel, not sure how. sounds kinda dangerous

Well, as I said, you need some kind of permanent storage (one of listed there in theory, out of those one of supported by the HW (which leaves only external SPI flash and SD card). Additional u-boot environment tweaks can be done at compilation time with some patches if you need it.

Link to comment
Share on other sites

Well, as I said, you need some kind of permanent storage (one of listed there in theory, out of those one of supported by the HW (which leaves only external SPI flash and SD card). Additional u-boot environment tweaks can be done at compilation time with some patches if you need it.

a em,

you mean this thing doesn't even have enough 'some kinda' onboard storage for uboot to fit in ? :(

Link to comment
Share on other sites

you mean this thing doesn't even have enough 'some kinda' onboard storage for uboot to fit in ? :(

No. Only boards with eMMC, Orange Pi Zero with SPI flash (which is optional but can be soldered if it's missing) and Orange Pi PC2 (which always comes with SPI flash soldered) can boot without SD card and without using FEL mode.

Depending on your project considerations you may have following options:

  • Using the cheapest possible SD cards only to store the u-boot
  • Buying SPI flash on a breakout board and some wires to connect it like this (no soldering required, but you may want to find a way to attach it to the main board for a finished product)
  • Choosing another H3 board if it's not too late
Link to comment
Share on other sites

 

No. Only boards with eMMC, Orange Pi Zero with SPI flash (which is optional but can be soldered if it's missing) and Orange Pi PC2 (which always comes with SPI flash soldered) can boot without SD card and without using FEL mode.

Depending on your project considerations you may have following options:

  • Using the cheapest possible SD cards only to store the u-boot
  • Buying SPI flash on a breakout board and some wires to connect it like this (no soldering required, but you may want to find a way to attach it to the main board for a finished product)
  • Choosing another H3 board if it's not too late

 

 

:o

:wacko:

:unsure:

 

Thanks ;)

i guess i need to switch to PC2, which is H5, i couldn't find it under download on armbian, don't you guys support it?

Link to comment
Share on other sites

i guess i need to switch to PC2, which is H5, i couldn't find it under download on armbian, don't you guys support it?

Not yet, out of (more or less) supported boards Zero may be a better choice if you don't need onboard wireless (which is total crap) and a display output

While it's possible to build an image for the PC2, it's still in an early WIP state and mostly server oriented

 

Edit: Or if you want something like Orange Pi PC with onboard storage, look at Orange Pi PC Plus

Link to comment
Share on other sites

@B.K.O. you may have a problem with that sole adapter pair because FEL use micro usb otg port *only* so you need to add some more cable ...

 

FEL+AOE is far more efficient on lan compared to FEL+NFS/ANY, it would be nice to have ata over ethernet module provided.

 

does PXE stack support sanboot or  iPXE chainload ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines