From ae2cee5f7e032f35462d67a77200749040ff40a3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 6 May 2020 17:46:37 +0800 Subject: [PATCH] also work around mkbootimage potential bug with szl --- default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/default.nix b/default.nix index fc6b123..faf890e 100644 --- a/default.nix +++ b/default.nix @@ -68,15 +68,19 @@ in buildInputs = [ mkbootimage ]; } '' - bif=`mktemp` - cat > $bif << EOF + # Do not use "long" paths in boot.bif, because embedded developers + # can't write software (mkbootimage will segfault). + bifdir=`mktemp -d` + cd $bifdir + ln -s ${zc706-firmware}/szl.elf szl.elf + cat > boot.bif << EOF the_ROM_image: { - [bootloader]${zc706-firmware}/szl.elf + [bootloader]szl.elf } EOF mkdir $out - mkbootimage $bif $out/boot.bin + mkbootimage boot.bif $out/boot.bin ln -s ${zc706-gateware}/top.bit $out ''; zc706-sd-zip = pkgs.runCommand "zc706-sd-zip" @@ -96,8 +100,6 @@ in buildInputs = [ mkbootimage ]; } '' - # Do not use "long" paths in boot.bif, because embedded developers - # can't write software (mkbootimage will segfault). # TODO: use self-built fsbl bifdir=`mktemp -d` cd $bifdir