From c1e279046b7517c803d4339f82a48ccf3c3405c8 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 20 Mar 2017 11:52:08 +0300 Subject: [PATCH] odroid-xu3-bootloader: init at 2015-12-04 --- .../misc/odroid-xu3-bootloader/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/misc/odroid-xu3-bootloader/default.nix 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 6128efa6c498..c7188bc7f3a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11935,6 +11935,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 { };