1 2LOADER_DISK_SUPPORT?= yes 3LOADER_CD9660_SUPPORT?= yes 4LOADER_MSDOS_SUPPORT?= no 5LOADER_EXT2FS_SUPPORT?= yes 6LOADER_UFS_SUPPORT?= yes 7LOADER_ZFS_SUPPORT?= yes 8LOADER_NET_SUPPORT?= no 9LOADER_NFS_SUPPORT?= no 10LOADER_TFTP_SUPPORT?= no 11LOADER_GZIP_SUPPORT?= no 12LOADER_BZIP2_SUPPORT?= no 13 14.include <bsd.init.mk> 15 16PROG= loader.kboot 17NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} 18INSTALLFLAGS= -b 19 20# Architecture-specific loader code 21SRCS= \ 22 bootinfo.c \ 23 conf.c \ 24 hostcons.c \ 25 hostdisk.c \ 26 hostfs.c \ 27 init.c \ 28 kbootfdt.c \ 29 main.c \ 30 seg.c \ 31 util.c \ 32 vers.c 33 34.if ${MK_LOADER_ZFS} != "no" 35CFLAGS+= -I${ZFSSRC} 36CFLAGS+= -I${SYSDIR}/contrib/openzfs/include 37CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs 38HAVE_ZFS=yes 39.endif 40 41HELP_FILENAME= loader.help.kboot 42 43.include "${BOOTSRC}/fdt.mk" 44 45# We share bootinfo.c with efi 46.PATH: ${BOOTSRC}/efi/loader 47 48# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH 49# instead of the more normal MACHINE since the changes between different flavors 50# of MACHINE_ARCH are large enough in Linux that it's easier that way. 51.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} 52.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" 53 54# Bring in our ldscript 55LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}.ldscript 56 57# Always add MI sources 58.include "${BOOTSRC}/loader.mk" 59CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} 60 61CFLAGS+= -Wall 62 63DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} 64LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} 65 66# Add our own lua bindings until they are universal 67.if ${LOADER_INTERP} == "lua" 68SRCS+= \ 69 lua_bindings.c 70CFLAGS.lua_bindings.c+= -I${FLUALIB}/libhash 71.endif 72 73.include <bsd.prog.mk> 74