Where is the MLO and u-boot.img

1,736 views
Skip to first unread message

Ricky Chang

unread,
Dec 5, 2014, 10:10:40 AM12/5/14
to beagl...@googlegroups.com
Hi,

I've just downloaded Robert Nelson's debian image of 


and flashed it to an SDcard. I discovered that there is no MLO or u-boot.img in the first partition. I thought that was ok since I understand that without pressing the boot button the system would look for the MLO and the u-boot.img on the first partition of the eMMC, but would boot with the kernel image on the SDcard. The u-boot version on the eMMC is "U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)". 

As expected, the system booted up successfully with the new kernel. Out of curiosity, I booted again pressing the boot button, and expecting an error. But to my surprise, again the system booted successfully, using a u-boot from I don't know where with a new version number "U-Boot 2014.10-00019-gbfd789c (Oct 15 2014 - 11:56:05)". Can anyone explain to me what happened? Where does this u-boot come from?


Thanks,

Ricky Chang




Robert Nelson

unread,
Dec 5, 2014, 2:09:05 PM12/5/14
to Beagle Board
It's all magic voodoo. ;)

We are utilizing a feature first introduced by TI in their omap4430
generation of the 'bootrom'. MLO/u-boot.img are dd'ed below the 1Mb
position. It should help out users who accidently decide to delete
MLO/u-boot.img from the first partition and wonder why it doesn't
boot.

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

ricky...@gmail.com

unread,
Dec 6, 2014, 2:24:22 AM12/6/14
to beagl...@googlegroups.com
Yes, a lot of things on Linux looks like voodoo magic, and so many mysterious codes lying everywhere :)

That said, can you point me to the place where I can learn how that was done, and the complete boot mechanism of the BBB? I am trying to learn the boot process(among other things) of the BBB but there are just so much info lying around, some are outdated and some are conflicting. Also does that mean I can no longer access or see these two files? Is there a place where I could download the source for the image?

I read your instructions at:


and saw that you have only made one partition on the SDcard with both the kernel and file system, and before you format the card you've dd'ed both the MLO and u-boot.img to it. Is this how that was done? And I thought that was a mistake, silly me :)

I have learned a lot from what you have posted on the web, thank you for your work and I look forward to seeing more "Products" from you. Too bad there is not a centralized location where we can learn all these for the BBB.


Best Regards,

Ricky Chang


Robert Nelson

unread,
Dec 8, 2014, 11:13:22 AM12/8/14
to Beagle Board
On Sat, Dec 6, 2014 at 1:24 AM, <ricky...@gmail.com> wrote:
> Yes, a lot of things on Linux looks like voodoo magic, and so many
> mysterious codes lying everywhere :)
>
> That said, can you point me to the place where I can learn how that was
> done, and the complete boot mechanism of the BBB? I am trying to learn the
> boot process(among other things) of the BBB but there are just so much info
> lying around, some are outdated and some are conflicting. Also does that
> mean I can no longer access or see these two files? Is there a place where I
> could download the source for the image?

Page 4934 (mmc raw mode)

http://www.ti.com/lit/ug/spruh73k/spruh73k.pdf

> I read your instructions at:
>
> https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSD/SDcard
>
> and saw that you have only made one partition on the SDcard with both the
> kernel and file system, and before you format the card you've dd'ed both the
> MLO and u-boot.img to it. Is this how that was done? And I thought that was
> a mistake, silly me :)

Do you you notice how we create a 1Mb hole on the front of the drive
via sfdisk? After that point, the order of dd'ing the bootloader or
mkfs.ext4 the partition doesn't really matter..

> I have learned a lot from what you have posted on the web, thank you for
> your work and I look forward to seeing more "Products" from you. Too bad
> there is not a centralized location where we can learn all these for the
> BBB.

Well there is this mailing list.

ricky...@gmail.com

unread,
Dec 10, 2014, 1:48:08 AM12/10/14
to beagl...@googlegroups.com
Hi Robert. Thanks for your info.

When you make partitions using sfdisk, where is the info written? Would the info overwrite the memory area of MLO or boot.img?

I have a problem when using this image. At boot I always get this message :

[   10.379089] libphy: PHY 4a101000.mdio:01 not found
[   10.384157] net eth0: phy 4a101000.mdio:01 not found on slave 1


