深秋的落叶
ARM && Linux kernel

/**************************************************************************
 * s3c2440 uboot 环境变量表:从开发板启动。
 * sdram start address:0x30000000
 * transmitting protocol: tftp
 * storage medium: nand flash(32M x 2)
 * boot loader start address: 0
 * size of allocated space for boot loader: 0x40000B = 0x40000>>0xa = 0x100K
 * kernel start address: 0x60000 = 0x180K
 * allocated size for kernel: 0x200000-0x60000 = 0x1a0000>>0xa = 0x680K
 * file system start address: 260000
 * allocated size for file system: 0x3d9c000-0x260000
 * ***********************************************************************/
utu-bootloader=>>>printenv
install-bootloader=tftp 30000000 u-boot.bin;nand erase 0 40000;nand write 30000000 0 0
install-kernel=tftp 30000000 uImage;nand erase 60000 200000;nand write.i 30000000 60000 0
install-filesystem=tftp 30000000 filesystem.yaffs;nand erase 260000 3d9c000;nand write.yaffs1 30000000 260000 0 erase-env=nand erase 40000 20000
bootcmd=nand read.i 0x32000000 0x60000 0x200000; bootm
bootdelay=1
baudrate=115200   //baudrate is set to 115200bps
ethaddr=00:0c:20:02:0a:5b //mac address: it must not be same as this
netmask=255.255.255.0
ipaddr=192.168.0.168  //ip in board, you can change ip for your network
serverip=192.168.0.64  //ip for pc, it must be associated to your pc's ip
bootargs=root=/dev/mtdblock2 rw console=ttySAC0,115200  //boot arguments
stdin=serial
stdout=serial
stderr=serial

Environment size: 592/131068 bytes

/*          注:以下大多以uboot为例说明                                   */

/***************************************************************************
 * 如果要从nfs启动开发板,则需把文件系统解压到PC机的任意目录下,并且连接好
 * 开发板与pc机的网络(可用“ping <开发板IP>”来测试是否连接正常,如不正常,
 * 则要检查:
 * (1)网线是否完好,网口是否亮(不亮也可能是LED灯故障);
 * (2)你的pc机的IP和开发板的IP是否在同一个网段,如是否都在192.168.1段);
 * (3)开发板uboot环境变量serverip是否设置为pc机IP相同(设置方法for uboot:
 *      setenv serverip <pc-ip>, eg: setenv serverip 192.168.1.168,设置完,
        不要忘记saveenv保存入flash,并reset重启开板)
 * (4)setenv设置完环境变量后,是否reset
 * (5)如果还不行,重新run install-bootloader烧写bootloader吧;
 * (6)如果还不行,换个uboot试试,或者用vivi
 * (7)如果还不行,拿你的板子去别人的机子上试试,再不行,你把你的板子放火
 *      上烧3天,扔茅厕中,再夯进半块砖得了;费力
 *
 * 如果网络是通的,则可设置uboot的环境变量为(注意是单行的,如果用记事本输
 * 入,记得要去掉记事本的“自动换行”功能(方法自己找)):
 **************************************************************************/
(1)使用utu-bootloader:
setenv bootargs 'console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.65:/data/s3c2440_recover ip=192.168.0.168:192.168.0.1:192.168.0.1:255.255.255.0:www.yctek.com:eth0:off'
/* nfsroot对应你pc机的IP和你解压的文件系统的路径,请酌情修改
 * ip指定你的开发板的IP、网关、DNS、掩码,(shamefaced)我也不知道是否真这样?
 * 高手请赐教!但是只要你改对了IP和掩码,基本就没有问题了。
 * 掩码后面应该是域名了,这个是扬创的域名
 * 再往后的eth0为什么为off?不懂,but, it do work well!
 **************************************************************************/
(2)使用vivi:
param set linux_cmd_line "console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.65:/data/s3c2440_recover ip=192.168.0.168:192.168.0.1:192.168.0.1:255.255.255.0:www.yctek.com:eth0:off'
/* 大致相同,除了命令之外,用不负责任的态度说:不细说了!!!^v^
 **************************************************************************/

/**************************************************************************
 * 可以说,在开发板启动和从nfs启动的两种方式中,至关重要的是引导参数的设置:
 * uboot为bootargs环境变量,vivi为linux_cmd_line,设置好这两个环境变量,如果
 * 不出意外,启动就可以自如切换了。
 *
 * 声明:如所述有不妥之处,还望指点!不胜感激
 *************************************************************************/

posted on 2009-11-18 15:17  刘伟_luvi  阅读(1764)  评论(0编辑  收藏  举报