Makefile revision 125537
150477Speter# $FreeBSD: head/sys/boot/i386/boot0/Makefile 125537 2004-02-06 21:58:32Z ru $
239973Srnordier
3125537SruFILES=	${BOOT}
4125537SruCLEANFILES= ${BOOT} ${BOOT}.out ${BOOT}.o
539980Srnordier
6125537SruBOOT?=	boot0
739973Srnordier
889240Sjhb# The default set of flags compiled into boot0.  This enables update (writing
989240Sjhb# the modified boot0 back to disk after running so that the selection made is
1089240Sjhb# saved), packet mode (detect and use the BIOS EDD extensions if we try to
1189240Sjhb# boot past the 1024 cylinder liimt), and booting from all valid slices.
1289240SjhbBOOT_BOOT0_FLAGS?=	0xf
1340524Srnordier
1489240Sjhb# The number of timer ticks to wait for a keypress before assuming the default
1589240Sjhb# selection.  Since there are 18.2 ticks per second, the default value of
1689240Sjhb# 0xb6 (182d) corresponds to 10 seconds.
1789240SjhbBOOT_BOOT0_TICKS?=	0xb6
1839973Srnordier
1989240Sjhb# The base address that we the boot0 code to to run it.  Don't change this
2089240Sjhb# unless you are glutton for punishment.
2189240SjhbBOOT_BOOT0_ORG?=	0x600
2289240Sjhb
23124179Sobrien# Comm settings for boot0sio.  0xE3 => 9600 8-N-1
24124179Sobrien# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_SPEED
25124179Sobrien# and BOOT_COMCONSOLE_PORT into the correct values to define on the build
26124179Sobrien# command line
27124179SobrienBOOT_BOOT0_COMCONSOLE_SPEED?=	0xE3
28124179Sobrien
29125537SruAFLAGS+=--defsym FLAGS=${BOOT_BOOT0_FLAGS} \
30125537Sru	--defsym TICKS=${BOOT_BOOT0_TICKS} \
31125537Sru	--defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED}
3239973Srnordier
33125537Sru${BOOT}: ${BOOT}.out
34125537Sru	objcopy -S -O binary ${BOOT}.out ${.TARGET}
3539973Srnordier
36125537Sru${BOOT}.out: ${BOOT}.o
37125537Sru	${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o ${.TARGET} ${BOOT}.o
3839973Srnordier
3939973Srnordier.include <bsd.prog.mk>
40