This is an old revision of the document!


U-BOOT Monitor

Monitor Mode

  • Type the two keys SPACE and 1 before the monitor 3 second timeout.

Exploring U-Boot

The version of U-Boot provided by DLink (on the B1 hardware) is EXTREMELY limited. Pretty much the only way to do anything in the bootloader is to chainload an additional program, because not even the “go” command is supported.

One way to achieve this is to build a new version of U-Boot, wrap it in a suitable header using “mkimage”, and then booting the new U-Boot.

Until recently, there was no support for the Orion architecture in U-Boot trunk. That changed with the addition of support for the LaCie edminiv2, which is also based on the same SoC.

While the basic SoC is the same, the flash part is different. Once I have managed to determine the correct configuration to allow the flash chip to be recognized by U-Boot, I will contribute a patch to the U-Boot maintainers to enable that support.

Here are some basic steps that can be followed to build your own U-Boot loader. The build platform was Ubuntu 10.04, on i386.

First, obtain a suitable cross compiler. The easiest way to do this is to get them from the Emdebian project.

Add the Emdebian repo to your /etc/apt/sources.list:

deb http://www.emdebian.org/debian/ lenny main

Then update the repositories:

sudo apt-get update
sudo apt-get install gcc-4.3-arm-linux-gnueabi
sudo apt-get install binutils-arm-linux-gnueabi
sudo apt-get install uboot-mkimage

Tell U-Boot which compiler you are using:

export CROSS_COMPILE=arm-linux-gnueabi-

Not knowing whether this image would work on more than just the B1 hardware, I chose to name it more specifically than less.

make clean mrproper dns323_b1_config
make
mkimage -A arm -O u-boot -T kernel -C none -a 0x8000 -e 0x8000 -n "UBoot dns323" -d u-boot.bin uImage.bin

The dns323_b1 board config specifically omits the low level initialisation code so that it can be chain loaded from an existing U-Boot loader. The image resulting from this process CANNOT be used to boot from poweroff!

In order to execute this new boot loader, it has to be uploaded to memory, using kermit. It goes without saying (I hope) that this requires a console cable already connected.

Here is my kermit connect script:

#!/usr/bin/kermit
echo connecting /dev/ttyUSB0 .....
set line /dev/ttyUSB0
set speed 115200
set serial 8n1
set carrier-watch off
set flow-control none
set handshake none
set prefixing all
set streaming off
set parity none
connect 

Once you are connected to the console, and have interrupted the boot process as described above (Press space, 1), you can then download this new boot loader into RAM:

loadb

Then press Ctrl-\ (Control-Backslash), followed by “c” to return to a Kermit prompt. Then:

send /path/to/uImage.bin

The “send” command takes a few seconds to actually start, but then it should show the progress of the upload. Once it is finished, type “c<Enter>” to return to the U-Boot console.

Now we can execute the new image:

bootm 0x100000

The address 0×100000 is the default address used by “loadb”. If your “loadb” uses a different address, you should update the “bootm” command above.

Now the new image should execute, and return you to a boot prompt, with a fully featured U-Boot loader ready to obey your commands, without having to run the risk of flashing something that may not boot, and have to recover using JTAG.


Navigation

Personal Tools