AM35x-OMAP35x-PSP 04.02.00.07 UserGuide 中文手册

AM35x-OMAP35x-PSP 04.02.00.07 UserGuide 中文手册


我把原文档上传了,大家可以下载原文档,方便阅读。http://download.csdn.net/detail/luhao806/4144939



   翻译:卢浩
转载请注明出处
嵌入式爱好者开发群 122879839


1 先阅读这个
  1.1 关于本手册
2 安装
   2.1 系统需求
   2.2 支持包内容
   2.3 环境安装
   2.4 选择启动模式
       2.4.1 OMAP3EVM (OMAP35x,AM /DM37x)
            2.4.1.1 用Onenand的EVM板
2.4.1.2 用镁光的nand的EVM板
2.4.2 AM3517 EVM
2.4.3 beagleboard的板子
  3 x-loader
3.1 简介
3.2 编译 x-loader
3.2.1 标记x-loader
3.2.2 ECC校验的选择
4 U-boot 
4.1 编译 U-boot
4.2 U-boot功能
4.2.1 OneNAND 支持
4.2.1.1 标记坏块
4.2.1.2 擦除 OneNAND
4.2.1.3 写入 OneNAND
4.2.1.4 OneNAND 的阅读
4.2.1.5 擦除 OneNAND
4.2.2 NAND 的支持
4.2.2.1 NAND 布局
4.2.2.2 标记坏块
4.2.2.3 查看坏块
4.2.2.4 擦除 Nand
4.2.2.5 Nand的阅读
4.2.2.6 Nand 的阅读
4.2.2.7 选择 ECC校验
4.2.3 nor的支持 (仅在 AM3517EVM)
4.2.4 MUSB 主机支持
4.3 从uboot烧写
4.3.1 OneNAND
4.3.1.1 保存环境变量
4.3.1.2 烧写x-loader
4.3.1.3 烧写u-boot
4.3.1.4 烧写 Linux 内核
4.3.1.5 烧写 JFFS2 文件系统
4.3.2 NAND
4.3.2.1 保存环境变量
   4.3.2.2 烧写x-loader
4.3.2.3 烧写uboot
4.3.2.4 烧写Linux 内核
4.3.2.5 烧写 JFFS2 文件系统
4.3.3 nor
5 linux内核
   5.1 编译内核
   5.2 为内核选择对应的nand ecc校验
   5.3 配置内核
   5.4 用正确的串口输出设备
   5.5 创建jffs2 文件系统
   5.6 启动内核
      5.6.1 从nand启动
      5.6.2 从onenand启动
      5.6.3 从mmc启动
      5.6.4 从nor启动
6 音频驱动程序
7 视频显示驱动程序
8 视频捕获驱动程序
9 USB 驱动程序
10 MMC 驱动程序
11 以太网驱动程序
12 电源管理
13 电源管理 IC
14 TI HECC CAN 控制器




















先阅读以下内容(非常重要)
  重要的变化
现在,Linux 内核中的 NAND 驱动程序使用 1 位硬件 ECC校验.。x-loader和uboot必须使用相同的ECC校验。所以,强制性的更新x-loader和uboot当使用来自这份文档中的linux 内核。文件系统也需要相应的更新。详细的信息可以看TI的用户手册。
串口控制设备从ttySn变成了ttyOn.所以在bootarg里面需要改变一下你所选择的串口设备。
通过mkfs.jffs2制作jffs2文件系统也发生了改变
利用uboot烧写jffs2到nand的步骤也发生了改变
Beagleboard的板子已经被同步到TI支持的平台上。
在linux2.6.37中,根文件系统对于挺的项 /proc/mounts 已经发生了改变,这个可能导致初始化脚本失败。举个例子,当你用nfs作为根文件系统的时候,文件系统里面的DHCP脚本可能就发生的变化。
内核输入子系统EV_VERSION已经更新到01.00.01.确定你的tilib也同步了,否则会导致错误。






关于本文档
本文档介绍了如何安装和用德州仪器平台支持包 (PSP) 作为 OMAP35x,AM /DM37x,AM3517 平台开发运行 Linux的工具。此 PSP 提供基础软件平台的开发、 部署和执行。它抽象化提供的硬件的功能。在这个开发平台上用过应用程序开发的来得到产品。


