<P>
&nbsp; <BR>
Hi,<BR>
<BR>
&nbsp; I am using versatile PB FPGA by ARM, and i am trying to make one partition on flash (NOR intel 64Mb) for jffs2 file system.<BR>
<BR>
I am trying to do(partitioning n making of jffs2) that by using a file versatile.c which is kept in drivers/mtd/maps/ directory.<BR>
<BR>
see the partitioning below as per the file,<BR>
<BR>
<BR>
#define WINDOW_ADDR 0x34000000<BR>
#define WINDOW_SIZE 0x04000000<BR>
#define BUSWIDTH&nbsp; &nbsp; 1<BR>
<BR>
<BR>
static struct mtd_info *mymtd;<BR>
<BR>
<BR>
struct map_info physmap_map = {<BR>
&nbsp; &nbsp; &nbsp; &nbsp; .name = &quot;versatile_flash&quot;,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; .size = WINDOW_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; .phys = WINDOW_ADDR,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; .bankwidth = BUSWIDTH<BR>
};<BR>
<BR>
#ifdef CONFIG_MTD_PARTITIONS<BR>
static struct mtd_partition *mtd_parts;<BR>
static int&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mtd_parts_nb;<BR>
<BR>
//#define FLASH_BLOCK_SIZE 0x20000<BR>
<BR>
static struct mtd_partition physmap_partitions[] = {<BR>
/* Partition information for versatile flash */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; {<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Boot monitor&quot;, /* 256K boot loader */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; 2*FLASH_BLOCK_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; 0,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .mask_flags =&nbsp; MTD_WRITEABLE,&nbsp; /* force read-only */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }, {<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;u-boot&quot;, /* 128K enviroment */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; 2*FLASH_BLOCK_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; MTDPART_OFS_APPEND,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }, {<BR>
.name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;bZimage&quot;,&nbsp; &nbsp; &nbsp; /* kernel image */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; 18*FLASH_BLOCK_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; MTDPART_OFS_APPEND,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .mask_flags =&nbsp; MTD_WRITEABLE,&nbsp; /* force read-only */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }<BR>
&nbsp; &nbsp; &nbsp; &nbsp; ,{<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;UserFStst&quot;,&nbsp; &nbsp; /* cramfs for testing */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 152*FLASH_BLOCK_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MTDPART_OFS_APPEND,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }<BR>
&nbsp; &nbsp; &nbsp; &nbsp; ,{<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;NFU&quot;,&nbsp; &nbsp; /* NFU for loading images */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2*FLASH_BLOCK_SIZE,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MTDPART_OFS_APPEND,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }<BR>
&nbsp; &nbsp; &nbsp; &nbsp; , {<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .name =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;UserFS&quot;,&nbsp; &nbsp; /* jffs2 until end */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .size =&nbsp; &nbsp; &nbsp; &nbsp; MTDPART_SIZ_FULL,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .offset =&nbsp; &nbsp; &nbsp; MTDPART_OFS_APPEND,<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // .mask_flags =&nbsp; MTD_WRITEABLE, /* May be need or need not */<BR>
&nbsp; &nbsp; &nbsp; &nbsp; }<BR>
};<BR>
<BR>
#define NUM_PARTITIONS&nbsp; (sizeof(physmap_partitions)/sizeof(struct mtd_partition))<BR>
const char *part_probes[] = {&quot;cmdlinepart&quot;, NULL};<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
i am making the partitions like above and giving the bootargs as<BR>
<BR>
&nbsp; setenv bootargs root=/dev/mtdblock5 rw rootfstype=jffs2 console=ttyAMA0,38400n8 mem=128M<BR>
<BR>
&nbsp; mtdblock5 is for jffs2 binary.<BR>
<BR>
Here is the part of .config<BR>
<BR>
<BR>
<BR>
<BR>
# Memory Technology Devices (MTD)<BR>
#<BR>
CONFIG_MTD=y<BR>
# CONFIG_MTD_DEBUG is not set<BR>
# CONFIG_MTD_CONCAT is not set<BR>
CONFIG_MTD_PARTITIONS=y<BR>
<BR>
# User Modules And Translation Layers<BR>
#<BR>
CONFIG_MTD_CHAR=y<BR>
CONFIG_MTD_BLOCK=y<BR>
# CONFIG_FTL is not set<BR>
# CONFIG_NFTL is not set<BR>
# CONFIG_INFTL is not set<BR>
<BR>
# RAM/ROM/Flash chip drivers<BR>
#<BR>
CONFIG_MTD_CFI=y<BR>
# CONFIG_MTD_JEDECPROBE is not set<BR>
CONFIG_MTD_GEN_PROBE=y<BR>
CONFIG_MTD_CFI_ADV_OPTIONS=y<BR>
CONFIG_MTD_CFI_NOSWAP=y<BR>
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set<BR>
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set<BR>
# CONFIG_MTD_CFI_GEOMETRY is not set<BR>
CONFIG_MTD_MAP_BANK_WIDTH_1=y<BR>
CONFIG_MTD_MAP_BANK_WIDTH_2=y<BR>
CONFIG_MTD_MAP_BANK_WIDTH_4=y<BR>
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set<BR>
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set<BR>
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set<BR>
CONFIG_MTD_CFI_I1=y<BR>
CONFIG_MTD_CFI_I2=y<BR>
# CONFIG_MTD_CFI_I4 is not set<BR>
# CONFIG_MTD_CFI_I8 is not set<BR>
CONFIG_MTD_CFI_INTELEXT=y<BR>
# CONFIG_MTD_CFI_AMDSTD is not set<BR>
# CONFIG_MTD_CFI_STAA is not set<BR>
CONFIG_MTD_CFI_UTIL=y<BR>
# CONFIG_MTD_RAM is not set<BR>
CONFIG_MTD_ROM=y<BR>
# CONFIG_MTD_ABSENT is not set<BR>
# CONFIG_MTD_XIP is not set<BR>
<BR>
#<BR>
# Mapping drivers for chip access<BR>
#<BR>
CONFIG_MTD_COMPLEX_MAPPINGS=y<BR>
# CONFIG_MTD_PHYSMAP is not set<BR>
# CONFIG_MTD_ARM_INTEGRATOR is not set<BR>
CONFIG_MTD_ARM_VERSATILE=y<BR>
# CONFIG_MTD_EDB7312 is not set<BR>
# CONFIG_MTD_PCI is not set<BR>
<BR>
# Miscellaneous filesystems<BR>
#<BR>
# CONFIG_ADFS_FS is not set<BR>
# CONFIG_AFFS_FS is not set<BR>
# CONFIG_HFS_FS is not set<BR>
# CONFIG_HFSPLUS_FS is not set<BR>
# CONFIG_BEFS_FS is not set<BR>
# CONFIG_BFS_FS is not set<BR>
# CONFIG_EFS_FS is not set<BR>
# CONFIG_JFFS_FS is not set<BR>
CONFIG_JFFS2_FS=y<BR>
CONFIG_JFFS2_FS_DEBUG=0<BR>
# CONFIG_JFFS2_FS_NAND is not set<BR>
# CONFIG_JFFS2_FS_NOR_ECC is not set<BR>
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set<BR>
CONFIG_JFFS2_ZLIB=y<BR>
CONFIG_JFFS2_RTIME=y<BR>
# CONFIG_JFFS2_RUBIN is not set<BR>
CONFIG_CRAMFS=y<BR>
# CONFIG_VXFS_FS is not set<BR>
# CONFIG_HPFS_FS is not set<BR>
# CONFIG_QNX4FS_FS is not set<BR>
# CONFIG_SYSV_FS is not set<BR>
# CONFIG_UFS_FS is not set<BR>
<BR>
#<BR>
# Partition Types<BR>
#<BR>
CONFIG_PARTITION_ADVANCED=y<BR>
# CONFIG_ACORN_PARTITION is not set<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
When i boot the board the following messages are coming.<BR>
<BR>
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009e0020: 0xffff in stead<BR>
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009e0024: 0xffff in stead<BR>
Further such events for this erase block will not be printed<BR>
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes<BR>
empty_blocks 0, bad_blocks 0, c-&gt;nr_blocks 80<BR>
VFS: Cannot open root device &quot;mtdblock5&quot; or unknown-block(31,5)<BR>
Please append a correct &quot;root=&quot; boot option<BR>
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)<BR>
<BR>
<BR>
<BR>
jffs2_scan_eraseblock() can be avoided by padding the flash,<BR>
but why it is not able to open/detect the mtdblock5, i dont know?<BR>
<BR>
can any one plz help to mount jffs2 in this case,<BR>
<BR>
am i doing any partitioning mistakes or root option mistakes?<BR>
<BR>
Thanks in advance,<BR>
<BR>
Thanks &amp; Regards,<BR>
Saikrishna Gajula
</P>
<br><br>
<a href="http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3"><IMG SRC="http://adworks.rediff.com/cgi-bin/AdWorks/sigimpress.cgi/www.rediff.com/signature-home.htm/1963059423@Middle5?OAS_query=null&PARTNER=3" BORDER=0 VSPACE=0 HSPACE=0></a>