4.2. Texas Instruments AM335x¶
The Texas Instruments AM335x SoCs have a two-stage boot process. The first stage loader, also known as MLO is loaded by the ROM code. The MLO loads the second stage loader from the same medium.
4.2.1. Building barebox¶
Booting with barebox on the TI AM335x is a two-stage process and unlike more recently added SoCs, requires building barebox twice, each time with a different defconfig:
omap_defconfig
for the regular (second-stage) barebox imageFor the MLO first-stage, either
am335x_mlo_sdmmc_defconfig
for SD/eMMC oram335x_mlo_rawflash_defconfig
for raw NOR/NAND.
The resulting images will be placed under images/
:
barebox-am33xx-afi-gf.img
barebox-am33xx-afi-gf-mlo.img
barebox-am33xx-beaglebone.img
barebox-am33xx-beaglebone-mlo.img
barebox-am33xx-phytec-phycore-mlo-256mb.img
barebox-am33xx-phytec-phycore-mlo-128mb.img
barebox-am33xx-phytec-phycore-mlo-512mb.img
barebox-am33xx-phytec-phycore-mlo-2x512mb.img
barebox-am33xx-phytec-phyflex-mlo-256mb.img
barebox-am33xx-phytec-phyflex-mlo-512mb.img
barebox-am33xx-phytec-phycore.img
barebox-am33xx-phytec-phycore-no-spi.img
barebox-am33xx-phytec-phyflex.img
Some boards come in different variants, make sure to pick the correct one.
4.2.1.1. Size Constraints¶
As the MLO needs to setup DRAM first, it must fit into the 109KiB of available on-Chip SRAM. Depending on the boards, drivers and general features enabled by your config, barebox may exceed this size resulting in an error message during build, e.g.:
images/start_am33xx_myirtech_sram.pblb size 111800 > maximum size 111616
If you run into this issue, consider disabling some unneeded config options
for the MLO via make menuconfig
and try again.
The am335x_mlo_sdmmc_defconfig
and am335x_mlo_rawflash_defconfig
defconfigs do just that by disabling CONFIG_MTD
and CONFIG_MCI
,
respectively.
4.2.2. Starting and updating barebox¶
4.2.2.1. SPI NOR and NAND¶
The regular board images can be started from another bootloader, see Starting barebox. The board should provide update handlers to update (or initially install) barebox on SPI NOR or NAND, see Updating barebox.
4.2.2.2. SD/MMC¶
To start barebox from SD/MMC prepare a card with a FAT filesystem. Copy the MLO
file for your board to the card and name it MLO
. Copy the regular image
for your board to the card and name it barebox.bin
.