Deleted Added
sdiff udiff text old ( 59150 ) new ( 60821 )
full compact
1# $FreeBSD: head/sys/boot/i386/boot2/Makefile 59150 2000-04-11 14:49:13Z jhb $
2
3PROG= boot2
4NOMAN=
5STRIP=
6BINDIR?= /boot
7BINMODE= 444
8CLEANFILES+= boot1 boot1.out boot1.o \
9 boot2.ldr boot2.bin boot2.ld boot2.out boot2.o \
10 sio.o
11
12M4?= m4
13
14# A value of 0x80 enables LBA support.
15B1FLAGS= 0
16
17BOOT_COMCONSOLE_PORT?= 0x3f8
18BOOT_COMCONSOLE_SPEED?= 9600
19B2SIOFMT?= 0x3
20
21.if exists(${.OBJDIR}/../btx)

--- 18 unchanged lines hidden (view full) ---

40all: boot1 boot2
41
42boot1: boot1.out
43 objcopy -S -O binary boot1.out ${.TARGET}
44
45boot1.out: boot1.o
46 ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o
47
48boot1.o: boot1.m4 boot1.s
49 (cd ${.CURDIR}; ${M4} -DFLAGS=${B1FLAGS} boot1.m4 boot1.s) | \
50 ${AS} ${AFLAGS} -o ${.TARGET}
51
52boot2: boot2.ldr boot2.bin ${BTX}/btx/btx
53 btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \
54 -o boot2.ld -P 1 boot2.bin
55 @ls -l boot2.ld | awk '{ x = 7680 - $$5; \
56 print x " bytes available"; if (x < 0) exit 1 }'
57 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync 2>/dev/null
58
59boot2.ldr:
60 dd if=/dev/zero of=${.TARGET} bs=512 count=1 2>/dev/null
61
62boot2.bin: boot2.out
63 objcopy -S -O binary boot2.out ${.TARGET}
64
65boot2.out: boot2.o sio.o
66 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} \
67 ${BTX}/lib/crt0.o boot2.o sio.o
68
69sio.o: sio.s
70 (cd ${.CURDIR}; ${M4} -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
71 -DSIOFMT=${B2SIOFMT} \
72 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} sio.s) | \
73 ${AS} ${AFLAGS} -o ${.TARGET}
74
75install:
76 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
77 boot1 ${DESTDIR}${BINDIR}/boot1
78 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
79 boot2 ${DESTDIR}${BINDIR}/boot2
80
81.include <bsd.prog.mk>