[<<][beagle][>>][..]
Thu Apr 19 12:21:35 EDT 2018

Beaglepocket MLO/SPL

SPL = Secondary Program Loader

Previous images had DOS partition with kernel and MLO.  Buildroot still does this.
But current beagleboard.org image has MLO on a fixed offset on the SD card.

Trace this down, and figure out how to boot pocketbeagle from buildroot image.


https://stackoverflow.com/questions/40782403/searching-for-the-mlo-file-on-the-beaglebone-black

Newer images put MLO outside the filesystems, directly at several
"magic" offsets on the eMMC/SD-card. That's documented in the TRM for
AM335x.

https://gist.github.com/jadonk/809337ed8435cdc25f99887746550ed2

dd if=MLO of=/dev/mmcblk0 bs=512 seek=256 count=256
dd if=u-boot.img of=/dev/mmcblk0 bs=512 seek=768 count=2048



So how does it boot?
Find the entry in the TRM.

spruh73p.pdf
26. initialization

26.1.6 Booting

- SYSBOOT pins

On BBB there is only one pin that is changed using the switch:
SYSBOOT2 which can override boot from MMC0=uSD.  Default is MMC1=eMMC.


26.1.8.5 MMC / SD Cards

- File system mode (FAT12/16/32 supported with or without Master Boot
  Record), image data is read from a booting file.

26.1.8.5.5 MMC/SD Read Sector Procedure in Raw Mode

4 locations: 0x0, 0x20000, 0x40000, 0x60000
Detects TOC structure, as described in Section 26.1.10

26.1.8.5.6 MMC/SD Read Sector Procedure in FAT Mode
- floppy-like: no MBR
- hd-like: MBR



So it appears this:

dd if=MLO of=/dev/mmcblk0 bs=512 seek=256 count=256
dd if=u-boot.img of=/dev/mmcblk0 bs=512 seek=768 count=2048

uses offset 0x20000 for the MLO/SPL and places the u-boot.img at a
fixed offset.




[Reply][About]
[<<][beagle][>>][..]