7 NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}
11 # Architecture-specific loader code
12 SRCS= conf.c metadata.c vers.c main.c ppc64_elf_freebsd.c
13 SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
16 LOADER_DISK_SUPPORT?= yes
17 LOADER_UFS_SUPPORT?= yes
18 LOADER_CD9660_SUPPORT?= yes
19 LOADER_EXT2FS_SUPPORT?= yes
20 LOADER_NET_SUPPORT?= yes
21 LOADER_NFS_SUPPORT?= yes
22 LOADER_TFTP_SUPPORT?= no
23 LOADER_GZIP_SUPPORT?= yes
24 LOADER_FDT_SUPPORT= yes
25 LOADER_BZIP2_SUPPORT?= no
27 .if ${LOADER_DISK_SUPPORT} == "yes"
28 CFLAGS+= -DLOADER_DISK_SUPPORT
30 .if ${LOADER_UFS_SUPPORT} == "yes"
31 CFLAGS+= -DLOADER_UFS_SUPPORT
33 .if ${LOADER_CD9660_SUPPORT} == "yes"
34 CFLAGS+= -DLOADER_CD9660_SUPPORT
36 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
37 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
39 .if ${LOADER_GZIP_SUPPORT} == "yes"
40 CFLAGS+= -DLOADER_GZIP_SUPPORT
42 .if ${LOADER_BZIP2_SUPPORT} == "yes"
43 CFLAGS+= -DLOADER_BZIP2_SUPPORT
45 .if ${LOADER_NET_SUPPORT} == "yes"
46 CFLAGS+= -DLOADER_NET_SUPPORT
48 .if ${LOADER_NFS_SUPPORT} == "yes"
49 CFLAGS+= -DLOADER_NFS_SUPPORT
51 .if ${LOADER_TFTP_SUPPORT} == "yes"
52 CFLAGS+= -DLOADER_TFTP_SUPPORT
54 .if ${LOADER_FDT_SUPPORT} == "yes"
55 CFLAGS+= -I${.CURDIR}/../../fdt
56 CFLAGS+= -I${.OBJDIR}/../../fdt
57 CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt
58 CFLAGS+= -DLOADER_FDT_SUPPORT
59 LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
63 .if ${MK_FORTH} != "no"
66 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
67 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
70 # Avoid the open-close-dance for every file access as some firmwares perform
71 # an auto-negotiation on every open of the network interface and thus causes
72 # netbooting to take horribly long.
73 CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64
75 # Always add MI sources
76 .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
77 .include "${.CURDIR}/../../common/Makefile.inc"
78 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
81 CLEANFILES+= vers.c loader.help
83 CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
84 # load address. set in linker script
86 CFLAGS+= -DRELOC=${RELOC}
88 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
90 # 64-bit bridge extensions
91 CFLAGS+= -Wa,-mppc64bridge
93 # Pull in common loader code
94 #.PATH: ${.CURDIR}/../../ofw/common
95 #.include "${.CURDIR}/../../ofw/common/Makefile.inc"
97 # where to get libstand from
98 LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
99 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
101 DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
102 LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
107 uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
109 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
110 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
112 loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt
114 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
116 .PATH: ${.CURDIR}/../../forth
117 FILES= loader.help loader.4th support.4th loader.conf
118 FILES+= screen.4th frames.4th
119 FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
120 FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
121 FILESDIR_loader.conf= /boot/defaults
123 .if !exists(${DESTDIR}/boot/loader.rc)
127 .if !exists(${DESTDIR}/boot/menu.rc)
131 .include <bsd.prog.mk>