Index: Makefile =================================================================== RCS file: /usr/cvs/src/sys/boot/i386/boot2/Makefile,v retrieving revision 1.16 diff -u -r1.16 Makefile --- Makefile 1999/11/15 04:23:40 1.16 +++ Makefile 2000/02/15 01:32:22 @@ -35,6 +35,10 @@ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings +.if defined(BOOT2_NOAOUT) || defined(BTX_VERBOSE) +CFLAGS+= -DBOOT2_NOAOUT +.endif + LDFLAGS=-nostdlib -static -N all: boot1 boot2 @@ -49,7 +53,7 @@ (cd ${.CURDIR}; ${M4} -DFLAGS=${B1FLAGS} boot1.m4 boot1.s) | \ ${AS} ${AFLAGS} -o ${.TARGET} -boot2: boot2.ldr boot2.bin +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 @ls -l boot2.ld | awk '{ x = 7680 - $$5; \ Index: boot2.c =================================================================== RCS file: /usr/cvs/src/sys/boot/i386/boot2/boot2.c,v retrieving revision 1.28 diff -u -r1.28 boot2.c --- boot2.c 2000/02/09 19:23:46 1.28 +++ boot2.c 2000/02/15 01:31:32 @@ -217,14 +217,18 @@ } if (xfsread(ino, &hdr, sizeof(hdr))) return; +#ifndef BOOT2_NOAOUT if (N_GETMAGIC(hdr.ex) == ZMAGIC) fmt = 0; - else if (IS_ELF(hdr.eh)) + else +#endif + if (IS_ELF(hdr.eh)) fmt = 1; else { printf("Invalid %s\n", "format"); return; } +#ifndef BOOT2_NOAOUT if (fmt == 0) { addr = hdr.ex.a_entry & 0xffffff; p = PTOV(addr); @@ -251,7 +255,9 @@ return; p += x; } - } else { + } else +#endif + { fs_off = hdr.eh.e_phoff; for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { if (xfsread(ino, ep + j, sizeof(ep[0])))