没有合适的资源?快使用搜索试试~ 我知道了~
首页TI816X-PSP-U-Boot
TI 816x U-Boot EA3 In TI816x the ROM code serves as the first stage bootloader. The 2nd stage bootloader is based on U-Boot. It does the bare minimum configuration needed to boot the kernel and in the process relocates itself to DDR.
资源详情
资源评论
资源推荐

TI816x U-Boot EA3
1
TI816x U- Boot EA3
U-Boot
In TI816x the ROM code serves as the first stage bootloader. The 2nd stage bootloader is based on U-Boot
[1]
. It
does the bare minimum configuration needed to boot the kernel and in the process relocates itself to DDR.
In case of NAND/SPI boot mode, the ROM code loads the U-Boot image from the flash memory into OCMC
RAM1. In case of NOR boot mode, the ROM code passes the control to the U-Boot image in NOR memory after
some basic initialization.
Size of U-Boot (TEXT + BSS section) cannot exceed 255KB (Applicable for all modes except SD boot mode.
For details refer here
Note
To avoid over-writing U-Boot when it is executing make sure that an address greater than 0x80800000 is used when
downloading the kernel and/or filesystem images
Building U-Boot
Note
The pre-built U-Boot binaries that comes in the release package has been built for DDR2 based EVM. The binaries
MLO and u-boot.bin are meant for SD boot and u-boot.noxip.bin is for flashing to NAND. The following steps can
be skipped if you have a DDR2 based EVM and wish to use the pre-built U-Boot image for flashing to NAND or if
you want to use SD boot.
Change to the base of the U-Boot directory.
$ cd ./u-boot
Remove the intermediate files generated during build. This step is not necessary when building for the first time.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
NOTE: U-Boot can be built to boot out of NAND, NOR or SPI flash. The default behavior is to place the ENV
section of U-Boot (where the environment variables are stored) in the same media for which U-Boot was built.
If you want to build U-Boot for DDR3 based EVM make the following change in include/configs/ti8168_evm.h in
U-Boot source code:
#define CONFIG_TI816X_EVM_DDR2 ==> #undef CONFIG_TI816X_EVM_DDR2
#undef CONFIG_TI816X_EVM_DDR3 ==> #define CONFIG_TI816X_EVM_DDR3
Choose one of the following configuration for TI8168 EVM
Default target (built for NAND currently)
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config
To explicitly select NAND boot

TI816x U-Boot EA3
2
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8168_evm_config_nand
In case of NOR boot
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8168_evm_config_nor
In case of SPI boot
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8168_evm_config_spi
Now initiate the build.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
On successful compilation, the following images will be created in the current directory for all the builds. Pick the
image corresponding to the option used while building U-Boot.
u-boot.bin ===> should be used in case of NOR boot or 2nd
stage u-boot binary in case of SD boot
u-boot.noxip.bin ===> should be used in case of NAND boot
u-boot.noxip.bin.spi ===> should be used in case of SPI boot
u-boot.min.sd ===> should be used as the 1st stage u-boot
binary for SD boot
In case of SD boot a 2 stage boot sequence needs to be followed.
Boot from SD is suported right from RBL all through u-boot until Linux
kernel is loaded.
ROM boot loader for SD Boot limits the (FAT32/VFAT) file size of the
loader binary to max of 128K.
Due to this reason we adopt a 2 staged boot strategy when booting out
of SD card. In the first stage
a very minimal version of U-Boot (just enough to support SD in u-boot -
u-boot.min.sd/MLO) is booted
by the RBL from the SD media. The second stage then boots the actual
u-boot binary (u-boot.bin from SD card)
that has extended support for other peripherals like NAND/NOR/SPI/I2C
etc.
We need to build two images for SD boot: MLO and u-boot.bin
First Stage
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_min_sd
Now initiate the build.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
Rename the file u-boot.min.sd as MLO.
For 2nd stage of SD boot, configure the build using one of the following commands:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config

TI816x U-Boot EA3
3
or
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8168_evm_config_nand
or
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8168_evm_config_sd
Now initiate the build
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
u-boot.bin generated at this stage is used later on along with MLO (1st stage image). The section on U-Boot SD
support gives more information about using the 2 images that are generated for SD boot.
Flashing U-Boot using CCS
You could flash u-boot onto NAND (for NAND boot) or to NOR (NOR Boot).
Refer to Flashing to NAND Flash using CCS wiki page for instructions on how to flash the pre-built U-Boot binary
(or the recompiled one) with the help of the NAND flash writer.
Refer to Flashing to NOR Flash using CCS wiki page for instructions on how to flash the pre-built U-Boot binary (or
the recompiled one) with the help of the NOR flash writer.
Refer to Flashing to SPI Flash using CCS wiki page for instructions on how to flash the pre-built U-Boot binary (or
the recompiled one) with the help of the SPI flash writer.
Booting U-Boot
After you have flashed the U-Boot image, connect a serial cable from the serial port of the EVM (there are two serial
ports on the EVM, use the one which is next to the MMC/SD slot) to the COM port on either the Windows machine
or Linux host depending on where you'll be running the serial terminal software.
Configure the serial terminal software with the following settings:
* Baud rate: 115,200
* Data bits: 8
* Parity: None
* Stop bits: 1
* Flow control: None
* Transmit delay: 0 msec/char, 100 msec/line

TI816x U-Boot EA3
4
EVM Switch Settings
The picture below captures the boot mode configuration switch SW3 on the TI8168 EVM. NOTE : The bootmode
setting in this picture is for NAND boot.
Make sure that the EVM boot switch settings are set to either the NAND / NOR / SPI boot mode and then power on
the board. You should see the U-Boot prompt (TI8168_EVM#) come up on the serial terminal (assuming u-boot was
already flashed using CCS JTAG flashing tool).
• For NAND boot mode
SW3---->BTM[4:0] ==> 10010 (other pins should be 0 i.e. OFF)
SW4---->NAND ON
Daughter Card SW1---->SW1[3:0] ==> 0000 (all off)
• For NOR boot mode
SW3---->CS0BW (i.e pin 8) 1 (should be ON)
SW3---->BTM[4:0] ==> 10000
SW4---->NAND OFF
Daughter Card SW1---->SW1[3:0] ==> 0001
• For SPI boot mode
SW3---->BTM[4:0] ==> 10110 (other pins should be 0 i.e. OFF)
SW4---->SPI ON
• For SD boot mode
SW3---BTM[4:0] ==> 10111 (other pins should be 0 i.e. OFF)
SW4---(as appropriate depending on where the ENV variables need to be
stored - SPI/NAND/NOR)

TI816x U-Boot EA3
5
U-Boot Network configuration
In order to download the Linux kernel image from the TFTP server and for mounting NFS you need to configure the
network settings in U-Boot. Note that the following commands are being run from the U-Boot prompt on the serial
console.
TI8168_EVM# setenv autoload no
TI8168_EVM# setenv bootfile uImage
The above two commands configure U-Boot not to autoboot the kernel and then set the name of the kernel image to
be downloaded over the network. Once you have flashed the kernel image (described later on) you can set the
autoload option to 'yes' in order to have U-Boot automatically boot the kernel image.
U-Boot currently does not read the MAC address from the eFuses as not all the devices have the associated eFuse
bits blow. However it is recommneded that the registers are checked once before a random MAC address is used. To
do this follow the steps below:
TI8168_EVM# md 4e000630
This will give a dump of a few registers.
TI8168_EVM#md 4e000630
4e000630: 00003476 12336764 00000000 00000000 DD.DDDDDDDDDDDDD
4e000640: 00000004 00000000 00000000 00000000 ................
The above dump indicates a valid MAC address (64:67:33:12:76:34) which can be used in the next step. Please note
the order of bytes and how they are to be used for the valid MAC address. If the dump indicates junk values as
shown below then you can use any random MAC address (00:08:65:23:22:19)
4e000630: 44004444 44444444 44444444 44444444 DD.DDDDDDDDDDDDD
4e000640: 00000004 00000000 00000000 00000000 ................
Now set the MAC address using the following commands
TI8168_EVM# set ethaddr <value determined in the last step>
In case you don't have a static ip, you can run the dhcp command to obtain the ip address from the DHCP server on
the network to which the EVM is connected.
TI8168_EVM# setenv serverip <tftp server in your network>
TI8168_EVM# netmask 255.255.255.0
TI8168_EVM# dhcp
TI8168_EVM# save
In case you want to use a static ip run the following commands
TI8168_EVM# setenv ipaddr <your static ip>
TI8168_EVM# save
This completes the network configuration in U-Boot. Since we are saving the settings to NAND you won't have to
repeat the above steps the next time unless you want to make some changes.
剩余23页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0