whether or not I have a cable plugged in. But if I have the ethernet cable plugged in, the system booted up relatively quickly with the log in prompt, otherwise it will take about 100 seconds before the log in prompt appeared. And if I plug in a cable after booting up, it will take a long while before the cable is detected and even longer before an IP is assigned by the DHCP server. I tried changing the settings in "dhclient.conf" without any effect. What can I do to fix these problems? In the stock kernel that came with the board(Rev C), the same message appears but only after the log in prompt, and it doesn't block the other operations.

I also read from the forum that the cape manager is gone in this kernel version(so soon!), so does that mean I have to put the capes I need in the am335x-boneblack.dts file and load everything at boot time? And how can I know what capes are loaded now without the  "/sys/devices/bone_capemgr.*/slots"?

Thanks again for your help!

Robert Nelson

unread,
Dec 11, 2014, 10:56:34 AM12/11/14
to Beagle Board
On Wed, Dec 10, 2014 at 12:48 AM, <ricky...@gmail.com> wrote:
> Hi Robert. Thanks for your info.
>
> When you make partitions using sfdisk, where is the info written? Would the
> info overwrite the memory area of MLO or boot.img?

Right here:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSD/SDcard

> I have a problem when using this image. At boot I always get this message :
>
> [ 10.379089] libphy: PHY 4a101000.mdio:01 not found
> [ 10.384157] net eth0: phy 4a101000.mdio:01 not found on slave 1

The am335x has two ports (or slaves), only one is connected on the black.


> whether or not I have a cable plugged in. But if I have the ethernet cable
> plugged in, the system booted up relatively quickly with the log in prompt,
> otherwise it will take about 100 seconds before the log in prompt appeared.
> And if I plug in a cable after booting up, it will take a long while before
> the cable is detected and even longer before an IP is assigned by the DHCP
> server. I tried changing the settings in "dhclient.conf" without any effect.
> What can I do to fix these problems? In the stock kernel that came with the
> board(Rev C), the same message appears but only after the log in prompt, and
> it doesn't block the other operations.

100~ 120seconds.. Disable eth0 in /etc/network/interfaces and it'll
boot fast.. But you will have to manually call dhclient..

> I also read from the forum that the cape manager is gone in this kernel
> version(so soon!), so does that mean I have to put the capes I need in the
> am335x-boneblack.dts file and load everything at boot time? And how can I
> know what capes are loaded now without the
> "/sys/devices/bone_capemgr.*/slots"?

It's your choice, either use v3.14.x and modify the dtb's by
"dtb-rebuilder" or install 3.8..

dtb-rebuilder:
http://elinux.org/Beagleboard:Capes_3.8_to_3.14#Custom_dtb

3.8:
sudo apt-get update
sudo apt-get install linux-image-3.8.13-bone68
sudo reboot

Sergey Manucharian

unread,
Jan 8, 2018, 1:54:56 PM1/8/18
to BeagleBoard
It's not clear to me: why when both eMMC and SD present and contains u-boot (both in raw mode), the CPU decides to boot from eMMC.
Is there a way to default to SD? The Technical Reference mentions a timeout, or am I missing anything?
Of course, the latest u-boot (in eMMC) does check for SD presence and switches to it, but if I have many BBBs with preinstalled old stuff, I have to press S2 to force booting from SD every time.

Robert Nelson

unread,
Jan 8, 2018, 2:02:13 PM1/8/18
to Beagle Board, Sergey Manucharian
On Mon, Jan 8, 2018 at 12:54 PM, Sergey Manucharian <s...@ara-ler.com> wrote:
> It's not clear to me: why when both eMMC and SD present and contains u-boot
> (both in raw mode), the CPU decides to boot from eMMC.
> Is there a way to default to SD? The Technical Reference mentions a timeout,
> or am I missing anything?
> Of course, the latest u-boot (in eMMC) does check for SD presence and
> switches to it, but if I have many BBBs with preinstalled old stuff, I have
> to press S2 to force booting from SD every time.

Open up the schematic, this "hardware" configuration is documented on page 6

https://github.com/beagleboard/beaglebone-black/blob/master/BBB_SCH.pdf

From that schematic, you'll notice the first row: "MMC1 (eMMC)" is
listed "before" "MMC0 (microSD)"..

By pressing the S2 button, the cpu is booting via the second row:

Regards,

--
Robert Nelson
https://rcn-ee.com/

Sergey Manucharian

unread,
Jan 8, 2018, 5:16:51 PM1/8/18
to Robert Nelson
Excerpts from Robert Nelson's message from Mon 08-Jan-18 13:01:
Thanks, Robert!

I missed it: all boot sequencies are described on page 4913 of the Technical
Reference as well.

-Sergey

Reply all
Reply to author
Forward
0 new messages