Install the 4th files in sys/boot/forth instead of each loader

Also, move generation of loader.help into loader.mk. Set HELP_FILES=
to disable this (so we only install one help file, for now). At the
same time remove some duplicate -I lines. Fix several FILES= and
CLEANFILES= into the += form since we're touching both of those in the
.mk files. Make sure we only build one loader.help file per platform
in a unified way (we were building many on some, with the last to
install winning, though often they were the same text).

Also, we're now installing loader.rc and menu.rc everywhere. arm and
mips uboot installed these as menu.rc.sample, but there's no need
since the loader.rc for those platforms doesn't do menu.rc processing
by default. pcibios.4th is now installed everywhere, but will failsafe
on non x86 platforms (it isn't loaded by default anywhere).

These changes are too intertwined to do separately since aspects of
each are required to have a bug-free commit.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-11-10 23:54:58 +00:00
parent 4728f534ff
commit 781c4d47f2
39 changed files with 96 additions and 203 deletions

View File

@ -12,7 +12,7 @@ LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
FILES= ubldr ubldr.bin
FILES+= ubldr ubldr.bin
NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
INSTALLFLAGS= -b
@ -28,11 +28,10 @@ SRCS= start.S conf.c self_reloc.c vers.c
CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized
.endif
HELP_FILES+= help.uboot ${BOOTSRC}/fdt/help.fdt
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float
@ -49,10 +48,6 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
ldscript.abs:
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
@ -72,15 +67,4 @@ ubldr.bin: ubldr.pie
CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin
.if !defined(LOADER_ONLY)
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
# Install loader.rc.
FILES+= loader.rc
# Put sample menu.rc on disk but don't enable it by default.
FILES+= menu.rc
FILESNAME_menu.rc= menu.rc.sample
.endif
.include <bsd.prog.mk>

View File

@ -122,6 +122,9 @@ LD_FLAGS+= -m elf_i386_fbsd
AFLAGS+= --32
.endif
# Make sure we use the machine link we're about to create
CFLAGS+=-I.
_ILINKS=machine
.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
_ILINKS+=${MACHINE_CPUARCH}
@ -161,4 +164,8 @@ ${_ILINKS}:
${ECHO} ${.TARGET:T} "->" $$path ; \
ln -fhs $$path ${.TARGET:T}
# For loader implementations, we generate a loader.help file. This can be suppressed by
# setting HELP_FILES to nothing.
HELP_FILES= ${LDRSRC}/help.common
.endif # __BOOT_DEFS_MK__

View File

@ -41,11 +41,9 @@ LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized
.endif
CFLAGS+= -I.
CFLAGS+= -I${EFIINC}
CFLAGS+= -I${EFIINCMD}
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
CFLAGS+= -I${SYSDIR}
CFLAGS+= -DEFI_UFS_BOOT
.ifdef(EFI_DEBUG)
CFLAGS+= -DEFI_DEBUG
@ -126,6 +124,6 @@ boot1.efifat: boot1.efi
xz -d -c ${.CURDIR}/fat-${MACHINE}.tmpl.xz > ${.TARGET}
${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
CLEANFILES= boot1.efi boot1.efifat
CLEANFILES+= boot1.efi boot1.efifat
.include <bsd.prog.mk>

View File

@ -25,6 +25,6 @@ CFLAGS+= -I${EFISRC}/include/${MACHINE}
CFLAGS+= -I${FDTSRC}
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
.include <bsd.lib.mk>

View File

@ -34,7 +34,6 @@ CFLAGS+= -mgeneral-regs-only
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I${EFIINC}
CFLAGS+= -I${EFIINCMD}
.if ${MK_ZFS} != "no"

View File

@ -55,7 +55,6 @@ CFLAGS+= -I${.CURDIR}/arch/${MACHINE}
CFLAGS+= -I${EFISRC}/include
CFLAGS+= -I${EFISRC}/include/${MACHINE}
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I${BOOTSRC}/i386/libi386
CFLAGS+= -DNO_PCI -DEFI
@ -84,6 +83,7 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE}
.endif
# Always add MI sources
HELP_FILES=
.include "${BOOTSRC}/loader.mk"
FILES+= loader.efi

View File

@ -10,16 +10,3 @@ CFLAGS+=-I${BOOTSRC}/arm64/libarm64
SRCS+= cache.c
CFLAGS+= -mgeneral-regs-only
CLEANFILES+= loader.help
loader.help: help.common
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.if !defined(LOADER_ONLY)
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc
.endif

View File

@ -8,7 +8,7 @@ BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
CLEANFILES+= softcore.c testmain testmain.o
.include <bsd.stand.mk>
.ifmake testmain

View File

@ -11,4 +11,33 @@ MAN+= beastie.4th.8 \
menusets.4th.8 \
version.4th.8
FILES+= beastie.4th
FILES+= brand.4th
FILES+= brand-fbsd.4th
FILES+= check-password.4th
FILES+= color.4th
FILES+= delay.4th
FILES+= efi.4th
FILES+= frames.4th
FILES+= loader.4th
FILES+= loader.conf
FILES+= logo-beastie.4th
FILES+= logo-beastiebw.4th
FILES+= logo-fbsdbw.4th
FILES+= logo-orb.4th
FILES+= logo-orbbw.4th
FILES+= menu.4th
FILES+= menu-commands.4th
FILES+= menusets.4th
FILES+= pcibios.4th
FILES+= screen.4th
FILES+= shortcuts.4th
FILES+= support.4th
FILES+= version.4th
FILESDIR_loader.conf= /boot/defaults
# Everybody has these, but you can override
.PATH: ${BOOTSRC}/${MACHINE:C/amd64/i386/}/common ${BOOTSRC}/forth
FILES+= loader.rc menu.rc
.include <bsd.prog.mk>

View File

@ -1,26 +0,0 @@
# $FreeBSD$
FILES+= beastie.4th
FILES+= brand.4th
FILES+= brand-fbsd.4th
FILES+= check-password.4th
FILES+= color.4th
FILES+= delay.4th
FILES+= efi.4th
FILES+= frames.4th
FILES+= loader.4th
FILES+= loader.conf
FILES+= loader.help
FILES+= logo-beastie.4th
FILES+= logo-beastiebw.4th
FILES+= logo-fbsdbw.4th
FILES+= logo-orb.4th
FILES+= logo-orbbw.4th
FILES+= menu.4th
FILES+= menu-commands.4th
FILES+= menusets.4th
FILES+= screen.4th
FILES+= shortcuts.4th
FILES+= support.4th
FILES+= version.4th
FILESDIR_loader.conf= /boot/defaults

View File

@ -38,7 +38,6 @@ SRCS+= md5c.c
# AES implementation from sys/crypto
.PATH: ${SYSDIR}/crypto/rijndael
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I${LDRSRC}
# Remove asserts
CFLAGS+= -DNDEBUG

View File

@ -31,7 +31,7 @@ CFLAGS+=-fomit-frame-pointer \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
-I${LDRSRC} \
-I${BTXLIB} -I. \
-I${BTXLIB} \
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@ -48,7 +48,7 @@ CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
LD_FLAGS+=${LD_FLAGS_BIN}
CLEANFILES= boot
CLEANFILES+= boot
boot: boot1 boot2
cat boot1 boot2 > boot

View File

@ -33,9 +33,8 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
-I${LDRSRC} \
-I${BOOTSRC}/i386/common \
-I${BTXLIB} -I. \
-I${BTXLIB} \
-I${BOOTSRC}/i386/boot2 \
-I${SYSDIR} \
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@ -45,7 +44,7 @@ CFLAGS.gcc+= --param max-inline-insns-single=100
LD_FLAGS+=${LD_FLAGS_BIN}
CLEANFILES= gptboot
CLEANFILES+= gptboot
gptboot: gptldr.bin gptboot.bin ${BTXKERN}
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \

View File

@ -31,9 +31,8 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \
-I${BOOTSRC}/i386/common \
-I${ZFSSRC} \
-I${SYSDIR}/cddl/boot/zfs \
-I${BOOTSRC}/i386/btx/lib -I. \
-I${BOOTSRC}/i386/btx/lib \
-I${BOOTSRC}/i386/boot2 \
-I${SYSDIR} \
-Wall -Waggregate-return -Wbad-function-cast \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@ -56,7 +55,7 @@ CFLAGS.gcc+= --param max-inline-insns-single=100
LD_FLAGS+=${LD_FLAGS_BIN}
CLEANFILES= gptzfsboot
CLEANFILES+= gptzfsboot
gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \

View File

@ -11,7 +11,7 @@ SRCS+= dcons.c fwcrom.c
CFLAGS+= -D_BOOT
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
CFLAGS+= -I${BTXLIB}
CFLAGS+= -I${BOOTSRC}/i386/libi386

View File

@ -49,8 +49,7 @@ CFLAGS+= -Dalloca=__builtin_alloca
CFLAGS+= -I${BOOTSRC}/ficl -I${BOOTSRC}/ficl/i386 \
-I${LDRSRC} -I${BOOTSRC}/i386/common \
-I${BTXLIB} \
-I${SYSDIR}/contrib/dev/acpica/include \
-I${SYSDIR} -I.
-I${SYSDIR}/contrib/dev/acpica/include
# Handle FreeBSD specific %b and %D printf format specifiers
CFLAGS+= ${FORMAT_EXTENSIONS}

View File

@ -40,11 +40,16 @@ CFLAGS+= -DLOADER_FIREWIRE_SUPPORT
LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a
.endif
.if exists(${.CURDIR}/help.i386)
HELP_FILES+= help.i386
.else
HELP_FILES=
.endif
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
CLEANFILES= ${LOADER} ${LOADER}.bin loader.help
CLEANFILES+= ${LOADER} ${LOADER}.bin
CFLAGS+= -Wall
LDFLAGS+= -static -Ttext 0x0
@ -67,21 +72,10 @@ ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
${LOADER}.bin: ${LOADER}.sym
strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC}
loader.help: help.common help.i386
cat ${.ALLSRC} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
FILES= ${LOADER}
FILES+= ${LOADER}
# XXX INSTALLFLAGS_loader= -b
FILESMODE_${LOADER}= ${BINMODE} -b
.if !defined(LOADER_ONLY)
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= pcibios.4th
FILES+= loader.rc menu.rc
.endif
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}

