iPXE discussion forum

Full Version: Problem building bin-arm32-efi/snp.efi with CONSOLE_SERIAL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to build the bin-arm32-efi/snp.efi target for the Raspberry Pi 3 model b+ but am getting the following compilation errors when I have the config option CONSOLE_SERIAL set.

Code:
[VERSION] bin-arm32-efi/version.snp.efi.o
  [LD] bin-arm32-efi/snp.efi.tmp
bin-arm32-efi/blib.a(serial.o): In function `serial_init':
/home/mark/packages/ipxe/src/core/serial.c:145: undefined reference to `uart_select'
bin-arm32-efi/blib.a(serial.o): In function `uart_data_ready':
/home/mark/packages/ipxe/src/include/ipxe/uart.h:112: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/include/ipxe/uart.h:112: undefined reference to `uart_read'
bin-arm32-efi/blib.a(serial.o): In function `uart_receive':
/home/mark/packages/ipxe/src/include/ipxe/uart.h:124: undefined reference to `uart_read'
bin-arm32-efi/blib.a(uart.o): In function `uart_transmit':
/home/mark/packages/ipxe/src/core/uart.c:54: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/core/uart.c:61: undefined reference to `uart_write'
bin-arm32-efi/blib.a(uart.o): In function `uart_flush':
/home/mark/packages/ipxe/src/core/uart.c:75: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/core/uart.c:76: undefined reference to `uart_read'
bin-arm32-efi/blib.a(uart.o): In function `uart_exists':
/home/mark/packages/ipxe/src/core/uart.c:95: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:96: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/core/uart.c:98: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:99: undefined reference to `uart_read'
bin-arm32-efi/blib.a(uart.o): In function `uart_init':
/home/mark/packages/ipxe/src/core/uart.c:124: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/core/uart.c:126: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:131: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:132: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:138: undefined reference to `uart_write'
/home/mark/packages/ipxe/src/core/uart.c:141: undefined reference to `uart_write'
bin-arm32-efi/blib.a(uart.o):/home/mark/packages/ipxe/src/core/uart.c:144: more undefined references to `uart_write' follow
bin-arm32-efi/blib.a(uart.o): In function `uart_init':
/home/mark/packages/ipxe/src/core/uart.c:134: undefined reference to `uart_read'
/home/mark/packages/ipxe/src/core/uart.c:135: undefined reference to `uart_read'
arm-linux-gnueabihf-ld: bin-arm32-efi/snp.efi.tmp: hidden symbol `uart_select' isn't defined
arm-linux-gnueabihf-ld: final link failed: Bad value
Makefile.housekeeping:1179: recipe for target 'bin-arm32-efi/snp.efi.tmp' failed
make: *** [bin-arm32-efi/snp.efi.tmp] Error 1
rm bin-arm32-efi/version.snp.efi.o

My toolchain is running on Ubuntu 17.10 x64 with the environment CROSS_COMPILE=arm-linux-gnueabihf- set.

I'm enabling the CONSOLE_SERIAL option in an attempt to get console access to the device over the serial interface. I'm loading the snp.efi module from U-Boot which has the console working correctly.

Has anyone tried something similar or got the serial console working for iPXE on the Raspberry Pi?
Currently the only implementation of UART is in src/arch/x86/include/bits/uart.h "16550-compatible UART"
Meaning there is no implementation of UART for arm, and in turn the reason for this is that there is no outb or inb implemented AFAIK.

I think the U-boot people can help you out a great deal here.
Reference URL's