本帖最后由 zhangmangui 于 2014-12-7 20:59 编辑
TI davinci DM6467通过串口0将UBL和u-boot写入NAND flash
TI的davinci系列一般支持好几种启动模式,如下图TMS320DM6467的datasheet可以查到所有的BOOTMODE
LVS301和LW9226的开发板上有一个选择bootmode的拨码开关
下面以LVS301为例,讲解如何通过通过串口0将UBL和u-boot写入NAND flash:
1. 断电,调整拨码开关SW501,设置为UART0 Boot (LVS301默认的boot mode是SPI Boot);
2. 链接串口CN509;
3. 从网站www.sourceforge.net下载flash utility软件(该软件在UART0 Boot mode烧写NAND flash);
4. 打开命令行工具,进入目录DM646x_FlashAndBootUtils_1_50DM646x_FlashAndBootUtils_1_50DM646xGNU;
5. 运行sfh_DM646x.exe;
windows
sfh_DM646x -nandflash -p COM1 ubl/ubl_DM646x_nand.bin uboot.bin
linux
mono sft_DM646x -nandflash -p /dev/ttyUSB0 ubl/ubl_DM646x_nand.bin uboot.bin
6. 上电,立即进入下载模式,开始烧写NAND flash;
7. 下载完成之后,断电,重新设置拨码开关SW501为NAND flash Boot;
8. 上电重启之后,LVS301就会从NAND flash启动UBL,然后加载u-boot;
资料来自收集 供大家学习使用
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
编译UBL
* Open the UBL project in CCS by clicking 'Project->Open' in CCS and selecting the project file 'ubldavinci.pjt'
inside 'build' directory.
* By default, the UBL build is configured for DM6467 @ 594MHz. To build UBL for DM6467T (alpha EVM), open
file 'ublconfig.cfg' present inside 'build' directory and uncomment the line "#-d UBL_CONFIG_1GHZ" by removing '#' at the
beginning of the line. Save the file and build the project by clicking 'F7' key in CCS. Assuming UBL project is selected
in project window, this will build UBL 'out' file and copy it to tools/util/Image directory.
* Open "Command Prompt(命令行)" and navigate to directory 'tools/util'
* Type 'makeublrom.bat' and press 'ENTER' which will create 'ublDaVinci.bin'
下载UBL
1 Change SW3 to UART boot mode (BM [0-3]:0001).
2 Using CCS, File->Load->nand_flash_writer.out and run (F5)
3 In the dialog box; enter the path of the UBL binary.(必须保证UBL文件在c盘下,路径最好没有中文字符)
4 In the dialog box asking for offset, enter 1
5 Specify 'y' for global erase
6 Wait until the flash writer completes writing ubl is written to NAND.
下载uboot
1 Change SW3 to UART boot mode (BM [0-3]:0001).
2 Using CCS, File->Load->nand_flash_writer.out and run (F5)
3 In the dialog box; enter the path of the u-boot.bin file.(必须保证U-boot文件在c盘下,路径最好没有中文字符)
4 In the dialog box asking for offset, enter 6
5 Specify 'n' for global erase
6 Specify 81080000 for the Application Entry Point
7 Specify 81080000 for the Application Load Address
8 Wait until the flash writer completes writing u-boot to NAND.
jffs2 启动环境变量配置
setenv bootargs 'mem=76M console=ttyS0,115200n8 root=/dev/mtdblock3 noinitrd rootfstype=jffs2 rw ip=off vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0'
配置tftp
setenv ipaddr 192.168.1.105
setenv serverip 192.168.1.101
使用tftp将uImage从server放到内存中
tftp 80000000 uImage
擦除nand flash
nand erase 0x160000 0x4000000
写flash
nand write 0x80000000 0x160000 0x200000
使用tftp将数据从server放到内存中
tftp 80000000 jffs2_16.img
擦除nand flash
nand erase 0x560000 0x7900000
写flash
nand write 0x80000000 0x560000 0x1000000
一周热门 更多>