View File

@ -7,7 +7,7 @@ INTERNALPROG=
FILES= ${BOOT}
MAN= ${BOOT}.8
SRCS= ${LDR}.S
CLEANFILES= ${BOOT}
CLEANFILES+= ${BOOT}
BOOT= pxeboot
LDR= pxeldr

View File

@ -30,7 +30,7 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \
-I${BOOTSRC}/i386 \
-I${ZFSSRC} \
-I${SYSDIR}/cddl/boot/zfs \
-I${BTXLIB} -I. \
-I${BTXLIB} \
-I${BOOTSRC}/i386/boot2 \
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
@ -46,7 +46,7 @@ LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
LD_FLAGS+=${LD_FLAGS_BIN}
CLEANFILES= zfsboot
CLEANFILES+= zfsboot
zfsboot: zfsboot1 zfsboot2
cat zfsboot1 zfsboot2 > zfsboot

View File

@ -2,8 +2,6 @@
LOADER= zfsloader
NEWVERSWHAT= "ZFS enabled bootstrap loader" x86
LOADER_ONLY= yes
HAVE_ZFS= yes
.include "${.CURDIR}/../loader/Makefile"

View File

@ -19,7 +19,7 @@ LIB?= sa
NO_PIC=
WARNS?= 0
CFLAGS+= -I${SASRC} -I${SYSDIR}
CFLAGS+= -I${SASRC}
# standalone components and stuff we have modified locally
SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \

