Inferno native build: could not read the boot disk

Issue #2 resolved
Ramon Batlle
created an issue

Boot failed when configuring a native build, running the following command:

qemu-system-i386 -m 512M -fda $INFERNO_ROOT/os/pc/disk

My qemu version is 2.5.0.

Note: The hosted build works great!.

Comments (14)

  1. David Boddie repo owner

    I wonder if qemu 2.5.0 behaves differently to version 1.1.2 with respect to the way floppy disk images are read. I will explore this with a more recent version.

  2. David Boddie repo owner

    Looking at this more closely, it seems that the floppy disk image is being created incorrectly in certain circumstances, so it seems that the version of qemu shouldn't be a factor.

  3. David Boddie repo owner

    9load seems to be built incorrectly in Inferno/386/9load and that causes the failure. Copying a binary that is known to work into a failing installation appears to help. I'm currently trying to diagnose why it is built incorrectly.

  4. David Boddie repo owner

    The linker, 8l, seems to produce incorrect output, setting the last three bytes in each group of four to zeros. If I compile the .c files on a system that can produce a working 8l and copy to .o files to the broken system, a working 8l can be made, so something is wrong with the way that 8l is compiled. There seems to be a difference between gcc 4.7.2 and gcc 4.9.2 that causes this.

  5. David Boddie repo owner

    You're welcome!

    It seems that there is something about utils/8l/asm.c that modern compilers don't like. I'm trying to get better warnings from gcc in order to help me understand what it doesn't like. The problem is that I don't really understand what the code is supposed to do. We may have to file a bug report at the official Inferno repository.

  6. David Boddie repo owner

    What I found was that if I remove 9load, 8l and asm.o

    rm inferno-os/Inferno/386/9load inferno-os/os/boot/pc/9load inferno-os/Linux/386/bin/8l inferno-os/utils/8l/o.out inferno-os/utils/8l/asm.o
    

    then copy in a version of asm.o from a working build then 9load is exactly the same as a working copy. Having said that, the linker in the mkfiles/mkfile-Linux-386 file is given as cc, which should be gcc.

    However, in the os/boot/pc/mkfile it uses 8l to link the object files and I don't think we can use gcc's linker for this target.

  7. David Boddie repo owner

    OK, I think I have a fix for this. I'll try and push it into my clone of the inferno-os repository and send a pull request to the official repository.

  8. Log in to comment