beautypg.com

Chapter 4: building the bootloader image, Building the u-boot image, Updating the u-boot image – Lanner MR-320 User Manual

Page 15: Recovering from a failsafe bootload, Chapter 4, Building the bootloader image

background image

12

Building the Bootloader Image

Chapter 4

Network Application Platforms

Chapter 4:

Building the Bootloader

Image

Building the U-boot image

To rebuild u-boot for the EM-8230 board, run the following

commands to compile the bootloader configuration file in

the u-boot directory whose path is bootloader/u-boot/:

It will create a boot image file: u-boot-MR320.bin.

Updating the U-boot Image

There are two u-boot images in flash– the failsafe

bootloader and the normal bootloader. The failsafe

bootloader is programmed by Lanner before the board is

shipped and cannot be updated. The failsafe bootloader

provides a means to recover from a failed loading of the

bootloader. The board also contains a normal bootloader

as well, and that is upgradable. To upgrade the bootloader,

, put the new bootloader image onto a compact flash card,

insert the card to the Main board, and power it up.

Reset the board. It will boot up with the new bootloader.
Another method is through the tftp over the network:

MR320# cd /bootloader/u-boot
MR320# make MR320_config
MR320# make

The physical address of the flash is: 0xbf400000

MR320#tftp 100000

MR320#run bootloader_flash_update

And then reset the board.

Note:

Remember to configure the Ethernet port

first by setting the following variables:

Below is the physical address of the flash memory and the

SDRAM for your reference:

You could also accomplish the update through the serial

port:

Recovering from a failsafe bootload

If booting from the normal bootloader fails, the failsafe

bootloader can be used to recover the normal bootloader

image. You can boot up with the failsafe bootloader

image to recover the normal bootloader when it cannot

bootup successfully.

Adjust jumper JP5 to Failsafe bootloader (refer to jumper

settings, Chapter 3) on the main board. This will select

failsafe bootloader to bootup, and then power on the

board. The failsafe bootloader image should now boot

and press “Crtl - C” to interrupt factory test. The bootloader

prompt should identify itself as the failsafe bootloader.

Following the instructions below to update normal-mode

bootloader:

Power on the system, press “ctrl - C” while the following

messages are displayed during the booting process:

MR320#setenv ipaddr 192.168.0.2
MR320#setenv serverip 192.168.0.1
MR320#saveenv

env

Runtime

Bootloader

64K

7808K

320K

0xbfc0 0000

0xbfbe 0000

0xbf45 0000

0xbf40 0000

Load the image into memory with the command:

MR320# fatload ide 0 100000

filename>

Burn the new bootloader image with the command:

MR320# run bootloader_flash_update

Nuke environment variables on the flash.

MR320# run nuke_env

MR320# loadb 100000

## Total Size = 0x00795670 = 7951984 Bytes
## Start Addr = 0x00b000000