AnsweredAssumed Answered

working fw_env.config for lx2160a fw_printenv

Question asked by Robert Hammond on Mar 12, 2020
Latest reply on Mar 12, 2020 by Yiping Wang

Hi , Has anyone been able to get u-boot tools fw_printenv to work successfully on LX2160ardb? If so are you using the u-boot tools source that gets shipped with flexbuilder LSDK or standard u-boot tools cross compiled to arm64?

The fw_env.config file that is in the flexbuilder source doesn't work for us. 

 

I can see the environement with hexdump :-

# hexdump -C -s 0x500000 /dev/mtd0 | head -n 5
00500000  ee 1f 12 15 42 4f 41 52  44 3d 6c 78 32 31 36 30  |....BOARD=lx2160|
00500010  61 72 64 62 00 61 72 63  68 3d 61 72 6d 00 62 61  |ardb.arch=arm.ba|
00500020  75 64 72 61 74 65 3d 31  31 35 32 30 30 00 62 6f  |udrate=115200.bo|
00500030  61 72 64 3d 6c 78 32 31  36 30 61 00 62 6f 61 72  |ard=lx2160a.boar|
00500040  64 5f 6e 61 6d 65 3d 6c  78 32 31 36 30 61 00 62  |d_name=lx2160a.b|

This is suggesting that env starts at 00500000

 

The fw_env.config that ships with flexbuilder has :-

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

 

which is completely wrong since /dev/mtd0 and /dev/mtd1 only.

the sector size according to u-boot is 128KiB 0x20000 -- 128KiB 

so our config line is 

/dev/mtd0 0x500000 0x40000 0x20000 

 

however , the usual crc checksum error is coming back.

 

If anyone can read uboot vars from Linux Userspace could you please share your configuration?

Outcomes