Difference between revisions of "BootLoader"
(→Install or restore from scratch) |
(→Build U-Boot) |
||
Line 12: | Line 12: | ||
tar jxvf u-boot-1.1.3.tar.bz2 | tar jxvf u-boot-1.1.3.tar.bz2 | ||
* Download Armadeus patches corresponding to your u-boot & gcc version from: http://fr.groups.yahoo.com/group/armadeus/files/Patches/ and copy it to the u-boot directory. | * Download Armadeus patches corresponding to your u-boot & gcc version from: http://fr.groups.yahoo.com/group/armadeus/files/Patches/ and copy it to the u-boot directory. | ||
− | * Go inside the u-boot directory and apply the patches: | + | * Go inside the u-boot directory and apply the patches (here for u-boot1.1.3): |
patch -p1 < u-boot1.1.3-apm9328-2.1.patch | patch -p1 < u-boot1.1.3-apm9328-2.1.patch | ||
patch -p1 < u-boot1.1-gcc3.4.patch (if necessary) | patch -p1 < u-boot1.1-gcc3.4.patch (if necessary) |
Revision as of 21:02, 27 January 2007
Contents
Introduction
This page describe the U-Boot installation/usage in the Armadeus context.
Build U-Boot
Build process is now part of the Armadeus package. The process is automated in the global build process (see Install Armadeus software), So the following information is only usefull for a manual build process:
- Download Das U-Boot source code archive from: http://sourceforge.net/project/showfiles.php?group_id=65938
- Uncompress it:
tar jxvf u-boot-1.1.3.tar.bz2
- Download Armadeus patches corresponding to your u-boot & gcc version from: http://fr.groups.yahoo.com/group/armadeus/files/Patches/ and copy it to the u-boot directory.
- Go inside the u-boot directory and apply the patches (here for u-boot1.1.3):
patch -p1 < u-boot1.1.3-apm9328-2.1.patch patch -p1 < u-boot1.1-gcc3.4.patch (if necessary)
If you have a 8 or 16MB apm9328 board, edit the include/configs/apm9328.h. look for a #define SDRAM_xxxMBIT change it to a:
* #define SDRAM_64MBIT /* for 8MB */ * #define SDRAM_128MBIT /* for 16MB */ * #define SDRAM_256MBIT /* for 32MB */
Then build u-boot:
make apm9328_config make
this produce a u-boot.bin and a u-boot.brec file:
- u-boot.bin is a binary image file and can be downloaded with the u-boot loadb command (or tftpboot, nfs,...)
- u-boot-brec is a boostrap record file compatible with the freescale bootloader. Use the kermit transmit command.
Install or restore from scratch
If your Armadeus board doesn't boot anymore (flash content erased or dammaged), you will have to use the bootstrap mode of the i.MX.
Use the jumper to boot the integrated freescale bootstrap.
check your host .kermrc file and add the following line:
set transmit linefeed on
Then connect to the apm9328:
kermit
c
Synchronize baudrate by pressing the 'A' key until you receive the character ':' then press return to validate the synchronization.
Go back to command mode
<CTRL><ALT GR>\
c
Then transmit the u-boot.brec file:
transmit armadeus_path/software/buildroot/u-boot.brec
This process can take a couple of minutes. U-boot is now running in RAM. make a new connection to check you have prompt: BIOS> You can burn u-boot in flash memory. see Update u-boot hereafter. Then remove the jumper to use u-boot at the next power-up.
For faster restoring you can use BootStrap utility too.
Update U-Boot
There are two steps to update u-boot:
- 1] Load the new u-boot code in RAM
You can use the following commands to download U-boot. With ethernet and a tftpboot server:
tftpboot 08000000 /tftpboot_path_to_buildroot/u-boot.bin
With ethernet and a nfs server:
nfs 08000000 host_ip_addr:/nfs_path_to_buildroot/u-boot.bin
With the kermit and a serial line
loadb <CTRL><ALT GR>\ c send path_to_buildroot/u_boot.bin c
- 2] Transfer code from RAM to Flash memory
There is a simple u-boot command/script to do that:
run flash_uboot
Modify your environment variables
There is a set of variables you can customize to your needs. The commande printenv show you most of them and their current state. Use the command setenv to change one of these variable. For instance:
setenv ipaddr 192.168.0.3
Use the command saveenv to save the state of your environment variables in flash memory.
Customize the flash memory organization
Booting Linux
The Install Armadeus software on target provide some information to install linux on Armadeus board
Customize Linux boot mode
Typical Kermit (.kermrc) config file
set line /dev/ttyS0 set speed 115200 set carrier-watch off set handshake none set flow-control none robust set file type bin set file name lit set rec pack 1000 set send pack 1000 set window 5 set transmit linefeed on