安装系统要求
硬件要求:
For AM/DM37x
OMAP3 Processor Module with AM37x ES1.2
OMAP3EVM Main Board (Rev G)
BeagleXM (Rev A1 and later)
For AM3505/ AM3517
AM3517 Processor Module with ES1.2 Si
AM3517EVM (Rev C)
AM3517 Application board (Rev C)
For OMAP35x
OMAP3 Processor Module with OMAP35x ES3.1 or later
OMAP3EVM Main Board (Rev G)
Beagle (Rev D and later)
软件要求
安装CodeSourcery ARM tool chain version 2009-q1 交叉编译器


重要信息
此版本已在以下平台上做过系统的测试
 
AM/DM37x Support : OMAP3 EVM (rev.G) and AM/DM37x Processor board with ES1.2 Si
AM3517 Support : AM3517 EVM (Rev C), Application board (Rev C) and ES1.2 Si


安装包包含的内容
$ tar -xvfz  AM35x-OMAP35x-LINUX-PSP-MM.mm.pp.bb.tgz
\---AM35x-OMAP35x-LINUX-PSP-MM.mm.pp.bb
   |    Software-manifest.html
   +----docs
   |    |----DataSheet-MM.mm.pp.bb.pdf
   |    |----ReleaseNotes-MM.mm.pp.bb.pdf
   |    |----am3517
   |    |    `----UserGuide-MM.mm.pp.bb.pdf
   |    |----omap3530
   |    |    `----UserGuide-MM.mm.pp.bb.pdf
   +----host-tools
   |    |----linux
   |    |    `----signGP
   |    |----src
   |    |    `----signGP.c
   +----images
   |    |----boot-strap
   |    |    |----am3517
   |    |    |    `----x-load.bin.ift
   |    |    |----omap3530
   |    |    |    `----x-load.bin.ift
   |    |    |----beagle
   |    |    |    `----x-load.bin.ift
   |    |----kernel
   |    |    |----am3517
   |    |    |    `----uImage
   |    |    |----omap3530
   |    |    |    `----uImage
   |    |    |----beagle
   |    |    |    `----uImage
   |    |----u-boot
   |    |    |----am3517
   |    |    |    `----u-boot.bin
   |    |    |----omap3530
   |    |    |    `----u-boot.bin
   |    |    |----beagle
   |    |    |    `----uImage
   +----scripts
   |    |----am3517
   |    |    |----Readme.txt
   |    |    |----initenv-micron.txt
   |    |    `----reflash-micron.txt
   |    |----omap3530
   |    |    |----Readme.txt
   |    |    |----initenv-micron.txt
   |    |    `----reflash-micron.txt
   |    |    |----initenv-samsung.txt
   |    |    `----reflash-samsung.txt
   +----src
        |----boot-strap
        |    |----ChangeLog-MM.mm.pp.bb
        |    |----ShortLog
        |    |----Unified-patch-MM.mm.pp.bb.gz
        |    |----diffstat-MM.mm.pp.bb
        |    |----x-loader-patches-MM.mm.pp.bb.tar.gz
        |    `----x-loader-MM.mm.pp.bb.tar.gz
        |----examples
        |    |----examples.tar.gz
        |----kernel
        |    |----Readme.txt
        |    |----ChangeLog-MM.mm.pp.bb
        |    |----ShortLog
        |    |----Unified-patch-MM.mm.pp.bb.gz
        |    |----diffstat-MM.mm.pp.bb
        |    |----kernel-patches-MM.mm.pp.bb.tar.gz
        |    `----linux-MM.mm.pp.bb.tar.gz
        |----u-boot
             |----Readme.txt
             |----ChangeLog-MM.mm.pp.bb
             |----ShortLog
             |----Unified-patch-MM.mm.pp.bb.gz
             |----diffstat-MM.mm.pp.bb
             |----u-boot-patches-MM.mm.pp.bb.tar.gz
             `----u-boot-MM.mm.pp.bb.tar.gz




环境变量设置
1.交叉编译环境的设置
 $ export PATH=/opt/toolchain/2009-q1/bin:$PATH  
2.uImage制作小插件的环境设置
 $ export PATH=/opt/u-boot/tools:$PATH 


注意:实际的设置采决于你实际路径的设置




设置启动模式
 OMAP3EVM (OMAP35x, AM/DM37x)
SW4开关是选择x-loader和uboot启动的位置,注意:nand和onenand的拨码开关的选择不一样。
用三星onenand EVM板的设置
从onenand启动,用以下任何一个设置:


 


从mmc启动(只有用三星onenand的EVM板),用以下任何一个选择:
 




用镁光nand的EVM板


从nand启动,用以下任何一个设置
 
从mmc启动(用镁光nand的EVM板),用以下任何一种方式启动:
 


SW4-6, SW4-7 和SW4-8 随便怎么设置,这些在上面显示为灰色


AM3517EVM
SW7开关是选择x-loader和uboot启动的位置,注意:nand和onenand的拨码开关的选择不一样 
从nand启动,用以下的设置
 
从mmc启动。用以下的设置
 
Beagle/ BeagleXM
比格犬板通过默认系统启动是在 NAND 的引导模式下,通过用户按钮"S1"选择启动模式,从 MMC 启动模式。按 S1 按钮并保持按下并松开时按住重置按钮 S2 。BeagleXM,只有 MMC 启动模式,支持的情况下只连接到 GPIO4,并不会引导模式选择器的功能。




x-loader
X-loader 是可执行文件boot loader,她是通过rom下载到ram执行,它对于初始化外部存储器非常重要,然后从你(nand,sd等)下载uboot。
X-loader支持从nand,mmc/sd和onenand启动。




编译x-loader 
1.进入x-loader的目录
$ cd ./x-load 
2.清除以前的配置
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean 
3.选择对应的板子的配置
For OMAP3EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3evm_config
For AM3517EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517evm_config
For Beagle/ BeagleXM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3beagle_config


4.启动生成x-loader
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm 
如果成功了,x-loader.bin文件将会出现在你的当前目录


标记可执行文件x-loader
在当前目录下执行
$ signGP x-load.bin 
然后会生成xloader.bin.ift。这是我们后面需要用的文件。


选择ECC校验模式
X-loader支持以下ECC校验,需要选择一下当你编译的时候
(4位硬件校验,8位硬件校验,1位软件校验)
你必须执行undefine ECC_HW_ENABLE 




1. Edit the file include/configs/<board_config>.h 
    Change from: 
    #define ECC_HW_ENABLE
    Change to:
    #undef ECC_HW_ENABLE




1-bit hardware ECC:
Leave ECC_HW_ENABLE defined.
This is the default scheme. To build this scheme: 


$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm




4-bit BCH hardware ECC:
First, undefine ECC_HW_ENABLE as described above.
To build this scheme: 


$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm PLATFORM_RELFLAGS+='-DFOUR_BIT_ERROR_CORRECT'




8-bit BCH hardware ECC:
First, undefine ECC_HW_ENABLE as described above.
To build this scheme: 


$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm PLATFORM_RELFLAGS+='-DEIGHT_BIT_ERROR_CORRECT'




1-bit software ECC:
First, undefine ECC_HW_ENABLE as described above.
To build this scheme: 


$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm PLATFORM_RELFLAGS+='-DONE_BIT_ERROR_CORRECT'
U-boot
1.进入uboot目录
$ cd ./u-boot 
2.清除以前的配置
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean 
3.选择对应的板子的uboot配
For OMAP3EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_evm_config
For AM3517EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517_evm_config
For Beagle/ BeagleXM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_beagle_config


4.启动生成uboot
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm 
如果成功,当前目录会出现u-boot.bin文件






U-boot的功能


请看这个链接http://www.denx.de/wiki/view/DULG/UBoot


Onenand的支持
只有老一些的版本的OMAP3EVM板才支持三星的Onenand,默认的uboot配置是支持镁光的nand的,所有如果你想支持Onenand,那么你需要使能支持Onenand在配置文件里面。


标记一个坏块
OMAP3_EVM # onenand markbad <offset>
举个例子,标记块32,(假设块大小事128bytes)作为坏块,offset = blocknum * 128 * 1024: 
OMAP3_EVM # onenand markbad 0x400000
擦除Onenand
OMAP3_EVM # onenand erase <stoffaddr> <endoffaddr>
举个例子
OMAP3_EVM # onenand erase 0x00400000 0x00440000
 0x00400000 是开始地址,0x00440000是长度。


对于坏块的处理,请参考我写过的两篇文章:
http://page.renren.com/601018081/note/805836121
http://page.renren.com/601018081/note/805841762


向Onenand写信息
OMAP3_EVM # onenand write <addr> <offset> <len>
打个比方
OMAP3_EVM # onenand write 0x80000000 0x400000 0x40000


从Onenand读信息
OMAP3_EVM # onenand read <addr> <offset> <len>
打个比方
OMAP3_EVM # onenand read 0x80000000 0x400000 0x40000


把Onenand全部置1.
参考我上面的连接




Nand的支持


镁光和华力士的nand可以被支持


 +------------+-->0x00000000-> X-loader start
 |            |
 |            |-->0x0007FFFF-> X-loader end  
 |            |-->0x00080000-> U-Boot start
 |            |
 |            |-->0x001BFFFF-> U-Boot end  
 |            |-->0x001C0000-> ENV start
 |            |
 |            |
 |            |-->0x0027FFFF-> ENV end
 |            |-->0x00280000-> Linux Kernel start
 |            |
 |            |
 |            |
 |            |
 |            |-->0x0077FFFF-> Linux Kernel end
 |            |-->0x00780000-> Filesystem start
 |            |
 |            |
 |            |
 |            |
 |            |
 |            |
 |            |
 |            |
 +------------+-->0x10000000-> Filesystem end




标记一个坏块
OMAP3_EVM # nand markbad <offset>
举个例子
OMAP3_EVM # nand markbad 0x400000
看你的标记的坏块
OMAP3_EVM # nand bad


擦除nand
OMAP3_EVM # nand erase <stoffaddr> <len>
OMAP3_EVM # nand erase 0x00400000 0x40000


向nand写信息
OMAP3_EVM # nand read <addr> <offset> <len>
举个例子
OMAP3_EVM # nand read 0x80000000 0x400000 0x40000


选择ECC校验
# nandecc [ hw <hw_type> | sw | bch4_sw | bch8_sw ] 


Usage: 


   sw           - Set software ECC for NAND
   hw <hw_type> - Set hardware ECC for NAND
                  <hw_type> - 1 for Kernel/FileSystem ECC layout
                              2 for X-loader/U-boot ECC layout
   bch4_sw      - Set 4-bit BCH ECC for NAND
   bch8_sw      - Set 8-bit BCH ECC for NAND


  (hw 1 is set as the default nandecc)




NOR Support (Only on AM3517EVM)
请看这个连接


http://processors.wiki.ti.com/index.php/AM35x-NOR-Flash-Support-ApplicationNote


MUSB Host Support
Uboot支持usb下载


初始化USB子系统
OMAP3_EVM # usb start
找到空闲的USB设备
OMAP3_EVM # usb tree
查看MSC设备的文件系统信息
OMAP3_EVM # fatinfo usb D:P




这个命令可以查看MSC设备分区的文件系统的信息


从MSC下载文件
OMAP3_EVM # fatload usb D:P <addr>ADDR> <file-name>
这个命令会阅读置顶的MSC上的文件并且会写到指定的地址上
烧写uboot
Onenand
保存环境变量
打个比方,设置boorargs的变量
OMAP3_EVM # setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2'
OMAP3_EVM # saveenv


烧写x-loader
烧写MLO(x-load.bin.ift )
OMAP3_EVM # mw.b 0x80000000 0xFF 0x100000
OMAP3_EVM # tftp 0x80000000 MLO
OMAP3_EVM # onenand erase 0x0 0x50000
OMAP3_EVM # onenand write 0x80000000 0x0 0x50000


烧写uboot
烧写支持Onenand的uboot
OMAP3_EVM # mw.b 0x80000000 0xFF 0x100000
OMAP3_EVM # tftp 0x80000000 u-boot.bin
OMAP3_EVM # onenand erase 0x80000 0x1C0000
OMAP3_EVM # onenand write 0x80000000 0x80000 0x1C0000


烧写linux内核(Onenand)
OMAP3_EVM # mw.b 0x80000000 0xFF 0x100000
OMAP3_EVM # tftp 0x80000000 uImage
OMAP3_EVM # onenand erase 0x280000 <kernel image size in HEX>
OMAP3_EVM # onenand write 0x80000000 0x280000 <kernel image size in HEX>


烧写jffs2文件系统(onenand)
OMAP3_EVM # mw.b 0x80000000 0xFF <file system size>
OMAP3_EVM # tftp 0x80000000 <file system image>
OMAP3_EVM # onenand erase 0x780000 <file system size in HEX>
OMAP3_EVM # onenand write 0x80000000 0x780000 <file system size in HEX>




Nand


保存环境变量
默认的ecc校验是1位软件校验,我们直接用默认的设置就行了
OMAP3_EVM # nandecc hw 1
OMAP3_EVM # setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2'
OMAP3_EVM # saveenv


烧写x-loader(nand)
烧写MLO(x-loader.bin.ift)
OMAP3_EVM # tftp 0x80000000 MLO
OMAP3_EVM # nand erase 0x0 0x50000
OMAP3_EVM # nandecc hw 2
OMAP3_EVM # nand write 0x80000000 0x0 0x50000




烧写uboot(nand)
OMAP3_EVM # tftp 0x80000000 u-boot.bin
OMAP3_EVM # nand erase 0x80000 0x1C0000
OMAP3_EVM # nandecc hw 2
OMAP3_EVM # nand write 0x80000000 0x80000 0x1C0000


烧写linux内核(nand)
OMAP3_EVM # tftp 0x80000000 uImage
OMAP3_EVM # nand erase 0x280000 <kernel image size in HEX>
OMAP3_EVM # nandecc hw 1
OMAP3_EVM # nand write 0x80000000 0x280000 <kernel image size in HEX>


烧写jffs2文件系统
OMAP3_EVM # mw.b 0x80000000 0xFF <file system size in HEX>
OMAP3_EVM # tftp 0x80000000 <file system image>
OMAP3_EVM # nand erase 0x780000 <file system size in HEX >
OMAP3_EVM # nandecc hw 1
OMAP3_EVM # nand write 0x80000000 0x780000 <file system size in HEX>


注意,这个nand是2KB对齐,打个比方,你的镜像大小是0x19B8004 ,实际操作的时候就得考虑到2KB对齐,所以需要用0x19B8800 ,保证2KB对齐


Nor的支持看这个
http://processors.wiki.ti.com/index.php/AM35x-NOR-Flash-Support-ApplicationNote




Linux内核,本文介绍了内核的配置




编译内核
1.进入内核在的目录
$ cd ./kernel 
2.清除以前的配置
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean 
3.选择对应的板子的配置
For OMAP3EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_evm_defconfig
For AM3517EVM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517_evm_defconfig
For Beagle/ BeagleXM:
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_beagle_defconfig


4.启动生成
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage 


内核的镜像将会生成在arch/arm/boot 目录下面


注意:要生成uImage,一定要设置要mkimage工具的路径




选择内核的nandecc校验


默认的配置是1位ecc软件校验


以下是改变默认配置的文件
arch/arm/mach-omap2/board-flash.c
drivers/mtd/nand/omap2.c
Replace the macro "OMAP_ECC_HAMMING_CODE_HW" with either "OMAP_ECC_BCH4_CODE_HW" or "OMAP_ECC_BCH8_CODE_HW" based on ECC requirement








配置内核
 


用以下命令配置你的内核
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig 


选择正确的串口控制台设备


Change the definition of console in bootargs
from
console=ttyS0,115200n8
to
console=ttyO0,115200n8
Change the definition of terminal in /etc/inittab of the target filesystem
from
S:2345:respawn:/sbin/getty 115200 ttyS0
to
S:2345:respawn:/sbin/getty 115200 ttyO0




看好是大写字母O


做一个jffs2文件系统


这个可以参考下我的一篇关于制作jffs2文件系统的文章
http://blog.csdn.net/luhao806/article/details/7341580






启动linux内核


从nand启动
首先选择nand启动的模式,以下是kernel image and filesystem 都从nand启动的配置
$ nand read.i 0x80000000 280000 500000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp'
$ bootm 0x80000000


以下是内核从nand启动,文件系统从nfs启动的配置
$ nand read.i 0x80000000 280000 500000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.168.1.1:/mnt/nfs,nolock ip=dhcp'
$ bootm 0x80000000


以下是从tftp启动的配置
$ setenv autoload no
$ dhcp
$ setenv serverip <Server IP Address>
$ tftp 0x80000000 uImage
$ tftp 0x82000000 ramdisk.gz
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 root=/dev/ram0 initrd=0x82000000,40M ramdisk_size=32768 ip=dhcp'
$ bootm 0x80000000




从Onenand启动
Boot from OneNAND
Select the boot mode as defined in section Selecting boot mode. Power on EVM and wait for u-boot to come up.
When kernel image and filesystem are flashed on the OneNAND device:
$ onenand read 0x80000000 0x280000 0x0220000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp'
$ bootm 0x80000000


When kernel image is flashed on the NAND/OneNAND device, and NFS mounted filesystem is being used:
$ onenand read 0x80000000 0x280000 0x0220000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.168.1.1:/mnt/nfs,nolock ip=dhcp'
$ bootm 0x80000000


When kernel image and ramdisk image are fetched from a tftp server:
$ setenv autoload no
$ dhcp
$ setenv serverip <Server IP Address>
$ tftp 0x80000000 uImage
$ tftp 0x82000000 ramdisk.gz
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 root=/dev/ram0 initrd=0x82000000,40M ramdisk_size=32768 ip=dhcp'
$ bootm 0x80000000


Please note that steps for NAND boot mode are applicable to all platforms, where NAND Flash is supported. Please make sure to use right console number, e.g. in case of AM3517EVM, we use ttyO2, so please change ttyO0 => ttyO2.






从MMC启动
以下是kernel image and filesystem (ramdisk) 都在MMC的配置
$ mmc init
$ fatload mmc 0 0x80000000 uImage
$ fatload mmc 0 0x82000000 ramdisk.gz
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 root=/dev/ram0 initrd=0x82000000,40M ramdisk_size=32768 ip=dhcp'
$ bootm 0x80000000




以下是内核在MMC。文件系统在nfs的配置
$ mmc init
$ fatload mmc 0 0x80000000 uImage
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd rw  root=/dev/nfs nfsroot=192.168.1.1:/mnt/nfs,nolock ip=dhcp'
$ bootm 0x80000000


以下是内核在MMC。文件系统在nand的配置
$ mmc init
$ fatload mmc 0 0x80000000 uImage
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp'
$ bootm 0x80000000


Boot from NOR
Configure the EVM in XIP boot mode as mentioned in the "Selecting boot mode" section above, power on the EVM and wait for u-boot to come up.
When kernel image and filesystem (ramdisk) are available on the MMC card:
$ cp.b 0x80000000 0x08100000 0x400000
$ cp.b 0x82000000 0x08500000 0x2000000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 root=/dev/ram0 initrd=0x82000000,40M ramdisk_size=32768 ip=dhcp'
$ bootm 0x80000000


When kernel image is available on the MMC card and NFS mounted filesystem is being used:
$ cp.b 0x80000000 0x08100000 0x400000
$ cp.b 0x82000000 0x08500000 0x2000000
$ setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd rw  root=/dev/nfs nfsroot=192.168.1.1:/mnt/nfs,nolock ip=dhcp'
$ bootm 0x80000000


Note
Once the Linux kernel boots, login as "root". No password is required.




Important
In the latest kernel (2.6.37) the entry corresponding to the root filesystem appearing in /proc/mounts has changed. Unless updated, the init scripts in the filesystem that use this entry to determine the device on which root filesystem is mounted will fail.
For example, the script /etc/udhcpc.d/50default doesn't send DHCP request if the root filesystem is network mounted. Although, the filesystem is successfully mounted, boot process my stall after showing errors from udhcpc.
The issue is fixed by updating the function root_is_nfs() as shown below:
Original code:
 root_is_nfs() {
       grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
 }


Updated code:
 root_is_nfs() {
       grep -qe 'nfs\|smbfs\|ncp\|coda.*' /proc/mounts
 }


When using an existing filesystem, review the init scripts to locate similar instances and make appropriate changes.




以下参考TI的WIKI
Audio Driver
Audio Driver UserGuide
Video Display Driver
Display Driver UserGuide
Video Capture Driver
OMAP35x, AM/DM37x Video Capture Driver UserGuide
AM3517 Capture Driver UserGuide
USB Driver
USB Driver UserGuide
MMC Driver
MMC Driver UserGuide
Ethernet Driver
Ethernet Driver UserGuide
Power Management
OMAP35x/DM37x Power Management UserGuide
AM35x Power Management UserGuide
Power Management IC
Power Management IC UserGuide
TI HECC CAN Controller
TI HECC CAN Controller

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值