Hi!
I try to manipulate the u-boot env-var from linux and trying to use uboot-envtools but I cant get it to work.
I have been looking at the sourcecode config in u-boot (mx6_iwg15m_q7.h), and it gives me the offset and the env size.
#define CONFIG_ENV_SECT_SIZE | (8 * 1024) |
#define CONFIG_ENV_SIZE | CONFIG_ENV_SECT_SIZE |
#if defined(CONFIG_FSL_ENV_IN_MMC)
#define CONFIG_ENV_IS_IN_MMC | 1 | |
#define CONFIG_ENV_OFFSET | (768 * 1024) |
cat /proc/mtd gives me:
dev: | size erasesize name |
mtd0: 00010000 00008000 "bootloader"
I define my fw_env.config
/dev/mtd0 | 0xc0000 0x2000 0x2000 |
When i try to read the env. variables i get a crc error.
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
I cant understand why it does not work :smileysad:
Any tip are welcome!
Thanks :smileyhappy:
/Dennis
Hi Dennis,
If the environment is in SPI-NOR, the kernel needs a structure in the board file that expresses
how things are used.
This is the bit that's used on the Boundary Devices Nitrogen6x:
With it, you can use /dev/mtd0ro to read the U-Boot executable, and /dev/mtd1ro contains the U-Boot environment.
I'm not sure how/if you can re-map MMC space to an MTD device if your board is storing the environment there.
Dennis, our support engineer is waiting for your response now. Please take your time to do it. If your question had been resolved please let us know. We will close the discssion if no response in 3 days.
Thanks,
Yixing