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
55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
# $FreeBSD$
|
|
|
|
LOADER_DISK_SUPPORT?= yes
|
|
LOADER_CD9660_SUPPORT?= yes
|
|
LOADER_MSDOS_SUPPORT?= no
|
|
LOADER_EXT2FS_SUPPORT?= yes
|
|
LOADER_UFS_SUPPORT?= yes
|
|
LOADER_NET_SUPPORT?= yes
|
|
LOADER_NFS_SUPPORT?= yes
|
|
LOADER_TFTP_SUPPORT?= no
|
|
LOADER_GZIP_SUPPORT?= yes
|
|
LOADER_BZIP2_SUPPORT?= no
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
PROG= loader.kboot
|
|
NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}
|
|
INSTALLFLAGS= -b
|
|
|
|
# Architecture-specific loader code
|
|
SRCS= \
|
|
conf.c \
|
|
crt1.c \
|
|
gfx_fb_stub.c \
|
|
host_syscalls.c \
|
|
hostcons.c \
|
|
hostdisk.c \
|
|
init.c \
|
|
kbootfdt.c \
|
|
main.c \
|
|
termios.c \
|
|
vers.c \
|
|
|
|
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"
|
|
|
|
# Always add MI sources
|
|
.include "${BOOTSRC}/loader.mk"
|
|
.PATH: ${SYSDIR}/libkern
|
|
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
|
|
|
|
CFLAGS+= -Wall
|
|
|
|
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
|
|
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
|
|
|
|
.include <bsd.prog.mk>
|