U-Boot (i.MX31)

Aus BECOM Systems Support
Zur Navigation springen Zur Suche springen

Prerequisites

You will need at least the following to successfully build and deploy a new bootloader:

  * A working ltib installation
  * A JTAG Programmer, such as PEEDI
  * A core module on the DevBoard

You will need to take a note of the ethernet address which is shown just after the boot process has started.

Creating a new u-boot.bin

Change to the directory where your ltib installation is. Then run the following command:

./ltib -m prep -p u-boot

This will unpack the u-boot files to ./rpm/BUILD/u-boot-$version$. You can now edit these files as desired.

To finally create the bootloader image, run the following command:

./ltib -m scbuild -p u-boot

This will create the file u-boot.bin. You will need to copy it to an location, which is accessible via TFTP. In our example we shared the directory ltib5/rootfs/boot. To perform the copying, run the following command

sudo cp ./rpm/BUILD/u-boot-1.2.0/u-boot.bin ./rootfs/boot/
or
./ltib -m scdeploy -p u-boot

Using ls, make sure that the copy process finished successfully and that the filetime of the new image is the current time.

Flashing the bootloader image

Now connect the JTAG to the devboard. Start the JTAG programmer. If you are using PEEDI, use the following commands flash the bootloader image.

flash erase 0xa0000000 0x100000
flash program tftp://192.168.0.75/u-boot.bin bin 0xa0000000

If the flashing does not succeed, you might want to check the FAQs section.

Changing the environment settings

After flashing, all your environment settings will be gone and you will have to renew them. To do this, enter the bootloader prompt by pressing a key when asked to and perform the following commands. Keep in mind that the settings shown are only example settings and do not represent your setup.

BTi.MX31$ setenv ethaddr 00:00:e2:a2:66:12
BTi.MX31$ setenv ipaddr 192.168.0.51
BTi.MX31$ setenv serverip 192.168.0.75
BTi.MX31$ setenv bootfile uImage
BTi.MX31$ run setup_bootargs_net
BTi.MX31$ saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors