iPXE discussion forum
Build issues with ipxe.efi for arm64 architecture - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Build issues with ipxe.efi for arm64 architecture (/showthread.php?tid=8526)



Build issues with ipxe.efi for arm64 architecture - tiger276 - 2017-03-08 14:10

I'm trying to build ipxe.efi for arm64 architecture and get some linker errors:

Code:
rm -f  bin-arm64-efi/*.*  bin-arm64-efi/.certificate.* bin-arm64-efi/.certificates.* bin-arm64-efi/.private_key.* bin-arm64-efi/errors   bin-arm64-efi/NIC       ./util/zbin ./util/elf2efi32 ./util/elf2efi64 ./util/efirom ./util/efifatbin ./util/iccfix ./util/einfo TAGS bin-arm64-efi/symtab
  [PARSEROM]
  [DEPS] arch/arm64/core/setjmp.S
  [DEPS] arch/arm/interface/efi/efiarm_nap.c
  [DEPS] arch/arm64/core/arm64_tcpip.c
  [DEPS] arch/arm64/core/arm64_string.c
  [DEPS] arch/arm64/core/arm64_bigint.c
  [DEPS] config/config_usb.c
  [DEPS] config/config_timer.c
  [DEPS] config/config_route.c
...
...
  [BUILD] bin-arm64-efi/qib7322.ids.o
  [BUILD] bin-arm64-efi/ehci.ids.o
  [BUILD] bin-arm64-efi/uhci.ids.o
  [BUILD] bin-arm64-efi/xhci.ids.o
  [HOSTCC] util/elf2efi64
  [VERSION] bin-arm64-efi/version.ipxe.efi.o
  [AR] bin-arm64-efi/blib.a
aarch64-linux-gnu-ar: creating bin-arm64-efi/blib.a
  [LD] bin-arm64-efi/ipxe.efi.tmp
bin-arm64-efi/blib.a(3c509.o): In function `t509_select_tag':
/home/andre/Software/ipxe/src/drivers/net/3c509.c:101: undefined reference to `outb'
bin-arm64-efi/blib.a(3c509.o): In function `t509_wait_for_id_sequence':
/home/andre/Software/ipxe/src/drivers/net/3c509.c:85: undefined reference to `outb'
...
...
bin-arm64-efi/blib.a(w89c840.o): In function `w89c840_probe':
/home/andre/Software/ipxe/src/drivers/net/w89c840.c:690: undefined reference to `outl'
aarch64-linux-gnu-ld: bin-arm64-efi/ipxe.efi.tmp: hidden symbol `insw' isn't defined
aarch64-linux-gnu-ld: final link failed: Bad value
make: *** [bin-arm64-efi/ipxe.efi.tmp] Error 1
rm bin-arm64-efi/version.ipxe.efi.o

It seems that there are some header files missing or not included correctly.

I start the build with "make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bin-arm64-efi/ipxe.efi -j8".
My host system is an Ubuntu 14.04 LTS.


RE: Build issues with ipxe.efi for arm64 architecture - NiKiZe - 2017-03-08 17:47

ARM builds does not yet support direct I/O or port calls which makes ipxe.efi invalid for ARM builds since it pulls in drivers which needs this.

Instead of ipxe.efi build the it with the specific driver, or combination of them, for example in your case
Code:
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bin-arm64-efi/intel--snp.efi -j8

or whichever driver it is you need


RE: Build issues with ipxe.efi for arm64 architecture - tiger276 - 2017-03-09 07:43

Ok, I understand.

So I would need a special driver for the SoC NIC.
I'm using an X-Gene 1 SoC from Applied Micro, but I think there is no driver in ipxe like it is for the Cavium ThunderX SoC.
Or is the snp-driver sufficent enough?


RE: Build issues with ipxe.efi for arm64 architecture - NiKiZe - 2017-03-09 08:21

If there is no specific driver for that nic in ipxe then snp is the only one, or maybe snponly, the best will be to just test if possible, let us know how it turns out.


RE: Build issues with ipxe.efi for arm64 architecture - tiger276 - 2017-03-09 11:51

The build for target bin-arm64-efi/snp.efi was successful and also the initial chainload via the UEFI-Firmware.
So that looks good so far.

Code:
iPXE 1.0.0+ (d9886) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE EFI Menu                                                                                                                                                                        

net0: fc:aa:14:e4:98:38 using SNP on SNP-0x807e894618 (open)                                                                                                                                                      
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]                                                                                                                                                                                
Configuring (net0 fc:aa:14:e4:98:38)..... ok                                                                                                                                                                      
net0: 192.168.0.12/255.255.255.0                                                                                                                                                                                  
Next server: 192.168.0.1                                                                                                                                                                                          
Filename: efi/boot/ipxe/snp.efi                                                                                                                                                                                    
tftp://192.168.0.1/efi/boot/ipxe/snp.efi... ok                                                                                                                                                                    
add-symbol-file snp.efi 0x807CB0B2C0                                                                                                                                                                              
remove-symbol-file snp.efi 0x7CB0B2C0                                                                                                                                                                              
snp.efi : 159872 bytes [EFI]                                                                                                                                                                                      
add-symbol-file snp.efi 0x807CB0B2C0                                                                                                                                                                              
iPXE initialising devices...ok

But the USB keyboard isn't working and PS2 is not possible Sad


RE: Build issues with ipxe.efi for arm64 architecture - NiKiZe - 2017-03-09 17:58

Happy it works so far..
Have you modified the configuration anything? I see that menu is missing from the features.
iPXE has some usb support, but that takes over from firmware, and by default the EFI input system should be work just fine with iPXE.
If you want to try the iPXE native USB you could build snp--ecm.efi which should pull it in, but really my guess is that you have some configuration change that is causing this issue.


RE: Build issues with ipxe.efi for arm64 architecture - tiger276 - 2017-03-10 10:39

@NiKiZe

The build for "snp.efi" indeed brings in support for a USB keyboard under an EFI environment, but after some more investigation I found out that instead of CTRL+B you have to press ESC+B to get to the iPXE prompt - weird behaviour.

And after you get to the prompt you can use the keyboard in a normal way. So now I can proceed with my other tests.

Thanks for your help.


RE: Build issues with ipxe.efi for arm64 architecture - NiKiZe - 2017-03-10 17:45

Glad it works, and thanks for reporting back!

(2017-03-10 10:39)tiger276 Wrote:  instead of CTRL+B you have to press ESC+B to get to the iPXE prompt - weird behaviour.

The explanation to that is this: Your EFI implementation is broken (aka does not support ctrl)
For that reason the esc key was added as a workaround:
https://git.ipxe.org/ipxe.git/commitdiff/8dd39b95723af0aac20d16316d16f306d8394af2

Sorry for my incorrect assumption of config issue.