Justus Winter <4win...@informatik.uni-hamburg.de> skribis:

> Wait, that sounds like serverboot, doesn't it ?
>
> It does.  I think it was a mistake to abandon it in the first place.
> Evidence for that: 1.  We now have two copies of the bootscript
> parser, once in the kernel, once in boot.  2.  We moved non-essential
> functionality (with lot's of string parsing) into the kernel.  3.  It
> makes strong assumptions about the platform, e.g. assumes a bootloader
> that can load modules like GRUB does with the multiboot protocol.
>
> But we don't use some made-up shell-like language, we use a Scheme
> interpreter.
>
> \o/

This is exciting!  ;-)

> Why is it awesome ?
>
> (define (bootstrap)
>   (log "Hurd server bootstrap:")
>   (bind-root rootfs-task)
>   [...]
>   (log ".\n"))
>
> (catch (panic "Hurd bootstrap failed: " last-exception "\n")
>        (bootstrap))

We’ve been using this approach in Guix to bootstrap GNU/Linux: all the
code to load kernel modules, mount the root file system, switch to the
new root, etc. are written in Scheme.  And likewise, we get a REPL with
a debugger when something goes wrong.

> start bootshell: bootshell/TinySCHEME 1.41.

Did you consider using a statically-linked Guile?  This is what we do in
the Linux initrd for Guix, and it’s wonderful.  :-)

If you take that route, we can make it easier to share code.  (And we
can adjust Guile as needed, too.)

Keep up the good hack!

Ludo’.


Reply via email to