FSBL: self-built FSBL working

This commit is contained in:
pca006132 2020-06-17 15:48:55 +08:00
parent e43511c95f
commit 812ac5996d
Signed by untrusted user: pca006132
GPG Key ID: 16997BD76CECCA4C
4 changed files with 4092 additions and 3 deletions

View File

@ -88,13 +88,13 @@ let
# FSBL startup
fsbl-sd = pkgs.runCommand "zc706-${variant}-fsbl-sd"
{
buildInputs = [ mkbootimage ];
buildInputs = [ mkbootimage zc706-fsbl];
}
''
# TODO: use self-built fsbl
bifdir=`mktemp -d`
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 ${firmware}/runtime.elf runtime.elf
cat > boot.bif << EOF

BIN
fsbl.elf

Binary file not shown.

View File

@ -10,6 +10,7 @@ pkgs.stdenv.mkDerivation {
rev = "65c849ed46c88c67457e1fc742744f96db968ff1";
sha256 = "1rvl06ha40dzd6s9aa4sylmksh4xb9dqaxq462lffv1fdk342pda";
};
patches = [ ./fsbl.patch ];
nativeBuildInputs = [
pkgs.gnumake
gnutoolchain.binutils
@ -17,13 +18,14 @@ pkgs.stdenv.mkDerivation {
];
patchPhase =
''
patch -p1 -i ${./fsbl.patch}
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
'';
buildPhase =
''
cd lib/sw_apps/zynq_fsbl/src
make BOARD=${board}
make BOARD=${board} "CFLAGS=-DFSBL_DEBUG_INFO -g"
'';
installPhase =
''

4087
fsbl.patch Normal file

File diff suppressed because it is too large Load Diff