View File

@ -7,7 +7,5 @@ DO32=1
LIB=sa32
LIBSA_CPUARCH=${MACHINE_CPUARCH:C/amd64/i386/}
CFLAGS+= -I.
.PATH: ${SASRC}
.include "${SASRC}/Makefile"

View File

@ -90,3 +90,11 @@ REPRO_FLAG= -r
vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE}
sh ${LDRSRC}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \
${NEWVERSWHAT}
.if !empty(HELP_FILES)
CLEANFILES+= loader.help
FILES+= loader.help
loader.help: ${HELP_FILES}
cat ${HELP_FILES} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.endif

View File

@ -51,7 +51,6 @@ CFLAGS= -ffreestanding \
-I${.CURDIR} \
-I${SASRC} \
-I${LDRSRC} \
-I${SYSDIR} \
-D_KERNEL \
-Wall \
-G0 \

View File

@ -67,6 +67,8 @@ SRCS+= altera_jtag_uart.c \
# Since we don't have a backward compatibility issue, default to this on BERI.
CFLAGS+= -DBOOT_PROMPT_123
HELP_FILES+= help.mips
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
@ -77,8 +79,6 @@ CFLAGS+= -I${BOOTSRC}/mips/beri/common
# Loader-specific MD headers
CFLAGS+= -I${.CURDIR}
CLEANFILES+= loader.help
# Generate code appropriate for the loader environment
CFLAGS+= -G0 \
-fno-pic \
@ -95,15 +95,6 @@ LDFLAGS= -nostdlib \
DPADD= ${LIBFICL} ${LIBSA}
LDADD= ${LIBFICL} ${LIBSA}
loader.help: help.common help.mips
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc menu.rc
.if defined(LOADER_USB_SUPPORT)
# Do garbage collection
CFLAGS+= -ffunction-sections -fdata-sections

View File

@ -12,7 +12,7 @@ LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
FILES= ubldr
FILES+= ubldr
NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
INSTALLFLAGS= -b
@ -24,11 +24,10 @@ UBLDR_LOADADDR?= 0xffffffff80800000
# Architecture-specific loader code
SRCS= start.S conf.c vers.c
HELP_FILES+= help.uboot ${BOOTSRC}/fdt/help.fdt
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float -g
@ -41,10 +40,6 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
ldscript.abs:
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
@ -58,16 +53,5 @@ ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD}
CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin
.if !defined(LOADER_ONLY)
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
# Install loader.rc.
FILES+= loader.rc
# Put sample menu.rc on disk but don't enable it by default.
FILES+= menu.rc
FILESNAME_menu.rc= menu.rc.sample
.endif
.include <bsd.stand.mk>
.include <bsd.prog.mk>

