After some testing with an ultrasparc cross-compiler:
Updating the cross-build expressions, adding some flexibility.
Updated the linux headers used cross building, as 2.6.28 had bugs on endianness in
sparc64.
There were, as usual some bugs in gcc. Maybe not many make a cross compiler to
ultrasparc.
For the record, I could build an ultrasparc kernel with this base nix:
import /etc/nixos/nixpkgs/default.nix # The root nixpkgs default.nix
{
crossSystem = {
config = "sparc64-unknown-linux";
bigEndian = true;
arch = "sparc64";
float = "soft";
withTLS = true;
cpu = "ultrasparc";
};
config = pkgs: {
packageOverrides = pkgs : {
platform = {
name = "sparc64";
kernelHeadersBaseConfig = "sparc64_defconfig";
kernelBaseConfig = "sparc64_defconfig";
kernelArch = "sparc";
kernelAutoModules = false;
kernelTarget = "zImage";
uboot = null;
};
};
};
}
Although it did not boot directly in qemu-system-sparc64:
[sparc64] Kernel already loaded
Unhandled Exception 0x0000000000000020
PC = 0x0000000000404000 NPC = 0x0000000000404004
svn path=/nixpkgs/trunk/; revision=20269
This commit is contained in:
@@ -67,9 +67,9 @@ stdenv.mkDerivation ({
|
||||
then "--enable-profile"
|
||||
else "--disable-profile")
|
||||
] ++ stdenv.lib.optionals (cross != null) [
|
||||
"--with-tls"
|
||||
(if cross.withTLS then "--with-tls" else "--without-tls")
|
||||
(if cross.float == "float" then "--without-fp" else "--with-fp")
|
||||
"--enable-kernel=2.6.0"
|
||||
"--without-fp"
|
||||
"--with-__thread"
|
||||
] ++ stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
|
||||
"--host=arm-linux-gnueabi"
|
||||
|
||||
@@ -46,6 +46,8 @@ in
|
||||
libc_cv_forced_unwind=yes
|
||||
libc_cv_c_cleanup=yes
|
||||
libc_cv_gnu89_inline=yes
|
||||
# Only due to a problem in gcc configure scripts:
|
||||
libc_cv_sparc64_tls=${if cross.withTLS then "yes" else "no"}
|
||||
EOF
|
||||
export BUILD_CC=gcc
|
||||
export CC="$crossConfig-gcc"
|
||||
|
||||
Reference in New Issue
Block a user