NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-evbarm/59814: Wrong build for evbarm Zynq
>Number: 59814
>Category: port-evbarm
>Synopsis: Wrong build for evbarm Zynq
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: port-evbarm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 02 12:35:00 +0000 2025
>Originator: Daniel
>Release: 10.1
>Organization:
>Environment:
evbarm zynq
>Description:
Trying to compile NetBSD for a Zynq 7020 board, I find out that
even when commenting the lines for the generic timers in GENERIC (or a copy of it)
# Timer
a9ptmr* at fdt? pass 2 # ARM Cortex A5/A9 Private Timer
arma9ptmr* at a9ptmr?
a9tmr* at fdt? pass 2 # ARM Cortex A5/A9 Timer
arma9tmr* at a9tmr?
#gtmr* at fdt? pass 1 # ARM Generic Timer
#armgtmr0 at gtmr?
#armgtmr* at mct?
or commenting out the lines for the platforms
makes the compilation fail, complaining about orphans and files that should not be compiled in the first place.
secmodel_bsd44.o fdt.o fdt_addresses.o fdt_empty_tree.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o devsw.o ioconf.o /root/home/kernel/usr/src/sys/arch/evbarm/compile/obj/GENERIC/lib/kern/libkern.o vers.o swapnetbsd.o kern_ksyms_buf.o
# link GENERIC/netbsd
/root/home/kernel/usr/src/obj/tooldir.NetBSD-10.1-amd64/bin/armv7--netbsdelf-eabihf-ld -Map netbsd.map --cref -T netbsd.ldscript -e generic_start -X -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
/root/home/kernel/usr/src/obj/tooldir.NetBSD-10.1-amd64/bin/armv7--netbsdelf-eabihf-ld: bcm283x_platform.o: in function `.LANCHOR0':
bcm283x_platform.c:(.rodata+0xe0): undefined reference to `gtmr_delay'
here the last line is very important.
If I not comment these references:
#gtmr* at fdt? pass 1 # ARM Generic Timer
#armgtmr0 at gtmr?
#armgtmr* at mct?
NetBSD do compile and I am able to generate a .ub image.
But later when I want to boot it on the board I get:
Undefined instruction 0xee1e2f10
Stopped at: netbsd:gtmr_delay+0x24
mrc p15, 0, r2, c14, c0, 0
that's all that is able to sent before a hard crash and even the uart dies.
The Zynq A9 CPU does not have those timers, but it seems the compilation requires them.
Talking with people on Reddit and IRC where able to replicate the problem.
One of them commented:
" Yup, now I see your problem. It looks like some SoC implementations are not properly feature gated(as in, it is not enough to just comment out stuff in the top-level GENERIC configuration). I had to drop down to files.generic too. "
>How-To-Repeat:
1- Try to compile NetBSD 10.1 only for Zynq using the evbarm GENERIC conf file
comment or delete other boards and their peripherals, or for this case, the timers.
2- Compile it without commenting lines, get the UB file and try to boot it in a Zynq Board.
>Fix:
Home |
Main Index |
Thread Index |
Old Index