jffs2_scan_medium effor

Nicolas Pitre nico at cam.org
Thu Jun 21 14:08:51 EDT 2001


On Thu, 21 Jun 2001, Nicolas Pitre wrote:

>
>
> On Thu, 21 Jun 2001, Frederic Giasson wrote:
>
> > Because my boot monitor is straigth in the middle of my flash and I can't
> > move it for an hardware reason.
>
> Hmmm...
>
> Then what I would suggest is that you play tricks with offsets in your map
> driver so the firmware sector appears at the end and the two separate parts
> are seen as being contigous.
>
> 	if (offset >= FIRMWARE_OFFSET + FIRMWARE_SECTOR_SIZE)
> 		offset -= FIRMWARE_SECTOR_SIZE;
> 	else if (offset >= FIRMWARE_OFFSET)
> 		offset = offset - FIRMWARE_OFFSET + LAST_SECTOR_OFFSET;

Forget the above.  Rather it should be:

	if (offset >= FLASH_SIZE - SECTOR_SIZE)
		offset = offset - (FLASH_SIZE - SECTOR_SIZE) + FIRMWARE_OFFSET;
	else if (offset >= FIRMWARE_OFFSET)
		offset -= SECTOR_SIZE;


Nicolas





More information about the linux-mtd mailing list