1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1998-10-05 19:20:36 +00:00
|
|
|
|
2003-12-08 19:02:06 +00:00
|
|
|
PROG?= boot0
|
1998-10-05 19:20:36 +00:00
|
|
|
NOMAN=
|
|
|
|
STRIP=
|
|
|
|
BINDIR?= /boot
|
1998-10-17 14:20:25 +00:00
|
|
|
BINMODE= 444
|
1998-10-05 10:08:37 +00:00
|
|
|
|
|
|
|
M4?= m4
|
|
|
|
|
2002-01-10 21:40:33 +00:00
|
|
|
# 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
|
1998-10-19 19:13:53 +00:00
|
|
|
|
2002-01-10 21:40:33 +00:00
|
|
|
# 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
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2003-12-08 19:02:06 +00:00
|
|
|
${PROG}: ${PROG}.o
|
|
|
|
${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o ${PROG}.out ${PROG}.o
|
|
|
|
objcopy -S -O binary ${PROG}.out ${.TARGET}
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2003-12-08 19:02:06 +00:00
|
|
|
${PROG}.o: ${PROG}.s
|
2002-01-10 21:40:33 +00:00
|
|
|
${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
|
|
|
|
--defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET}
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2003-12-08 19:02:06 +00:00
|
|
|
CLEANFILES+= ${PROG}.out ${PROG}.o
|
1998-10-05 10:08:37 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|