Page MenuHomeFreeBSD

D36129.diff
No OneTemporary

D36129.diff

diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
--- a/stand/i386/loader/Makefile
+++ b/stand/i386/loader/Makefile
@@ -19,6 +19,8 @@
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
VERSION_FILE= ${.CURDIR}/../loader/version
+LOADERSIZE= 510000 # Largest known safe size
+
.PATH: ${BOOTSRC}/i386/loader
@@ -79,9 +81,12 @@
8x16.c: ${SRCTOP}/contrib/terminus/ter-u16b.bdf
vtfontcvt -f compressed-source -o ${.TARGET} ${.ALLSRC}
+
${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADER}.bin
+ @set -- `${SIZE} ${.TARGET} | tail -1` ; x=$$((${LOADERSIZE}-$$4)); \
+ echo "$$x bytes available"; test $$x -ge 0
${LOADER}.bin: ${LOADER}.sym
${STRIPBIN} -R .comment -R .note -o ${.TARGET} ${.ALLSRC}
diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile
--- a/stand/i386/pxeldr/Makefile
+++ b/stand/i386/pxeldr/Makefile
@@ -13,6 +13,7 @@
LDR= pxeldr
ORG= 0x7c00
LOADER= loader
+PXELDRSIZE= 510000 # Largest known safe size
.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
CFLAGS+=-DPROBE_KEYBOARD
@@ -41,5 +42,7 @@
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADERBIN}
+ @set -- `${SIZE} ${.TARGET} | tail -1` ; x=$$((${PXELDRSIZE}-$$4)); \
+ echo "$$x bytes available"; test $$x -ge 0
.include <bsd.prog.mk>

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 24, 2:10 PM (12 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17760330
Default Alt Text
D36129.diff (1 KB)

Event Timeline