Want to serial boot my BBB

Hi,

I am trying to boot my BBB over a serial connection, and need a little help. I have followed the instructions for UART recovery listed here http://elinux.org/BeagleBoardRecovery

I built the pserial tool and an x-loan.bin, but when I try to load it, I just getting hanging.

$ sudo ./pserial -p /dev/ttyUSB0 -f x-load.bin
Waiting For Device ASIC ID: Press Ctrl+C to stop

I am using a 6 pin TTL to USB cable to my PC.

Perhaps the x-load.bin I am using is for the wrong processor (BeagleBoard)? If so, maybe I can convert the MLO produced by the BBB u-boot build to a x-load.bin. Just need a few pointers on how to do that.

Thanks,

Dallas

uboot is supposed to handle serial booting. However, I have no personal hands on. Just a quick google search showed many results however. One thing to note is that uboot for the BBB is patched, so possibly different. It does not however make sense for this feature to be patched out, so I would assume that it should work.

Sorry for the less than definitive answer, perhaps someone with hands on will respond. You can however experiment on your own.

http://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:serial_port_loading_files
http://blog.mezeske.com/?p=483

$ apt-cache search ckermit
ckermit - serial and network communications package

Second link package mentioned is available, so looks to be possible.

Ok after reading the second link fully, I noticed a few things.

First, the boot file is different. We have zImage typically, so I would assume the bootz command would be necessary. OR you could convert a zImage to uImage.

Secondly, the base load address is different, so this would need to be taken into account. Although I think changing this would be fairly simple.

Lastly, we also need to load the device tree board file, and I am a bit confused about this for loading serially.

Hi William. Thanks for the help. I’m stuck much earlier on than u-boot. I am expecting the ROM to return the ASIC ID when I run the pserial command to try and load the first stage boot loader (x-load.bin). I’m not even able to get past that. It looks like either I have the wrong pserial command or maybe the BBB ROM does not provide an ASIC ID. I don’t know enough about the Sitara processor to say. If I can get the x-loader to work, I think I am home free because it should be able to load a u-boot.bin.

One other data point. If I don’t press and hold the boot switch when power is applied and instead wait a few seconds after applying power and then press the boot switch, the pserial command is able to detect the ASIC ID and download the x-loan.bin.

$ sudo ./pserial -p /dev/ttyUSB0 -f x-load.bin
Waiting For Device ASIC ID: Press Ctrl+C to stop
ASIC ID Detected: 0x85 0x74 0x61 0x90
Sending 2ndFile:
Downloading file: 100.000% completed (10516/10516 bytes)
File download completed.

However, the BBB boots from the eMMC instead of the x-loan.bin I downloaded. So this is progress. It means that my pserial command does work with a BBB and the BBB ROM code does respond with its ASIC ID and does in fact download the x-load.bin. It looks like I just need to figure out what the correct boot switch power on sequence is now.

One other data point. If I don’t press and hold the boot switch when power is applied and instead wait a few seconds after applying power and then press the boot switch, the pserial command is able to detect the ASIC ID and download the x-loan.bin.

You should be loading MLO, not x-load.bin. I also haven’t tried this myself, but loading via serial shouldn’t be any different from loading from tftp. The load addresses should be identical.

Regards,
John

If I remember correctly , You should load x-loader.bin NOT MLO
While the different between MLO and x-loader.bin is MLO has 8 bytes head , the first 4 bytes is dest and the second 4 bytes is length .
This is for boot from NAND /eMMC , and when download from serial . the boot rom will download to fixed address and limit length .

Sorry , I have made a mistake .

On omap3 board ,you should use pserial to download from serial
And on am335x / dm8148 board. x-modem is enough.and MLO is for boot from serial

So , please try to use teraterm , and upload from file->transfer->xmodem->send.
Then power on the beaglebone board .

Okay, thanks very much! I’ll give that a try.

I was able to send the MLO file via minicom / x-modem just fine to the board. However after the transfer completed, nothing happened. Should I expect to see any output on the serial console afterward?

For UART or USB you do not use the MLO file. When you build u-boot you should have a spl/u-boot-spl.bin file. This is what you send over x-modem. The MLO file is only used for Memory Booting (SD/Card, eMMC) while the u-boot-spl.bin file is used for Peripheral Booting (UART, USB).

Steve K.

Thanks Steve. That was my understanding as well. I’ll give that a shot.

Hi Steve, It looks like the u-boot-spl.bin is working. This is what I’m seeing on my minicom console:

Welcome to minicom 2.6.1

OPTIONS: I18n
Compiled on Feb 11 2012, 18:12:55.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys

ot SPL 2013.07-00012-g31df114 (Jul 11 2014 - 20:33:02)
CCCCCCCCC

Is the next step to send a MLO?

CCCCC is print by boot rom , you can send u-boot-spl.bin now

For UART or USB you do not use the MLO file. When you build u-boot you should have a spl/u-boot-spl.bin file. This is what you send over x-modem. The MLO file is only used for Memory Booting (SD/Card, eMMC) while the u-boot-spl.bin file is used for Peripheral Booting (UART, USB).

I’m not sure if this is correct. My understanding is that u-boot cannot be loaded directly because it is too big to fit into the SRAM, so MLO is loaded into SRAM which then sets up the DDR memory and timing and then u-boot is loaded into DDR memory. Why should this be any different when using UART or USB? Do you have any docs that explains the difference?

Regards,
John

It looks like next step is to load u-boot.img, which works nicely. Thanks for the clues everyone!

This web-page is a very helpful guide for anyone else trying to boot from the serial port: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_UBoot_Board_Port

It looks like next step is to load u-boot.img, which works nicely. Thanks for the clues everyone!

This web-page is a very helpful guide for anyone else trying to boot from the serial port: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_UBoot_Board_Port

Looking at the wiki, I think the 06.00.00.00.00-template is probably stripped of most u-boot functionality (ethernet, mmc, etc) and is able to fit into SRAM and that is why MLO is not needed.

Regards,
John

Dallas,

Thanks for that link, I’ve never seen it before and will likely be of some use in the future if I need to boot via serial. Looks very intensive too.