如何在linux中访问和更改u变量。使用u引导目录中的u- boot /tools/env目录:
u-boot$ make env 它创建了可执行文件fw_printenv。我将其复制到/usr/sbin和目标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 0x00000 0x20000 0x20000target#./fw_printenv
SEGV是什么导致了这个错误?
dev: size erasesize name
mtd0: 00020000 00020000 "flash_uboot_env"
mtd1: 002e0000 00020000 "flash_linux_image"
mtd2: 00900000 00020000 "flash_jffs2"
mtd3: 00900000 00020000 "flash_data"发布于 2013-04-22 14:34:35
你的fw_env.config和我的不同。我在0x00260000-0x00280000范围内有u启动env。我记得,fw_env文件非常敏感,如果您忘记了某些列,fw_setenv将返回到某些默认值,这会导致各种奇怪的错误。
仅供参考,这是我的fw_env.config
root@linux:~# cat /etc/fw_env.config
# Dev. name offset env. size flash sector size nbr. sectors
/dev/mtd1 0x00 0x2000 0x20000 1您可以交叉编译strace并使用它进行故障排除。
https://unix.stackexchange.com/questions/73272
复制相似问题