Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
arm64 USB NIC Support
2019-03-13, 22:09
Post: #1
arm64 USB NIC Support
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!
Find all posts by this user
Quote this message in a reply
2019-03-14, 01:42
Post: #2
RE: arm64 USB NIC Support
I'm quite sure that the support for Rpi have been discussed a few times, and works just fine, but can't find that now.
Have you tried building with the only relevant driver: bin-arm64-efi/smsc95xx.efi ?
there should be no need for uhci to be included in the dependencies, ehci would probably be good to have to, but might suffer from the same issues.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)