Carl-Daniel,
thanks for bringing this up.
* Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net [080107 10:40]:
The bootblock will always be the last member of the lar. We also try to fill the lar from the bottom up. That means unless the lar is completely full, we will walk an empty are in 16 byte increments. Since we know the location of the boot block (top of flash) and we also know we never have to lookup or load the bootblock during LB execution, there should be an easy way to specify "from here to the beginning of the bootblock there will be no file" which is equivalent to "stop searching here". The "no file till bootblock" functionality can be implemented in three ways:
- Explicit "stop searching here" marker or lar member.
- Explicit lar member covering the free space.
- List free space somehere in flash.
Two of these ways fail in practice: 3. Listing free space in flash means erasing and/or rewriting that list everytime the lar changes. The only reasonable place for such a list would be the bootblock and we don't want to touch it during partial reflash.
- Explicit free space covering lar member is fine, but to add any new
file to the archive, you have to erase the part covered by the exlusive space.
I don't think this is such a bit problem. Lar could remove this entry automatically, and recreate it. This is not more special code in lar than 1. But I start thinking that those two are pretty much the same in the end.
What about a linked list in the header? Each file could explicitly point to the next file. If the pointer is 0 or -1, we stop.
This way we would not lock out the "bootblock" file in our lar search.