public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] How can I save env values to NAND FLASH
@ 2003-11-27 23:41 최광일
  2003-11-27 23:57 ` [U-Boot-Users] " Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: 최광일 @ 2003-11-27 23:41 UTC (permalink / raw)
  To: u-boot

Dear All

Das U-Boot uses NOR FLASH for saving environment values 

for example IPADDR,GATEWAY and so on.

I have a board with only NAND FLASH (SAMSUNG NAND FLASH 64M) without NOR FLASH

and when I entered saveenv command to save environment values to NAND FLASH in U-Boot

Some message returned and my values are not saved into NAND 


======= Message ================ 
SMDK2410 # saveenv 

Saving Environment to Flash... 
Un-Protected 1 sectors Erasing Flash...Erasing sector 18 ... ok. 
Erased 1 sectors Writing to Flash... Flash not Erased Protected 1 sectors 
===== End of Message ===========

How Can I save environment values to NAND FLASH?

Best regards

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [U-Boot-Users] U-Boot code checksum?
@ 2003-11-25 15:43 Wolfgang Denk
  2003-11-27  3:12 ` [U-Boot-Users] How can I save env values to NAND FLASH 최광일
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2003-11-25 15:43 UTC (permalink / raw)
  To: u-boot

In message <B64365CEC50FA74DB2B72D3F7A5D4C7D10AD30@EPEXCH02.qlogic.org> you wrote:
> 
> Does the U-Boot code generate and check a
> checksum or CRC on itself?  I see code to verify

No.

> CRC checksums on images that U-Boot loads into
> memory, but I do not see any code that checks the
> U-Boot image itself.

I'm not sure what you mean with "image" here. If you build  a  U-Boot
image (meaning using the "mkimage" tool to create an image out of the
"u-boot.bin" file) this _will_ have checksums included and checked.

The U-Boot code as stored in flash does compute or check a checksum.

> If there is a function that checks the U-Boot CRC or
> checksum, could someone point it out to me?

You can use the CRC command to compute a checksum, and  store  it  at
location  of  your choice. Note however that with many board configu-
rations this will  not  work  (especially  with  those  that  use  an
embedded environment).

> We burn the U-Boot code into a boot PROM and I need
> some way of verifying the boot PROM was burned correctly
> when the system powers up.  I've written checksum generation
> and verification utilities in the past but would
> prefer to use the utilities that come with U-Boot if
> they exist.

You can use the existing CRC32 code in U-Boot for such a purpose, but
be aware that you have a chicken-and-egg problem here. If you  assume
that  the U-Boot image in the PROM is corrupted but still running god
enough that you can do _anything_ with it - what  makes  you  believe
that  it  will  calculate  a  valid  checksum  then?  If the image is
corrupted, it might be exactly the part of the  code  that  does  the
checksum verification...

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Why waste negative entropy on comments, when you could use the  same
entropy to create bugs instead?"                        - Steve Elias

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

end of thread, other threads:[~2003-11-27 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-27 23:41 [U-Boot-Users] How can I save env values to NAND FLASH 최광일
2003-11-27 23:57 ` [U-Boot-Users] " Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-11-25 15:43 [U-Boot-Users] U-Boot code checksum? Wolfgang Denk
2003-11-27  3:12 ` [U-Boot-Users] How can I save env values to NAND FLASH 최광일

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox