3. Building Buildroot Images
This document provides a step-by-step guide to build a Buildroot image using the buildroot-external-TI tree.
3.1. Prerequisites
A Linux-based development environment.
Required packages Required Packages.
For Debian/Ubuntu distributions, the necessary packages can be installed with the following command:
$ sudo apt install debianutils sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc git
3.2. Steps to Build the Image
3.2.1. Setting up the External Tree
To set up and use the buildroot-external-ti external tree, follow these steps:
Clone the Buildroot and external tree repositories:
Buildroot tags for Platforms supported are as follws:
Repo |
AM62LX |
AM62X |
2024.11.1 |
2024.11.1 |
|
https://github.com/TexasInstruments/buildroot-external-TI.git |
11.00.05.02 |
11.00.09.04 |
You can fetch the repos with an explicit tag using:
$ git clone -b <tag> https://github.com/buildroot/buildroot
$ git clone -b <tag> https://github.com/TexasInstruments/buildroot-external-TI.git
Configure Buildroot to use the external tree and choose a configuration file
$ cd buildroot
During configuration
$ make BR2_EXTERNAL=<path to external tree>/buildroot-external-TI <configuration file>
OR
export BR2_EXTERNAL=<path to external tree>/buildroot-external-TI
3.2.2. Select the Build Configuration
Buildroot uses a configuration file to determine which packages and settings to use for the build. The buildroot-external-TI repository should provide one or more configuration files tailored to a specific board. Select the appropriate configuration file for your target device.
Use the following table to determine what defconfig to use to configure with:
Board
Configuration file
AM62X-SK evm
ti_release_am62x_sk_defconfig
AM62LX-evm
ti_release_am62lx_evm_defconfig
$ cd buildroot $ make <defconfig> For example, $ make ti_release_am62x_sk_defconfig
3.2.3. Customize the Configuration
If necessary, you can customize the configuration further using the menuconfig interface. This step is optional but useful if you need to make specific adjustments.
$ make menuconfig
3.2.4. Build the Image
With the configuration set, you can now build the image. This process compiles the necessary components and creates the root filesystem, kernel, and bootloader.
TI_K3_BOOT_FIRMWARE_VERSION will be as follows:
Platform |
version_tag |
AM62X |
11.00.09 |
AM62LX |
11.00.05 |
$ make TI_K3_BOOT_FIRMWARE_VERSION=<version_tag>
For Example, version_tag will be 11.00.09 or 10.01.10
$ make TI_K3_BOOT_FIRMWARE_VERSION=11.00.09
The build process can take some time, depending on your system’s resources and the complexity of the configuration.
3.2.5. Locate the Output Files
Once the build is complete, the generated files will be located in the output/images
directory. These files typically include the root filesystem image, the kernel
image, and the bootloader.
You will find files ex. flashable SD card image sdcard.img
, root filesytems
rootfs.ext4
along with other build output files.
3.2.6. Flash the Image to SD Card
The final step is to flash the generated images to your target device. The specific steps for flashing will depend on your hardware. Common methods include using dd to write the image to an SD card or using a tool like Balena Etcher. for USB flashing.
Example for SD card:
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
$ sync
Replace /dev/sdX with the appropriate device identifier for your SD card.
3.2.7. Booting the SD Card Image
After the image is flashed to SD Card. Change the boot mode pins in AM62LX board for SD Card boot.
SW1[1:8] = 11000010 and SW2[1:8] = 01000000
Insert the SD Card in SD Card slot in AM62LX board. Use a USB Micro-B cable to connect the host PC to the USB Micro-B interface for UART on the EVM then power on the board, the following logs can be observed on the terminal window:
Trying to boot from MMC2
...
...
...
Starting network: [ 2.823578] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
[ 2.823635] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, forking to background
[ 5.944022] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83867] (irq=POLL)
[ 5.944130] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, forking to background
OK
Welcome to Buildroot
buildroot login: root
#
3.3. Going further
For more detailed information, refer to the Buildroot manual.