5 Stages to Booting:
- The ROM loads. This is on board read only and can't change. It looks for the MLO file and runs it.
- MLO file runs and looks for Zimage
- Zimage loads & run with configuration uEnv.txt
- uEnv.txt files have info on where to find the linux kernal plus lots of other parameters
- Parameters can be passed from the uEnv.txt file into Linux kernal (provided the kernal was complied with the required modules for the parameters)
- Linux Kernal loads
- Root file system loads (e.g. debian, ubuntu, etc.)
The normal sequence is (S2 button not pushed):
- MC1 (eMMC on-board flash), MMC0 (SD card), UART0, USB0
- SPI0, MMC0 (SD card), USB0, UART0
- Stage 2 and forward is basically software so it can be changed & modified. Be careful what you read in blogs (this one!) and wiki as they could be out of date.
- Standard boot process can be overridden by placing a resistor between P8.43 and ground. Pushing S2 is not required.
- S2 button push must have a power down/power up cycle. Rebooting and pushing S2 has not impact.
- The BBB will boot from the SD card with out pushing S2. However the stage 1 (MLO) and Stage 2 (U-boot) will be from the eMMC.
- Pushing S2 forces Stage 2 and Stage 3 to be pulled from SD card.
- Alternative remove MLO and Zimage from the eMMC to force boot from the SD card without pushing the S2 button
- Booting from eMMC will pull the uEnv.txt information from SD card if available.
- A blank SD card inserted will cause the BBB to hang. The following is needed in a uEnv.txt file in the main partition of the SD card.
- mmcroot=/dev/mmcblk1p2 ro