1 { stdenv, lib, fetchFromGitHub, coreutils, ubootOdroidXU3, runtimeShell }:
4 name = "odroid-xu3-bootloader-2015-12-04";
6 src = fetchFromGitHub {
9 rev = "fe2f831fd44a4071f58a42f260164544697aa666";
10 sha256 = "1h5yvawzla0vqhkk98gxcwc824bhc936bh6j77qkyspvqcw761fr";
14 install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel_1mb_uboot/{bl2,tzsw}.*
15 install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel/bl1.*
16 ln -sf ${ubootOdroidXU3}/u-boot-dtb.bin $out/lib/sd_fuse-xu3/u-boot-dtb.bin
18 install -Dm755 $src/sd_fuse/hardkernel_1mb_uboot/sd_fusing.1M.sh $out/bin/sd_fuse-xu3
20 -e '1i#!${runtimeShell}' \
21 -e '1iPATH=${lib.makeBinPath [ coreutils ]}:$PATH' \
23 -e 's,.\/sd_fusing\.sh,sd_fuse-xu3,g' \
24 -e "s,\./,$out/lib/sd_fuse-xu3/,g" \
29 platforms = platforms.linux;
30 license = licenses.unfreeRedistributableFirmware;
31 description = "Secure boot enabled boot loader for ODROID-XU{3,4}";
32 maintainers = with maintainers; [ abbradar ];