diff options
author | jhb <jhb@FreeBSD.org> | 2001-07-31 19:50:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-07-31 19:50:09 +0000 |
commit | 198dfe1ce372964cd0190a0caa7d115f92f9da6c (patch) | |
tree | af96aaeb4aebec2c07287668b0913f3a584ec6e7 /sys/boot/i386/gptboot/Makefile | |
parent | 153539de08c0558a99102fb2b3091f7b7ab7eb51 (diff) | |
download | FreeBSD-src-198dfe1ce372964cd0190a0caa7d115f92f9da6c.zip FreeBSD-src-198dfe1ce372964cd0190a0caa7d115f92f9da6c.tar.gz |
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify. Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.
Submitted by: Mark Peek <mark@whistle.com>
Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
PR: i386/26382
Obtained from: NetBSD, OpenBSD (the example BPB)
MFC after: 1 month
Diffstat (limited to 'sys/boot/i386/gptboot/Makefile')
-rw-r--r-- | sys/boot/i386/gptboot/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile index 35e7d89..5425c08 100644 --- a/sys/boot/i386/gptboot/Makefile +++ b/sys/boot/i386/gptboot/Makefile @@ -6,9 +6,11 @@ STRIP= BINDIR?= /boot BINMODE= 444 CLEANFILES+= boot1 boot1.out boot1.o \ - boot2.ldr boot2.bin boot2.ld boot2.out boot2.o \ + boot2.ldr boot2.bin boot2.ld boot2.out boot2.o boot2.h \ sio.o +NM?= nm + # A value of 0x80 enables LBA support. B1FLAGS= 0x80 @@ -46,6 +48,11 @@ boot1.out: boot1.o boot1.o: boot1.s ${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET} +boot2.h: boot1.out + ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ + { x = $$1 - ORG1; printf("#define XREADORG 0x7%x\n", x) }' \ + ORG1=`printf "%d" ${ORG1}` > boot2.h + boot2: boot2.ldr boot2.bin ${BTX}/btx/btx btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \ -o boot2.ld -P 1 boot2.bin @@ -63,6 +70,8 @@ boot2.out: boot2.o sio.o ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} \ ${BTX}/lib/crt0.o boot2.o sio.o +boot2.o: boot2.h + sio.o: sio.s ${AS} ${AFLAGS} --defsym SIOPRT=${BOOT_COMCONSOLE_PORT} \ --defsym SIOFMT=${B2SIOFMT} \ |