For example, 1. I only want to let end user to flash normal part [0-384k), and don't let him touch fallback part [384k, 512k). 2. or I only want to update the payload image in the beginning, [0,64k).
Regards
Yinghai Lu -----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:09 收件人: YhLu 抄送: LinuxBIOS 主题: Re: flash_rom start and size
On Tue, 2004-04-20 at 20:06, YhLu wrote:
Ollie or David,
Can you modify the flash_rom to take start and size command line?
I mean
Flash_rom -start=0k -size=384k xxxx.rom
And xxxx.rom only to be 384k.
Why do you want to do this ? You should prepare the image the same size as your flash chip.
There are techinical difficulty doing this. Most flash parts are block/sector erase and byte program. There is no general way to start from an abitrary address to any size.
Ollie
Regards
YH
On Wed, 2004-04-21 at 10:40, YhLu wrote:
For example,
- I only want to let end user to flash normal part [0-384k), and don't let
him touch fallback part [384k, 512k).
there is no way you can really lock the flash.
- or I only want to update the payload image in the beginning, [0,64k).
you need some kind of flash translation layer to accomplish this. You need to back up some part of the erase block you want reserve , erase the block and write with updated and reserved data.
You probably need MTD.
Ollie
Regards
Yinghai Lu -----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:09 收件人: YhLu 抄送: LinuxBIOS 主题: Re: flash_rom start and size
On Tue, 2004-04-20 at 20:06, YhLu wrote:
Ollie or David,
Can you modify the flash_rom to take start and size command line?
I mean
Flash_rom -start=0k -size=384k xxxx.rom
And xxxx.rom only to be 384k.
Why do you want to do this ? You should prepare the image the same size as your flash chip.
There are techinical difficulty doing this. Most flash parts are block/sector erase and byte program. There is no general way to start from an abitrary address to any size.
Ollie
Regards
YH
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Wed, Apr 21, 2004 at 10:49:02AM -0600, Li-Ta Lo wrote:
On Wed, 2004-04-21 at 10:40, YhLu wrote:
- or I only want to update the payload image in the beginning, [0,64k).
you need some kind of flash translation layer to accomplish this. You need to back up some part of the erase block you want reserve , erase the block and write with updated and reserved data.
If the start and end positions are not aligned to block boundaries then flash_rom should just return an error.
It would be nice to be able to update a payload without having to burn the whole flash. (Rewriting the whole flash risks the possibility of an incomplete write which could leave the machine unbootable.) Of course, if the user wishes to do this then it should be the responsibility of the user to know the flash part and what boundaries to align the payloads.
-Kevin