summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/misc/uboot/default.nix19
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix
index b56ca2693570..aac5f5a2c802 100644
--- a/pkgs/misc/uboot/default.nix
+++ b/pkgs/misc/uboot/default.nix
@@ -1,11 +1,20 @@
 { stdenv, fetchurl, fetchpatch, bc, dtc, openssl, python2, swig
+, armTrustedFirmwareAllwinner
 , hostPlatform, buildPackages
 }:
 
 let
+  # Various changes for 64-bit sunxi boards, (hopefully) destined for 2018.05
+  sunxiPatch = fetchpatch {
+    name = "sunxi.patch";
+    url = "https://github.com/u-boot/u-boot/compare/v2018.03...dezgeg:2018-03-sunxi.patch";
+    sha256 = "1pqn7c6c06hfygwpcgaraqvqxcjhz99j0rx5psfhj8igy0qvk2dq";
+  };
+
   buildUBoot = { filesToInstall
             , installDir ? "$out"
             , defconfig
+            , extraPatches ? []
             , extraMakeFlags ? []
             , extraMeta ? {}
             , ... } @ args:
@@ -36,7 +45,7 @@ let
         url = https://github.com/dezgeg/u-boot/commit/extlinux-path-length-2018-03.patch;
         sha256 = "07jafdnxvqv8lz256qy29agjc2k1zj5ad4k28r1w5qkhwj4ixmf8";
       })
-    ];
+    ] ++ extraPatches;
 
     postPatch = ''
       patchShebangs tools
@@ -200,6 +209,14 @@ in rec {
     filesToInstall = ["u-boot.bin"];
   };
 
+  ubootSopine = buildUBoot rec {
+    extraPatches = [sunxiPatch];
+    defconfig = "sopine_baseboard_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
   ubootUtilite = buildUBoot rec {
     defconfig = "cm_fx6_defconfig";
     extraMeta.platforms = ["armv7l-linux"];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6e8b403e1799..7c535d63e3ed 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13881,6 +13881,7 @@ with pkgs;
     ubootRaspberryPi3_32bit
     ubootRaspberryPi3_64bit
     ubootSheevaplug
+    ubootSopine
     ubootUtilite
     ubootWandboard
     ;