0

I got a beaglebone black which comes with u-boot linux preinstalled on the emmc. For the sake of learning I want to put u-boot on the flash myself and build linux from scratch. I have compiled u-boot, booted the board via UART and loaded u-boot via xmodem. As a result I can enter u-boot commands.

From my understanding I need to store the MLO and u-boot.bin files on the emmc.

I have loaded the files into RAM using xmodem but I am a little bit confused how/where to write them. I also don't see any existing MLO /u-boot files on the board which raises the question how the stock linux boots in the first place. Any hints?

=> mmcinfo      
Device: OMAP SD/MMC
Manufacturer ID: 70
OEM: 100
Name: M6270 
Tran Speed: 52000000
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB
Boot Capacity: 2 MiB ENH
RPMB Capacity: 512 KiB ENH




 => mmc part

Partition Map for MMC device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors UUID        Type
  1 2048        7469056     00000000-01 83 Boot
2

The README file for the board, which is found at board/ti/am335x/README in the source tree has a section on writing to the eMMC. It talks about Falcon Mode, which is having U-Boot run Linux, but covers flashing U-Boot itself as part of that.

  • This was helpful information however I am still a bit confused by my current partitioning. mmc part shows that the partition is Dos type, even though it is ext4 and from my understanding the partition where the boot loader is, needs to be FAT. I also have and empty uboot directory under /boot/. Is this where I am supposed to put MLO and the uboot binary? What does Boot Capacity: 2 MiB ENH in the mmcinfo output mean? – Georgi Georgiev Jan 13 at 15:48
  • This means that in the partition table it is set to FAT, but it got formatted to ext4 by whatever you're running. Keep in mind that the ROM can boot from either reading the "MLO" file from FAT (first partition of the device) or raw from specific hard-coded offsets in the storage device. The README documents the raw offsets and some distributions write them there to start with. A way to tell is to read the start of the boot log as when U-Boot reads from FAT it says as much, and will look for u-boot.img in the same type of boot medium MLO was started from (so FAT from FAT or RAW from RAW). – Tom Rini Jan 14 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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