From cc7b630cec8320ad979af6b29cb67027f6a95456 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 4 Sep 2022 09:31:51 -0600 Subject: [PATCH] stand/kboot: Add note about why we use MACHINE_ARCH here Normally in the boot loader, we key off of MACHINE since that specifies the kernel and the loader is very tuned to each type of MACHINE in general. In this case, however, we're producing a Linux binary, with Linux system calls encoded in it. These align better along the MACHINE_ARCH axis of FreeBSD. For PowerPC the system calls are radically different for each of our MACHINE_ARCHes, with only powerpc64 and powerpc64le sharing the same numbers and memory layout. The same was true about mips when it was in the tree. 32-bit arm uses the same layout, however, for both armv6 and armv7 ports: that can be easily shared in the unlikely event we support that in the future. Sponsored by: Netflix --- stand/kboot/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index c204af8b17e..518e945a596 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -35,6 +35,9 @@ CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken .include "${BOOTSRC}/fdt.mk" +# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH +# instead of the more normal MACHINE since the changes between different flavors +# of MACHINE_ARCH are large enough in Linux that it's easier that way. .PATH: ${.CURDIR}/arch/${MACHINE_ARCH} .include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"