summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2002-10-08 12:09:16 +0000
committergreen <green@FreeBSD.org>2002-10-08 12:09:16 +0000
commit7a416624c8a0f0bb2dcfffe6865d99fd1f9608da (patch)
treee935b328a9f57d30875ea1093b4f508aebac3a9f /sys/boot/i386
parent33d1a8b9c2dbe4bc22843213ff3044d86bb37710 (diff)
downloadFreeBSD-src-7a416624c8a0f0bb2dcfffe6865d99fd1f9608da.zip
FreeBSD-src-7a416624c8a0f0bb2dcfffe6865d99fd1f9608da.tar.gz
Reinstate rev 1.36 with an important line that got missed. Note this
also improves the "random undocumented offsets into various memory spaces" a little bit.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/boot2/Makefile7
-rw-r--r--sys/boot/i386/gptboot/Makefile7
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 05567c1..9445fbb 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -24,6 +24,7 @@ BTX= ${.OBJDIR}/../btx
BTX= ${.CURDIR}/../btx
.endif
+REL1= 0x700
ORG1= 0x7c00
ORG2= 0x1000
@@ -68,8 +69,10 @@ boot2.o: boot2.c ${.CURDIR}/../../common/ufsread.c
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
+ { x = $$1 - ORG1; \
+ printf("#define XREADORG %#x\n", REL1 + x) }' \
+ ORG1=`printf "%d" ${ORG1}` \
+ REL1=`printf "%d" ${REL1}` > boot2.h
boot2: boot2.ldr boot2.bin ${BTX}/btx/btx
btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \
diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile
index 05567c1..9445fbb 100644
--- a/sys/boot/i386/gptboot/Makefile
+++ b/sys/boot/i386/gptboot/Makefile
@@ -24,6 +24,7 @@ BTX= ${.OBJDIR}/../btx
BTX= ${.CURDIR}/../btx
.endif
+REL1= 0x700
ORG1= 0x7c00
ORG2= 0x1000
@@ -68,8 +69,10 @@ boot2.o: boot2.c ${.CURDIR}/../../common/ufsread.c
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
+ { x = $$1 - ORG1; \
+ printf("#define XREADORG %#x\n", REL1 + x) }' \
+ ORG1=`printf "%d" ${ORG1}` \
+ REL1=`printf "%d" ${REL1}` > boot2.h
boot2: boot2.ldr boot2.bin ${BTX}/btx/btx
btxld -v -E ${ORG2} -f bin -b ${BTX}/btx/btx -l boot2.ldr \
OpenPOWER on IntegriCloud