freebsd-dev/sys/boot/i386/boot0/Makefile
John Baldwin 83f4b92050 Unrevert revision 1.12. Revision 1.14 backed this out saying it was
backing out the 1024 sector boot0, but revision 1.12 had nothing to do with
that.  Instead, it documented various compile time options for boot0 and
allowed them to be overridden via make.conf or options on the make
command line.
2002-01-10 21:40:33 +00:00

42 lines
1.2 KiB
Makefile

# $FreeBSD$
PROG= boot0
NOMAN=
STRIP=
BINDIR?= /boot
BINMODE= 444
M4?= m4
# The default set of flags compiled into boot0. This enables update (writing
# the modified boot0 back to disk after running so that the selection made is
# saved), packet mode (detect and use the BIOS EDD extensions if we try to
# boot past the 1024 cylinder liimt), and booting from all valid slices.
BOOT_BOOT0_FLAGS?= 0xf
# The number of timer ticks to wait for a keypress before assuming the default
# selection. Since there are 18.2 ticks per second, the default value of
# 0xb6 (182d) corresponds to 10 seconds.
BOOT_BOOT0_TICKS?= 0xb6
# The base address that we the boot0 code to to run it. Don't change this
# unless you are glutton for punishment.
BOOT_BOOT0_ORG?= 0x600
boot0: boot0.o
.if ${OBJFORMAT} == aout
${LD} -N -s -T ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
dd if=boot0.out of=${.TARGET} ibs=32 skip=1
.else
${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
objcopy -S -O binary boot0.out ${.TARGET}
.endif
boot0.o: boot0.s
${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
--defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET}
CLEANFILES+= boot0.out boot0.o
.include <bsd.prog.mk>