[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reinventing the Hurd server bootstrap

From: Justus Winter
Subject: Re: Reinventing the Hurd server bootstrap
Date: Sun, 28 Dec 2014 03:53:11 +0100
User-agent: alot/0.3.5

Quoting Ludovic Courtès (2014-12-27 22:22:34)
> 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.

That sounds cool !

> > 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.)

Yes, I actually tried this before I went with TinySCHEME.  I didn't
managed to get it to work, maybe because the program has to be totally
stand-alone.  When bootshell starts, there is no filesystem, so one
cannot load resources from it.  What I did was to embed TinySCHEMEs
library code directly into the binary.  I guess something similar
could be done with Guile though.

> Keep up the good hack!

I'm excited about it too.  For the first time, I feel like I can
actually change the bootstrap process that has caused me so much pain
in the past >,<


reply via email to

[Prev in Thread] Current Thread [Next in Thread]