OMAP3 Serial Boot

Hi,

As it might be interesting for others, here is a small tutorial on how
to boot the Beagle through UART:

1 - Generate an x-loader with serial support:
mkdir serial_boot
cd serial_boot
git clone http://git.omapzoom.org/repo/u-boot.git
git clone http://git.omapzoom.org/repo/x-loader.git
cd x-loader
make distclean
make omap3430labradordownload_config
make
cd ..

now you've got an ~13k x-load.bin in the x-loader directory.

2 - Generate Nishant Menon's tools
git clone git clone http://github.com/nmenon/omap-u-boot-utils.git
cd omap-u-boot-utils
make distclean
make

now you've got two tools: pserial and ukermit

3 - Pick up the U-Boot you'd like to put in SDRAM
You can either use the one generated by OE, or you can quickly
generate a new one:
cd ..
git clone http://git.denx.de/u-boot.git u-boot-denx
cd u-boot-denx
make distclean
make omap3_beagle_config
make
cd ..

now you've got an ~160k u-boot.bin in the u-boot-denx directory.

4 - Prepare the boot
cd omap-u-boot-utils
cp ../x-loader/x-load.bin .
cp ../u-boot-denx/u-boot.bin .

5 - Boot (use the right tty for your setup of course)
Power off the board.
Run pserial to put the x-loader in the internal SRAM:
./pserial -p /dev/ttyS0 -f x-load.bin

If you already have an x-loader in NAND, you must push the User Button
so that the NAND boot is tried after the UART boot, then power-on the
board.
If you don't have one, simply power-on the board.

You see:
Waiting For Device ASIC ID: Press Ctrl+C to stop
ASIC ID Detected.
Sending 2ndFile:
Downloading file: 100.000% completed(12700/12700 bytes)
File download completed.

Then run ukermit, to transmit the u-boot to the x-loader and then the
x-loader puts it in SDRAM:
./ukermit -p /dev/ttyS0 -f u-boot.bin

You see:
Downloading file: 100.000% completed(162656/162656 bytes)
File Download completed

And then you have an U-Boot prompt like this:
## Start Addr = 0x80008000
Starting OS Bootloader from UART ...

U-Boot 2009.03-rc2-00013-gefb4734 (C3A4r 18 2009 - 10:55:33)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
DRAM: 128 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Board revision Ax/Bx
Die ID #047a00030000000004013f780601000c
Hit any key to stop autoboot: 0

You can automate the process using the little script attached.
This has been tested with B5 and B7 boards on Ubuntu 8.10.

Comments and/or remarks welcome!

Regards,
Matthieu.

boot_omap3_serial.sh (126 Bytes)

Matthieu Poullet wrote:

Hi,

As it might be interesting for others, here is a small tutorial on how
to boot the Beagle through UART:

Great! Sounds like we should create a eLinux wiki page for this?

1 - Generate an x-loader with serial support:
mkdir serial_boot
cd serial_boot
git clone http://git.omapzoom.org/repo/u-boot.git
git clone http://git.omapzoom.org/repo/x-loader.git

Why do you use zoom repositories for this and not 'official' beagle ones?

http://elinux.org/BeagleBoard#X-Loader

?

cd x-loader
make distclean
make omap3430labradordownload_config
make
cd ..

now you've got an ~13k x-load.bin in the x-loader directory.

2 - Generate Nishant Menon's tools
git clone git clone http://github.com/nmenon/omap-u-boot-utils.git
cd omap-u-boot-utils
make distclean
make

now you've got two tools: pserial and ukermit

3 - Pick up the U-Boot you'd like to put in SDRAM
You can either use the one generated by OE, or you can quickly
generate a new one:
cd ..
git clone http://git.denx.de/u-boot.git u-boot-denx
cd u-boot-denx
make distclean
make omap3_beagle_config
make
cd ..

now you've got an ~160k u-boot.bin in the u-boot-denx directory.

4 - Prepare the boot
cd omap-u-boot-utils
cp ../x-loader/x-load.bin .
cp ../u-boot-denx/u-boot.bin .

5 - Boot (use the right tty for your setup of course)
Power off the board.
Run pserial to put the x-loader in the internal SRAM:
./pserial -p /dev/ttyS0 -f x-load.bin

If you already have an x-loader in NAND, you must push the User Button
so that the NAND boot is tried after the UART boot, then power-on the
board.
If you don't have one, simply power-on the board.

You see:
Waiting For Device ASIC ID: Press Ctrl+C to stop
ASIC ID Detected.
Sending 2ndFile:
Downloading file: 100.000% completed(12700/12700 bytes)
File download completed.

