【问题标题】:use fw_printenv for get U-boot's env使用 fw_printenv 获取 U-boot 的环境
【发布时间】:2011-06-02 18:57:28
【问题描述】:

我想使用 fw_printenv 来获取 U-boot 的环境。

$cat /proc/mtd

mtd0: 00060000 00004000 "bootloader"
mtd1: 00200000 00004000 "kernel"
mtd2: 03c00000 00004000 "root"

$vi /etc/fw_env.config

# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.

# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd0               0x0000          0x60000         0x4000

然后

$ fw_printenv

Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

你能告诉我怎么了吗?

非常感谢。 ^^

【问题讨论】:

    标签: linux arm bootloader busybox u-boot


    【解决方案1】:

    我明白了。

    # MTD device name       Device offset   Env. size       Flash sector size
    /dev/mtdblock0               0x40000          0x20000         0x4000
    

    【讨论】:

    • 您介意分享一下这些价值观的来源背景吗?
    猜你喜欢
    • 2020-02-20
    • 1970-01-01
    • 2021-10-19
    • 2016-08-27
    • 2021-08-30
    • 2013-12-29
    • 2019-12-07
    • 2011-07-17
    • 2019-08-03
    相关资源
    最近更新 更多