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

Lluís Batlle viriketo at gmail.com
Wed Nov 11 20:25:17 CET 2009


2009/11/10 Ludovic Courtès <ludo at gnu.org>:
> For many (most?) applications, the kernel is not so important.  What’s
> important is the operating system, e.g., GNU.  Most applications
> supposedly written for “Linux” are in fact written for GNU/Linux and
> would be more easily ported to other GNU variants (currently
> GNU/kFreeBSD and GNU/Hurd) than to, say, BSD.
>
> GNU config.guess uses the ‘CPU-VENDOR-KERNEL-OS’ or simply
> ‘CPU-VENDOR-OS’ form for this reason (see
> http://git.sv.gnu.org/gitweb/?p=config.git;a=blob;f=testsuite/config-guess.data
> for examples.)
If nixpkgs had only to handle programs, maybe cpu-vendor-kernel-os
would be enough, but by now it handles the kernel, the drivers, and
bootloaders too.
These need more information about the hardware they have to be built
for. No 'config.guess' is used to build a kernel or uboot, as the
information there is only, IMO, for usual programs.

For ARMs, the "hardware information" usually involves details on the
eletronics and wiring involved in the whole computer, as the memory
banks, bus controllers, timers, interrupt map, ... For PCs, I think,
all these details are set in quite a common way, and there is always
the BIOS to provide any missing detail.

The uboot expression in nixpkgs is, in fact, specific for the
sheevaplug, although uboot has code for many boards. The kernel and
uboot usually have names referring to different kind of boards they
can be built for, and I think this is the kind of information that
should be handled in nixpkgs someway. Not for most of the programs,
but at least for those dealing with the eletronics. And given the
diversity of platforms, I thought of a 'string' identifying each.

I like the pierron first proposal about 'platform' being a parameter
of nixpkgs. I did not think much the changes I did in nixpkgs to
support the pc and two arm platforms, but at least I set a base to
start modifications from, and then check if all still builds properly.
For the builtins.system to provide the platform information... I don't
know how that could be done. It is not something a program can ask to
the kernel, and get a useful answer.

Regards,
Lluís.



More information about the nix-dev mailing list