The kernel compile fail when build without KDB. Reason is the usage of kdb_trap() in /usr/src/sys/arm64/arm64/trap.c:326 outside of an "#ifdef KDB" condition. It's easy to fix, just put it into #ifdef KDB [...] #endif. I've put the last lines of the "make buildkernel" output below. [...] --- trap.o --- /usr/src/sys/arm64/arm64/trap.c:326:3: error: implicit declaration of function 'kdb_trap' is invalid in C99 [-Werror,-Wimplicit-function-declaration] kdb_trap(exception, 0, ^ /usr/src/sys/arm64/arm64/trap.c:326:3: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] 2 errors generated. *** [trap.o] Error code 1 make[2]: stopped in /usr/obj/usr/src/arm64.aarch64/sys/PINE64-ASC 1 error make[2]: stopped in /usr/obj/usr/src/arm64.aarch64/sys/PINE64-ASC *** [buildkernel] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildkernel] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src
A commit references this bug: Author: gonzo Date: Wed Apr 4 01:13:28 UTC 2018 New revision: 331967 URL: https://svnweb.freebsd.org/changeset/base/331967 Log: Fix arm64 buildkernel target with "nooptions KDB" Make kdb_trap in breakpoint exception handler conditional. If "options KDB" is not present just panic with message that debugger is not enabled. PR: 224653 Changes: head/sys/arm64/arm64/trap.c