[Nix-dev] New arm platform: qemu-system-arm

Lluís Batlle viriketo at gmail.com
Sun Nov 8 22:24:39 CET 2009


Hello all,

some times I mentioned that for arm devices, we would need in nixos
some way of setting the platform where the OS will run, and not only
the processor and the kernel (as in builtins.system).

I did some hack into nixpkgs/stdenv-updates to get that, and I
considered the grub platforms to be 'pc', and then I have two arm
platforms: sheevaplug and qemu-system-arm versatilepb (which I named
'versatileARM').

I don't know how far it has to be extended, but the actual scheme (the
platform attribute set in nixpkgs) works for my needs, and at least
expresses the minimum information the rest of the nixos/nixpkgs system
needs:
- how to build the kernel
- how to build the initrd
- how to prepare the boot loader

Now a user can use its configuration.nix to state, for example:
nixpkgs.config = {
      packageOverrides = pkgs: with pkgs; rec {
        platform = platformVersatileARM;
      };
}

Those who follow stdenv-updates, feel free to comment on that. I don't
doubt you may have better ideas to reflect the 'platform' information
properly for nixos. Pierron, any suggestion as a nixos module? How
much of that information in 'platform' should be in nixpkgs, and how
much in nixos?

The new VersatileARM platform allows me to soon send a qemu image to
niksnut that will be able to take part in hydra building binaries for
the Sheevaplug platform, because this VersatileARM platform for
qemu-system-arm allows binary-compatibility with the sheevaplug.

By now, I only made the 2.6.31-zen5 kernel to follow this scheme.

Also please notice, off-topic, that this weekend I changed
'stdenv-updates' removing it and renaming another branch I created to
the very same 'stdenv-updates'. I hope the new branch will be easily
merged into trunk now, and I hope I have not left any previous
stdenv-updates difference respect to the nixpkgs trunk.

Regards,
Lluís.



More information about the nix-dev mailing list