Skip to content

Commit

Permalink
odroid-xu3-bootloader: use 1MB-capable bootloader
Browse files Browse the repository at this point in the history
(cherry picked from commit 7d66259a777fd1b1930eca26f08236f657529e25)
  • Loading branch information
abbradar committed Mar 21, 2017
1 parent c808801 commit 8eabb34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkgs/misc/uboot/default.nix
Expand Up @@ -86,7 +86,7 @@ in rec {
ubootOdroidXU3 = buildUBoot rec {
defconfig = "odroid-xu3_defconfig";
targetPlatforms = ["armv7l-linux"];
filesToInstall = ["u-boot.bin"];
filesToInstall = ["u-boot-dtb.bin"];
};

ubootPcduino3Nano = buildUBoot rec {
Expand Down
15 changes: 9 additions & 6 deletions pkgs/tools/misc/odroid-xu3-bootloader/default.nix
Expand Up @@ -6,19 +6,22 @@ stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "hardkernel";
repo = "u-boot";
rev = "bbdea1841c4fbf767dcaf9d7ae8d3a46af235c4d";
sha256 = "03rvyfj147xh83w8hlvbxix131l3nnvk8n517fdhv9nil1l8dd71";
rev = "fe2f831fd44a4071f58a42f260164544697aa666";
sha256 = "1h5yvawzla0vqhkk98gxcwc824bhc936bh6j77qkyspvqcw761fr";
};

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 -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel_1mb_uboot/{bl2,tzsw}.*
install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel/bl1.*
ln -sf ${ubootOdroidXU3}/u-boot-dtb.bin $out/lib/sd_fuse-xu3/u-boot-dtb.bin
install -Dm755 $src/sd_fuse/hardkernel/sd_fusing.sh $out/bin/sd_fuse-xu3
install -Dm755 $src/sd_fuse/hardkernel_1mb_uboot/sd_fusing.1M.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" \
-e '/set -x/d' \
-e 's,.\/sd_fusing\.sh,sd_fuse-xu3,g' \
-e "s,\./,$out/lib/sd_fuse-xu3/,g" \
$out/bin/sd_fuse-xu3
'';

Expand Down

0 comments on commit 8eabb34

Please sign in to comment.