Makefile revision 89240
150477Speter# $FreeBSD: head/sys/boot/i386/boot0/Makefile 89240 2002-01-10 21:40:33Z jhb $
239973Srnordier
339980SrnordierPROG=		boot0
439980SrnordierNOMAN=
539980SrnordierSTRIP=
639980SrnordierBINDIR?=	/boot
740493SrnordierBINMODE=	444
839980Srnordier
939973SrnordierM4?=	m4
1039973Srnordier
1189240Sjhb# The default set of flags compiled into boot0.  This enables update (writing
1289240Sjhb# the modified boot0 back to disk after running so that the selection made is
1389240Sjhb# saved), packet mode (detect and use the BIOS EDD extensions if we try to
1489240Sjhb# boot past the 1024 cylinder liimt), and booting from all valid slices.
1589240SjhbBOOT_BOOT0_FLAGS?=	0xf
1640524Srnordier
1789240Sjhb# The number of timer ticks to wait for a keypress before assuming the default
1889240Sjhb# selection.  Since there are 18.2 ticks per second, the default value of
1989240Sjhb# 0xb6 (182d) corresponds to 10 seconds.
2089240SjhbBOOT_BOOT0_TICKS?=	0xb6
2139973Srnordier
2289240Sjhb# The base address that we the boot0 code to to run it.  Don't change this
2389240Sjhb# unless you are glutton for punishment.
2489240SjhbBOOT_BOOT0_ORG?=	0x600
2589240Sjhb
2639973Srnordierboot0: boot0.o
2740124Srnordier.if ${OBJFORMAT} == aout
2889240Sjhb	${LD} -N -s -T ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
2940124Srnordier	dd if=boot0.out of=${.TARGET} ibs=32 skip=1
3040124Srnordier.else
3189240Sjhb	${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
3240308Srnordier	objcopy -S -O binary boot0.out ${.TARGET}
3340124Srnordier.endif
3439973Srnordier
3560821Sjhbboot0.o: boot0.s
3689240Sjhb	${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
3789240Sjhb		--defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET}
3839973Srnordier
3939980SrnordierCLEANFILES+= boot0.out boot0.o
4039973Srnordier
4139973Srnordier.include <bsd.prog.mk>
42