Hi,
Here is my flash structure:
/dev/fs0
/dev/fs0p0 → IPL + basic OS image
/dev/fs0p1 → space for Photon, applications, …
How can I protect OS image partition against undesirable erase?
Is it possible to hide fs0p0 device somehow?
Regards,
Jacek
Jacek Rudnicki <jacek.rudnicki@quantum.com.pl> wrote:
Hi,
Here is my flash structure:
/dev/fs0
/dev/fs0p0 → IPL + basic OS image
/dev/fs0p1 → space for Photon, applications, …
How can I protect OS image partition against undesirable erase?
Is it possible to hide fs0p0 device somehow?
If your flash device supports block locking, you can lock the
desired area using the flashctl command, and then that area can
only be unlocked with a similar flashctl command. For example,
to lock the first megabyte of flash:
flashctl -p/dev/fs0 -l1M -L
to unlock the same area:
flashctl -p/dev/fs0 -l1M -U
–
David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com
Jacek Rudnicki <jacek.rudnicki@quantum.com.pl> wrote:
Let’s assume that my flash is a 16 MB device.
First MB is for IPL & OS image.
Is it possible to modify flash driver to see only
the rest 15 MBs?
No.
I mean the following scenario:
/dev/fs0
/dev/fs0p0 —> 15 MB partition
instead:
/dev/fs0 → 16 MB socket
/dev/fs0p0 → IPL & OS image
/dev/fs0p1 → space for Photon, applications, …
In short I would like to forget
about the 1 MB of flash memory
for example.
Jacek
news:def50s$sm6$> 1@inn.qnx.com> …
Jacek Rudnicki <> jacek.rudnicki@quantum.com.pl> > wrote:
Hi,
Here is my flash structure:
/dev/fs0
/dev/fs0p0 → IPL + basic OS image
/dev/fs0p1 → space for Photon, applications, …
How can I protect OS image partition against undesirable erase?
Is it possible to hide fs0p0 device somehow?
If your flash device supports block locking, you can lock the
desired area using the flashctl command, and then that area can
only be unlocked with a similar flashctl command. For example,
to lock the first megabyte of flash:
flashctl -p/dev/fs0 -l1M -L
to unlock the same area:
flashctl -p/dev/fs0 -l1M -U
–
David Green (> dgreen@qnx.com> )
QNX Software Systems Ltd.
http://www.qnx.com
–
David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com
Let’s assume that my flash is a 16 MB device.
First MB is for IPL & OS image.
Is it possible to modify flash driver to see only
the rest 15 MBs?
I mean the following scenario:
/dev/fs0
/dev/fs0p0 —> 15 MB partition
instead:
/dev/fs0 → 16 MB socket
/dev/fs0p0 → IPL & OS image
/dev/fs0p1 → space for Photon, applications, …
In short I would like to forget
about the 1 MB of flash memory
for example.
Jacek
U¿ytkownik “Dave Green” <dgreen@qnx.com> napisa³ w wiadomo¶ci
news:def50s$sm6$1@inn.qnx.com…
Jacek Rudnicki <> jacek.rudnicki@quantum.com.pl> > wrote:
Hi,
Here is my flash structure:
/dev/fs0
/dev/fs0p0 → IPL + basic OS image
/dev/fs0p1 → space for Photon, applications, …
How can I protect OS image partition against undesirable erase?
Is it possible to hide fs0p0 device somehow?
If your flash device supports block locking, you can lock the
desired area using the flashctl command, and then that area can
only be unlocked with a similar flashctl command. For example,
to lock the first megabyte of flash:
flashctl -p/dev/fs0 -l1M -L
to unlock the same area:
flashctl -p/dev/fs0 -l1M -U
–
David Green (> dgreen@qnx.com> )
QNX Software Systems Ltd.
http://www.qnx.com
If your flash device supports block locking, you can lock the
desired area using the flashctl command, and then that area can
only be unlocked with a similar flashctl command. For example,
to lock the first megabyte of flash:
flashctl -p/dev/fs0 -l1M -L
to unlock the same area:
flashctl -p/dev/fs0 -l1M -U
What is about devices which do not support block locking?
Is there any universal solution here?
Jacek Rudnicki wrote:
If your flash device supports block locking, you can lock the
desired area using the flashctl command, and then that area can
only be unlocked with a similar flashctl command. For example,
to lock the first megabyte of flash:
flashctl -p/dev/fs0 -l1M -L
to unlock the same area:
flashctl -p/dev/fs0 -l1M -U
What is about devices which do not support block locking?
Is there any universal solution here?
Seems to me the most univeral and effective method would be to
disconnect the WE pin on the flash part. Or even better - wire a switch
to that line actuated with a transitor (GPIO or something similar
connected to the base/gate).
–
Cheers,
Adam
With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster
Jacek Rudnicki wrote:
Hi,
Here is my flash structure:
/dev/fs0
/dev/fs0p0 → IPL + basic OS image
/dev/fs0p1 → space for Photon, applications, …
How can I protect OS image partition against undesirable erase?
Is it possible to hide fs0p0 device somehow?
Regards,
Jacek
Hello Jacek,
we have the same problem, and we have solved it by locking the flash
blocks physically. We have a utility to do that:
http://www.ibv-augsburg.net/en/products/utl-flash.htm
That works
Regards
Lutz
Dave Green wrote:
Jacek Rudnicki <> jacek.rudnicki@quantum.com.pl> > wrote:
Let’s assume that my flash is a 16 MB device.
First MB is for IPL & OS image.
Is it possible to modify flash driver to see only
the rest 15 MBs?
No.
I think It shouldbe possible if you change the sources of your devf-…
driver.
Lutz