From b15bde58a13b013fe14827f5f63588dd03f0b36a Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Fri, 5 Jan 2024 12:44:53 +0100 Subject: [PATCH] Scripts for u-boot --- os/02_get_uboot.sh | 3 +++ ...build_buildroot.sh => 11_build_buildroot.sh} | 1 + os/12_build_uboot.sh | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100755 os/02_get_uboot.sh rename os/{02_build_buildroot.sh => 11_build_buildroot.sh} (86%) create mode 100755 os/12_build_uboot.sh diff --git a/os/02_get_uboot.sh b/os/02_get_uboot.sh new file mode 100755 index 0000000..f4b360d --- /dev/null +++ b/os/02_get_uboot.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +git clone https://github.com/u-boot/u-boot.git --single-branch --branch v2023.10 diff --git a/os/02_build_buildroot.sh b/os/11_build_buildroot.sh similarity index 86% rename from os/02_build_buildroot.sh rename to os/11_build_buildroot.sh index 5e9b2f1..8fae439 100755 --- a/os/02_build_buildroot.sh +++ b/os/11_build_buildroot.sh @@ -10,3 +10,4 @@ cp -a config/buildroot_puzzlefw_defconfig "$BUILDROOT_DIR/.config" make -C "$BUILDROOT_DIR" olddefconfig make -C "$BUILDROOT_DIR" +ln -sf "$BUILDROOT_DIR" buildroot diff --git a/os/12_build_uboot.sh b/os/12_build_uboot.sh new file mode 100755 index 0000000..63d4800 --- /dev/null +++ b/os/12_build_uboot.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +BUILDDIR="$(realpath buildroot/output/host/bin)" + +if [ ! -x "$BUILDDIR/arm-linux-gcc" ]; then + echo "ERROR: Missing $BUILDDIR/arm-linux-gcc" >&2 + echo " Build buildroot to prepare the arm-linux toolchain" >&2 + exit 1 +fi + +export PATH="$BUILDDIR:$PATH" + +make -C u-boot CROSS_COMPILE=arm-linux- distclean +make -C u-boot CROSS_COMPILE=arm-linux- xilinx_zynq_virt_config +make -C u-boot CROSS_COMPILE=arm-linux-