Then run ukermit, to transmit the u-boot to the x-loader and then the
x-loader puts it in SDRAM:
./ukermit -p /dev/ttyS0 -f u-boot.bin

You see:
Downloading file: 100.000% completed(162656/162656 bytes)
File Download completed

And then you have an U-Boot prompt like this:
## Start Addr = 0x80008000
Starting OS Bootloader from UART ...

U-Boot 2009.03-rc2-00013-gefb4734 (C3A4r 18 2009 - 10:55:33)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
DRAM: 128 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Board revision Ax/Bx
Die ID #047a00030000000004013f780601000c
Hit any key to stop autoboot: 0

You can automate the process using the little script attached.
This has been tested with B5 and B7 boards on Ubuntu 8.10.

Comments and/or remarks welcome!

If we can get this to somewhere more permanent and linkable than a fast forgotten mail, this would be great. eLinux? Maybe extend http://elinux.org/BeagleBoardRecovery ?

Dirk

Dirk Behme said the following on 03/18/2009 12:27 PM:

Matthieu Poullet wrote:
  

Hi,

As it might be interesting for others, here is a small tutorial on how
to boot the Beagle through UART:
    
Great! Sounds like we should create a eLinux wiki page for this?

1 - Generate an x-loader with serial support:
mkdir serial_boot
cd serial_boot
git clone http://git.omapzoom.org/repo/u-boot.git
git clone http://git.omapzoom.org/repo/x-loader.git
    
Why do you use zoom repositories for this and not 'official' beagle ones?

http://elinux.org/BeagleBoard#X-Loader

?

cd x-loader
make distclean
make omap3430labradordownload_config
make
cd ..

now you've got an ~13k x-load.bin in the x-loader directory.

2 - Generate Nishant Menon's tools
git clone git clone http://github.com/nmenon/omap-u-boot-utils.git
cd omap-u-boot-utils
make distclean
make

now you've got two tools: pserial and ukermit

3 - Pick up the U-Boot you'd like to put in SDRAM
You can either use the one generated by OE, or you can quickly
generate a new one:
cd ..
git clone http://git.denx.de/u-boot.git u-boot-denx
cd u-boot-denx
make distclean
make omap3_beagle_config
make
cd ..

now you've got an ~160k u-boot.bin in the u-boot-denx directory.

4 - Prepare the boot
cd omap-u-boot-utils
cp ../x-loader/x-load.bin .
cp ../u-boot-denx/u-boot.bin .

5 - Boot (use the right tty for your setup of course)
Power off the board.
Run pserial to put the x-loader in the internal SRAM:
./pserial -p /dev/ttyS0 -f x-load.bin

If you already have an x-loader in NAND, you must push the User Button
so that the NAND boot is tried after the UART boot, then power-on the
board.
If you don't have one, simply power-on the board.

You see:
Waiting For Device ASIC ID: Press Ctrl+C to stop
ASIC ID Detected.
Sending 2ndFile:
Downloading file: 100.000% completed(12700/12700 bytes)
File download completed.

Then run ukermit, to transmit the u-boot to the x-loader and then the
x-loader puts it in SDRAM:
./ukermit -p /dev/ttyS0 -f u-boot.bin

You see:
Downloading file: 100.000% completed(162656/162656 bytes)
File Download completed

And then you have an U-Boot prompt like this:
## Start Addr = 0x80008000
Starting OS Bootloader from UART ...

U-Boot 2009.03-rc2-00013-gefb4734 (C3A4r 18 2009 - 10:55:33)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
DRAM: 128 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Board revision Ax/Bx
Die ID #047a00030000000004013f780601000c
Hit any key to stop autoboot: 0

You can automate the process using the little script attached.
This has been tested with B5 and B7 boards on Ubuntu 8.10.

Comments and/or remarks welcome!
    
If we can get this to somewhere more permanent and linkable than a
fast forgotten mail, this would be great. eLinux? Maybe extend
http://elinux.org/BeagleBoardRecovery ?

could be a nice idea to put prebuilt binaries along with the script too
somewhere where folks can download it and run it..

Regards,
Nishanth Menon

Hi Dirk,

I will extend the recovery page then.

The problem with the 'official' x-loader tree is that the serial boot
capability has been completely removed, see e.g. the #define
START_LOADB_DOWNLOAD in the zoom sources.
I've tried to put this back in Sakoman's x-loader tree but until now
it doesn't work.
I'd prefer to have this back in the 'official' tree too because the
zoom sources are such a mess...
Moreover two repos for such a little piece of code, it makes no sense.

Regards,
Matthieu.

Hi Nishanth,

I've put a tarball called boot_omap3_serial.tar.bz2 here:
http://groups.google.com/group/beagleboard/files

Regards,
Matthieu.