Linux BSP User Guide for AM335X Series Yocto2.1
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.1
- Kernel: 4.1.xxx
3. Build Environment on Host
Currently, we adopt Docker as build environment.
You can get the latest version of advrisc/u14.04-am57lbv1 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/u14.04-am57lbv1
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/u14.04-am57lbv1 /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-03.01.00.06 -m amxxLBV1090.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-03.01.00.06
$ 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:
$ 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-processor-sdk | images/<machine>/zImage-<machine>.bin / .dtb | kernel |
Supported Platforms
| MACHINE | Supported Product |
|---|---|
| am57xxrom7510a1 | ROM-7510A1 |
| am57xxrom7510a2 | ROM-7510A2 |
| am335xrsb4220a1 | RSB-4220A1 |
| am335xrsb4221a1 | RSB-4221A1 |
| am335xrom3310a1 | ROM-3310A1 |
Build command
$ MACHINE=<machine> bitbake <target>
Take uboot as an example:
$ MACHINE=am57xxrom7510a2 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.
When the target is arago-core-tisdk-image, MLO, u-boot.img, zImage, devicetree file, filesystem and full SDK will compiled.
To modify source code and rebuild u-boot
$ MACHINE=<machine> bitbake <target> --force -c compile
$ MACHINE=<machine> bitbake <target>
Take uboot as an example:
$ MACHINE=am57xxrom7510a2 bitbake u-boot-ti-staging --force -c compile
$ MACHINE=am57xxrom7510a2 bitbake u-boot-ti-staging
Cleaning Built Recipe
$ MACHINE=<machine> bitbake <target> -c cleansstate
Recipes
One or more recipes can be specified for the <target> for greater granularity of recipe development and debug.
$ MACHINE=am57xxrom7510a2 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
Please insert the Linux system SD card to ROM-7510, and then power up. It boot from the SD card.
$ 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
If you want to see debug message from device, you need to prepare for hardware device and software tool.
- Debug Port Information
- Debug console tool: "minicom" or "putty"
- Baud rate: 115200
Local development
All instructions in this guide are based on Ubuntu 14.04 LTS developing environment. Please install the Ubuntu 14.04 LTS at your PC/NB in advance. Set up Build Environment Perform the following command in terminal console
$ cd ti-sdk-XXX/
$ ./sdk-install.sh
Rebuild sources Using the top-level makefile in the SDK root directory. For example:
Rebuilds all components in the SDK:
$ make all
Configures and builds the kernel:
$ make linux
If you want to copy the compiled module to the specified directory:
Please specifying the installation directory in the Rules.make file firstly
$ DESTDIR=<install_directory>
Then executing the following instructions:
$ make linux_install
Builds u-boot, u-boot-spl and MLO:
$ make u-boot
Customization
Package addition To add vsftpd & crontab Navigate to the directory wherefs-image.bbappendfs-image.bbappend located,Add following line to tisdk-rootfs-image.bbappend
$ cd ${BSP_HOME}/sources/meta-advantech/meta-ti-adv/recipes-core/images/
IMAGE_INSTALL += " cronie vsftpd "
Then, follow the Build Steps above to generate the image.
7. Summary
7.1 Supported Hardware Platforms
- ROM-7510A1: Computer-on-Module with AM57xx processor
- ROM-7510A2: 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
7.2 System Requirements
- Docker environment with
advrisc/u14.04-am57lbv1image - Ubuntu 14.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)
7.3 Build Workflow Summary
- Environment Setup → Docker + Ubuntu 14.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