0
\$\begingroup\$

How is the ROM code loaded/provided on the BeagleBone Black?

I see a few possibilities:

  • It is loaded on in TI's factory and is immutable [unlikely]

  • It is flashed on during manufacture of BeagleBone [most likely]

  • Some other way

If it is open-source, where can it be obtained from?

If it is not open-source, and it is not flashed onto the Sitara by TI, can it be obtained as a binary blob, or can it be extracted from another Sitara?

How would it be flashed (via USB? JTAG?)

Does this ROM code take a similar function as a PC BIOS? Resetting initial system state (including configuring boot devices), then loading a bootloader?

This question is the sequel to this one.

I have been playing with FreeRTOS on some Cortex M3 and F1 boards for a while and I decided to start learning how more complex embedded systems work.

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

The AM335x ROM is fixed by TI, there is no real reason to need the code. It loads a small executable depending on the bootstrap pins from one of many possible locations including MMC, NAND, UART (via XMODEM), a server via Ethernet using the BOOTP protocol and others.

What is used as the program the ROM loads depends on your configuration.

In case of Linux a typical boot process looks like this:

  1. ROM loads U-Boot SPL
  2. U-Boot SPL initializes clocks (including MPU), RAM and some other stuff (like UART for console)
  3. SPL loads U-Boot proper
  4. U-Boot proper loads your OS or does whatever

U-Boot SPL is the stripped down version of U-Boot, which is used because U-Boot is too big (300k+) to be loaded into Sitara's RAM (or cache, however you call it, it's 128k).

In the particular case of BeagleBone both SPL and U-Boot are found in the eMMC (or SD card), either in the small FAT partition or in the first 2kB at fixed adress if there is no FAT partition.

SPL is actually a part of U-Boot and is built together with it, so if you want to experiment just build U-Boot usign the configuration for BeagleBone and play around with it.

Answering your other questions, the only thing done by ROM is to load the bootloader - all initialization of hardware, including the AM335x itself is done by the bootloader in either stage.

Keep in mind that not all bootloaders are two-stage, it's just that U-Boot is too big. On some other MPUs, like i.MX6 which has more built-in RAM there is no need to use two stages even with U-Boot.

\$\endgroup\$
0
\$\begingroup\$

The ROM bootloader (a stripped-down version of U-boot) is flashed by TI and is immutable thereafter.

It attempts to load the second stage from boot devices in a predefined order (MMC, SPI, ... UART? ...).

The second stage may be an OS itself, or is more likely another boot-loader (usually a full U-boot), which loads the main OS then (e.g. Linux).

\$\endgroup\$
1
  • \$\begingroup\$ On AM335x full U-Boot is too big to be loaded directly - first SPL is loaded. And how do you know what's in ROM is a version of U-Boot? \$\endgroup\$
    – jaskij
    Commented Dec 8, 2016 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.