3.1.1.1. Setup
3.1.1.1.1. Install host dependencies
Note
The recommended host machine for building U-Boot is Ubuntu 22.04. Users of Ubuntu 18.04 may need to install Python 3.7 or higher. If using the default Python 3.6 that comes with Ubuntu 18.04, users may need to install these additional dependencies:
pip install dataclasses pyelftools jsonschema yamllint importlib-resources
3.1.1.1.2. Getting the Source Code
The easiest way to get access to the source code is by
downloading and installing the Processor SDK Linux. Once installed,
the source code is included in the SDK at the path <path to tisdk>/board-support.
For your convenience the sources also includes
git repositories including commit history.
Alternatively, U-Boot sources can directly be fetched from GIT. The GIT repo URL, branch and commit id can be found in the release notes:
ti-u-boot version: Build Information
3.1.1.1.3. Setup Cross Compile Environment
The cross compile version supported in this release can be found in the release notes for the kernel release.
Before compiling any of the sources referenced in this document, set the cross compiler paths to the toolchains packaged in the Processor SDK [Recommended] as shown below. Refer to Yocto-built SDK Toolchains section for more details on usage.
host# export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-"
host# export SYSROOT_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi"
host# export CFLAGS="-march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard"
host# export CC_32="${CROSS_COMPILE_32}gcc ${CFLAGS} --sysroot=${SYSROOT_32}"
If the Processor SDK is not installed, the Arm GNU toolchains can be downloaded and setup. Refer to ARM toolchains section for more details on usage.