Commit ec42d236 authored by Pascal Bos's avatar Pascal Bos

Renamed Build.sh to Build_boot.sh, moved output dir, DESTROYED hard tabs

updated .gitignore


updated Build_boot.sh to accept arguments better, added defaults.

Also updated gitignore
parent 315e9658
*.log
*.bit
*.jou
hdl/spec7_write_design/syn/work/
*.xsa
hdl/ip/*
hdl/syn/spec7_ref_design/*
hdl/syn/spec7_tandem_boot/*
sw/fsbl/*
sw/boot/output/*
#! /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
#! /bin/bash
SW_DIR=../../sw #relative to sw/boot dir
OUTPUT_DIR=./boot/output #relative to sw sir
SYN_DIR=../hdl/syn #relative to sw dir
mkdir -p ${SW_DIR}/$OUTPUT_DIR
board=zynq_spec7
defconfig=${board}_defconfig
cd $SW_DIR
#Default bitfile's are the most recent bitfiles in the syn dir.
TANDEM_GATEWARE=../../$SYN_DIR/$(ls -t $SYN_DIR | grep .bit | grep tandem | head -n 1)
REFERENCE_GATEWARE=../../$SYN_DIR/$(ls -t $SYN_DIR| grep .bit | grep ref | head -n 1)
OFFSET=0x1000000
while getopts t:r:o:h flag
do
case "${flag}" in
t) TANDEM_GATEWARE=${OPTARG};;
r) REFERENCE_GATEWARE=${OPTARG};;
o) OFFSET=${OPTARG};;
h) echo Usage: $0 -t {Tandem_bitfile} -r {Reference_bitfile} -o {Memory_Offset};
echo -t {Tandem_bitfile} location of the bitfile used in tandem PCIe boot. Default is the most recent bitfile in spec7/hdl/syn/ containing the word "tandem".;
echo -r {Reference_bitfile} location of the bitfile used in the reference design. Default is the most recent bitfile in spec7/hdl/syn/ containing the word "ref".;
echo -o {Memory_Offset} the DDR3 Memory offset where the reference design is loaded into. Default is 0x1000000.;
echo -h Prints this help message.;
exit 1;;
esac
done
for dir in $(ls)
do
if [ "$dir" == "fsbl" ];then
make -C $dir
cp $dir/zynq_fsbl.elf $OUTPUT_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
cd $OUTPUT_DIR
rm $(ls|grep .bif)
echo "the_ROM_image:" >> spec7.bif
echo "{" >> spec7.bif
echo "[bootloader] zynq_fsbl.elf" >> spec7.bif
echo "$TANDEM_GATEWARE" >> spec7.bif
echo "u-boot.elf" >> spec7.bif
if [ "$REFRENCE_GATEWARE" == "" ]; then
echo "[offset = $OFFSET] $REFERENCE_GATEWARE" >> spec7.bif
fi
echo "}" >> 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