Subject: bootblock for hd[123]
To: None <port-i386@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: port-i386
Date: 09/08/1999 05:46:48
Hi,

I just tried building a i386 bootblock that can boot from something
different than hd0. (I want to throw this at the WinNT bootloader; I have
hd0 100% Win*, and NetBSD on hd1 and hd2, both bootable). Having 1.4.1
sources, I remove the comment in line 144 of
sys/arch/i386/stand/lib/crt/bootsect/start_bootsect.S, cd to
sys/arch/i386/stand/biosboot, "make", and get:

miyu% make
rm -f /sys/arch/i386/stand/biosboot/obj.i386/machine
ln -s /sys/arch/i386/stand/biosboot/../../../..//arch/i386/include
/sys/arch/i386/stand/biosboot/obj.i386/machine
cc   -DCOMPAT_OLDBOOT -DCOMPAT_386BSD_MBRPART -DPASS_BIOSGEOM -nostdinc
-I/sys/arch/i386/stand/biosboot/obj.i386
-I/sys/arch/i386/stand/biosboot/../../../../
-I/sys/arch/i386/stand/biosboot/../../../..//arch/i386/stand/lib
-I/sys/arch/i386/stand/biosboot/../../../..//lib/libsa -D_STANDALONE -c
-traditional-cpp
/sys/arch/i386/stand/biosboot/../../../..//arch/i386/stand/lib/crt/bootsect/start_bootsect.S
/tmp/ccbq8gkx.s: Assembler messages:
/tmp/ccbq8gkx.s:1013: Error: attempt to .org/.space backwards? (-5)
/tmp/ccbq8gkx.s:1013: Internal error!
Assertion failure in write_contents at
/data/cvs/src/gnu/usr.bin/gas.new/../../dist/gas/write.c line 1106.
Please report this bug.
*** Error code 1

Nice!

I'm not a intel machine language guru, can anyone tell me what's wrong
with that mov-command:

        data32
        andl    $0xff, %edx 
        mov     $0x0080, %edx	<- this one was commented out before
        int     $0x13

If I put back the comment, everything works fine. Any hints?

I hope that I'm at least at the right place for changing what I want? Or
is setting BOOTABLE in the same file the way to go?


Thanks,

	Hubert

-- 
NetBSD - Better for your uptime than Viagra