Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115415976
D36129.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36129.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D36129: stand: impose 510,000 byte limit for /boot/loader and /boot/pxeldr
Attached
Detach File
Event Timeline
Log In to Comment