Commit 83b76038 authored by Pascal Bos's avatar Pascal Bos

Updated build script to enable a selection of the UBOOT uart channel


added comments
parent ec42d236
Pipeline #2216 failed with stage
in 2 minutes and 19 seconds
......@@ -8,7 +8,7 @@ mkdir -p ${SW_DIR}/$OUTPUT_DIR
board=zynq_spec7
defconfig=${board}_defconfig
USE_UART=0
cd $SW_DIR
#Default bitfile's are the most recent bitfiles in the syn dir.
......@@ -16,16 +16,18 @@ TANDEM_GATEWARE=../../$SYN_DIR/$(ls -t $SYN_DIR | grep .bit | grep tandem | head
REFERENCE_GATEWARE=../../$SYN_DIR/$(ls -t $SYN_DIR| grep .bit | grep ref | head -n 1)
OFFSET=0x1000000
while getopts t:r:o:h flag
while getopts t:r:o:u:h flag
do
case "${flag}" in
t) TANDEM_GATEWARE=${OPTARG};;
r) REFERENCE_GATEWARE=${OPTARG};;
o) OFFSET=${OPTARG};;
u) USE_UART=${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 -u {uboot uart channel} The uart channel number where Cout and Cin is directed. Default is 0.;
echo -h Prints this help message.;
exit 1;;
esac
......@@ -33,12 +35,22 @@ 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
if [ "$USE_UART" == "1" ]; then
sed -i "s/uart0;/uart1;/" $dir/uboot/arch/arm/dts/zynq-spec7.dts
sed -i "s/CONFIG_DEBUG_UART_BASE=0xe0000000/CONFIG_DEBUG_UART_BASE=0xe0001000/" $dir/uboot/configs/zynq_spec7_defconfig
sed -i "s/CONFIG_ENV_OFFSET=0xFE0000/CONFIG_ENV_OFFSET=0xFC0000/" $dir/uboot/configs/zynq_spec7_defconfig
else
sed -i "s/uart1;/uart0;/" $dir/uboot/arch/arm/dts/zynq-spec7.dts
sed -i "s/CONFIG_DEBUG_UART_BASE=0xe0001000/CONFIG_DEBUG_UART_BASE=0xe0000000/" $dir/uboot/configs/zynq_spec7_defconfig
sed -i "s/CONFIG_ENV_OFFSET=0xFC0000/CONFIG_ENV_OFFSET=0xFE0000/" $dir/uboot/configs/zynq_spec7_defconfig
fi
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
make -C $dir/uboot $defconfig
......
......@@ -82,6 +82,8 @@ platform generate
app create -name zynq_fsbl -template {Zynq FSBL} \
-platform spec7 -domain fsbl_domain -sysproj spec7_system
# Adjust QPSI prescaler for maximum speed.
exec sed -i "s/XQSPIPS_CLK_PRESCALE_8/XQSPIPS_CLK_PRESCALE_2/" ./build/zynq_fsbl/src/qspi.c
app config -name zynq_fsbl build-config release
app config -name zynq_fsbl build-config
app build -name zynq_fsbl
......
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