redpitaya-puzzlefw/sw/12_build_uboot.sh

29 lines
885 B
Bash
Raw Normal View History

2024-01-05 12:44:53 +01:00
#!/bin/bash
set -e
2024-01-07 01:06:45 +01:00
. script_env
setup_toolchain
2024-01-05 12:44:53 +01:00
2024-01-07 01:06:45 +01:00
make -C "$UBOOT_DIR" CROSS_COMPILE=arm-linux- distclean
2024-01-05 12:44:53 +01:00
2024-09-19 21:08:22 +02:00
# We need the XSA file from Vivado.
# It contains the init code for the U-Boot SPL image.
if [ ! -f "$XSA_FILE" ]; then
echo "ERROR: $XSA_FILE not found" >&2
2024-09-22 11:34:19 +02:00
echo " Build the FPGA image before building U-Boot." >&2
2024-09-19 21:08:22 +02:00
exit 1
fi
# Create board directory with ps7_init_gpl.c.
rm -rf "$UBOOT_DIR/board/xilinx/zynq/redpitaya"
mkdir "$UBOOT_DIR/board/xilinx/zynq/redpitaya"
unzip $XSA_FILE ps7_init_gpl.c ps7_init_gpl.h -d "$UBOOT_DIR/board/xilinx/zynq/redpitaya"
cp -a devicetree/redpitaya_puzzlefw.dts "$UBOOT_DIR/arch/arm/dts/redpitaya.dts"
cp -a config/uboot_redpitaya_puzzlefw_defconfig "$UBOOT_DIR/configs/redpitaya_puzzlefw_defconfig"
2024-01-07 01:06:45 +01:00
make -C "$UBOOT_DIR" CROSS_COMPILE=arm-linux- redpitaya_puzzlefw_defconfig
2024-01-07 01:06:45 +01:00
make -C "$UBOOT_DIR" CROSS_COMPILE=arm-linux-
2024-01-05 12:44:53 +01:00