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
Have the same problem now with congatec i.mx6 board.
fw_printenv is failing to read u-boot environment variables area with Bad crc error.
I cannot find a file named mx6_iwg15m_q7.h in the U-Boot source that is shipped with the MX6 BSP. Can you share with us where this file is located.
Best regards,
-Mahesh
I found out that its only the nor-flash that are exposed through in the board configuration. How can i expose the nand-flash as a MTD device?
Thanks for any tip...
Dennis, please respond our engineer's question. We will close the DI if no response in 3 days.
Thanks,
Yixing