Re: simpler boot loader

From: Frank Knobbe (frank_at_knobbe.us)
Date: 06/25/05

  • Next message: Vittorio De Martino: "Problems with libcom_err_p.a"
    To: Wojciech Puchar <wojtek@tensor.3miasto.net>
    Date: Sat, 25 Jun 2005 14:32:55 -0500
    
    
    

    On Sun, 2005-06-05 at 13:39 +0200, Wojciech Puchar wrote:
    > something like for NetBSD - just load one ELF file from disk and that's
    > all.
    >
    > FreeBSD /boot/loader and it's script are overcomplicated.

    What complicates the normal boot process is that the kernel requires a
    pre-boot environment to be set up. That's what the various loader steps
    do, mainly loader.

    About a year ago I tried to hack a Cobalt RAQ so that it would boot the
    BSD kernel. The problem is that the Cobalt has Linux in the BIOS... it
    boots straight into a Linux boot loader which then loads the Linux
    kernel (in ELF format I believe). Replacing that Linux kernel with the
    FreeBSD kernel does not work. I had tried to hack boot2 and loader so
    that it can be run from the Linux loader (in ELF format) and then set up
    the pre-boot environment and load and execute the kernel. However, my
    x86 assembler skills suck (in a previous life I did 65xx and 68xxx, but
    not x86). The loader segfaults every time and I had tabled the project.

    The interim solution for me was to have the Cobalt boot into VMware
    which then run FreeBSD. The performance kinda sucks and I would prefer
    to run BSD directly, so eventually I'd like to revisit that.

    In closing, I'm not aware of an easy way (without major hacks) to boot
    the FreeBSD kernel as a single file. You can try to look at the code for
    boot2 and loader write an ELF binary that does the same and loads
    FreeBSD. If you get something together, *please* let me know.

    Cheers,
    Frank

    
    



  • Next message: Vittorio De Martino: "Problems with libcom_err_p.a"