uboot 设置启动参数

配置uboot并运行Linux(tftp 和NFS 服务的使用)

在开发调试中建议使用tftp服务下载内核和NFS启动文件系统,这样方便调试

1)配置板子的 IP 地址:

> setenv ipaddr 192.168.2.44

 

2) 配置板子的 Linux 服务器地址:

> setenv serverip 192.168.2.202

 

3) 配置启动参数,设置为从 NFS 文件系统启动

setenv bootargs mem=128M console=ttyS0 115200 \

root=/dev/nfs rw nfsroot=192.168.1.10:/home/rootnfs \

ip=192.168.1.11:192.168.1.10:192.168.1.1:255.255.255.0::eth0:off

 

4)从 Linux 服务器通过tftp 服务下载内核到SDRAM(设置自启动内核)

setenv bootcmd tftp 72000000 uImage \;bootm 0x72000000

 

5)保存 u-boot 配置

> saveenv

 

其它:从NandFlash启动jffs2,并挂载文件系统

setenv bootargs mem=128M console=ttyS0 115200 root=/dev/mtdblock1 rw rootfstype=jffs2

setenv bootcmd nand read 72000000 a0000 200000\;bootm 0x72000000

 

cramfs文件系统启动
setenv bootargs mem=128M console=ttyS0 115200 root=/dev/mtdblock1 rw rootfstype=cramfs




一   内核分区

static struct mtd_partition mini2440_default_nand_part[] __initdata = {
    [0] = {
        .name    = "u-boot",
        .size    = SZ_256K + SZ_128K,
        .offset    = 0,
    },
    [1] = {
        .name    = "u-boot-env",
        .size    = SZ_128K,
        .offset    = SZ_256K + SZ_128K,
    },
    [2] = {
        .name    = "kernel",
        /* 5 megabytes, for a kernel with no modules
         * or a uImage with a ramdisk attached */
        .size    = 0x00500000,
        .offset    = SZ_512K,
    },
    [3] = {
        .name    = "root",
        .offset    = SZ_512K + 0x00500000,
        .size    = MTDPART_SIZ_FULL,
    },
};


二. 

bootdelay=1
baudrate=115200
ethaddr=08:08:11:18:12:27
 stdin=serial
stdout=serial
stderr=serial
ethact=dm9000
filesize=283CA40
fileaddr=30008000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.25
serverip=192.168.1.88
bootargs=noinitrd root=/dev/mtdblock3 rootfstype=yaffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M
bootcmd=nand read 30008000 80000 500000;bootm 30008000








  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值