我在尝试在uBoot中保存环境变量时遇到问题并让它们在重新启动后保持不变,请参阅下面的跟踪。这是U-Boot 2009.08-00000-g19b0e8d-dirty(2012年5月29日 - 16:09:40)。关于什么可能是错的任何想法? “写入Flash ... Flash not Erased”消息是否显着?
-> setenv ipaddr 10.1.10.28 -> saveenv Saving Environment to Flash... . done Un-Protected 1 sectors . done Un-Protected 1 sectors Erasing Flash... . done Erased 1 sectors Writing to Flash... Flash not Erased . done Protected 1 sectors . done Protected 1 sectors -> printenv bootdelay=1 baudrate=115200 serverip=10.1.10.40 loadaddr=41000000 u-boot=q4/u-boot.bin load=tftp ${loadaddr) ${u-boot} upd=run load; run prog bootargs=console=ttyMCF2,115200 panic=10 rootpath=/tftpboot/ltib nfsargs=setenv bootargs ${bootargs} root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off nfs=run nfsargs; tftp q4/uImage-nfs; bootm prog=prot off 0 3ffff;era 0 3ffff;cp.b ${loadaddr} 0 ${filesize};save ext_wp_off=mw.b 10010020 e0 1 ethact=FEC0 ethaddr=3c:98:bf:00:00:14 eth1addr=3c:98:bf:00:00:15 nfsaddr=10.1.10.40 httpPort=81 hostname= stdin=serial stdout=serial stderr=serial mem=65024k ipaddr=10.1.10.28 Environment size: 686/32763 bytes -> reset U-Boot 2009.08-00000-g19b0e8d-dirty (May 29 2012 - 16:09:40) (c) 2012. CPU: Freescale MCF53013 (Mask:73 Version:1) CPU CLK 240 MHz BUS CLK 80 MHz Board: RevB I2C: ready DRAM: 64 MB FLASH: 32 MB In: serial Out: serial Err: serial Net: FEC0, FEC1 -> printenv bootdelay=1 baudrate=115200 serverip=10.1.10.40 loadaddr=41000000 u-boot=q4/u-boot.bin load=tftp ${loadaddr) ${u-boot} upd=run load; run prog bootargs=console=ttyMCF2,115200 panic=10 rootpath=/tftpboot/ltib nfsargs=setenv bootargs ${bootargs} root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off nfs=run nfsargs; tftp q4/uImage-nfs; bootm prog=prot off 0 3ffff;era 0 3ffff;cp.b ${loadaddr} 0 ${filesize};save ext_wp_off=mw.b 10010020 e0 1 ethact=FEC0 ethaddr=3c:98:bf:00:00:14 eth1addr=3c:98:bf:00:00:15 nfsaddr=10.1.10.40 httpPort=81 hostname= stdin=serial stdout=serial stderr=serial mem=65024k Environment size: 668/32763 bytes ->
flinfo输出是:
-> flinfo Bank # 1: CFI conformant FLASH (16 x 16) Size: 32 MB in 262 Sectors AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E Erase timeout: 8192 ms, write timeout: 1 ms Buffer write timeout: 5 ms, buffer size: 64 bytes Sector Start Addresses: 00000000 RO 00008000 RO 00010000 RO 00018000 RO 00020000 RO 00040000 00060000 00080000 000A0000 000C0000 000E0000 00100000 00120000 00140000 00160000 00180000 001A0000 001C0000 001E0000 00200000 00220000 00240000 00260000 00280000 002A0000 002C0000 002E0000 00300000 00320000 00340000 00360000 00380000 003A0000 003C0000 003E0000 00400000 00420000 00440000 00460000 00480000 004A0000 004C0000 004E0000 00500000 00520000 00540000 00560000 00580000 005A0000 005C0000 005E0000 00600000 00620000 00640000 00660000 00680000 006A0000 006C0000 006E0000 00700000 00720000 00740000 00760000 00780000 007A0000 007C0000 007E0000 00800000 00820000 00840000 00860000 00880000 008A0000 008C0000 008E0000 00900000 00920000 00940000 00960000 00980000 009A0000 009C0000 009E0000 00A00000 00A20000 00A40000 00A60000 00A80000 00AA0000 00AC0000 00AE0000 00B00000 00B20000 00B40000 00B60000 00B80000 00BA0000 00BC0000 00BE0000 00C00000 00C20000 00C40000 00C60000 00C80000 00CA0000 00CC0000 00CE0000 00D00000 00D20000 00D40000 00D60000 00D80000 00DA0000 00DC0000 00DE0000 00E00000 00E20000 00E40000 00E60000 00E80000 00EA0000 00EC0000 00EE0000 00F00000 00F20000 00F40000 00F60000 00F80000 00FA0000 00FC0000 00FE0000 01000000 01020000 01040000 01060000 01080000 010A0000 010C0000 010E0000 01100000 01120000 01140000 01160000 01180000 011A0000 011C0000 011E0000 01200000 01220000 01240000 01260000 01280000 012A0000 012C0000 012E0000 01300000 01320000 01340000 01360000 01380000 013A0000 013C0000 013E0000 01400000 01420000 01440000 01460000 01480000 014A0000 014C0000 014E0000 01500000 01520000 01540000 01560000 01580000 015A0000 015C0000 015E0000 01600000 01620000 01640000 01660000 01680000 016A0000 016C0000 016E0000 01700000 01720000 01740000 01760000 01780000 017A0000 017C0000 017E0000 01800000 01820000 01840000 01860000 01880000 018A0000 018C0000 018E0000 01900000 01920000 01940000 01960000 01980000 019A0000 019C0000 019E0000 01A00000 01A20000 01A40000 01A60000 01A80000 01AA0000 01AC0000 01AE0000 01B00000 01B20000 01B40000 01B60000 01B80000 01BA0000 01BC0000 01BE0000 01C00000 01C20000 01C40000 01C60000 01C80000 01CA0000 01CC0000 01CE0000 01D00000 01D20000 01D40000 01D60000 01D80000 01DA0000 01DC0000 01DE0000 01E00000 01E20000 01E40000 01E60000 01E80000 01EA0000 01EC0000 01EE0000 01F00000 01F20000 01F40000 01F60000 01F80000 01FA0000 01FC0000 01FE0000 RO 01FE8000 RO 01FF0000 01FF8000
答案 0 :(得分:1)
使用“fw_setenv”更新我的U-Boot环境后,我遇到了类似的问题。
我发现在fw_setenv将其锁定在Linux之后,我的U-Boot无法解锁环境扇区。一切看起来都不错,但写作会像你的那样失败。
我能够通过使用flash_unlock从Linux解锁env扇区来解决我的问题。
答案 1 :(得分:1)
在Linux中偶尔使用fw_setenv后会发生这种情况。如果你可以启动你正在运行的Linux,执行“mtd unlock / devX”,其中X是你的u-boot环境变量所在的分区,然后启动回u-boot。你应该能够执行“Saveenv”
答案 2 :(得分:0)
我重新刷新了我的Flash,现在可以保存环境变量了。一定是腐败了吗?