Commit 315e9658 authored by Mamta Shukla's avatar Mamta Shukla

sw: Add script to generate BOOT.bin

Signed-off-by: Mamta Shukla's avatarMamta Shukla <mamta.ramendra.shukla@cern.ch>
parent d2388486
Pipeline #2115 failed with stage
in 2 minutes and 19 seconds
#! /bin/bash
mkdir -p ../../output
SW_DIR=../../sw
OUTPUT_DIR=../output
board=zynq_spec7
defconfig=${board}_defconfig
cd $SW_DIR
for dir in $(ls)
do
if [ "$dir" == "fsbl" ];then
make -C $dir
fi
if [ "$dir" == "spec7-ps-sw" ];then
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
make -C $dir/uboot $defconfig
make -C $dir/uboot
cp $dir/uboot/u-boot.elf $OUTPUT_DIR
fi
done
[[ "$#" -ne 6 ]] && { echo "Usage :./Build.sh --t <tandem_gateware> --r <reference_gateware> --o <offset>" ; exit 1; }
[[ "$1" = "--t" ]] && TANDEM_GATEWARE=$2
[[ "$3" = "--r" ]] && REFERENCE_GATEWARE=$4
[[ "$5" = "--o" ]] && OFFSET=$6
cd $OUTPUT_DIR
rm $(ls|grep .bif)
echo "the_ROM_image:" >> $OUTPUT_DIR/spec7.bif
echo "{" >> $OUTPUT_DIR/spec7.bif
echo "[bootloader] zynq_fsbl.elf" >> $OUTPUT_DIR/spec7.bif
echo "$TANDEM_GATEWARE" >> $OUTPUT_DIR/spec7.bif
echo "u-boot.elf" >> $OUTPUT_DIR/spec7.bif
if [ "$REFRENCE_GATEWARE" == "" ]; then
echo "[offset = $OFFSET] $REFERENCE_GATEWARE" >> $OUTPUT_DIR/spec7.bif
fi
echo "}" >> $OUTPUT_DIR/spec7.bif
bootgen -image spec7.bif -arch zynq -o BOOT.bin -w
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment