[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reinventing the Hurd server bootstrap
From: |
Ludovic Courtès |
Subject: |
Re: Reinventing the Hurd server bootstrap |
Date: |
Sat, 27 Dec 2014 22:22:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Justus Winter <4winter@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’.