Linux BSP User Guide for AM335X Series Yocto2.4
1. Introduction
This page provides the steps to build the Processor SDK and individual components from source. The Processor SDK build is based on the Arago Project which provides a set of layers for OpenEmbedded and the Yocto Project targeting TI platforms.
2. Linux BSP Version
- OS: Yocto 2.4
- Kernel: 4.19.xxx
3. Build Environment on Host
Currently, we adopt Docker as build environment.
You can get the latest version of advrisc/u16.04-amxxlbv1 Docker image for developing TI AM335X projects.
3.1 Docker Installation Commands
$ sudo apt-get update
$ sudo apt-get install -y qemu-user-static
$ sudo apt-get install -y live-build
$ sudo docker pull advrisc/u16.04-amxxlbv1
3.2 Run Docker Example
- Step 1: Run Docker Container
Assume your working directory ishome/bsp/myLinuxand the Docker container name isam335x_yocto_bsp.
Replacehome/bsp/myLinuxandam335x_yocto_bspwith the actual ones based on your environment.
$ export WORKSPACE="home/bsp/myLinux"
$ export CONTAINER_NAME="am335x_yocto_bsp"
$ sudo docker run -it --name ${CONTAINER_NAME} -v ${WORKSPACE}:/home/adv/BSP:rw --privileged advrisc/u16.04-amxxlbv1 /bin/bash
- Step 2: Change User in Container
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
-
Step 3: Install build dependencies in Container
-
Install live build
adv@7cc0fa834366:~$ cd ~
adv@7cc0fa834366:~$ git clone https://salsa.debian.org/live-team/live-build.git --depth 1 -b debian/1%20230131
adv@7cc0fa834366:~$ cd live-build
adv@7cc0fa834366:~$ rm -rf manpages/po/
adv@7cc0fa834366:~$ sudo make install -j8
adv@7cc0fa834366:~$ cd ~
adv@7cc0fa834366:~$ rm -rf live-build -
Install qemu and binfmts
adv@7cc0fa834366:~$ sudo apt-get update
adv@7cc0fa834366:~$ sudo apt-get install binfmt-support qemu-user-static --reinstall
adv@7cc0fa834366:~$ sudo update-binfmts --enable qemu-aarch64 -
Install gettext
adv@7cc0fa834366:~$ sudo apt-get update
adv@7cc0fa834366:~$ sudo apt-get install gettext -y
-
4. Getting Linux Source Code
The Advantech Yocto BSP source code is available on GitHub. Use the repo tool to download it.
For this example, a directory called yocto_bsp is created for the project.
$ sudo chown adv:adv -R yocto_bsp
$ cd yocto_bsp/
$ mkdir tisdk
$ cd tisdk/
$ repo init -u https://github.com/ADVANTECH-Corp/adv-ti-yocto-bsp.git -b processor-sdk-05.03.00.07 -m release.xml
$ repo sync
If you want to get latest bsp:
$ repo init -u git://github.com/ADVANTECH-Corp/adv-ti-yocto-bsp.git -b processor-sdk-05.03.00.07
$ repo sync
5. Building
Build Instructions
The following commands show the build process after the source code is obtained.
Build Options
The following table provides a list of build targets supported: Processor SDK uses the following oe-layertool-setup configs to configure the meta layers.
$ ./oe-layertool-setup.sh
In addition to individual components packages, the following table provides a list of build targets supported. These are the <target> used in the command:
$ MACHINE=<machine> bitbake <target>
| Target | Build Output | Description |
|---|---|---|
| arago-core-tisdk-image | images/<machine>/processor-sdk-linux-image-<machine>.tar.xz | Full SDK |
| tisdk-rootfs-image | images/<machine>/tisdk-rootfs-image-<machine>.tar.xz | Target Filesystem |
| u-boot-ti-staging | images/<machine>/u-boot-<machine>.img / MLO-<machine> | u-boot |
| linux-ti-staging | images/<machine>/zImage-<machine>.bin / .dtb | kernel |
Supported Platforms
| MACHINE | Supported Product |
|---|---|
| am335xrsb4220a1 | RSB-4220A1 |
| am335xrsb4221a1 | RSB-4221A1 |
| am335xrom3310a1 | ROM-3310A1 |
| am335xepcr3220a1 | EPC-R3220A1 |
| am57xxrom7510a1 | ROM-7510A1 |
RT Support
Processor SDK Linux supports RT Linux Kernel for the following machines:
$ MACHINE=<machine> ARAGO_RT_ENABLE=1 bitbake <target>
RT supported machines: RSB-4220A1, RSB-4221A1, ROM-3310A1, EPC-R3220A1
Using source package snapshot
Using the snapshot of the arago source packages can avoid fetch errors:
$ ./oe-layertool-setup.sh
$ mkdir downloads
$ cd downloads
$ wget http://software-dl.ti.com/processor-sdk-linux/esd/AM335X/05_03_00_07/exports/am335x-evm-linux-sdk-arago-src-05.03.00.07.tar.xz
$ am335x-evm-linux-sdk-arago-src-05.03.00.07/get_build_sources.sh am335x-evm-linux-sdk-arago-src-05.03.00.07/source_pkg_list.txt
Build command
$ MACHINE=<machine> bitbake <target>
Take uboot as an example:
$ MACHINE=am335xepcr3220a1 bitbake u-boot-ti-staging
The MLO and u-boot.img will be located in the directory, ./arago-tmp-external-linaro-toolchain/deploy/images/am57xxrom7510a2.
To modify source code and rebuild u-boot
$ MACHINE=<machine> bitbake <target> --force -c compile
$ MACHINE=<machine> bitbake <target>
Cleaning Built Recipe
$ MACHINE=<machine> bitbake <target> -c cleansstate
Recipes
$ MACHINE=am335xepcr3220a1 bitbake opencl
Installing Package
$ opkg install [package_ipk].ipk
Common Variations
Rebuilding without SGX: Add to conf/local.conf:
MACHINE_FEATURES_remove="sgx"
Rebuilding without Wayland: Add to conf/local.conf:
DISTRO_FEATURES_remove = "wayland"
6. Update Images
Update Images
Our motherboard generally supports from SD card and onboard flash. This section will take ROM-7510 as an example to introduce how to make a system boot media.
Create a Linux System SD Card
Copy full SDK to your desktop:
$ mkdir ti-sdk-XXX
$ tar -xJf Desktop/processor-sdk-linux-image-<machine>.tar.xz -C ti-sdk-XXX
$ cd ti-sdk-XXX/bin
$ ./create-sdcard.sh
Select SD card, number of partitions, and pre-built system image.
If you need to transfer whole system to on-board flash, press y followed by Enter.
While "[Operation Finished]" shows up means the transferring is finished.
Then insert the Linux system SD card to ROM-7510, it will boot up with Linux environment.
Boot from Onboard Flash
$ cd /mk_inand
$ ./mk-eMMC-boot.sh
Select eMMC, partitions, and confirm burning.
While "[Operation Finished]" shows up means the burning is finished.
Then you can boot from onboard flash without SD card.
Debug console information
- Debug Port Information
- Debug console tool: "minicom" or "putty"
- Baud rate: 115200
7. Summary
7.1 Supported Hardware Platforms
- ROM-7510: Computer-on-Module with AM57xx processor
- RSB-4220: Single Board Computer with AM335x processor
- RSB-4221: Single Board Computer with AM335x processor
- ROM-3310: Computer-on-Module with AM335x processor
- EPC-R3220: Embedded PC with AM335x processor
7.2 System Requirements
- Docker environment with
advrisc/u16.04-amxxlbv1image - Ubuntu 16.04 base system
- BSP tarball from PM
- Build tools and dependencies
- Sufficient disk space for source code and build artifacts
- Internet connection for package installation
- Target processors (ROM-7510, RSB-4220, RSB-4221, ROM-3310, EPC-R3220)
7.3 Build Workflow Summary
- Environment Setup → Docker + Ubuntu 16.04
- Source Acquisition → BSP tarball from PM
- Project Selection → Choose target processors platform
- Component Build → U-boot → Kernel
- Image Generation → Firmware packaging → (Update image)*
- Deployment → AndroidTool, SD/USB storage, or SDDiskTool
Components marked with asterisk () are not supported in BSP tarball mode.
7.4 Development Modes
7.4.1 BSP Tarball Mode (Limited)
- Use Case: Quick U-boot and kernel development
- Advantages: Fast setup, smaller download size
- Limitations: Cannot build recovery, debian, or update images
The BSP tarball is designed for fast development of uboot and kernel components. However, it has some limitations.
- ✅ Supported: U-boot building
- ✅ Supported: Kernel building
- ❌ NOT Supported: Recovery building
- ❌ NOT Supported: Debian building
- ❌ NOT Supported: Update image building
For full BSP functionality including recovery, debian, and update image building, please contact your PM for the complete SDK.
7.4.2 Full SDK Mode (Complete)
- Use Case: Complete system development and customization
- Advantages: Full build capability, all components supported
- Requirements: Contact PM for access