Hi Kishore,
Thanks for the info. Yeah, that was the case. Were you able to get MTD JFFS2
working
under the Montavista kernel (linux-2.6.10_mvl401) that came with DVSDK? I
wasn't able
to so I used the GIT kernel and it worked. However, I'm having weird problems
with the
GIT kernel booting up. It would boot up fine until it stalls at:
Freeing init memory: 100K
INIT:
at which point I have to manual press Enter several times to force it to
continue booting up.
Anyone else has this problem with the GIT kernel booting up?
Regards,
Andy
----- Original Message ----
From: kishore sannapaneni <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Friday, March 9, 2007 1:52:10 AM
Subject: Re: ROOT file system from Flash
HI
You cannot use both of them at same time. They are pin multiplexed.
>From: Andy Ngo <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED],
>[EMAIL PROTECTED]
>CC: "davinci-linux-open-source @linux.davincidsp.com"
><[email protected]>
>Subject: Re: ROOT file system from Flash
>Date: Thu, 8 Mar 2007 10:41:58 -0800 (PST)
>
>Hi all again,
>
>OK. So I downloaded the latest GIT tree and compiled with MTD / NOR /
>JFFS2 filesystem support. When I booted,
>I noticed there's a message that says "WARNING: both IDE and NOR flash are
>enabled, but are pin-muxed.
>Disable IDE for NOR support." (see below)
>So is it true that I won't be able to get MTD / NOR working if IDE (hard
>drive) is enabled? Thanks.
>
>Regards,
>Andy
>
>
>
>Linux version 2.6.20-omap1-ge7255f31 ([EMAIL PROTECTED]) (gcc
>version 3.4.3 (MontaVista 3.4.3-25.0.30.0501131 2005-07-23)) #1 Thu Mar 8
>05:39:28 PST 2007
>CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
>Machine: DaVinci EVM
>Memory policy: ECC disabled, Data cache writeback
>DM6443
>CPU0: D VIVT write-back cache
>CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
>CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
>Built 1 zonelists. Total pages: 30480
>PID hash table entries: 512 (order: 9, 2048 bytes)
>Console: colour dummy device 80x30
>Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
>Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
>Memory: 120MB = 120MB total
>Memory: 94336KB available (2440K code, 210K data, 100K init)
>Mount-cache hash table entries: 512
>CPU: Testing write buffer coherency: ok
>NET: Registered protocol family 16
>WARNING: both IDE and NOR flash are enabled, but are pin-muxed.
> Disable IDE for NOR support.
>DaVinci: 71 gpio irqs
>NET: Registered protocol family 2
>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
>TCP established hash table entries: 4096 (order: 2, 16384 bytes)
>TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
>TCP: Hash tables configured (established 4096 bind 2048)
>TCP reno registered
>checking if image is initramfs...it isn't (no cpio magic); looks like an
>initrd
>Freeing initrd memory: 24576K
>Initializing DaVinci McBSP system
>JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
>JFFS2: default compression mode: priority
>io scheduler noop registered
>io scheduler anticipatory registered (default)
>Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
>serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
>RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
>TI DaVinci EMAC: MAC address is 00:0e:99:02:57:39
>TI DaVinci EMAC Linux version updated 4.0
>TI DaVinci EMAC: Installed 1 instances.
>netconsole: not configured, aborting
>i2c /dev entries driver
>TLV320AIC23 I2C version 1.8 (10-Feb-2006)
>Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
>ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
>hda: TOSHIBA MK4032GAX, ATA DISK drive
>ide0 at 0xe10661f0-0xe10661f7,0xe10663f6 on irq 22
>hda: max request size: 512KiB
>hda: 78140160 sectors (40007 MB), CHS=16383/255/63
>hda: cache flushes supported
> hda: hda1 hda2
> ide0: BM-DMA at 0xe1066000-0xe1066007, BIOS settings: hda:pio, hdb:pio
>physmap platform flash device: 01000000 at 02000000
>physmap-flash physmap-flash.0: map_probe failed
>
>
>----- Original Message ----
>From: Andy Ngo <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
>[EMAIL PROTECTED]
>Cc: "davinci-linux-open-source @linux.davincidsp.com"
><[email protected]>
>Sent: Thursday, March 8, 2007 1:03:41 AM
>Subject: re: ROOT file system from Flash
>
>
>Hi Kishore,
>
>I saw your posting last August and was wondering how you get the kernel to
>recognize the NOR flash
>as different partitions. I read a few documents recommended by T Ziomek on
>how to enable MTD JFFS2 in
>the kernel and did exactly as stated. I followed the instructions exactly
>and modified
>linux-2.6.10_mvl401/drivers/mtd/maps/physmap.c to have several MTD
>partitions:
>
>
>struct map_info physmap_map = {
> .name = "phys_mapped_flash",
> .phys = 0x02000000,
> .size = 0x01000000,
> .bankwidth = 2,
>};
>
>
>static struct mtd_partition *physmap_partitions[] = {
> {
> .name =
> "Bootloader",
> .size = 0x00050000,
> .offset = 0
> },{
> .name = "Kernel",
> .size = 0x00200000,
> .offset = MTDPART_OFS_APPEND
> },{
> .name = "RootFS",
> .size = MTDPART_SIZ_FULL,
> .offset = MTDPART_OFS_APPEND
> }
>};
>
>I enabled the following in the kernel:
>
>
>
>
>
>
>
>
>
>
>
>
>
>CONFIG_MTD=y
>CONFIG_MTD_DEBUG=y
>CONFIG_MTD_DEBUG_VERBOSE=3
>CONFIG_MTD_PARTITIONS=y
>CONFIG_MTD_CHAR=y
>CONFIG_MTD_BLOCK=y
>CONFIG_MTD_CFI=y
>CONFIG_MTD_JEDECPROBE=y
>CONFIG_MTD_GEN_PROBE=y
>CONFIG_MTD_CFI_AMDSTD=y
>CONFIG_MTD_PHYSMAP=y
>CONFIG_MTD_PHYSMAP_START=0x02000000
>CONFIG_MTD_PHYSMAP_LEN=0x01000000
>CONFIG_MTD_PHYSMAP_BUSWIDTH=2
>CONFIG_JFFS2_FS=y
>CONFIG_JFFS2_FS_DEBUG=2
>CONFIG_JFFS2_FS_WRITEBUFFER=y
>
>After rebuilding the kernel and loading it, the kernel
>tried to probe the NOR flash for the device ID to figure out
>what device it is but couldn't, the id is always 0000. According
>to the spec sheet, the NOR Flash is an AMD 29LV256M, so the device
>ID should be 2201. Because of this, it doesn't think there is a
>NOR flash device. Maybe the ioremap function is not mapping the
>physical address to the virtual address correctly? It seems as
> though
>the kernel can't detect the flash at all or is probing at wrong
>address.
>
>Anyways, it seems like you got pretty far along; can you please help
>me? Am I doing something wrong? Your or anyone's else help is
>appreciated.
>
>Regards,
>Andy
>=================================================================================
>
> ROOT file system from Flash
> kishore sannapaneni
>
> Tue, 29 Aug 2006 03:05:29 -0700
>
>
>
>
>
>
>
>
>
>
>HI
>
>I want to mount root file system from flash. so i build the kernel with mtd
>map driver from the list.
>wehn i boot the system i got the log messege as
>
> Physmaped_flash: Found 1 x16 devices at 0x0 in 16-bit bank
> Amd/Fujitsu Extended Query Table at 0x0040
> Using buffer write method
> Physmaped_flash: CFI does not contain boot bank location.
>Assuming top.
> number of CFI chips: 1
> cfi_cmdset_0002: Disabling erase-suspend-program due to code
>brokenness.
> 0 partition parsing origin
> in else add-partitions
> Creating 4 MTD partitions on "Physmaped_flash":
> 0x00000000-0x00040000 : "bootloader"
> mtd: Giving out device 0 to bootloader
> 0x00040000-0x00050000 : "params"
> mtd: Giving out device 1 to params
> 0x00050000-0x00250000 : "kernel"
> mtd: Giving out device 2 to kernel
> 0x00250000-0x01000000 : "filesystem"
> mtd: Giving out device 3 to filesystem
>
>I downloaded th MTD utilities mtd-utils-1.0.0m from
>http://www.linux-mtd.infradead.org/index.html.
>Build th mkfs.jffs2 utility as
> make mkfs.jffs2
>then build the root fs image as
> mkfs.jffs2 -d root_folder
>-o rootfs_image.jffs2 -e 0x10000
>Then i copied the root fs image to flash from u-boot to address
>0x02250000.
>I supplied the boot arguments to kernel as
> bootargs=console=ttyS0,115200n8 root=/dev/mtdblock3 rw
>noinitrd ip=dhcp rootfstype=jffs2.
> when i boot the system i got the following error.
>
>IP-Config: Complete:
> device=eth0, addr=10.1.11.166, mask=255.255.255.0, gw=10.1.11.76,
> host=10.1.11.166, domain=, nis-domain=(none),
> bootserver=10.1.11.76, rootserver=10.1.11.76, rootpath=
>mtdblock_open
>ok
>mtdblock: read on "filesystem" at 0x400, size 0x200
>Unable to handle kernel NULL pointer dereference at virtual address
>00000000
>pgd = c0004000
>[00000000] *pgd=00000000
>Internal error: Oops: 5 [#1]
>Modules linked in:
>CPU: 0
>PC is at __wake_up_common+0x28/0x7c
>LR is at 0x0
>pc : [<c0037248>] lr : [<00000000>] Not tainted
>sp : c6e6be70 ip : c6e6be9c fp : c6e6be98
>r10: 00000006 r9 : 00000000 r8 : 00000000
>r7 : c6e6a000 r6 : c0615a94 r5 : 60000013 r4 : 00000001
>r3 : 00000000 r2 : 00000001 r1 : 00000006 r0 : c0615a94
>Flags: nzcv IRQs off FIQs on Mode SVC_32 Segment kernel
>Control:
> 5317F Table: 80004000 DAC: 00000017
>Process mtdblockd (pid: 704, stack limit = 0xc6e6a198)
>Stack: (0xc6e6be70 to 0xc6e6c000)
>be60: c6e6a000 60000013 c061fe28
>c6e6a000
>be80: c0615a78 00000000 00000200 c6e6beb4 c6e6be9c c00372dc c0037230
>00000000
>bea0: 00250400 c0615a40 c6e6bedc c6e6beb8 c01af500 c00372ac c0615a40
>00250400
>bec0: c0615a40 00000000 c6e6a000 c061fe28 c6e6bf28 c6e6bee0 c01af91c
>c01af3ac
>bee0: c0615a40 00250400 00250400 00000000 c0615a78 c0615a40 00000200
>60000013
>bf00: c0619800 00000400 00000000 c6e6bf6c c6fa3400 00000400 00010000
>c6e6bf5c
>bf20: c6e6bf2c c01a6f10 c01af6cc c6e6bf6c c6fa3400 c6e6bf40 c003bd78
>00000200
>bf40: 00000400 c71ae3e0 c6fa3400 c0619000 c6e6bf98 c6e6bf60 c01ab1f8
>c01a6e74
>bf60: c6e6bf6c c6fa3400 00000200 00000000 00000002 00000002 c6e6a000
>c6fa3400
>bf80: c6e6122c c6e6f120 c02b253c c6e6bff4 c6e6bf9c c01ab93c c01ab114
>c6e6f130
>bfa0: c061c8e0 00000000 c05eb300 c0037200 00000000 00000000 00000000
>c05eb300
>bfc0: c0037200 00000000 00000000 00000000 00000000 00000000 00000000
>00000000
>bfe0: 00000000 00000000 00000000 c6e6bff8 c003d63c c01ab700 1c002217
>40054e74
>Backtrace:
>[<c0037220>] (__wake_up_common+0x0/0x7c) from [<c00372dc>]
>(__wake_up+0x40/0x64)
>[<c003729c>] (__wake_up+0x0/0x64) from [<c01af500>] (put_chip+0x164/0x16c)
>[<c01af39c>] (put_chip+0x0/0x16c) from [<c01af91c>]
>(cfi_amdstd_read+0x260/0x2d0)
>[<c01af6bc>] (cfi_amdstd_read+0x0/0x2d0) from [<c01a6f10>]
>(part_read+0xac/0xe0)
>[<c01a6e64>] (part_read+0x0/0xe0) from [<c01ab1f8>]
>(mtdblock_readsect+0xf4/0x138)
>[<c01ab104>] (mtdblock_readsect+0x0/0x138) from [<c01ab93c>]
>(mtd_blktrans_thread+0x24c/0x354)
>[<c01ab6f0>] (mtd_blktrans_thread+0x0/0x354) from [<c003d63c>]
>(do_exit+0x0/0xdc0)
>Code: e1a0a001 e1a04002 e1a08003 e59b9004 (e59e7000)
><6>note: mtdblockd[704] exited with preempt_count 2
>BUG: scheduling while atomic: mtdblockd/0x00000002/704
>caller is do_exit+0xd5c/0xdc0
>
>
>i can't find the reason.
>has any one done this. If so is this the correct way.
>
>Thanking you.
>
>
>_______________________________________________
>Davinci-linux-open-source mailing list
>[email protected]
>http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
>
>
>
>
_________________________________________________________________
Catch the complete World Cup coverage with MSN
http://content.msn.co.in/Sports/Cricket/Default.aspx
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source