blob: ec41072dfbead690bfcd4fb33ac10789c9cea51a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# $FreeBSD$
PROG= boot1
SRCS= _start.S boot1.c
NOMAN=
STRIP=
BINDIR?= /boot
BINMODE= 444
BOOTBLOCKBASE= 0x4000
CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common -I${.CURDIR}/../../common
boot1.elf: _start.o boot1.o
${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC}
boot1.aout: boot1.elf
elf2aout -o ${.TARGET} ${.ALLSRC}
# 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
CLEANFILES+= boot1.elf boot1.aout
.include <bsd.prog.mk>
|