Re: [U-Boot] Problems with fw_printenv
Op 3-3-2010 21:21, Wolfgang Denk schreef: > Dear Ronald Kortekaas, > > In message you > wrote: > >> The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining >> this it works. >> > Do you understand the consequewnces of removing this definition? Are > you sure you really want to do this? > > Best regards, > > Wolfgang Denk > > I think I found the solution. I changed my configuration als follows: Removed the #undef CONFIG_ENV_ADDR_REDUND Added #define CONFIG_ENV_OFFSET_REDUND(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUNDCONFIG_ENV_SIZE Changed my mtdparts to: #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),128k(ubootenv_re),4096k(kernel)" So mtd in u-boot showd: device nor0 , # parts = 3 #: namesizeoffset mask_flags 0: uboot 0x0004 0x 1 1: ubootenv0x0002 0x0004 0 2: ubootenv0x0002 0x0006 0 3: kernel 0x0040 0x0008 0 I changed fw_env.h to #define HAVE_REDUND. And the fw_env.config: /dev/mtd20x0x20x2 /dev/mtd30x0x20x2 So now it's working with the redundant environment partitions. Thanks for your support ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problems with fw_printenv
Op 3-3-2010 21:21, Wolfgang Denk schreef: > Dear Ronald Kortekaas, > > In message you > wrote: > >> The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining >> this it works. >> > Do you understand the consequewnces of removing this definition? Are > you sure you really want to do this? > > Best regards, > > Wolfgang Denk > > No, I'm not understanding the consequences of removing this definition. I can't find a description what is does. It was a suggestion of one of the other readers of the maillist. But if I want to use the CONFIG_ENV_ADDR_REDUND. Is there a way to solve this problem? This message refers to http://lists.denx.de/pipermail/u-boot/2010-March/068204.html. Best regards, Ronald ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Problems with fw_printenv
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Problems with fw_printenv
I have some problems with the fw_printenv tool. I use the following versions of u-boot, kernel and compiler: - u-boot-2009.11.1 - linux-2.6.22 - gcc-3.4.3-glibc-2.3.2 arm-linux- The problem is that the fw_printenv complains about: "Warning: Bad CRC, using default environment". My U-boot configuration for the environment is: #define PHYS_FLASH_1 0xc000 #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_OFFSET (0x4) #define CONFIG_ENV_SECT_SIZE 0x2 /* Env sector Size */ #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define MTDIDS_DEFAULT "nor0=physmap-flash.0" #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),4096k(kernel)" Mtd in u-boot prints: device nor0 , # parts = 3 #: namesizeoffset mask_flags 0: uboot 0x0004 0x 1 1: ubootenv0x0002 0x0004 0 2: kernel 0x0040 0x0006 0 active partition: nor0,0 - (uboot) 0x0004 @ 0x defaults: mtdids : nor0=physmap-flash.0 mtdparts: mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),4096k(kernel) So my environment is located at 0xc004. My /proc/mtd is: dev:size erasesize name mtd0: 0080 0002 "NOR flash on Clever" mtd1: 0004 0002 "uboot" mtd2: 0002 0002 "ubootenv" mtd3: 0040 0002 "Kernel" My fw_env.config is: /dev/mtd2 0x 0x2 0x2 When I copy the /dev/mtd2 to a file I see the environment variables from U-Boot. This starts with "Gøwbootdelay=5" When I do a fw_setenv bootdelay 4, it says "Warning: Bad CRC, using default environment". But if I use then fw_printenv everything is fine. If I copy the contents of /dev/mtd2 to a file is starts with: "Ð U(bootcmd=bootp". So I can write the environment from linux but not read it from u-boot. If I restarts my board U-boot compains about a bad CRC (this is the expected result). So I looks like the offsets are wrong because my kernel image get damaged after saving the environment from linux. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot