problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
Arun Kumar
arunkat at gmail.com
Mon Jul 24 18:24:42 EST 2006
Hi Ben ,
Thanks for your reply .It was indeed very comrehensive .I am able to proceed
further But still there is a bit problem .
When I try to mknod physically viz mknod /dev/mtd0 .....
It says the node is readonly .
Can you please point out the problem . I am attaching a dump of the console
.
Linux/PPC load:
Uncompressing Linux...done.
Now booting the kernel ....
Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.20_mvl31 (aks at IIB-A1040829) (gcc version 3.3.1 (MontaVista
3.3
.1-3.0.10.0300532 2003-12-24)) #368 Mon Jul 24 13:02:13 IST 2006
DBAT0U = 0x800001fe
DBAT0L = 0x8000002a
DBAT1U = 0xf0001ffe
DBAT1L = 0xf000002a
DBAT2U = 0xc00007fe
DBAT2L = 0x00000002
DBAT3U = 0xff8001fe
DBAT3L = 0xff80002a
ET4K Montavista Linux Test Platform
Port by Agere Systems
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line:
OpenPIC Version 1.2 (1 CPUs and 14 IRQ sources) at fcf40000
Calibrating delay loop... 884.73 BogoMIPS
Memory: 62084k available (1000k kernel code, 356k data, 76k init, 0k
highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [1057/0006] 000600 00
PCI:00:00.0 Resource 0 [00000000-ffffffff] is unassigned
PCI:00:00.0 Resource 1 [00000000-00000fff] is unassigned
PCI:00:00.0 Resource 2 [00000000-ffffffff] is unassigned
Found 00:78 [8086/1013] 000200 00
PCI:00:0f.0 Resource 6 [00000000-0000ffff] is unassigned
Found 00:f0 [0700/1107] 000600 00
Fixups for bus 00
Bus scan for 00 returning with max=00
PCI: bridge rsrc fc000000..fcc00000 (100), parent c011ddd4
PCI: bridge rsrc 80000000..fe000000 (200), parent c011ddf0
PCI:00:0f.0: Resource 0: fdfe0000-fdffffff (f=204)
PCI:00:0f.0: Resource 2: fdfd0000-fdfdffff (f=204)
PCI:00:0f.0: Resource 4: fcbfffc0-fcbfffff (f=101)
PCI:00:1e.0: Resource 0: fc000000-fcffffff (f=120c)
PCI:00:1e.0: Resource 2: fcbffe00-fcbffeff (f=101)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
LSP Revision 1
Starting kswapd
Disabling the Out Of Memory Killer
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis
Communications
AB.
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI en
abled
ttyS00 at 0xfcf04500 (irq = 13) is a ST16650
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
AMD_FLASH_INIT called *aks *
physmap flash device: 800000 at ff800000 virtual address Number of erase
regions
: 4
Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
Primary Algorithm Table at 0040
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum: 2.7 V
Vcc Maximum: 3.6 V
No Vpp line
Typical byte/word write timeout: 128 µs
Maximum byte/word write timeout: 256 µs
Full buffer write not supported
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 16384 ms
Chip erase not supported
Device size: 0x200000 bytes (2 MiB)
Flash Device Interface description: 0x0002
- supports x8 and x16 via BYTE# with asynchronous interface
Max. bytes in buffer write: 0x1
Number of Erase Block Regions: 4
Erase Region #0: BlockSize 0x4000 bytes, 1 blocks
Erase Region #1: BlockSize 0x2000 bytes, 2 blocks
Erase Region #2: BlockSize 0x8000 bytes, 1 blocks
Erase Region #3: BlockSize 0x10000 bytes, 31 blocks
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
number of CFI chips: 4
in amdstd_setup 0: offset=0x0,size=0x10000,blocks=1
1: offset=0x10000,size=0x8000,blocks=2
2: offset=0x20000,size=0x20000,blocks=1
3: offset=0x40000,size=0x40000,blocks=31
4: offset=0x800000,size=0x10000,blocks=1
5: offset=0x810000,size=0x8000,blocks=2
6: offset=0x820000,size=0x20000,blocks=1
7: offset=0x840000,size=0x40000,blocks=31
8: offset=0x1000000,size=0x10000,blocks=1
9: offset=0x1010000,size=0x8000,blocks=2
10: offset=0x1020000,size=0x20000,blocks=1
11: offset=0x1040000,size=0x40000,blocks=31
12: offset=0x1800000,size=0x10000,blocks=1
13: offset=0x1810000,size=0x8000,blocks=2
14: offset=0x1820000,size=0x20000,blocks=1
15: offset=0x1840000,size=0x40000,blocks=31
cfi_cmdset_0002: Disabling fast programming due to code brokenness. aks
Enabling
*
in MTD Partitioning <5>No RedBoot partition table detected in
phys_mapped_flash
Using physmap partition definition
Creating 3 MTD partitions on "phys_mapped_flash":
0x00000000-0x00040000 : "agere-ets0"
mtd: Giving out device 0 to agere-ets0
0x00040000-0x00080000 : "agere-ets1"
mtd: Giving out device 1 to agere-ets1
0x00080000-0x0007fffe : "agere-ets2"
mtd: partition "agere-ets2" doesn't end on an erase block -- force read-only
mtd: Giving out device 2 to agere-ets2
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
/dev/console mapped to mkdev 5: minor: 1
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1247k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 76k init
calling sbin/init
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
Starting pid 8, console /dev/ttyS0: '/bin/ash'
BusyBox v1.2.0 (2006.07.12-05:25+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ $ mknod /dev/mtd0 c 90 0
mknod: /dev/mtd0: Read-only file system
/ $
also can you point out why it is trying to disable the fast programming ?
Thanks,
Arun
On 7/21/06, Ben Warren <bwarren at qstreams.com> wrote:
>
> Hi Arun,
>
> On Fri, 2006-07-21 at 20:26 +0530, Arun Kumar wrote:
> > Hi ,
> > Can anyone help me in this naive problem ?
> >
> Then a naive answer is most fitting... Turns out that's my specialty.
>
> > #
> > # Memory Technology Devices (MTD)
> > #
> > CONFIG_MTD=y
> > CONFIG_MTD_DEBUG=y
> > CONFIG_MTD_DEBUG_VERBOSE=2
> > CONFIG_MTD_PARTITIONS=y
> > CONFIG_MTD_CONCAT=y
> > CONFIG_MTD_REDBOOT_PARTS=y
> > CONFIG_MTD_CMDLINE_PARTS=y
> Probably get rid of REDBOOT if you're not using that bootloader
> >
> > #
> > # User Modules And Translation Layers
> > #
> > # CONFIG_MTD_CHAR is not set
> > # 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
> >
> You need to enable MTD_CHAR to read/write and MTD_BLOCK to mount
>
> > Can any happy soul let me know :--
> >
> > 1)How to mount jffs2 on this flash and also to test mtd->read/write
> > routines ?
> Start with the char drivers (/dev/mtd0 etc.). You'll need one for each
> partition you want to experiment with.
> How about creating the nodes manually?
>
> mknod /dev/mtd0 c 90 0
> mknod /dev/mtd1 c 90 2 etc. (minor # increments in 2s)
>
> Add a block device for each partition:
>
> mknod /dev/mtdblock0 b 31 0
> mknod /dev/mtdblock1 b 31 1 etc.
>
> Once you clean up #3 below, you should be able to read/write the char
> devices using commands like 'cat', or write a simple user-space app
> using "open, read, write", etc if you'd rather look at the actual binary
> data.
>
> You can then experiment with mounting the JFFS2. I recommend booting to
> an NFS file system then mounting the JFFS2 with something like:
>
> mount -t jffs2 /dev/mtdblock5 /mnt/temp (Use the correct partition)
>
> >
> > 2) Is it ok not to see mtd0.. partions in /dev directory .
> Pretty sure you'll need these
> >
> > 3 ) Where do I register the mtd partitions to get them noticed
> > here ??
> Looks like your partitions are already being found, but are probably not
> set up right. I don't know if this is a static definition in your board
> init code or passed by command line from the bootloader, but it looks
> like the values don't line up with your device:
>
> *********
> Using physmap partition definition
> Creating 3 MTD partitions on "phys_mapped_flash":
> 0x00000000-0x00040000 : "foo-ets0"
> mtd: Giving out device 0 to foo-ets0
> 0x00040000-0x001e0000 : "foo-ets1"
> mtd: partition "agere-ets1" doesn't end on an erase block -- force
> read-only
> mtd: Giving out device 1 to foo-ets1
> 0x001e0000-0x00200000 : "foo-ets2"
> mtd: partition "foo-ets2" doesn't start on an erase block boundary --
> force read-only
> *********
> --------------------------------------------------------------------------
> Hopefully this helps you proceed a little bit.
>
> regards,
> Ben
>
>
--
Arun Kumar Singh
Tech Lead.
Agere India
Bangalore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060724/32bae4ec/attachment.htm
More information about the Linuxppc-embedded
mailing list