Hi,
since we now have working UEFI on the Raspberry Pi, I thought that I might try using iPXE on it. The NIC that the Raspberry Pi is using (
https://dox.ipxe.org/smsc95xx_8c.html#details) is supported by iPXE, and so is 64-bit ARM EFI support. And, thankfully, I've got it to boot it! But, only with SNP only networking, which means that booting iPXE works, but it can't find the network devices. So I've included the relevant drivers:
Code:
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi
Which fails:
Code:
edk2@9255f14e62f5:/home/ipxe$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi
[PARSEROM]
[DEPS] drivers/usb/uhci.c
[BUILD] bin-arm64-efi/uhci.o
[BUILD] bin-arm64-efi/uhci.ids.o
[AR] bin-arm64-efi/blib.a
aarch64-linux-gnu-ar: creating bin-arm64-efi/blib.a
[VERSION] bin-arm64-efi/version.ncm--ecm--snp--smsc95xx.efi.o
[LD] bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi.tmp
bin-arm64-efi/blib.a(uhci.o): In function `uhci_root_disable':
/home/ipxe/drivers/usb/uhci.c:1203: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:1205: undefined reference to `outw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_root_enable':
/home/ipxe/drivers/usb/uhci.c:1161: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:1163: undefined reference to `outw'
/home/ipxe/drivers/usb/uhci.c:1166: undefined reference to `outw'
/home/ipxe/drivers/usb/uhci.c:1171: undefined reference to `outw'
/home/ipxe/drivers/usb/uhci.c:1178: undefined reference to `inw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_root_speed':
/home/ipxe/drivers/usb/uhci.c:1224: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:1249: undefined reference to `outw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_stop':
/home/ipxe/drivers/usb/uhci.c:104: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:106: undefined reference to `outw'
/home/ipxe/drivers/usb/uhci.c:112: undefined reference to `inw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_reset':
/home/ipxe/drivers/usb/uhci.c:144: undefined reference to `outw'
/home/ipxe/drivers/usb/uhci.c:150: undefined reference to `inw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_root_poll':
/home/ipxe/drivers/usb/uhci.c:1285: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:1292: undefined reference to `outw'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_bus_open':
/home/ipxe/drivers/usb/uhci.c:1342: undefined reference to `outl'
bin-arm64-efi/blib.a(uhci.o): In function `uhci_run':
/home/ipxe/drivers/usb/uhci.c:87: undefined reference to `inw'
/home/ipxe/drivers/usb/uhci.c:89: undefined reference to `outw'
aarch64-linux-gnu-ld: bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi.tmp: hidden symbol `inw' isn't defined
aarch64-linux-gnu-ld: final link failed: Bad value
Makefile.housekeeping:1190: recipe for target 'bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi.tmp' failed
make: *** [bin-arm64-efi/ncm--ecm--snp--smsc95xx.efi.tmp] Error 1
rm bin-arm64-efi/version.ncm--ecm--snp--smsc95xx.efi.o
Looks like it tries to call outw, inw and outl from sys/io.h, which is X86 only (direct assembler calls). If someone could port this to aarch64 it might actually work. I am a frontend dev, so I myself won't be able to fix this sadly. Would anyone be able to take a look at this? It only seems to be these 3 functions that are X86 only ...
Also, see the
GitHub issue for some more info if you could help!