AMSDK u-boot User's Guide

Contents

  [hide]

Overview

This document covers the following platforms:

  • am335x EVM
  • BeagleBone
  • am3517 EVM
  • am37x
  • Beagleboard

For am180x information please see this page.

Starting with the v05.03.00.00 release, the following targets now use SPL to provide the interface between the ROM and full U-Boot in place of x-loader or u-boot-min.

  • am335x EVM
  • BeagleBone

Starting with the v05.03.01.00 release, the following targets now use SPL as well.

  • am3517 EVM
  • am37x
  • Beagleboard

Building MLO and u-boot

We strongly recommend the use of separate object directories when building. This is done with O= parameter to make. This value can either be relative to your current directory or a full path.

Cleaning the Sources

If you did not use a separate object directory:

$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm distclean

If you used 'O=am335x' as your object directory:

$ rm -rf ./am335x

Compiling MLO and u-boot

Building of both u-boot and SPL is done with a single make command. The make target depends on the board in question:

Boardmake target
AM335x EVMam335x_evm
BeagleBoneam335x_evm
AM3517 EVMam3517_evm
AM37x EVMomap3_evm
BeagleBoardomap3_beagle
$ make O=am335x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm make_target_from_table_above

Installing MLO and u-boot

With a switch to SPL you now need to use u-boot.img and MLO from the build to boot the target. If you are going to load via UART then you may need to use spl/u-boot-spl.bin rather than MLO as when loading via UART the board typically requires a raw binary rather than one with a special header at the start. ced

SD card booting

All targets, when configured to boot from SD card, need MLO and u-boot.img placed onto the SD card in the manner described in the board specific manual.

NAND

First, note that the BeagleBoard xM and BeagleBone do not have NAND and this section does not apply. Second, please see the Additional Information section for further details and explanation for each target.

Note:

  • The default layout of the NAND that each supported device supports is the same which is why all of the nand erase and write locations are the same.
  • While each board uses the same 'nandecc' command, the mode this sets on the target is not the same. Again, refer to the Additional Information section for details about a specific target.
  • This series of commands will write MLO to the default location and then the backup locations that the ROM will look in as well.

The following will load the binaries from an SD card. For other methods (such as UART), please see Additional Information.

U-Boot # mmc rescan
U-Boot # nand erase 0x0 0x280000
U-Boot # saveenv
U-Boot # nandecc hw 2
U-Boot # fatload mmc 0 0x81000000 MLO
U-Boot # nand write 0x81000000 0x0 0x20000
U-Boot # nand write 0x81000000 0x20000 0x20000
U-Boot # nand write 0x81000000 0x40000 0x20000
U-Boot # nand write 0x81000000 0x60000 0x20000
U-Boot # fatload mmc 0 0x81000000 u-boot.img
U-Boot # nand write 0x81000000 0x80000 0x1E0000

Installing the Linux Kernel

NAND

First, note that the BeagleBoard xM and BeagleBone do not have NAND and this section does not apply. Second, please see the Additional Information section for further details and explanation for each target.

The following will load the binaries from an SD card. For other methods (such as UART), please see Additional Information. When issuing the commands please see the following table to see the proper size to erase and nandecc command to issue.

BoardNAND Kernel Partition Size'nandecc' command
AM335x EVM0x500000nandecc hw 2
AM37x EVM0x500000nandecc hw 1
AM3517 EVM0x500000nandecc hw 1
BeagleBoard0x400000nandecc hw 1
U-Boot # mmc rescan
U-Boot # nand erase 0x280000 <NAND Kernel Partition Size>
U-Boot # <nandecc command>
U-Boot # fatload mmc 0 0x81000000 uImage
U-Boot # nand write 0x81000000 0x280000 0x500000

U-Boot Environment

Restoring defaults

It is possible to reset the set of U-Boot environment variables to their defaults, and save them to flash by doing the following:

U-Boot # env default -f
U-Boot # saveenv

NOTE: If you do not issue a saveenv the changes will only exist until reset. This can be useful for testing.

Networking Environment

The default behavior of U-Boot is to utilize all information that a DHCP server passes to us when the user issues the dhcp command. This will include the dhcp parameter next-server which indicates where to fetch files from via TFTP. There may be times however where the dhcp server on your network provides incorrect information and you are unable to modify the server. In this case the following steps can be helpful:

U-Boot # setenv autoload no
U-Boot # dhcp
U-Boot # setenv serverip correct.server.ip
U-Boot # tftp

Another alternative is to utilize the full syntax of the tftp command:

U-Boot # setenv autoload no
U-Boot # dhcp
U-Boot # tftp ${loadaddr} server.ip:fileName

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值