netboot
netboot copied to clipboard
RPI4 netboot support
The new Raspberry Pi 4 has support for PXE, but it looks like the format may be a little different than expected:
https://github.com/raspberrypi/rpi-eeprom/issues/182
It's not full PXE (https://github.com/raspberrypi/rpi-eeprom/issues/87#issuecomment-580486478), but I think it's enough for pixiecore. We also have UBoot PXE firmware for Raspberry Pi that could be used on older Pis.
This will probably also require an API change so that we can handle different architectures. Perhaps something like this:
- If
<apiserver-prefix>/v1/boot/<mac-addr>
is non-200, then Pixiecore will try<apiserver-prefix>/v1/boot
with a POST JSON that looks like:
{
"arch": "aarch64",
"mac": "...",
}
I am actually trying to do the same so am very interested as well
I gave this a try, but I couldn't get it to work.
I flashed my eeprom to pieeprom-2020-09-03.bin
and configured it to network boot.
pixiecore sees dhcp requests and responds to them, but the raspberry pi pxe implementation never tries to make a pxe or tftp request. It eventually gives the cryptic "NETBOOT init failed" and gives up after a few retries.
What I ended up doing that worked for my case is slapping a UEFI implementation on my sdcard, booting that, and then using the uefi pxe implementation. In conjunction with https://github.com/danderson/netboot/pull/121, that worked fine!
Shoutout to this blog post for suggesting that alternative method: https://www.virtuallyghetto.com/2020/07/two-methods-to-network-boot-raspberry-pi-4.html
Anyway, I guess the short of it is I think there's an rpi-eeprom bug that gets in the way of trivially fixing this, even after adding arm64 support to the code.