mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
28 lines
988 B
Plaintext
28 lines
988 B
Plaintext
|
Adding uClibc support for a new platform
|
||
|
|
||
|
Sometimes you want to cross-compile to another architecture, for example an
|
||
|
embedded devices. For embedded devices the uClibc C library is popular.
|
||
|
In Nixpkgs there is support for uClibc for several architectures but not
|
||
|
everything is supported.
|
||
|
|
||
|
Adding support is not very difficult,
|
||
|
|
||
|
* Add your architecture to the buildfiles in
|
||
|
$nixpkgs/development/tools/misc/binutils-cross
|
||
|
|
||
|
* Add your architecture to the buildfiles in
|
||
|
$nixpkgs/development/compilers/gcc-4.0-cross
|
||
|
|
||
|
* Add your architecture to the buildfiles in
|
||
|
$nixpkgs/os-specific/linux/kernel-headers-cross
|
||
|
|
||
|
* Add your architecture to the buildfiles in
|
||
|
$nixpkgs/development/uclibc
|
||
|
|
||
|
In the latter directory you will also need a configuration file for uClibc.
|
||
|
You can make these by unpacking the uClibc sources and run a "make menuconfig".
|
||
|
In the configuration a few things need to be adapted:
|
||
|
|
||
|
- kernel sources -> need to point at our own kernel headers
|
||
|
- install -> needs to point at $out
|