summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/boot2/Makefile
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-14 19:44:13 +0000
committerphk <phk@FreeBSD.org>2002-12-14 19:44:13 +0000
commitbb0e8ad59aab5cf40ac2ec9d26d8d6ae7daf76ac (patch)
tree2857198281c41e5b88be3d8e3dc25dece1e35847 /sys/boot/i386/boot2/Makefile
parent49ede28a1f9965bb9ec2ec8bc81433622085e282 (diff)
downloadFreeBSD-src-bb0e8ad59aab5cf40ac2ec9d26d8d6ae7daf76ac.zip
FreeBSD-src-bb0e8ad59aab5cf40ac2ec9d26d8d6ae7daf76ac.tar.gz
Employ the unused bytes after the disklabel in the second sector. This makes
it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the traditional 16 sectors. Remove assorted now unneeded hackery. UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably not within our reach, ever.
Diffstat (limited to 'sys/boot/i386/boot2/Makefile')
-rw-r--r--sys/boot/i386/boot2/Makefile21
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index aed315f..1045754 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -28,25 +28,22 @@ REL1= 0x700
ORG1= 0x7c00
ORG2= 0x2000
-# Setting this to anything else gives UFS1+2 support and larger
-# boot2 binary.
+# Decide Level of UFS support. UFS1_AND_UFS2 doesn't fit.
+
+# BOOT2_UFS?= UFS2_ONLY
+# BOOT2_UFS?= UFS1_AND_UFS2
BOOT2_UFS?= UFS1_ONLY
CFLAGS= -elf -ffreestanding -Os -fno-builtin \
-fno-guess-branch-probability \
-mrtd \
+ -D${BOOT2_UFS} \
-I${.CURDIR}/../../common \
-I${.CURDIR}/../btx/lib -I. \
-Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-.if ${BOOT2_UFS} == "UFS1_ONLY"
-CFLAGS+= -D${BOOT2_UFS}
-.else
-# nothing here
-.endif
-
LDFLAGS=-nostdlib -static -N
all: boot1 boot2
@@ -77,18 +74,12 @@ boot2.h: boot1.out
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
-.if ${BOOT2_UFS} == "UFS1_ONLY"
@ls -l boot2.ld | awk '{ x = 7680 - $$5; \
print x " bytes available"; if (x < 0) exit 1 }'
dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync 2>/dev/null
-.else
- @ls -l boot2.ld | awk '{ x = 9728 - $$5; \
- print x " bytes available"; if (x < 0) exit 1 }'
- dd if=boot2.ld of=${.TARGET} obs=9728 conv=osync 2>/dev/null
-.endif
boot2.ldr:
- dd if=/dev/zero of=${.TARGET} bs=512 count=1 2>/dev/null
+ dd if=/dev/zero of=${.TARGET} bs=276 count=1 2>/dev/null
boot2.bin: boot2.out
objcopy -S -O binary boot2.out ${.TARGET}
OpenPOWER on IntegriCloud