AM1808固件烧写方法
目标:往AM1808内烧写ubl、uboot、uImage、lierdafs
烧写完成之后,ubl和uboot从SPIflash加载,内核和文件系统从nand加载
准备条件:ubl.bin(使用TI原始固件)
uboot.bin(此固件为修改后的固件,支持nand烧写,产生方法如下:)修改uboot源码包中的include/configs/da850evm.h文件
#define CONFIG_USE_SPIFLASH
#undefCONFIG_USE_NAND
#undefCONFIG_SYS_USE_NOR 改为:
#undef CONFIG_USE_SPIFLASH
#define CONFIG_USE_NAND
#undefCONFIG_SYS_USE_NOR
重新编译得到。
uImage(使用TI原始的)
lierdafs(使用arago制作好的文件文件系统改名为lierdafs方便下载用) 在一台电脑上(192.168.14.71)建立一个tftp服务器,把uImage和lierdafs文件复制到此tftp目录下。把AM1808板的网线接到路由器上,电脑也接到路由器上(注意:路由器的dhcp分配从192.168.14.100到192.168.14.200)。
1.把ubl.bin和uboot.bin放在\\OMAP-L138\\OMAP-L138\\GNU目录下。
2.跳线设置AM1808从uart2启动。
3.修改erase.bat和flash.bat文件中的COM端口号,默认为COM10。
4.点击erase.bat 擦除spiflash。
5.点击flash.bat将把ubl.bin和uboot.bin烧写到spiflash.
6.跳线设置AM1808从spi0启动,重启将进入uboot界面。
7.设置mac地址:
U-Boot> setenv ethaddr 00:ff:ff:ff:ff:00
8.使用dhcp获取一个ip地址
U-Boot>dhcp
9.设置服务器ip地址
U-Boot>setenv serverip 192.168.14.71
10.获取uImage存放到mDDR的0xc0700000地址,并烧写到nand中的0x200000地址中大小为0x220000(我们的uImage大于2M,所以这里设的大点)
U-Boot> tftp 0xc0700000 uImage
U-Boot> nand erase 0x200000 0x300000
U-Boot> nand write.e 0xc0700000 0x200000 0x300000
11.获取文件系统lierdafs存放到mDDR的0xc1180000地址中,并烧写到nand的0x420000
地址中,文件系统大小为8M:
U-Boot> tftp 0xc1180000 lierdafs
U-Boot> nand erase 0x500000 0x800000
U-Boot> nand write.e 0xc1180000 0x500000 0x800000
12.设置uboot环境变量:
U-Boot> setenv bootcmd \'nand read.e 0xc1180000 0x500000 0x800000; nboot.e 0xc0700000 0 0x200000; bootm\'
U-Boot> setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,8M ip=dhcp eth=${ethaddr} U-Boot> setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,8M ip=off eth=${ethaddr}
13.保存uboot环境变量:
U-Boot>saveenv
14.重启,稍等片刻即可登入linux系统,用户名root密码为空