View File

@ -12,7 +12,7 @@ SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \
SRCS+= devicename_stubs.c
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "powerpc"

View File

@ -34,7 +34,7 @@ boot1.hfs: boot1.elf bootinfo.txt
${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \
conv=notrunc
CLEANFILES= boot1.hfs
CLEANFILES+= boot1.hfs
boot1.o: ${SASRC}/ufsread.c

View File

@ -28,12 +28,9 @@ SRCS+= ucmpdi2.c
CFLAGS+= -mcpu=powerpc64
# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
# load address. set in linker script
@ -48,13 +45,6 @@ CFLAGS+= -Wa,-mppc64bridge
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
loader.help: help.common ${FDTSRC}/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc menu.rc
HELP_FILES+= ${FDTSRC}/help.fdt
.include <bsd.prog.mk>

View File

@ -27,14 +27,12 @@ SRCS+= ucmpdi2.c
SRCS+= ofwfdt.c
.endif
HELP_FILES+= ${FDTSRC}/help.fdt
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float
# load address. set in linker script
@ -54,13 +52,4 @@ CFLAGS+= -I${BOOTSRC}/ofw/libofw
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
loader.help: help.common ${FDTSRC}/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc menu.rc
.include <bsd.prog.mk>

View File

@ -26,12 +26,9 @@ SRCS+= ucmpdi2.c
CFLAGS+= -mcpu=powerpc64
# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
# load address. set in linker script
@ -48,13 +45,4 @@ SC_DFLT_FONT=cp437
font.h:
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
loader.help: help.common
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc menu.rc
.include <bsd.prog.mk>

View File

@ -21,12 +21,9 @@ SRCS= start.S conf.c vers.c
SRCS+= ucmpdi2.c
# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
CFLAGS+= -I${SYSDIR}
CFLAGS+= -I.
CLEANFILES+= ${PROG}.help
CFLAGS+= -ffreestanding
@ -37,11 +34,4 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
loader.help: help.common ${BOOTSRC}/fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
FILES= loader.help
.include <bsd.prog.mk>

View File

@ -7,7 +7,7 @@ INTERNALPROG=
MAN=
FILES?= boot1
SRCS= _start.s boot1.c
CLEANFILES=${FILES} boot1.aout
CLEANFILES+=${FILES} boot1.aout
BOOTBLOCKBASE= 0x4000

View File

@ -29,11 +29,14 @@ SRCS= locore.S main.c metadata.c vers.c
CFLAGS+= -DLOADER_DEBUG
.endif
.if exists(${.CURDIR}/help.sparc64)
HELP_FILES+= help.sparc64
.else
HELP_FILES=
.endif
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
CLEANFILES+= loader.help
LDFLAGS+= -static
@ -41,19 +44,7 @@ LDFLAGS+= -static
LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a
CFLAGS+= -I${BOOTSRC}/ofw/libofw/
# Need sys/ for crypto/intake.h
CFLAGS+= -I${SRCTOP}/sys
DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
loader.help: help.common help.sparc64
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${BOOTSRC}/forth
.include "${BOOTSRC}/forth/Makefile.inc"
FILES+= loader.rc menu.rc
.include <bsd.prog.mk>

View File

@ -19,7 +19,7 @@ CFLAGS+= -I${UBOOTSRC}/lib
CFLAGS+= -I${FDTSRC}
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
.include <bsd.stand.mk>
.include <bsd.lib.mk>

View File

@ -20,7 +20,7 @@ SRCS+= disk.c
.include "${BOOTSRC}/fdt.mk"
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
.ifdef(BOOT_DISK_DEBUG)
# Make the disk code more talkative

View File

@ -10,6 +10,5 @@ PROG= test
INTERNALPROG=
CFLAGS+= -I${BOOTSRC}/userboot
CFLAGS+= -I${SYSDIR}
.include <bsd.prog.mk>

View File

@ -36,8 +36,7 @@ SRCS+= vers.c
CFLAGS+= -Wall
CFLAGS+= -I${BOOTSRC}/userboot
CFLAGS+= -I${SYSDIR}
CFLAGS+= -ffreestanding -I.
CFLAGS+= -ffreestanding
CWARNFLAGS.main.c += -Wno-implicit-function-declaration
@ -51,6 +50,7 @@ LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
.endif
# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}

View File

@ -12,7 +12,7 @@ CFLAGS+= -DSKEIN_LOOP=111
.PATH: ${SYSDIR}/crypto/skein
CFLAGS+= -DBOOTPROG=\"zfsloader\"
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.
CFLAGS+= -I${LDRSRC}
CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
CFLAGS+= -I${SYSDIR}/crypto/skein