fw_printenv

root@ubuntu:/home/work/Hi3516A_SDK_V1.0.5.0/package/osdrv/opensource/uboot/u-boot-2010.06/tools/env# arm-hisiv300-linux-gcc -Wall -DUSE_HOSTCC -I/home/chengchenglu/work/Hi3516A_SDK_V1.0.5.0/package/osdrv/opensource/uboot/u-boot-2010.06/include crc32.c  fw_env.c  fw_env_main.c -o fw_printenv
In file included from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-abi.h:23:0,
                 from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-user.h:26,
                 from fw_env.c:43:
/home/chengchenglu/work/Hi3516A_SDK_V1.0.5.0/package/osdrv/opensource/uboot/u-boot-2010.06/include/linux/types.h:154:36: error: conflicting types for ‘uintmax_t’
 typedef u_int32_t                  uintmax_t;
                                    ^
In file included from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/include/stdint.h:9:0,
                 from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-user.h:23,
                 from fw_env.c:43:
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/stdint.h:143:32: note: previous declaration of ‘uintmax_t’ was here
 typedef unsigned long long int uintmax_t;
                                ^
In file included from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-abi.h:23:0,
                 from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-user.h:26,
                 from fw_env.c:43:
/home/chengchenglu/work/Hi3516A_SDK_V1.0.5.0/package/osdrv/opensource/uboot/u-boot-2010.06/include/linux/types.h:155:36: error: conflicting types for ‘intmax_t’
 typedef int32_t                    intmax_t;
                                    ^
In file included from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/include/stdint.h:9:0,
                 from /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/mtd/mtd-user.h:23,
                 from fw_env.c:43:
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include/stdint.h:141:24: note: previous declaration of ‘intmax_t’ was here
 typedef long long int  intmax_t;
                        ^

 

cat fw_env.config 

# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name    Device offset    Env. size    Flash sector size    Number of sectors
/dev/mtd1        0x0000        0x4000        0x4000
/dev/mtd2        0x0000        0x4000        0x4000

# NAND example
#/dev/mtd0        0x4000        0x4000        0x20000            2

 

 

/etc # fw_setenv name chad
End of range reached, aborting
Error: can't write fw_env to flash

/etc # fw_setenv name lv
MTD erase error on /dev/mtd0: Invalid argument
Error: can't write fw_env to flash

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值