Firmware, Trizeps VIIImini
How to Make U-Boot for Trizeps VIII Mini using imx_firmware
This will generate the uboot with all needed components atf, optee, spl, and uboot. Also, you can create an uefi image.
Update and install build tools:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install attr build-essential python python-dev python-crypto python-wand device-tree-compiler bison flex swig iasl uuid-dev wget git bc libssl-dev zlib1g-dev python3-pip gcc g++ make python3 mono-devel
Clone the imx-firmware repo:
git clone --recursive ssh://git@gitlab.keith-koep.com:30001/imx/imx_firmware.git
Build uboot and uefi:
./buildme64.sh -b Tr8m -t all
Update uboot and uefi on mounted sd card:
sudo ./WriteUboot.sh /dev/sde ./flash.bin
sudo ./WriteUefi.sh /dev/sde ./uefi.fit
Update uboot and uefi using fastboot:
sudo fastboot flash bootloader flash.bin
sudo fastboot flash BOOTFIRMWARE uefi.fit
Setup Build Enviroment
Set up a Linux Environment (Note: We use WSL):
Dedicated Linux system
Linux Virtual Machine
Windows Subsystem for Linux (WSL setup instructions)
Update and install build Tools:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install attr build-essential python python-dev python-crypto python-wand device-tree-compiler bison flex swig iasl uuid-dev wget git bc libssl-dev zlib1g-dev python3-pip
sudo apt-get install gcc g++ make python3 mono-devel
pushd ~
wget https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
tar xf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
rm gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
popd
U-Boot
http://gitlab.keith-koep.com/imx/uboot-imx
http://gitlab.keith-koep.com/imx/imx-mkimage
Clone repositories:
git clone -b iot_merged_kuk_imx_v2018.03_4.14.98_2.0.0_ga http://gitlab.keith-koep.com/imx/uboot-imx
git clone http://gitlab.keith-koep.com/imx/imx-mkimage.git
Build U-Boot:
pushd uboot-imx
export CROSS_COMPILE=~/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export ARCH=arm64
make trizeps8mini_iot_defconfig
make -j32
popd
Create bootimage:
pushd imx-mkimage
CFLAGS= make SOC=iMX8MM clean
make copytr8mini
CFLAGS= make SOC=iMX8MM flash_trizeps8mini
popd
UEFI
http://gitlab.keith-koep.com/imx/mu_platform_nxp
Note: # note: On Windows Ubuntu, ignore Python errors during build specifically like # „ERROR - Please upgrade Python! Current version is 3.6.7. Recommended minimum is 3.7.“
Clone repositories and setup:
git clone --recursive http://gitlab.keith-koep.com/imx/mu_platform_nxp.git
pushd mu_platform_nxp
export GCC5_AARCH64_PREFIX=~/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
pip3 install -r requirements.txt --upgrade
python3 KUK/Trizeps8mini_2GB/PlatformBuild.py --setup
cd MU_BASECORE
make -C BaseTools
cd ..
popd
Build:
pushd mu_platform_nxp
export GCC5_AARCH64_PREFIX=~/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
python3 KUK/Trizeps8mini_2GB/PlatformBuild.py -V TARGET=RELEASE \
PROFILE=DEV MAX_CONCURRENT_THREAD_NUMBER=20
popd
Create bootable UEFI image:
pushd mu_platform_nxp/Build/Trizeps8mini_2GB/RELEASE_GCC5/FV
cp ../../../../../imx-iotcore/build/firmware/its/uefi_imx8_unsigned.its .
../../../../../u-boot/tools/mkimage -f uefi_imx8_unsigned.its -r uefi.fit
popd