Skip to contentSkip to conversation

Boot failure after erasing a file in flash

DISCUSSION Rahanesh 1 participant 1 message Sep 14, 2009 Memory technology devices (MTD)

lore
Share & tools
lore

Rahanesh

author
#0 lore raw

Hi All,

I have four mtd partitions on the board.
Size of mtd1 is 7.18MB.

So when i create JFFS i give pad as 7.18MB , which will pad zeros to make the jffs size to 7.18MB if the jffs size is less than 7.18MB. hope my understanding is correct?

mkfs --pad=0x730000 --root=/input_dir --eraseblock=0x10000 --output=jffs

U boot uses Linux image (/Linux/uImage) from jffs and boots up and mounts the mtd1 partition to the ramdisk. So i have entire mtd1 partition mounted as flash directory in ramdisk(root file system of Linux).

These are the console messages when u-boot brings up Linux...

*Hit any key to stop autoboot:  0
### JFFS2 loading '/Linux/uImage' to 0x80800000 Scanning JFFS2 FS:............................ done. ### JFFS2 load complete: 2432748 bytes loaded to 0x80800000 ## Booting image at 80800000 ...

  Image Name:   Linux Kernel Image with ramdisk.
  Created:      2009-09-13  17:49:39 UTC
  Image Type:   MIPS Linux Kernel Image (gzip compressed)
  Data Size:    2432684 Bytes =  2.3 MB

Load Address: 80100000
Entry Point: 804ba000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK*

Once the jffs is mounted as flash directory and If i do a rm -rf to a file inside flash directory and then reboot

it shows following error while uboot trying to bring Linux

*Hit any key to stop autoboot:  0
### JFFS2 loading '/Linux/uImage' to 0x80800000
Scanning JFFS2 FS: . ............................ get_fl_mem: can't alloc -560169186 bytes
off = 0xad2f7b28 magic 0x1985 type 0x49c6 node.totlen = -560169186*

Any idea?

If i create the JFFS without pading , then there is no such isssue..

Please help on this!!!!!!!!!!

Thanks
Rahanesh