From 3b7395683c6c2deeee58432c6a3a383f24b511eb Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sun, 17 Apr 2016 05:06:10 -0700 Subject: [PATCH 1/3] platforms: add scaleway-c1 (armv7 sans NEON) --- lib/systems/platforms.nix | 8 ++++++++ pkgs/stdenv/linux/make-bootstrap-tools-cross.nix | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 4322c8e2ff6..24634f83a49 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -307,6 +307,14 @@ rec { uboot = null; }; + scaleway-c1 = armv7l-hf-multiplatform // { + gcc = { + cpu = "cortex-a9"; + fpu = "vfpv3"; + float = "hard"; + }; + }; + guruplug = sheevaplug // { # Define `CONFIG_MACH_GURUPLUG' (see # ) diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 613edfafd95..3eb902c890d 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -62,8 +62,15 @@ let }; }; + scaleway-c1-crossSystem.crossSystem = armv7l-hf-multiplatform-crossSystem.crossSystem // rec { + platform = pkgsNoParams.platforms.scaleway-c1; + inherit (platform) gcc; + inherit (gcc) fpu; + }; + selectedCrossSystem = if toolsArch == "armv5tel" then sheevaplugCrossSystem else + if toolsArch == "scaleway" then scaleway-c1-crossSystem else if toolsArch == "armv6l" then raspberrypiCrossSystem else if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null; @@ -277,4 +284,5 @@ rec { armv6l = buildFor "armv6l"; armv7l = buildFor "armv7l"; aarch64 = buildFor "aarch64"; + scaleway = buildFor "scaleway"; } From c3eca1f8dc19b27a6c0b55f24f5ac9baab395221 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Mon, 9 May 2016 11:55:43 -0700 Subject: [PATCH 2/3] platforms: add pogoplug4 (armv5tel softfloat) --- lib/systems/platforms.nix | 33 +++++++++++++++++++ .../linux/make-bootstrap-tools-cross.nix | 16 +++++++++ 2 files changed, 49 insertions(+) diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 24634f83a49..ccf3380e1f6 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -21,6 +21,39 @@ rec { kernelAutoModules = false; }; + pogoplug4 = { + name = "pogoplug4"; + + gcc = { + arch = "armv5te"; + float = "soft"; + }; + + kernelMajor = "2.6"; + kernelHeadersBaseConfig = "multi_v5_defconfig"; + kernelBaseConfig = "multi_v5_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + kernelExtraConfig = + '' + # Ubi for the mtd + MTD_UBI y + UBIFS_FS y + UBIFS_FS_XATTR y + UBIFS_FS_ADVANCED_COMPR y + UBIFS_FS_LZO y + UBIFS_FS_ZLIB y + UBIFS_FS_DEBUG n + ''; + kernelMakeFlags = [ "LOADADDR=0x8000" ]; + kernelTarget = "uImage"; + # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working + #kernelDTB = true; + + # XXX can be anything non-null, pkgs actually only cares if it is set or not + uboot = "pogoplug4"; + }; + sheevaplug = { name = "sheevaplug"; kernelMajor = "2.6"; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 3eb902c890d..1e488601276 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -68,9 +68,24 @@ let inherit (gcc) fpu; }; + pogoplug4-crossSystem.crossSystem = { + arch = "armv5tel"; + config = "armv5tel-softfloat-linux-gnueabi"; + float = "soft"; + + platform = pkgsNoParams.platforms.pogoplug4; + + inherit (pkgsNoParams.platforms.pogoplug4) gcc; + libc = "glibc"; + + withTLS = true; + openssl.system = "linux-generic32"; + }; + selectedCrossSystem = if toolsArch == "armv5tel" then sheevaplugCrossSystem else if toolsArch == "scaleway" then scaleway-c1-crossSystem else + if toolsArch == "pogoplug4" then pogoplug4-crossSystem else if toolsArch == "armv6l" then raspberrypiCrossSystem else if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null; @@ -285,4 +300,5 @@ rec { armv7l = buildFor "armv7l"; aarch64 = buildFor "aarch64"; scaleway = buildFor "scaleway"; + pogoplug4 = buildFor "pogoplug4"; } From 127347f1fd6995ea8b85c27deb53aff0755d9ca8 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Thu, 23 Jun 2016 04:16:29 +0000 Subject: [PATCH 3/3] platforms: add CompuLab Utilite (armv7) --- lib/systems/platforms.nix | 29 +++++++++++++++++++++++++++++ pkgs/misc/uboot/default.nix | 14 ++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 44 insertions(+) diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index ccf3380e1f6..0bea38ab419 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -348,6 +348,35 @@ rec { }; }; + utilite = { + name = "utilite"; + kernelMajor = "2.6"; + kernelHeadersBaseConfig = "multi_v7_defconfig"; + kernelBaseConfig = "multi_v7_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + kernelExtraConfig = + '' + # Ubi for the mtd + MTD_UBI y + UBIFS_FS y + UBIFS_FS_XATTR y + UBIFS_FS_ADVANCED_COMPR y + UBIFS_FS_LZO y + UBIFS_FS_ZLIB y + UBIFS_FS_DEBUG n + ''; + kernelMakeFlags = [ "LOADADDR=0x10800000" ]; + kernelTarget = "uImage"; + kernelDTB = true; + uboot = true; #XXX: any non-null value here is needed so that mkimage is present to build kernelTarget uImage + gcc = { + cpu = "cortex-a9"; + fpu = "neon"; + float = "hard"; + }; + }; + guruplug = sheevaplug // { # Define `CONFIG_MACH_GURUPLUG' (see # ) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index d2fadad8852..4c14581e331 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -123,6 +123,20 @@ in rec { filesToInstall = ["u-boot.bin"]; }; + ubootUtilite = buildUBoot rec { + defconfig = "cm_fx6_defconfig"; + targetPlatforms = ["armv7l-linux"]; + filesToInstall = ["u-boot-with-nand-spl.imx"]; + buildFlags = "u-boot-with-nand-spl.imx"; + postConfigure = '' + cat >> .config << EOF + CONFIG_CMD_SETEXPR=y + EOF + ''; + # sata init; load sata 0 $loadaddr u-boot-with-nand-spl.imx + # sf probe; sf update $loadaddr 0 80000 + }; + ubootWandboard = buildUBoot rec { defconfig = "wandboard_defconfig"; targetPlatforms = ["armv7l-linux"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 690ca4c0bd4..3ac3299a232 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12232,6 +12232,7 @@ with pkgs; ubootRaspberryPi2 ubootRaspberryPi3_32bit ubootRaspberryPi3_64bit + ubootUtilite ubootWandboard ;