本文共 2849 字,大约阅读时间需要 9 分钟。
U-Boot SD(Secured Digital card) Support
This section gives an overview of the SD(Secured Digital Card) support in U-Boot
l Overview
SD (Secured Digital Card) support isavailable through HSMMC controller.
SD support is available by default in allU-Boot configs. SD card can be access in all other boot modes (NAND/SPI/NOR).
l Read and execute application from SD card
List files on a FAT32 formated SD card
TI8168_EVM# mmc rescan 0
TI8168_EVM# fatls mmc 0
l Booting kernel image from the SD card
TI8168_EVM# mmc rescan 0
TI8168_EVM# fatload mmc 0 0x81000000 uImage
TI8168_EVM# bootm 0x81000000
l Booting application (ex.u-boot.bin)image from the SD card
TI8168_EVM# mmc rescan 0
TI8168_EVM# fatload mmc 0 0x81000000 u-boot.bin
TI8168_EVM# go 0x81000000
Note: For the PSP_04.00.00.12and older release use the following mmc commands
$mmc rescan 0 must be replaced with$mmc init
$fatload mmc 0 <addr><file> must be replaced with $fatload mmc 1 <addr> <file>
l Setting Up Boot Environment onSD Card
This section describes steps to be followedto create a standalone power-on bootable system on SD card.
l Prerequisites Ensure thatfollowing is available:
• A Linux hostwith fdisk, sfdisk, mkfs.ext3 and mkfs.vfat utilities is available
• Copy images MLO, u-boot.bin, uImage, nfs.tar.gz and mksd-ti816x.sh from release package to a directory onthis Linux machine. For subsequent description, we will assume these files arecopied to /home/ti816x. Please refer Package Contents section in DM816x User Guide for location of these files.
• Empty SDcard (at least 256MB, preferably 4GB SDHC)
• A SD memorycard reader/programmer to copy files from Linux Host
Note: The SD Boot has some specificrestriction about the format of the 1st partition and copying the MLO image.Soit is recommended that the supplied script mksd-ti816x.sh is used for creatingpartitions and copying files.
l Steps
• Connect the SD memory card using Memory Card reader to the LinuxHost
• Note the name allotted for this device. We assume the device isnamed as "/dev/sdb"
• Navigate to the /home/ti816x directory where all the mentionedfiles are copied
• Ensure that the script mksd-ti816x.sh has executable permissions
• This scripts expects arguments in the following format
./mksd-ti816x.sh<sd-device-name> <sd-1st-stage-bootloader> <kernel-uImage><tar-gzipped-filesystem-directory>
• Note that the user will require root/sudo permissions
• In our example, we run the following command
sudo ./mksd-ti816x.sh/dev/sdb MLO u-boot.bin uImage nfs.tar.gz
• You will be asked about data getting overwritten, confirm it andthe files along with filesystem will be copied to SD card
• Note that this script will create two primary partitions:
• 1st partition is formatted as FAT32 containingMLO, u-boot.bin, uImage files
• 2nd partition is formatted as ext3where the filesystem is extracted in root
转载地址:http://nvici.baihongyu.com/