public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Setting strataflash lock bit accidentally
@ 2006-07-21 10:19 llandre
  2006-07-21 11:02 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: llandre @ 2006-07-21 10:19 UTC (permalink / raw)
  To: u-boot

Let's assume that, because a software bug, an application has 
accidentally set the lock bit of the flash sector used to store the 
U-Boot environment. In this case, when trying to store a new environment 
with the saveenv command, U-Boot would not be able to complete the 
operation. Is it enough to define CFG_FLASH_PROTECTION in order to 
handle this situation and to allow U-Boot to unlock the sector (same 
thing would happen in case the locked sectors fall in the memrory area 
devoted to store kernels or ramsisks)? If no, how do you suggest to 
manage this situation?



TIA,
llandre

DAVE Electronics System House - R&D Department
web:   http://www.dave-tech.it
email: r&d2 at dave-tech.it

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

* [U-Boot-Users] Setting strataflash lock bit accidentally
  2006-07-21 10:19 [U-Boot-Users] Setting strataflash lock bit accidentally llandre
@ 2006-07-21 11:02 ` Wolfgang Denk
  2006-07-21 11:22   ` llandre
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2006-07-21 11:02 UTC (permalink / raw)
  To: u-boot

In message <44C0AA44.5050400@dave-tech.it> you wrote:
> Let's assume that, because a software bug, an application has 
> accidentally set the lock bit of the flash sector used to store the 
> U-Boot environment. In this case, when trying to store a new environment 
> with the saveenv command, U-Boot would not be able to complete the 
> operation. Is it enough to define CFG_FLASH_PROTECTION in order to 
> handle this situation and to allow U-Boot to unlock the sector (same 
> thing would happen in case the locked sectors fall in the memrory area 
> devoted to store kernels or ramsisks)? If no, how do you suggest to 
> manage this situation?

Use MTD tools under Linux to unlock the flash?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
place to shift.

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

* [U-Boot-Users] Setting strataflash lock bit accidentally
  2006-07-21 11:02 ` Wolfgang Denk
@ 2006-07-21 11:22   ` llandre
  2006-07-21 11:45     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: llandre @ 2006-07-21 11:22 UTC (permalink / raw)
  To: u-boot

>> Let's assume that, because a software bug, an application has 
>> accidentally set the lock bit of the flash sector used to store the 
>> U-Boot environment. In this case, when trying to store a new environment 
>> with the saveenv command, U-Boot would not be able to complete the 
>> operation. Is it enough to define CFG_FLASH_PROTECTION in order to 
>> handle this situation and to allow U-Boot to unlock the sector (same 
>> thing would happen in case the locked sectors fall in the memrory area 
>> devoted to store kernels or ramsisks)? If no, how do you suggest to 
>> manage this situation?
> 
> Use MTD tools under Linux to unlock the flash?

Indeed this is a possible solution but I'm looking for a general one 
implemented in u-boot. In fact it must work with any operating system 
and I must assume o.s. might not provide MTD or similar tools.


-- 
llandre

DAVE Electronics System House - R&D Department
web:   http://www.dave-tech.it
email: r&d2 at dave-tech.it

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

* [U-Boot-Users] Setting strataflash lock bit accidentally
  2006-07-21 11:22   ` llandre
@ 2006-07-21 11:45     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-07-21 11:45 UTC (permalink / raw)
  To: u-boot

In message <44C0B8EC.8090405@dave-tech.it> you wrote:
>
> > Use MTD tools under Linux to unlock the flash?
> 
> Indeed this is a possible solution but I'm looking for a general one 
> implemented in u-boot. In fact it must work with any operating system 
> and I must assume o.s. might not provide MTD or similar tools.

It is easy to postulate  requirements.  But  seriously,  if  you  are
careless  enough  to  use  flash chips which can change modes or even
lose data by just writing random data to  sequential  addresses  then
you  must  also  accept  the  consequences.  Either  provide adequate
recovery mechanisms in Linux or your OS of choice or in U-Boot.

I have to admit that I fail to understand what exactly  your  problem
is:  if  you  want  to use the hardware protection features in U-Boot
(including the unlocking of locked sectors)  then  just  enable  this
feature in U-Boot.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nobody goes to that restaurant anymore. It's too crowded.

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

end of thread, other threads:[~2006-07-21 11:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-21 10:19 [U-Boot-Users] Setting strataflash lock bit accidentally llandre
2006-07-21 11:02 ` Wolfgang Denk
2006-07-21 11:22   ` llandre
2006-07-21 11:45     ` Wolfgang Denk

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