1LOADER_DISK_SUPPORT?= yes 2LOADER_CD9660_SUPPORT?= yes 3LOADER_MSDOS_SUPPORT?= no 4LOADER_EXT2FS_SUPPORT?= yes 5LOADER_UFS_SUPPORT?= yes 6LOADER_ZFS_SUPPORT?= yes 7LOADER_NET_SUPPORT?= no 8LOADER_NFS_SUPPORT?= no 9LOADER_TFTP_SUPPORT?= no 10LOADER_GZIP_SUPPORT?= no 11LOADER_BZIP2_SUPPORT?= no 12 13.include <bsd.init.mk> 14 15PROG= loader.kboot 16NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} 17INSTALLFLAGS= -b 18 19# Architecture-specific loader code 20SRCS= \ 21 bootinfo.c \ 22 conf.c \ 23 hostcons.c \ 24 hostdisk.c \ 25 hostfs.c \ 26 init.c \ 27 main.c \ 28 vers.c 29 30.if ${MK_FDT} != "no" 31SRCS+= kbootfdt.c 32.endif 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