MLO and UART boot

Hello everyone,

I’m trying to get a BeagleBoard xM to do UART boot from my computer following the procedure depicted on SPRUGN4R.pdf, but I see some confusing results and finally not even the MLO seems to load properly. I’m using the MLO-beagleboard first stage boot loader included in ti-sdk-beagleboard-05.05.01.00/board-support/prebuilt-images.

My first question is regarding table 26-13 in SPRUGN4R.pdf, according to which I should get a 69-byte sequence upon startup (1+7+4+23+23+11), but then I only get 58 bytes (??).

Now, once I get the ASIC ID (58 bytes, whatever they are), I write the peripheral boot message (0xF0030002) and then the image size (32-bit, as specified), and finally the binary image. Then nothing happens. Any ideas?

I’m using the following python script to receive the ASIC ID and upload the MLO image:

import struct

port = serial.Serial(port=‘/dev/ttyUSB0’, baudrate=115200, bytesize=serial.EIGHTBITS, parity=serial.PARITY_EVEN, stopbits=serial.STOPBITS_ONE)

print ‘Number of subblocks:’, port.read(1).encode(‘hex’)
print ‘Id Subblock:’, port.read(7).encode(‘hex’)
print ‘Reserved:’, port.read(4).encode(‘hex’)
print ‘Id Subblock:’, port.read(23).encode(‘hex’)
print ‘Reserved:’, port.read(23).encode(‘hex’)
print ‘Checksum:’, port.read(0).encode(‘hex’)

port.write(struct.pack(‘<I’, 0xF0030002))

with open(‘…/prebuilt-images/MLO-beagleboard’, ‘rb’) as mlo:

I don’t think there’s a valid prebuilt image provided. You most likely need to build from source and then send ‘spl/u-boot-spl.bin’ as peripheral booting does not, iirc, want the header prepended like SD/NAND does (and thus this could be one of your problems, the header contents are executed as code and that’s garbage…).

image = mlo.read()
size = len(image)
print ‘Writing image:’, size, ‘bytes’
port.write(struct.pack(‘<I’, size))

Having not looked at the other omap3-family peripheral booting tools (which could be helpful in this area as the TRM says that USB and UART work the same), I would expect this to be “tricky”. Is python writing the ascii-string value of size here? Or the real value of size?