Please append a correct "root=" boot option
sai krishna sai
gajula_kittu at rediffmail.com
Tue Oct 18 06:59:12 EDT 2005
Hi,
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.
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.
see the partitioning below as per the file,
#define WINDOW_ADDR 0x34000000
#define WINDOW_SIZE 0x04000000
#define BUSWIDTH 1
static struct mtd_info *mymtd;
struct map_info physmap_map = {
.name = "versatile_flash",
.size = WINDOW_SIZE,
.phys = WINDOW_ADDR,
.bankwidth = BUSWIDTH
};
#ifdef CONFIG_MTD_PARTITIONS
static struct mtd_partition *mtd_parts;
static int mtd_parts_nb;
//#define FLASH_BLOCK_SIZE 0x20000
static struct mtd_partition physmap_partitions[] = {
/* Partition information for versatile flash */
{
.name = "Boot monitor", /* 256K boot loader */
.size = 2*FLASH_BLOCK_SIZE,
.offset = 0,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}, {
.name = "u-boot", /* 128K enviroment */
.size = 2*FLASH_BLOCK_SIZE,
.offset = MTDPART_OFS_APPEND,
}, {
.name = "bZimage", /* kernel image */
.size = 18*FLASH_BLOCK_SIZE,
.offset = MTDPART_OFS_APPEND,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}
,{
.name = "UserFStst", /* cramfs for testing */
.size = 152*FLASH_BLOCK_SIZE,
.offset = MTDPART_OFS_APPEND,
}
,{
.name = "NFU", /* NFU for loading images */
.size = 2*FLASH_BLOCK_SIZE,
.offset = MTDPART_OFS_APPEND,
}
, {
.name = "UserFS", /* jffs2 until end */
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
// .mask_flags = MTD_WRITEABLE, /* May be need or need not */
}
};
#define NUM_PARTITIONS (sizeof(physmap_partitions)/sizeof(struct mtd_partition))
const char *part_probes[] = {"cmdlinepart", NULL};
i am making the partitions like above and giving the bootargs as
setenv bootargs root=/dev/mtdblock5 rw rootfstype=jffs2 console=ttyAMA0,38400n8 mem=128M
mtdblock5 is for jffs2 binary.
Here is the part of .config
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_PARTITIONS=y
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_NOSWAP=y
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_GEOMETRY is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
CONFIG_MTD_ROM=y
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_XIP is not set
#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_ARM_VERSATILE=y
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_NAND is not set
# CONFIG_JFFS2_FS_NOR_ECC is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_CRAMFS=y
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
When i boot the board the following messages are coming.
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009e0020: 0xffff in stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009e0024: 0xffff in stead
Further such events for this erase block will not be printed
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 80
VFS: Cannot open root device "mtdblock5" or unknown-block(31,5)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)
jffs2_scan_eraseblock() can be avoided by padding the flash,
but why it is not able to open/detect the mtdblock5, i dont know?
can any one plz help to mount jffs2 in this case,
am i doing any partitioning mistakes or root option mistakes?
Thanks in advance,
Thanks & Regards,
Saikrishna Gajula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.infradead.org/pipermail/linux-mtd/attachments/20051018/94a01327/attachment.html
More information about the linux-mtd
mailing list