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

Ludovic Courtès ludo at gnu.org
Thu Nov 12 12:32:15 CET 2009


Saluton!

Lluís Batlle <viriketo at gmail.com> writes:

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

[...]

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

Right.  In this case ‘config.guess’ probably isn’t enough.  In a ideal
world, the ‘vendor’ part would be “sheevaplug”, and from that you could
derive specific parameters needed by uboot et al.  But I don’t think
config.guess currently detects that, so you’re probably right in that
Nixpkgs must be provided with additional info.

> I like the pierron first proposal about 'platform' being a parameter
> of nixpkgs.

Nicolas’ proposal [0] was actually similar to the information provided
by config.guess.  So perhaps it’s not enough for you, unless we use
‘platform’ to provide more detailed information that config.guess would
provide.

Another option would be to patch config.guess so that it provides a
useful ‘vendor’ field.

Thanks,
Ludo’.

[0] , platform ? "pc" [...]
    , system ? "${cpu.name}-${platform}-${kernel.name}"




More information about the nix-dev mailing list