[uClinux-dev] JFFS2/MTD on M5235EVB/BCC

Jate Sujjavanich jsujjavanich at syntech-fuelmaster.com
Thu Oct 13 15:04:57 EDT 2005


It appears that you need CONFIG_MTD_BLOCK=y.

- Jate S.

-----Original Message-----
From: uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Stefano Caioli
Sent: Thursday, October 13, 2005 8:43 AM
To: uCLinux Mailing List
Subject: [uClinux-dev] JFFS2/MTD on M5235EVB/BCC

Hi all,
i need some help.
i'm porting uClinux 20050906 kernel 2.6.x to m5235bcc, i have
sucessfully enable mtd on 2MB external flash, and compiled support for
JFFS2.
I choosed these options in kernel config:

#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=3
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set #
CONFIG_MTD_REDBOOT_PARTS_READONLY is not set CONFIG_MTD_CMDLINE_PARTS=y

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
# CONFIG_MTD_BLOCK is not set
# CONFIG_MTD_BLOCK_RO is not set
# 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=y
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=y 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 is not set CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_RAM=y CONFIG_MTD_ROM=y #
CONFIG_MTD_ABSENT is not set

#
# Mapping drivers for chip access
#
CONFIG_MTD_NETSC520=y
# CONFIG_MTD_COMPLEX_MAPPINGS is not set CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_PHYSMAP_START=0xffe00000
CONFIG_MTD_PHYSMAP_LEN=0x200000
CONFIG_MTD_PHYSMAP_BANKWIDTH=2
CONFIG_MTD_UCLINUX=y
# CONFIG_MTD_SNAPGEARuC is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set


In "Kernel hacking" i passed "root=1f03" to boot from romfs and try some
JFFS2 experiments, but i get this:



dBUG> dn
Downloading Image 'image.bin' from 192.168.0.76 TFTP transfer completed
Read 2170884 bytes (4241 blocks)
dBUG> go 0x20000
Linux version 2.6.12-uc0 (root at www.linux.com) (gcc version 3.4.0) #24
Thu Oct 15


uClinux/COLDFIRE(m523x)
COLDFIRE port done by Greg Ungerer, gerg at snapgear.com Flat model support
(C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne Motorola M5235EVB
support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)<7>O6 Built 1
zonelists Kernel command line: root=1f03 PID hash table entries: 128
(order: 7, 2048 bytes) Dentry cache hash table entries: 4096 (order: 2,
16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 13888k/16384k RAM, 0k/0k ROM (1034k kernel code, 149k
data) Mount-cache hash table entries: 512
NET: Registered protocol family 16
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
JFFS2: default compression mode: priority
i8042.c: i8042 controller self test timeout.
ColdFire internal UART serial driver version 1.00 ttyS0 at 0x40000200
(irq = 77) is a builtin ColdFire UART
ttyS1 at 0x40000240 (irq = 78) is a builtin ColdFire UART io scheduler
noop registered io scheduler cfq registered RAMDISK driver initialized:
16 RAM disks of 4096K size 1024 blocksize FEC ENET Version 0.2
eth0: ethernet 00:cf:52:35:cf:01
PPP generic driver version 2.4.2
fec: PHY @ 0x1f, ID 0x00221619 -- KS8721BL physmap flash device: 200000
at ffe00000
phys_mapped_flash: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040 number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Searching for RedBoot partition table in phys_mapped_flash at offset
0x1f0000 No RedBoot partition table detected in phys_mapped_flash
mtd: Giving out device 0 to phys_mapped_flash NetSc520 flash device:
0x200000 at 0xffe00000 netsc520 Flash Bank: Found 1 x16 devices at 0x0
in 16-bit bank  Amd/Fujitsu Extended Query Table at 0x0040 number of CFI
chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 2 MTD partitions on "netsc520 Flash Bank":
0x00000000-0x00040000 : "dBUG (256k)"
mtd: Giving out device 1 to dBUG (256k)
0x00040000-0x00200000 : "user (1792k)"
mtd: Giving out device 2 to user (1792k)
uclinux[mtd]: RAM probe address=0x147ff4 size=0xf8000 Creating 1 MTD
partitions on "RAM":
0x00000000-0x000f8000 : "ROMfs"
mtd: Giving out device 3 to ROMfs
uclinux[mtd]: set ROMfs to be root filesystem
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes TCP established
hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table
entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Cannot open root device "1f03" or unknown-block(31,3) Please append
a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to
mount root fs on unknown-block(31,3)


I tried to specify different values for "root=" 1f00,1f01,1f02 and in
same cases i get:

VFS: Cannot open root device "<NULL>" or unknown-block(0,0)

I hope some gentle soul  can provide me some clues.
Regards,

               Stefano

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org



More information about the uClinux-dev mailing list