All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Firmware Upgrade
@ 2009-09-15 10:52 Rahanesh
  2009-09-15 11:08 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Rahanesh @ 2009-09-15 10:52 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Firmware Upgrade
  2009-09-15 10:52 [U-Boot] Firmware Upgrade Rahanesh
@ 2009-09-15 11:08 ` Wolfgang Denk
  2009-09-15 13:43   ` Rahanesh
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-09-15 11:08 UTC (permalink / raw)
  To: u-boot

Dear Rahanesh,

In message <4AAF71E3.7050702@tataelxsi.co.in> 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.

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Firmware Upgrade
  2009-09-15 11:08 ` Wolfgang Denk
@ 2009-09-15 13:43   ` Rahanesh
  2009-09-15 14:00     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Rahanesh @ 2009-09-15 13:43 UTC (permalink / raw)
  To: u-boot

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




Wolfgang Denk wrote:
> Dear Rahanesh,
>
> In message <4AAF71E3.7050702@tataelxsi.co.in> 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.
>
>   
>> 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
>
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Firmware Upgrade
  2009-09-15 13:43   ` Rahanesh
@ 2009-09-15 14:00     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2009-09-15 14:00 UTC (permalink / raw)
  To: u-boot

Dear Rahanesh,

In message <4AAF9A1F.1060206@tataelxsi.co.in> you wrote:
> 
> Thank you very much for the reply!!!

You are welcome.

> Few questions:

Hm... please do not top-post / full quote. Please make sure to read
http://www.netmeister.org/news/learn2quote.html

> 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?

That's fine. A separate partition is not needed. the fw_*env tools can
be easily configured for your setup.

>    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.

> *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

-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-15 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 10:52 [U-Boot] Firmware Upgrade Rahanesh
2009-09-15 11:08 ` Wolfgang Denk
2009-09-15 13:43   ` Rahanesh
2009-09-15 14:00     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.