FSBL: self-built FSBL working
This commit is contained in:
parent
e43511c95f
commit
812ac5996d
@ -88,13 +88,13 @@ let
|
|||||||
# FSBL startup
|
# FSBL startup
|
||||||
fsbl-sd = pkgs.runCommand "zc706-${variant}-fsbl-sd"
|
fsbl-sd = pkgs.runCommand "zc706-${variant}-fsbl-sd"
|
||||||
{
|
{
|
||||||
buildInputs = [ mkbootimage ];
|
buildInputs = [ mkbootimage zc706-fsbl];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
# TODO: use self-built fsbl
|
# TODO: use self-built fsbl
|
||||||
bifdir=`mktemp -d`
|
bifdir=`mktemp -d`
|
||||||
cd $bifdir
|
cd $bifdir
|
||||||
ln -s ${./fsbl.elf} fsbl.elf
|
ln -s ${zc706-fsbl}/fsbl.elf fsbl.elf
|
||||||
ln -s ${gateware}/top.bit top.bit
|
ln -s ${gateware}/top.bit top.bit
|
||||||
ln -s ${firmware}/runtime.elf runtime.elf
|
ln -s ${firmware}/runtime.elf runtime.elf
|
||||||
cat > boot.bif << EOF
|
cat > boot.bif << EOF
|
||||||
|
4
fsbl.nix
4
fsbl.nix
@ -10,6 +10,7 @@ pkgs.stdenv.mkDerivation {
|
|||||||
rev = "65c849ed46c88c67457e1fc742744f96db968ff1";
|
rev = "65c849ed46c88c67457e1fc742744f96db968ff1";
|
||||||
sha256 = "1rvl06ha40dzd6s9aa4sylmksh4xb9dqaxq462lffv1fdk342pda";
|
sha256 = "1rvl06ha40dzd6s9aa4sylmksh4xb9dqaxq462lffv1fdk342pda";
|
||||||
};
|
};
|
||||||
|
patches = [ ./fsbl.patch ];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.gnumake
|
pkgs.gnumake
|
||||||
gnutoolchain.binutils
|
gnutoolchain.binutils
|
||||||
@ -17,13 +18,14 @@ pkgs.stdenv.mkDerivation {
|
|||||||
];
|
];
|
||||||
patchPhase =
|
patchPhase =
|
||||||
''
|
''
|
||||||
|
patch -p1 -i ${./fsbl.patch}
|
||||||
patchShebangs lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh
|
patchShebangs lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh
|
||||||
echo 'SEARCH_DIR("${gnutoolchain.newlib}/arm-none-eabi/lib");' >> lib/sw_apps/zynq_fsbl/src/lscript.ld
|
echo 'SEARCH_DIR("${gnutoolchain.newlib}/arm-none-eabi/lib");' >> lib/sw_apps/zynq_fsbl/src/lscript.ld
|
||||||
'';
|
'';
|
||||||
buildPhase =
|
buildPhase =
|
||||||
''
|
''
|
||||||
cd lib/sw_apps/zynq_fsbl/src
|
cd lib/sw_apps/zynq_fsbl/src
|
||||||
make BOARD=${board}
|
make BOARD=${board} "CFLAGS=-DFSBL_DEBUG_INFO -g"
|
||||||
'';
|
'';
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
|
4087
fsbl.patch
Normal file
4087
fsbl.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user