opnsense-src/sys/boot/powerpc/boot1.chrp/Makefile
Warner Losh 158c18ffb4 dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

Differential Revision: https://reviews.freebsd.org/D8605
2016-12-02 14:44:38 +00:00

42 lines
1,008 B
Makefile

# $FreeBSD$
SSP_CFLAGS=
PROG= boot1.elf
NEWVERSWHAT= "Open Firmware boot block" ${MACHINE_ARCH}
BINDIR?= /boot
INSTALLFLAGS= -b
FILES= boot1.hfs
SRCS= boot1.c ashldi3.c syncicache.c
MAN=
CFLAGS= -ffreestanding -msoft-float \
-I${.CURDIR}/../../common -I${.CURDIR}/../../../ \
-D_STANDALONE
LDFLAGS=-nostdlib -static -Wl,-N
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${.CURDIR}/../../../libkern ${.CURDIR}/../../../../lib/libc/powerpc/gen ${.CURDIR}
# The following inserts out objects into a template HFS
# created by generate-hfs.sh
.include "${.CURDIR}/Makefile.hfs"
boot1.hfs: boot1.elf bootinfo.txt
echo ${.OBJDIR}
uudecode ${.CURDIR}/hfs.tmpl.bz2.uu
mv hfs.tmpl.bz2 ${.TARGET}.bz2
bzip2 -f -d ${.TARGET}.bz2
${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \
conv=notrunc
CLEANFILES= boot1.hfs
boot1.o: ${.CURDIR}/../../common/ufsread.c
.include <bsd.prog.mk>