diff options
author | imp <imp@FreeBSD.org> | 2002-12-17 21:10:34 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-12-17 21:10:34 +0000 |
commit | 1bf3ace0eab7394609cdc04db121f8a44426c39e (patch) | |
tree | 8f1aa59f10c6595dc9e7bdfed5db7cf10d3825c2 /sys/boot/i386/boot2/Makefile | |
parent | 6a15800e94ed79cf4aa9cb520f8a6c5f6e570fcb (diff) | |
download | FreeBSD-src-1bf3ace0eab7394609cdc04db121f8a44426c39e.zip FreeBSD-src-1bf3ace0eab7394609cdc04db121f8a44426c39e.tar.gz |
Make both UFS1 and UFS2 fit on the same boot blocks. These are a
subset of Peter's patchs that are believed to be safe.
Makefile tweaks:
o -fomit-frame-pointer
o Change default to building both UFS1 and UFS2 bootblocks.
Lots of boot2 tweaks:
o lookup is only ever called with kname, so use it directly.
o inline memsize
o getstr are only ever called with cmd, so hardware that.
o tweaks to the parsing code to test after the conversion rather than
before since we tested after anyways.
o eliminate support for %x in printf.
o eliminate a few bytes in printfs.
o Tweak the boot banner.
o eliminate support for wd and " " devices (I might add wd back to
keep bde happy).
o eliminate support for a few arguments.
This takes us from -162 bytes free to 67 bytes free.
I've tested this only on a few systems, so be careful when updating to
this change.
Submitted by: peter, imp, ian
Diffstat (limited to 'sys/boot/i386/boot2/Makefile')
-rw-r--r-- | sys/boot/i386/boot2/Makefile | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index 1045754..2c81624 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -31,11 +31,11 @@ ORG2= 0x2000 # Decide Level of UFS support. UFS1_AND_UFS2 doesn't fit. # BOOT2_UFS?= UFS2_ONLY -# BOOT2_UFS?= UFS1_AND_UFS2 -BOOT2_UFS?= UFS1_ONLY +BOOT2_UFS?= UFS1_AND_UFS2 +# BOOT2_UFS?= UFS1_ONLY CFLAGS= -elf -ffreestanding -Os -fno-builtin \ - -fno-guess-branch-probability \ + -fno-guess-branch-probability -fomit-frame-pointer\ -mrtd \ -D${BOOT2_UFS} \ -I${.CURDIR}/../../common \ @@ -44,7 +44,7 @@ CFLAGS= -elf -ffreestanding -Os -fno-builtin \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -LDFLAGS=-nostdlib -static -N +LDFLAGS=-nostdlib -static -N --gc-sections all: boot1 boot2 @@ -61,7 +61,6 @@ boot1.o: boot1.s boot2.o: boot2.c ${.CURDIR}/../../common/ufsread.c ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.IMPSRC} sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s - rm -f boot2.s.tmp ${AS} ${AFLAGS} -o boot2.o boot2.s boot2.h: boot1.out |