aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-05-11 21:39:59 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-05-11 21:39:59 +0000
commit7a163a83dad189d3c71b2477183ab7dca361b44f (patch)
treed97d7d03416459d900f0003d0bbad4a4ddc09aa5 /sys/boot
parentd07160f4012c448ee1cc01a757430ff7068bea18 (diff)
downloadsrc-7a163a83dad189d3c71b2477183ab7dca361b44f.tar.gz
src-7a163a83dad189d3c71b2477183ab7dca361b44f.zip
Use a crowbar and duct-tape to make boot2 fit again. This gets it down
to 4 bytes free. I removed a printf (the Keyboard yes/no) since it is of marginal value and sed'ed the generated asm output to remove the unwanted aligns. There's probably a better way to gain a few extra bytes than losing the printf. Shortening strings is probably a better option but this should get us over the hurdle.
Notes
Notes: svn path=/head/; revision=96424
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/boot2/Makefile6
-rw-r--r--sys/boot/i386/boot2/boot2.c2
-rw-r--r--sys/boot/i386/gptboot/Makefile6
-rw-r--r--sys/boot/i386/gptboot/gptboot.c2
4 files changed, 14 insertions, 2 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 12fa148b8166..8cb5dd310b7b 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -48,6 +48,12 @@ boot1.out: boot1.o
boot1.o: boot1.s
${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET}
+boot2.o: boot2.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
${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \
{ x = $$1 - ORG1; printf("#define XREADORG 0x7%x\n", x) }' \
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index 68aa0571ff63..849bd22b8e47 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -456,7 +456,7 @@ parse(char *arg)
}
if (opts & 1 << RBX_PROBEKBD) {
i = *(uint8_t *)PTOV(0x496) & 0x10;
- printf("Keyboard: %s\n", i ? "yes" : "no");
+ /* printf("Keyboard: %s\n", i ? "yes" : "no"); XXX GCC31 size */
if (!i)
opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL;
opts &= ~(1 << RBX_PROBEKBD);
diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile
index 12fa148b8166..8cb5dd310b7b 100644
--- a/sys/boot/i386/gptboot/Makefile
+++ b/sys/boot/i386/gptboot/Makefile
@@ -48,6 +48,12 @@ boot1.out: boot1.o
boot1.o: boot1.s
${AS} ${AFLAGS} --defsym FLAGS=${B1FLAGS} ${.IMPSRC} -o ${.TARGET}
+boot2.o: boot2.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
${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \
{ x = $$1 - ORG1; printf("#define XREADORG 0x7%x\n", x) }' \
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 68aa0571ff63..849bd22b8e47 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -456,7 +456,7 @@ parse(char *arg)
}
if (opts & 1 << RBX_PROBEKBD) {
i = *(uint8_t *)PTOV(0x496) & 0x10;
- printf("Keyboard: %s\n", i ? "yes" : "no");
+ /* printf("Keyboard: %s\n", i ? "yes" : "no"); XXX GCC31 size */
if (!i)
opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL;
opts &= ~(1 << RBX_PROBEKBD);