about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-03-20 17:44:09 +0300
committerGitHub <noreply@github.com>2017-03-20 17:44:09 +0300
commit179fe96a03ac0eb0a45f4a3b57b8c2445e959397 (patch)
treef645e66630778ce8df17e3ab55927d20c6af0fab
parent3bbab1757510de86d8062684f8c92d231265b934 (diff)
parentc1e279046b7517c803d4339f82a48ccf3c3405c8 (diff)
downloadnixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar.gz
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar.bz2
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar.lz
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar.xz
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.tar.zst
nixlib-179fe96a03ac0eb0a45f4a3b57b8c2445e959397.zip
Merge pull request #24112 from abbradar/odroid
Add ODROID-XU{3,4} support
-rw-r--r--nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix2
-rw-r--r--pkgs/misc/uboot/default.nix6
-rw-r--r--pkgs/tools/misc/odroid-xu3-bootloader/default.nix31
-rw-r--r--pkgs/top-level/all-packages.nix3
4 files changed, 41 insertions, 1 deletions
diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
index 0b858746ff0a..118ed20d47f5 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
@@ -28,7 +28,7 @@ in
   boot.loader.generic-extlinux-compatible.enable = true;
 
   boot.kernelPackages = pkgs.linuxPackages_latest;
-  boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=ttyO0,115200n8" "console=tty0"];
+  boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=ttyO0,115200n8" "console=ttySAC2,115200n8" "console=tty0"];
 
   # FIXME: this probably should be in installation-device.nix
   users.extraUsers.root.initialHashedPassword = "";
diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix
index f0ec5f483d40..5d9c83059c76 100644
--- a/pkgs/misc/uboot/default.nix
+++ b/pkgs/misc/uboot/default.nix
@@ -83,6 +83,12 @@ in rec {
     filesToInstall = ["u-boot" "u-boot.dtb" "u-boot-dtb-tegra.bin" "u-boot-nodtb-tegra.bin"];
   };
 
+  ubootOdroidXU3 = buildUBoot rec {
+    defconfig = "odroid-xu3_defconfig";
+    targetPlatforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
   ubootPcduino3Nano = buildUBoot rec {
     defconfig = "Linksprite_pcDuino3_Nano_defconfig";
     targetPlatforms = ["armv7l-linux"];
diff --git a/pkgs/tools/misc/odroid-xu3-bootloader/default.nix b/pkgs/tools/misc/odroid-xu3-bootloader/default.nix
new file mode 100644
index 000000000000..595b0d84ff57
--- /dev/null
+++ b/pkgs/tools/misc/odroid-xu3-bootloader/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, coreutils, ubootOdroidXU3 }:
+
+stdenv.mkDerivation {
+  name = "odroid-xu3-bootloader-2015-12-04";
+
+  src = fetchFromGitHub {
+    owner = "hardkernel";
+    repo = "u-boot";
+    rev = "bbdea1841c4fbf767dcaf9d7ae8d3a46af235c4d";
+    sha256 = "03rvyfj147xh83w8hlvbxix131l3nnvk8n517fdhv9nil1l8dd71";
+  };
+
+  buildCommand = ''
+    install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel/*.hardkernel
+    ln -sf ${ubootOdroidXU3}/u-boot.bin $out/lib/sd_fuse-xu3/u-boot.bin.hardkernel
+
+    install -Dm755 $src/sd_fuse/hardkernel/sd_fusing.sh $out/bin/sd_fuse-xu3
+    sed -i \
+      -e '1i#!${stdenv.shell}' \
+      -e '1iPATH=${lib.makeBinPath [ coreutils ]}:$PATH' \
+      -e "s,if=\./,if=$out/lib/sd_fuse-xu3/,g" \
+      $out/bin/sd_fuse-xu3
+  '';
+
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    license = licenses.unfreeRedistributableFirmware;
+    description = "Secure boot enabled boot loader for ODROID-XU{3,4}";
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f6073b15ede0..57375be364b8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11939,6 +11939,8 @@ with pkgs;
 
   nss_ldap = callPackage ../os-specific/linux/nss_ldap { };
 
+  odroid-xu3-bootloader = callPackage ../tools/misc/odroid-xu3-bootloader { };
+
   pagemon = callPackage ../os-specific/linux/pagemon { };
 
   pam = callPackage ../os-specific/linux/pam { };
@@ -12135,6 +12137,7 @@ with pkgs;
     ubootBananaPi
     ubootBeagleboneBlack
     ubootJetsonTK1
+    ubootOdroidXU3
     ubootPcduino3Nano
     ubootRaspberryPi
     ubootRaspberryPi2