<P>
<BR>
Hi,<BR>
<BR>
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 1<BR>
<BR>
<BR>
static struct mtd_info *mymtd;<BR>
<BR>
<BR>
struct map_info physmap_map = {<BR>
.name = "versatile_flash",<BR>
.size = WINDOW_SIZE,<BR>
.phys = WINDOW_ADDR,<BR>
.bankwidth = BUSWIDTH<BR>
};<BR>
<BR>
#ifdef CONFIG_MTD_PARTITIONS<BR>
static struct mtd_partition *mtd_parts;<BR>
static int 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>
{<BR>
.name = "Boot monitor", /* 256K boot loader */<BR>
.size = 2*FLASH_BLOCK_SIZE,<BR>
.offset = 0,<BR>
.mask_flags = MTD_WRITEABLE, /* force read-only */<BR>
}, {<BR>
.name = "u-boot", /* 128K enviroment */<BR>
.size = 2*FLASH_BLOCK_SIZE,<BR>
.offset = MTDPART_OFS_APPEND,<BR>
}, {<BR>
.name = "bZimage", /* kernel image */<BR>
.size = 18*FLASH_BLOCK_SIZE,<BR>
.offset = MTDPART_OFS_APPEND,<BR>
.mask_flags = MTD_WRITEABLE, /* force read-only */<BR>
}<BR>
,{<BR>
.name = "UserFStst", /* cramfs for testing */<BR>
.size = 152*FLASH_BLOCK_SIZE,<BR>
.offset = MTDPART_OFS_APPEND,<BR>
}<BR>
,{<BR>
.name = "NFU", /* NFU for loading images */<BR>
.size = 2*FLASH_BLOCK_SIZE,<BR>
.offset = MTDPART_OFS_APPEND,<BR>
}<BR>
, {<BR>
.name = "UserFS", /* jffs2 until end */<BR>
.size = MTDPART_SIZ_FULL,<BR>
.offset = MTDPART_OFS_APPEND,<BR>
// .mask_flags = MTD_WRITEABLE, /* May be need or need not */<BR>
}<BR>
};<BR>
<BR>
#define NUM_PARTITIONS (sizeof(physmap_partitions)/sizeof(struct mtd_partition))<BR>
const char *part_probes[] = {"cmdlinepart", NULL};<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
i am making the partitions like above and giving the bootargs as<BR>
<BR>
setenv bootargs root=/dev/mtdblock5 rw rootfstype=jffs2 console=ttyAMA0,38400n8 mem=128M<BR>
<BR>
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->nr_blocks 80<BR>
VFS: Cannot open root device "mtdblock5" or unknown-block(31,5)<BR>
Please append a correct "root=" 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 & 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>