AVNET MaaXBoard8ULP Single Board Computer User Guide
- June 16, 2024
- AVNET
Table of Contents
- AVNET MaaXBoard8ULP Single Board Computer
- Product Information
- MaaXBoard 8ULP
- Chapter 1 Build with Yocto
- Chapter 2 Standalone Build of u-Boot and Kernel
- Chapter 3 System power on and boot up
- Chapter 4 Appendix
- Contact Information
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
- !/bin/bash
- bash clean.sh
- For Yocto
- copy firmware
- copy atf-imx image
- copy uboot-imx image
- generate bootloader image
- copy bootloader image out
AVNET MaaXBoard8ULP Single Board Computer
Product Information
- Product Name: MaaXBoard 8ULP
- Development Guide Version: V3.1
- Copyright Statement: MaaXBoard-8ULP-Linux-Yocto-Development-guide-V3.0
- Copyright Holder: Avnet
- Regulatory Compliance: CE, FCC & SRRC certified
- Product Website: MaaXBoard 8ULP
Revision History
Version | Release Date | Author |
---|---|---|
V1.0 | – | Lily |
V2.0 | – | Lily |
V3.0 | 2023/05/16 | Lily |
V3.1 | 2023/06/30 | Lily |
Chapter 1: Build with Yocto
Setup Build Environment
To setup the build environment, you will need
- Hardware: It is recommended to have at least 300GB of disk space and 4GB of RAM.
- Software: Ubuntu 64-bit OS, version 20.04 LTS or later LTS version (Ubuntu Desktop or Ubuntu Server version). You can also run the Ubuntu 64-bit OS on a virtual machine or in a docker container.
The following packages are required for the development environment. You can install them using the bash script below:
$ sudo apt-get update
$ sudo apt-get install -y wget git-core diffstat unzip texinfo gcc-multilib
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev
pylint3 xterm rsync curl gawk zstd lz4 locales bash-completion
FAQ
-
Q: Who owns the MaaXBoard 8ULP single board computer?
A: The MaaXBoard 8ULP single board computer and its related intellectual property are owned by Avnet. -
Q: What certifications does the MaaXBoard 8ULP single board computer have?
A: The MaaXBoard 8ULP single board computer has passed the CE, FCC & SRRC certification. -
Q: Where can I find more information about the MaaXBoard 8ULP?
A: You can find more information about the MaaXBoard 8ULP on the product website.
MaaXBoard 8ULP
Linux Yocto Development Guide
V3.1
Copyright Statement
- The MaaXBoard 8ULP single board computer and its related intellectual property are owned by Avnet.
- Avnet has the copyright of this document and reserves all rights. Any part of the document should not be modified, distributed or duplicated in any approach and form with the written permission issued by Avnet.
Disclaimer
Avnet does not take warranty of any kind, either expressed or implied, as to
the program source code, software and documents provided along with the
products, and including, but not limited to, warranties of fitness for a
particular purpose; The entire risk as to the quality or performance of the
program is with the user of products.
Regulatory Compliance
MaaXBoard 8ULP single board computer has passed the CE, FCC & SRRC
certification.
Revision History
Version | Note | Author | Release Date |
---|---|---|---|
V1.0 | Initial version | Lily | 2022/11/09 |
V2.0 | Updated Yocto to kirkstone(4.0), BSP_VERSION to lf- 5.15.71-2.2.0, | ||
Converts the file format to markdown | Lily | 20230516 | |
V3.0 | Updated Yocto to Langdale(4.1), BSP_VERSION to lf-6.1.1- 1.0.0 | ||
Lily | 20230630 | ||
V3.1 | Updated Yocto to mickledore(4.2), BSP_VERSION to lf- 6.1.22-2.0.0 | ||
Lily | 20231024 |
Chapter 1 Build with Yocto
Setup Build Environment
To setup the build environment need:
- Hardware : It is recommended that at least 300GB of disk space and 4GB of RAM
- Software : Ubuntu 64-bit OS, 20.04 LTS version or later LTS version (Ubuntu Desktop or Ubuntu Server version). You could also run the Ubuntu 64-bit OS on virtual machine or in docker container.
The following packages are required for the development environment. The required packages can be installed using the bash script below:
- $ sudo apt-get update
- $ sudo apt-get install -y wget git-core diffstat unzip texinfo gcc-multilib \
- build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
- xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
- pylint3 xterm rsync curl gawk zstd lz4 locales bash-completion
Install repo
- $ mkdir -p ~/bin
- $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
- $ chmod a+x ~/bin/repo
- $ export PATH=~/bin:$PATH
Set Git configuration
- $ git config –global user.name “Your Name”
- $ git config –global user.email “you@example.com“
Fetch Source Code
Download meta layers from NXP
- $ mkdir ~/imx-yocto-bsp
- $ cd ~/imx-yocto-bsp
- $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.22-
- 2.0.0.xml
- $ repo sync
Download MaaXBoard 8ULP Source Code
To download the source code of MaaXBoard 8ULP, clone the repository from
Github:
- $ cd ~/imx-yocto-bsp/sources
- $ git clone https://github.com/Avnet/meta-maaxboard.git -b mickledore meta-maaxboard
Build
Edit build Configuration
If you want to create a new build folder or set the configuration for the
first time, run the command:
- $ cd ~/imx-yocto-bsp
- $ MACHINE=maaxboard-8ulp source sources/meta-maaxboard/tools/maaxboard-setup.sh -b
maaxboard-8ulp/build
If you want to build in an existing build folder, use the following command:
- $ cd ~/imx-yocto-bsp
- $ source sources/poky/oe-init-build-env maaxboard-8ulp/build
Build
Execute the following command to build a Weston Wayland image:
- $ bitbake avnet-image-full
After the build has successfully completed, the output files are deployed in: ~/imx-yocto-bsp/maaxboard-8ulp/build/tmp/deploy/images/maaxboard-8ulp/
imx-boot-tagged | Bootloader Image |
---|---|
avnet-image-full-maaxboard- 8ulp -xxxx.rootfs.wic | System image, |
this includes: Linux kernel, DTB and root file system.
Image| Kernel image
maaxboard-8ulp.dtb| MaaXBoard 8ULP device tree binary
overlays| MaaXBoard 8ULP device tree overlay binary
avnet-image-full-maaxboard- 8ulp -xxxx.rootfs.tar.bz2| __
System image compressed archive file
Chapter 2 Standalone Build of u-Boot and Kernel
This chapter describes how to build U-boot and Kernel using SDK or ARM GCC in a standalone environment.
Cross-compile tool chain
The cross-compile tool chain that is used, can be ARM GCC or Yocto SDK.
ARM GCC
Download the tool chain for the A-profile architecture on arm Developer GNU-A
Downloads page. It is recommended to use the 10.3 version for this release.
You can download the “gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-
gnu.tar.xz “, and decompress the file into a local directory.
- $ mkdir ~/toolchain
- $ tar -xJf gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz -C ~/toolchain
Execute the following command to check that the toolchain can be directly run.
- $ cd toolchain/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/
- $ ./aarch64-none-linux-gnu-gcc -v
To compile a project with ARM GCC, first set the environment with the following commands before building :
- $ TOOLCHAIN_PATH=$HOME/toolchain/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linuxgnu/ bin
- $ export PATH=$TOOLCHAIN_PATH:$PATH
- $ export ARCH=arm64
- $ export CROSS_COMPILE=aarch64-none-linux-gnu-
Yocto SDK
Generate an SDK from the Yocto Project build environment with the following
command after generating the image in the previous chapter.
- $ cd ~/imx-yocto-bsp
- $ source sources/poky/oe-init-build-env maaxboard-8ulp/build
- $ bitbake avnet-image-full -c populate_sdk
The generated file is: ~/imx-yocto-bsp/maaxboard-8ulp/build/tmp/deploy/sdk/ fsl-imx-wayland-lite-glibc-x86_64-avnet-image-full-armv8a-maaxboard-8ulp- toolchain-6.1-mickledore..sh and execute this script to install the SDK. The default location is /opt but can be placed anywhere on the host machine.
- $ sudo ./fsl-imx-wayland-lite-glibc-x86_64-avnet-image-full-armv8a-maaxboard-8ulp-toolchain-6.1- mickledore.sh
- NXP i.MX Release Distro SDK installer version 6.1-mickledore
- ============================================================
- Enter target directory for SDK (default: /opt/fsl-imx-wayland-lite/6.1-mickledore):
- You are about to install the SDK to “/opt/fsl-imx-wayland-lite/6.1-mickledore”. Proceed [Y/n]?
- Extracting
- SDK……………………………………………………………………………………………………………………..done
- Setting it up…done
- SDK has been successfully set up and is ready to be used.
When using SDK to compile a project, first execute the following command to configure environment variables :
- $ . /opt/fsl-imx-wayland-lite/6.1-mickledore/environment-setup-armv8a-poky-linux
Build U-Boot in a standalone environment
Get the source code and firmware
To get the source code of u-boot, imx-atf and imx-mkimage, execute the
following commands:
- $ mkdir tmp
- $ cd tmp
- $ git clone https://github.com/Avnet/uboot-imx.git -b maaxboard_lf-6.1.22-2.0.0
- $ git clone https://github.com/Avnet/imx-atf.git -b maaxboard_lf-6.1.22-2.0.0
- $ git clone https://github.com/Avnet/imx-mkimage.git -b maaxboard_lf-6.1.22-2.0.0
- Download the firmware-imx, decompress and accept NXP EULA when running:
- $ wget https://www.nxp.com.cn/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.20.bin
- $ chmod +x firmware-imx-8.20.bin
- $ ./firmware-imx-8.20.bin
- Execute the ‘ls’ command to view the tmp directory:
- $ ls tmp
- firmware-imx-8.20 firmware-imx-8.20.bin imx-atf imx-mkimage uboot-imx
- So far, the required source code and firmware have been prepared.
Compile script
Create a bash script in the tmp directory and change the file mode:
- $ cd tmp
- $ touch make_mx8ulp_uboot.sh
- $ chmod 766 make_mx8ulp_uboot.sh
- $ vi make_mx8ulp_uboot.sh
- Copy the following content into the make_mx8ulp_uboot.sh script:
-
!/bin/bash
- PRJ_PATH=
pwd
- export JOBS=
cat /proc/cpuinfo | grep processor | wc -l
- export CROSS_COMPILE=$HOME/toolchain/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linuxgnu/
- bin/aarch64-none-linux-gnu-
- MKIMG_BIN_PATH=$PRJ_PATH/imx-mkimage/iMX8ULP/
- set -e
- function fetch_firmware()
- {
- if [ ! -d firmware-sentinel-0.10 ] ; then
- wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin
- bash firmware-sentinel-0.10.bin –auto-accept > /dev/null 2>&1
- fi
- if [ ! -d firmware-upower-1.3.0 ] ; then
- wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-upower-1.3.0.bin
- bash firmware-upower-1.3.0.bin –auto-accept > /dev/null 2>&1
- fi
- if [ ! -d meta-maaxboard ] ; then
- git clone https://github.com/Avnet/meta-maaxboard.git -b mickledore
- fi
- rm -f *.bin
- }
- function build_atf()
- {
- SRC=imx-atf
- if [ ! -d $SRC ] ; then
- git clone https://github.com/Avnet/$SRC.git -b maaxboard_lf-6.1.22-2.0.0
- fi
- cd $SRC
- make -j${JOBS} CROSS_COMPILE=${CROSS_COMPILE} PLAT=imx8ulp bl31
- cd $PRJ_PATH
- }
- function build_cortexM()
- {
- DEMO_PATH=boards/evkmimx8ulp/multicore_examples/rpmsg_lite_str_echo_rtos/armgcc
- DEMO_BIN=release/rpmsg_lite_str_echo_rtos.bin
- SRC=mcore_sdk_8ulp
- cd $PRJ_PATH/${SRC}
- cd $DEMO_PATH
- export ARMGCC_DIR=$MCORE_COMPILE
-
bash clean.sh
- if [ ! -s $DEMO_BIN ] ; then
- bash build_release.sh
- fi
- set -x
- cp $DEMO_BIN $MKIMG_BIN_PATH/m33_image.bin
-
For Yocto
- cp $DEMO_BIN $PRFX_PATH/maaxboard_8ulp_m33_image.bin
- set +x
- }
- function build_uboot()
- {
- SRC=uboot-imx
- if [ ! -d $SRC ] ; then
- git clone https://github.com/Avnet/$SRC.git -b maaxboard_lf-6.1.22-2.0.0
- fi
- cd $PRJ_PATH/${SRC}
- if [ ! -f .config ] ; then
- make ARCH=arm ${BOARD}_defconfig
- fi
- make -j${JOBS} CROSS_COMPILE=${CROSS_COMPILE} ARCH=arm
- cd $PRJ_PATH
- }
- function build_imxboot()
- {
SRC=imx-mkimage
- if [ ! -d $SRC ] ; then
- git clone https://github.com/Avnet/$SRC.git -b maaxboard_lf-6.1.22-2.0.0
- fi
- cd $SRC
-
copy firmware
- cp $PRJ_PATH/firmware-upower-*/upower_a1.bin iMX8ULP/upower.bin
- cp $PRJ_PATH/firmware-sentinel-*/mx8ulpa0-ahab-container.img iMX8ULP/
-
copy atf-imx image
- cp $PRJ_PATH/imx-atf/build/imx8ulp/release/bl31.bin iMX8ULP/
-
copy uboot-imx image
- cp $PRJ_PATH/uboot-imx/u-boot.bin iMX8ULP/
- cp $PRJ_PATH/uboot-imx/u-boot-nodtb.bin iMX8ULP/
- cp $PRJ_PATH/uboot-imx/spl/u-boot-spl.bin iMX8ULP/
- cp $PRJ_PATH/uboot-imx/arch/arm/dts/maaxboard-8ulp.dtb iMX8ULP/imx8ulp-evk.dtb
- cp $PRJ_PATH/uboot-imx/tools/mkimage iMX8ULP/mkimage_uboot
-
generate bootloader image
- make SOC=iMX8ULP flash_singleboot_m33
- cp iMX8ULP/flash.bin u-boot-maaxboard-8ulp.imx
- chmod a+x u-boot-maaxboard-8ulp.imx
-
copy bootloader image out
- cp u-boot-maaxboard-8ulp.imx $PRJ_PATH
- }
- fetch_firmware
- build_atf
- build_cortexM
- build_uboot
- build_imxboot
- Execute the script to build:
- $ ./make_mx8ulp_uboot.sh
- $ ls -t
- u-boot-maaxboard-8ulp.imx uboot-imx meta-maaxboard firmware-sentinel-0.8 firmwareupower-
- 1.3.0
- imx-mkimage imx-atf make_mx8ulp_uboot.sh firmware-imx-8.18
The boot image for Maaxboard 8ULP is u-boot-maaxboard-8ulp.imx in the current directory.
Build Kernel in a standalone environment
Get the Linux source code
$ git clone https://github.com/Avnet/linux-imx.git -b
maaxboard_lf-6.1.22-2.0.0
Check that the environment variables are correctly set :
$ echo $CROSS_COMPILE $ARCH
Build the kernel sources
- $ cd linux-imx
- $ make distclean
- $ make maaxboard-8ulp_defconfig
- $ make -j4
Execute the ‘ls’ command to view the Image and dtb files after compilation.
- $ ls arch/arm64/boot/Image
- $ ls arch/arm64/boot/dts/freescale/maaxboard*dtb
- arch/arm64/boot/dts/freescale/maaxboard-8ulp.dtb
Execute the following command to compile the kernel modules, and install the modules to rootfs in the current directory.
- $ make modules
- $ make modules_install INSTALL_MOD_PATH=./rootfs
Chapter 3 System power on and boot up
To program the generated new Bootloader and System image files into MaaXBoard 8ULP’s eMMC memory, or for guidance on power-up MaaXBoard 8ULP, the boot-up process, and how to exercise the supported BSP features of MaaXBoard 8ULP, please refer to MaaXBoard-8ULP-Linux-Yocto-UserManual.
Chapter 4 Appendix
Hardware Documents
For the detail hardware introduction, please refer to MaaXBoard 8ULP Hardware
user manual.
Software Documents
MaaXBoard 8ULP supports Yocto Linux, for additional information, please refer
to the following documents:
- MaaXBoard 8ULP Linux Yocto User Manual
- Describes how to boot up MaaXBoard 8ULP and aspects of the BSP functionality
- MaaXBoard 8ULP Linux Yocto Development Guide
- Detailed guidance on how to rebuild the Linux system image (This document)
Contact Information
Product Webpage:
https://www.avnet.com/wps/portal/us/products/avnet-boards/avnet-board-
families/maaxboard/maaxboard-8ulp/
References
- Clean Shaven Apps
- GitHub - Avnet/imx-atf: MaaXBoard(Mini / Nano) ARM Trusted firmware - upstream: https://source.codeaurora.org/external/imx/imx-atf
- GitHub - Avnet/imx-mkimage: i.MX Mkimage Bootloader Tool (Yocto/Android) - upstream: https://source.c odeaurora.org/external/imx/imx-mkimage
- GitHub - Avnet/linux-imx: Linux Kernel for MaaXboard / Mini / Nano / Plus - upstream: https://source.codeaurora.org/external/i mx/linux-imx
- GitHub - Avnet/meta-maaxboard: Yocto meta-layer for MaaXBoard/Mini/Nano /Plus
- GitHub - nxp-imx/imx-manifest: i.MX Release Manifest
- storage.googleapis.com/git-repo-downloads/repo
- MaaXBoard 8ULP | Avnet Boards
- nxp.com.cn/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.20.bin
- nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin
- nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-upower-1.3.0.bin
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>