Trying to build L4 on NixOS

Adam Lackorzynski adam at
Sun Apr 9 23:56:16 CEST 2017

On Mon Apr 03, 2017 at 19:19:18 +0200, Mateusz Czaplinski wrote:
> On Fri, Mar 31, 2017 at 12:30 AM, Adam Lackorzynski <
> adam at> wrote:
> > I think on your L4Linux build ARCH=x86
> > was somehow set so it just build a normal Linux kernel.
> >
> Indeed, seems that ARCH=x86_64 is called with defconfig. Is there some ARCH
> I can set to still get asked the L4 questions?

Yes, it's ARCH=l4, and it's the default.

> > The build system won't just overwrite your host system, so it
> > did not do that. (Did you bulid as root? Don't do that!)
> > Further, some setup and configuration is needed.
> NixOS is very much automated, and the scripts I linked before result in
> NixOS automatically picking the result of the build (vmlinuz etc.) and
> adding a new default GRUB entry which would use it. So after a successful
> build and reboot, the new kernel is used.

I see.
> As to building as root - why not? I'm doing the experiments in a fully
> controlled local VM, and there it's easier for me to just work as root,
> especially during intensive hacking. Does it break the L4Linux build
> somehow? (Also, Nix/NixOS builds stuff in custom non-root chroot jail IIUC
> anyway.)

> As to "some setup and configuration" - what do you mean by that? Something
> L4/L4Linux-specific?

Yes. L4Re is a microkernel system and as such programs (including VMs
like L4Linux) do not get access to everything per default. If a
component wants to have access to a hardware device it needs to be
explicitly granted to it. So most of the times it's not just working.

> > Since L4Linux pretty adopted to L4Re you could for example check dmesg
> > and see some L4-specific lines there. Or you could check
> > /proc/interrupts.
> >
> Oh, cool, thanks. Should it be enough to grep 'l4' or 'L4' in dmesg, or
> would it be something more cryptic? As to /proc/interrupts, what should I
> look for? `grep -i L4 /proc/interrupts` should to it?

Yes, there will be a couple of 'l4' in dmesg, and also in

Please go to the l4 build directory and do "make qemu", then select the
"L4Linux-basic" entry. There should be an L4Linux booting up. That's how
it looks.


More information about the l4-hackers mailing list