Makefile (80084) | Makefile (80751) |
---|---|
1# $FreeBSD: head/sys/boot/i386/boot2/Makefile 80084 2001-07-21 14:32:47Z rnordier $ | 1# $FreeBSD: head/sys/boot/i386/boot2/Makefile 80751 2001-07-31 19:50:09Z jhb $ |
2 3PROG= boot2 4NOMAN= 5STRIP= 6BINDIR?= /boot 7BINMODE= 444 8CLEANFILES+= boot1 boot1.out boot1.o \ | 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 \ | 9 boot2.ldr boot2.bin boot2.ld boot2.out boot2.o boot2.h \ |
10 sio.o 11 | 10 sio.o 11 |
12NM?= nm 13 |
|
12# A value of 0x80 enables LBA support. 13B1FLAGS= 0x80 14 15BOOT_COMCONSOLE_PORT?= 0x3f8 16BOOT_COMCONSOLE_SPEED?= 9600 17B2SIOFMT?= 0x3 18 19.if exists(${.OBJDIR}/../btx) --- 21 unchanged lines hidden (view full) --- 41 objcopy -S -O binary boot1.out ${.TARGET} 42 43boot1.out: boot1.o 44 ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o 45 46boot1.o: boot1.s 47 ${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET} 48 | 14# A value of 0x80 enables LBA support. 15B1FLAGS= 0x80 16 17BOOT_COMCONSOLE_PORT?= 0x3f8 18BOOT_COMCONSOLE_SPEED?= 9600 19B2SIOFMT?= 0x3 20 21.if exists(${.OBJDIR}/../btx) --- 21 unchanged lines hidden (view full) --- 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.s 49 ${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET} 50 |
51boot2.h: boot1.out 52 ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ 53 { x = $$1 - ORG1; printf("#define XREADORG 0x7%x\n", x) }' \ 54 ORG1=`printf "%d" ${ORG1}` > boot2.h 55 |
|
49boot2: boot2.ldr boot2.bin ${BTX}/btx/btx 50 btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \ 51 -o boot2.ld -P 1 boot2.bin 52 @ls -l boot2.ld | awk '{ x = 7680 - $$5; \ 53 print x " bytes available"; if (x < 0) exit 1 }' 54 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync 2>/dev/null 55 56boot2.ldr: 57 dd if=/dev/zero of=${.TARGET} bs=512 count=1 2>/dev/null 58 59boot2.bin: boot2.out 60 objcopy -S -O binary boot2.out ${.TARGET} 61 62boot2.out: boot2.o sio.o 63 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} \ 64 ${BTX}/lib/crt0.o boot2.o sio.o 65 | 56boot2: boot2.ldr boot2.bin ${BTX}/btx/btx 57 btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \ 58 -o boot2.ld -P 1 boot2.bin 59 @ls -l boot2.ld | awk '{ x = 7680 - $$5; \ 60 print x " bytes available"; if (x < 0) exit 1 }' 61 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync 2>/dev/null 62 63boot2.ldr: 64 dd if=/dev/zero of=${.TARGET} bs=512 count=1 2>/dev/null 65 66boot2.bin: boot2.out 67 objcopy -S -O binary boot2.out ${.TARGET} 68 69boot2.out: boot2.o sio.o 70 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} \ 71 ${BTX}/lib/crt0.o boot2.o sio.o 72 |
73boot2.o: boot2.h 74 |
|
66sio.o: sio.s 67 ${AS} ${AFLAGS} --defsym SIOPRT=${BOOT_COMCONSOLE_PORT} \ 68 --defsym SIOFMT=${B2SIOFMT} \ 69 --defsym SIOSPD=${BOOT_COMCONSOLE_SPEED} \ 70 ${.IMPSRC} -o ${.TARGET} 71 72install: 73 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 74 boot1 ${DESTDIR}${BINDIR}/boot1 75 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 76 boot2 ${DESTDIR}${BINDIR}/boot2 77 78.include <bsd.prog.mk> | 75sio.o: sio.s 76 ${AS} ${AFLAGS} --defsym SIOPRT=${BOOT_COMCONSOLE_PORT} \ 77 --defsym SIOFMT=${B2SIOFMT} \ 78 --defsym SIOSPD=${BOOT_COMCONSOLE_SPEED} \ 79 ${.IMPSRC} -o ${.TARGET} 80 81install: 82 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 83 boot1 ${DESTDIR}${BINDIR}/boot1 84 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 85 boot2 ${DESTDIR}${BINDIR}/boot2 86 87.include <bsd.prog.mk> |