Nixos Arm Image Generation?

137 views
Skip to first unread message

Colin Rice

unread,
Jun 11, 2018, 12:01:35 AM6/11/18
to nix-devel
Hi,

What I'd like to do is be able to produce raspberry pi images as flat files (basically that could be written to a sd image and just work), with some custom services mixed in (for my own local projects).

I was wondering if anyone would have objections (or suggestions on a better way to do this) to me trying to get make-disk-image
to work on arm - (maybe with follow on work to get the sd image builder pathway to also use the same library?).

A first feature would be to add modify the boot loader options to allow for extlinux bootloaders as well as perhaps a wrapper which populates the various raspberry pi 3 boot files.

Thanks
-Colin

Tuomas Tynkkynen

unread,
Jun 15, 2018, 8:51:18 AM6/15/18
to nix-devel
Hi,

You can just import nixos/modules/installer/cd-dvd/sd-image.nix on its own (similar to say, nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix does it) and start working from that. No need to involve make-disk-image.nix.

While it would be nice to merge sd-image.nix and make-disk-image.nix to a common implementation, it's going to be a huge yak shaving project, starting from fixing upstream lkl to work on ARM (last time I checked it doesn't), making make-disk-image.nix to be not dependent on Qemu/KVM (I have this project of adding Python bindings to lkl which could be used to replace the Qemu parts like setting correct permissions on /nix/store, but that itself is an >1k lines of patch to lkl), and so on...

Colin Rice

unread,
Jun 16, 2018, 2:57:16 PM6/16/18
to Tuomas Tynkkynen, nix-devel
Ah - I didn't realize that make disk image used qemu + kvm. I must admit I want to use it because that way I don't have to need around with populating the boot folder like what sd-image-aarch64 does. I'll take a second try at just using the installer infrastructure.

--
You received this message because you are subscribed to the Google Groups "nix-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nix-devel+...@googlegroups.com.
To post to this group, send email to nix-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nix-devel/065aaf86-2f84-45cb-85f8-e43e69480931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages