2002-02-15 12:49:20 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2002-04-01 22:57:51 +00:00
|
|
|
PROG= boot1
|
|
|
|
SRCS= _start.S boot1.c
|
|
|
|
NOMAN=
|
|
|
|
STRIP=
|
|
|
|
BINDIR?= /boot
|
|
|
|
BINMODE= 444
|
|
|
|
|
2002-02-15 12:49:20 +00:00
|
|
|
BOOTBLOCKBASE= 0x4000
|
|
|
|
|
2002-05-10 09:26:35 +00:00
|
|
|
CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common
|
2002-04-01 22:57:51 +00:00
|
|
|
|
|
|
|
boot1.elf: _start.o boot1.o
|
2002-04-21 02:37:55 +00:00
|
|
|
${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC}
|
2002-04-01 22:57:51 +00:00
|
|
|
|
|
|
|
boot1.aout: boot1.elf
|
2002-04-21 02:37:55 +00:00
|
|
|
elf2aout -o ${.TARGET} ${.ALLSRC}
|
2002-02-15 12:49:20 +00:00
|
|
|
|
2002-04-01 22:57:51 +00:00
|
|
|
# Construct boot1. disklabel expects it to contain zeroed-out space for the
|
|
|
|
# label, and to be of the correct size.
|
|
|
|
boot1: boot1.aout
|
|
|
|
dd if=/dev/zero of=${.TARGET} bs=512 count=16
|
|
|
|
dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc
|
2002-02-15 12:49:20 +00:00
|
|
|
|
2002-04-01 22:57:51 +00:00
|
|
|
CLEANFILES+= boot1.elf boot1.aout
|
2002-02-15 12:49:20 +00:00
|
|
|
|
2002-04-01 22:57:51 +00:00
|
|
|
.include <bsd.prog.mk>
|