forked from M-Labs/artiq-zynq
also work around mkbootimage potential bug with szl
This commit is contained in:
parent
27466036a7
commit
ae2cee5f7e
14
default.nix
14
default.nix
|
@ -68,15 +68,19 @@ in
|
||||||
buildInputs = [ mkbootimage ];
|
buildInputs = [ mkbootimage ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
bif=`mktemp`
|
# Do not use "long" paths in boot.bif, because embedded developers
|
||||||
cat > $bif << EOF
|
# 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:
|
the_ROM_image:
|
||||||
{
|
{
|
||||||
[bootloader]${zc706-firmware}/szl.elf
|
[bootloader]szl.elf
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
mkdir $out
|
mkdir $out
|
||||||
mkbootimage $bif $out/boot.bin
|
mkbootimage boot.bif $out/boot.bin
|
||||||
ln -s ${zc706-gateware}/top.bit $out
|
ln -s ${zc706-gateware}/top.bit $out
|
||||||
'';
|
'';
|
||||||
zc706-sd-zip = pkgs.runCommand "zc706-sd-zip"
|
zc706-sd-zip = pkgs.runCommand "zc706-sd-zip"
|
||||||
|
@ -96,8 +100,6 @@ in
|
||||||
buildInputs = [ mkbootimage ];
|
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
|
# TODO: use self-built fsbl
|
||||||
bifdir=`mktemp -d`
|
bifdir=`mktemp -d`
|
||||||
cd $bifdir
|
cd $bifdir
|
||||||
|
|
Loading…
Reference in New Issue