2015-01-05 04:33:39 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2022-07-14 03:41:17 +00:00
|
|
|
LOADER_DISK_SUPPORT?= yes
|
2017-11-08 14:44:45 +00:00
|
|
|
LOADER_CD9660_SUPPORT?= yes
|
|
|
|
LOADER_MSDOS_SUPPORT?= no
|
|
|
|
LOADER_EXT2FS_SUPPORT?= yes
|
|
|
|
LOADER_UFS_SUPPORT?= yes
|
2023-01-13 21:20:48 +00:00
|
|
|
LOADER_ZFS_SUPPORT?= yes
|
2022-12-03 19:48:23 +00:00
|
|
|
LOADER_NET_SUPPORT?= no
|
|
|
|
LOADER_NFS_SUPPORT?= no
|
2017-11-08 14:44:45 +00:00
|
|
|
LOADER_TFTP_SUPPORT?= no
|
2022-12-03 19:48:23 +00:00
|
|
|
LOADER_GZIP_SUPPORT?= no
|
2017-11-08 14:44:45 +00:00
|
|
|
LOADER_BZIP2_SUPPORT?= no
|
|
|
|
|
2017-10-30 03:12:28 +00:00
|
|
|
.include <bsd.init.mk>
|
2015-01-05 04:33:39 +00:00
|
|
|
|
|
|
|
PROG= loader.kboot
|
|
|
|
NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}
|
|
|
|
INSTALLFLAGS= -b
|
|
|
|
|
|
|
|
# Architecture-specific loader code
|
2022-09-01 17:07:34 +00:00
|
|
|
SRCS= \
|
2023-02-03 15:39:55 +00:00
|
|
|
bootinfo.c \
|
2022-09-01 17:07:34 +00:00
|
|
|
conf.c \
|
|
|
|
crt1.c \
|
|
|
|
gfx_fb_stub.c \
|
|
|
|
host_syscalls.c \
|
|
|
|
hostcons.c \
|
|
|
|
hostdisk.c \
|
2022-10-27 17:37:54 +00:00
|
|
|
hostfs.c \
|
2022-09-01 17:07:34 +00:00
|
|
|
init.c \
|
|
|
|
kbootfdt.c \
|
|
|
|
main.c \
|
2023-02-03 15:37:53 +00:00
|
|
|
seg.c \
|
2022-09-01 17:07:34 +00:00
|
|
|
termios.c \
|
2022-12-02 18:05:58 +00:00
|
|
|
util.c \
|
|
|
|
vers.c
|
2021-01-04 16:51:58 +00:00
|
|
|
|
2021-12-14 21:39:12 +00:00
|
|
|
CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
|
2023-01-13 21:20:48 +00:00
|
|
|
.if ${MK_LOADER_ZFS} != "no"
|
|
|
|
CFLAGS+= -I${ZFSSRC}
|
|
|
|
CFLAGS+= -I${SYSDIR}/contrib/openzfs/include
|
|
|
|
CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
|
|
|
|
HAVE_ZFS=yes
|
|
|
|
.endif
|
2015-01-05 04:33:39 +00:00
|
|
|
|
2021-02-11 14:29:00 +00:00
|
|
|
HELP_FILENAME= loader.help.kboot
|
|
|
|
|
2017-11-10 23:54:24 +00:00
|
|
|
.include "${BOOTSRC}/fdt.mk"
|
2015-01-05 04:33:39 +00:00
|
|
|
|
2023-02-03 15:39:55 +00:00
|
|
|
# We share bootinfo.c with efi
|
|
|
|
.PATH: ${BOOTSRC}/efi/loader
|
|
|
|
|
2022-09-04 15:31:51 +00:00
|
|
|
# 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.
|
2021-12-30 23:07:13 +00:00
|
|
|
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
|
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
|
2015-01-05 04:33:39 +00:00
|
|
|
|
|
|
|
# Always add MI sources
|
2017-10-30 03:12:28 +00:00
|
|
|
.include "${BOOTSRC}/loader.mk"
|
|
|
|
.PATH: ${SYSDIR}/libkern
|
2021-12-30 23:07:13 +00:00
|
|
|
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
|
2015-01-05 04:33:39 +00:00
|
|
|
|
2021-12-30 23:07:13 +00:00
|
|
|
CFLAGS+= -Wall
|
2015-01-05 04:33:39 +00:00
|
|
|
|
2018-02-02 15:40:49 +00:00
|
|
|
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
|
|
|
|
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
|
2015-01-05 04:33:39 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|