158c18ffb4
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
31 lines
747 B
Makefile
31 lines
747 B
Makefile
# $FreeBSD$
|
|
|
|
PROG= boot1.elf
|
|
INTERNALPROG=
|
|
MAN=
|
|
FILES?= boot1
|
|
SRCS= _start.s boot1.c
|
|
CLEANFILES=${FILES} boot1.aout
|
|
|
|
BOOTBLOCKBASE= 0x4000
|
|
|
|
CFLAGS.clang+=-mcmodel=small
|
|
CFLAGS.gcc+=-mcmodel=medlow
|
|
CFLAGS+=-Os -I${.CURDIR}/../../common
|
|
LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N
|
|
|
|
# Construct boot1. sunlabel expects it to contain zeroed-out space for the
|
|
# label, and to be of the correct size.
|
|
${FILES}: boot1.aout
|
|
@set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \
|
|
echo "$$x bytes available"; test $$x -ge 0
|
|
${DD} if=/dev/zero of=${.TARGET} bs=512 count=16
|
|
${DD} if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc
|
|
|
|
boot1.aout: boot1.elf
|
|
elf2aout -o ${.TARGET} ${.ALLSRC}
|
|
|
|
boot1.o: ${.CURDIR}/../../common/ufsread.c
|
|
|
|
.include <bsd.prog.mk>
|