Hi Manuel, Manuel Sahm <[EMAIL PROTECTED]> writes:
> I took the U-Boot version 1.3.2; now I am able to generate the make env > -> fw_printenv utility. > > I copy the jw_printenv binary and rename it to fw_setenv. A (hard) link would be enough. > I use the config file in the /etc directory. > I want to access a NAND flash. [Pagesize = 0x800; ERASEBLOCKSIZE=0x20000] > My uboot is in mtd1. > mtd1 is from 0x20000 ... 0x100000 in my NAND-Flash > The Uboot enviroment is from 0x60000...0x80000; the redundant from > 0x80000...0x100000 > > My fw_config file is: > > /dev/mtd1 0x40000 0x20000 0x20000 > /dev/mtd1 0x60000 0x20000 0x20000 > > Is this correct ? Looks OK to me. > I am able tu use fw_printenv, the variables are printed on the console > If I use fw_setenv I get errors: > > fw_setenv test 1 > > Unlocking Flash > Done > nand_write: attempting to write not page aligned data > Erasing old enviroment > Done > Writing enviroment to /dev/mtd1: Invalid argument > Error: can´t write fw_env to flash > > What´s wrong ???? I think the problem is that the fw_setenv so far only supports NOR flash. Environment in NAND is implemented slightly different, especially it doesn't (and can't) invalidate the former valid environment after the updated one was written successfully. So I'm afraid you will have to update this tool to support NAND. Best regards Markus Klotzbuecher -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users