Firmware Upgrade
Hi All,
Is it Possible from Linux to set an environment variable of u-Boot.?
This is for Firmware up gradation.
Currently Linux has 4 mtd partitions in flash
mtd0 : U-Boot
mtd1: JFFS file system (Golden image)
mtd2: JFFS file system (Silver image)
mtd3: Configs
U boot does an fsload of uImage(Linux image) from Golden JFFS and boots up Linux.
Now from Linux I can download a new JFFS(Silver) and flash it to mtd2 partition of Flash.
Is there any mechanism that Linux acknowledges the u-boot about the new jffs image that next time it has to
do an fsload of uImage(Linux image) from Silver JFFS , not Golden JFFS.
I thought of Doing this using some environment variables .
But after a successful download of new jffs and writing to mtd2 partition , How will Linux update the environment variable of U-boot?
Any better idea for firmware up gradation?
Expecting your Suggestions and Help
Thanks
Rahanesh
Dear Rahanesh,
Quoted 2 lines · In message <[email protected]> you wrote:
Is it Possible from Linux to set an environment variable of u-Boot.?
If your environment is stored in NOR or NAND flash, then you can use the tools from the tools/env/ directory (fw_setenv / fw_printenv).
It should be trivial to adapt the code for other storage devices, too.
Quoted 2 lines
But after a successful download of new jffs and writing to mtd2 partition , How will Linux update the environment variable of U-boot?
Use fw_setenv.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
Hi Wolfgang Denk,
Thank you very much for the reply!!!
Few questions:
1) You said " If your environment is stored in NOR or NAND flash, then
you can use
the tools from the tools/env/ directory (fw_setenv / fw_printenv)."
*It is already stored in NOR Flash. This is not in a separate partition. Should it be in a separate partition?
Currently uboot.bin and environment variable are in mtd1 partition. Any problem? Should i create another partition for environment variables alone?
*2) I have downloaded these tools from* http://packages.debian.org/unstable/main/uboot-envtools *. I am not able to make it. I need to cross compile this for MIPS. Can u suggest me an url where i can get the stable and compilable src code.
Thanks
Rahanesh
Quoted 32 lines · Wolfgang Denk
Dear Rahanesh,
Quoted 2 lines · In message <[email protected]> you wrote:
Is it Possible from Linux to set an environment variable of u-Boot.?
If your environment is stored in NOR or NAND flash, then you can use the tools from the
tools/env/directory (fw_setenv/fw_printenv).It should be trivial to adapt the code for other storage devices, too.
Quoted 3 lines
But after a successful download of new jffs and writing to mtd2 partition , How will Linux update the environment variable of U-boot?
Use
fw_setenv.Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
Dear Rahanesh,
Quoted 2 lines · In message <[email protected]> you wrote:
Thank you very much for the reply!!!
You are welcome.
Quoted 1 line
Few questions:
Hm... please do not top-post / full quote. Please make sure to read
http://www.netmeister.org/news/learn2quote.html
Quoted 7 lines
1) You said " If your environment is stored in NOR or NAND flash, then
you can usethe tools from the
tools/env/directory (fw_setenv/fw_printenv)."*It is already stored in NOR Flash. This is not in a separate partition.
Should it be in a separate partition?
That's fine. A separate partition is not needed. the fw_*env tools can be easily configured for your setup.
Quoted 2 lines
Currently uboot.bin and environment variable are in mtd1 partition. Any
problem? Should i create another partition for environment variables alone?
No changes are necessary.
Quoted 4 lines
*2) I have downloaded these tools from*
http://packages.debian.org/unstable/main/uboot-envtools *. I am not able to make it. I need to cross compile this for MIPS. Can u suggest me an url where i can get the stable and compilable src code.
The tools come as part of the U-Boot source code. Please see
http://www.denx.de/wiki/U-Boot/SourceCode for details.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I'm a soldier, not a diplomat. I can only tell the truth. -- Kirk, "Errand of Mercy", stardate 3198.9