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.
Answer
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:
- ROM loads U-Boot SPL
- U-Boot SPL initializes clocks (including MPU), RAM and some other stuff (like UART for console)
- SPL loads U-Boot proper
- 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.
No comments:
Post a Comment