Hi,
I am trying to flash jffs2 FS into NOR flash and boot the board from TFTP
(2.6.25-davinci1 git kernel).
First, I've edited my board-ipvp.c as follows (in my case sector size is 128KB):
static struct mtd_partition davinci_ipvp_norflash_partitions[] = {
/* bootloader (U-Boot, etc) in first 4 sectors */
{
.name = "bootloader",
.offset = 0,
.size = 1 * SZ_128K,
.mask_flags = MTD_WRITEABLE, /* force read-only */
},
/* bootloader params in the next 1 sectors */
{
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
.mask_flags = 0,
},
/* spare sector */
{
.name = "spare",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
.mask_flags = 0,
},
/* kernel */
{
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
.mask_flags = 0
},
/* file system */
{
.name = "filesystem",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0
}
};
so the 5 MTD partitions should look like this:
0x00000000-0x00020000 : "bootloader"
0x00020000-0x00040000 : "params"
0x00040000-0x00060000 : "spare"
0x00060000-0x00260000 : "kernel"
0x00260000-0x01000000 : "filesystem"
Nor Flash and MTD support are enabled by menuconfig.
Then, I used the sample ramdisk.gz mentioned from spraah2.pdf to prepare the
jffs2 FS:
gunzip ramdisk.gz
mkdir myrootfs
mount -o loop ramdisk myrootfs
mkfs.jffs2 -d myrootfs -o rootfs.jffs2 -e 0x20000
Then I successfully flashed the jffs2 FS into NOR flash at address 0x2260000
using u-boot utilities.
Now, uImage is ready in my /tftpboot.
The environment variables are as follows:
bootdelay=10
baudrate=115200
bootdir=boot
nfshost=192.168.0.243
dnsip=192.168.0.202
dnsip2=192.168.0.201
bootfile=uImage
rootpath=/home/gabriele/workdir/filesys_2.6.25
filesize=40de10
fileaddr=80700000
gatewayip=192.168.0.243
netmask=255.255.255.0
ipaddr=192.168.0.244
serverip=192.168.0.243
stdin=serial
stdout=serial
stderr=serial
ethaddr=a0:a1:a2:a3:a4:a5
bootcmd=tftp 0x80700000 uImage; bootm 0x80700000
videostd=pal
bootargs=console=ttyS0,115200n8 noinitrd rw root=/dev/mtdblock4 rw noinitrd
noatime rootfstype=jffs2 ip=192.168.0.244 mem=120M
When i tried to boot it is giving kernel panic:
TFTP from server 192.168.0.243; our IP address is 192.168.0.244
Filename 'uImage'.
Load address: 0x80700000
Loading: *#################################################################
#################################################################
#################################################################
#################################################################
################################
done
Bytes transferred = 1491780 (16c344 hex)
## Booting image at 80700000 ...
Image Name: Linux-2.6.25rc1-davinci1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1491716 Bytes = 1.4 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing
Linux..................................................................................................
done, booting the kernel.
<5>Linux version 2.6.25rc1-davinci1 ([EMAIL PROTECTED]) (gcc version 3.4.3
(MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #23 PREEMPT Mon Aug 4 13:09:00
CEST 2008
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci IPvPhone
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 30720
<7> DMA zone: 240 pages used for memmap
<7> DMA zone: 0 pages reserved
<7> DMA zone: 30480 pages, LIFO batch:7
<7> Normal zone: 0 pages used for memmap
<7> Movable zone: 0 pages used for memmap
DaVinci DM6446 variant 0x0
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 in Zone order, mobility grouping on. Total pages: 30480
<5>Kernel command line: console=ttyS0,115200n8 noinitrd rw root=/dev/mtdblock4
rw noinitrd noatime rootfstype=jffs2 ip=192.168.0.244 mem=120M
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
<6>Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>Memory: 120MB = 120MB total
<5>Memory: 118528KB available (2796K code, 273K data, 128K init)
<7>Calibrating delay loop... 127.79 BogoMIPS (lpj=638976)
Mount-cache hash table entries: 512
<6>CPU: Testing write buffer coherency: ok
<6>net_namespace: 624 bytes
<6>NET: Registered protocol family 16
<6>DaVinci: 71 gpio irqs
<6>NET: Registered protocol family 2
<7>Switched to high resolution mode on CPU 0
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 4096 (order: 3, 32768 bytes)
<6>TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
<6>TCP: Hash tables configured (established 4096 bind 4096)
<6>TCP reno registered
<6>NET: Registered protocol family 1
<6>Initializing DaVinci McBSP system
<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
<6>io scheduler noop registered
<6>io scheduler anticipatory registered (default)
Setting Up Clocks for DM420 OSD
Console: switching to colour frame buffer device 90x30
<6>fb0: dm_osd0_fb frame buffer device
<6>fb1: dm_vid0_fb frame buffer device
<6>fb2: dm_osd1_fb frame buffer device
<6>fb3: dm_vid1_fb frame buffer device
<6>Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
<6>serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
<6>console [ttyS0] enabled
Linux version 2.6.25rc1-davinci1 ([EMAIL PROTECTED]) (gcc version 3.4.3
(MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #23 PREEMPT Mon Aug 4 13:09:00
CEST 2008
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci IPvPhone
Memory policy: ECC disabled, Data cache writeback
DaVinci DM6446 variant 0x0
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 in Zone order, mobility grouping on. Total pages: 30480
Kernel command line: console=ttyS0,115200n8 noinitrd rw root=/dev/mtdblock4 rw
noinitrd noatime rootfstype=jffs2 ip=192.168.0.244 mem=120M
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: 118528KB available (2796K code, 273K data, 128K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 624 bytes
NET: Registered protocol family 16
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: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
Initializing DaVinci McBSP system
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
Setting Up Clocks for DM420 OSD
Console: switching to colour frame buffer device 90x30
fb0: dm_osd0_fb frame buffer device
fb1: dm_vid0_fb frame buffer device
fb2: dm_osd1_fb frame buffer device
fb3: dm_vid1_fb frame buffer device
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
<6>brd: module loaded
brd: module loaded
TI DaVinci EMAC: MAC address is deadbeef
TI DaVinci EMAC: MAC address is deadbeef
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
TI DaVinci EMAC: Installed 1 instances.
<6>console [netcon0] enabled
console [netcon0] enabled
<6>netconsole: network logging started
netconsole: network logging started
<6>Linux video capture interface: v2.00
Linux video capture interface: v2.00
<6>i2c /dev entries driver
i2c /dev entries driver
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<3>i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
i2c_davinci i2c_davinci.1: TDR IRQ while no data to send
<6>TCP cubic registered
TCP cubic registered
<6>NET: Registered protocol family 17
NET: Registered protocol family 17
<6>RPC: Registered udp transport module.
RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
RPC: Registered tcp transport module.
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:IP-Config: Complete:
device=eth0
device=eth0, addr=192.168.0.244, addr=192.168.0.244, mask=255.255.255.0,
mask=255.255.255.0, gw=255.255.255.255, gw=255.255.255.255,
host=192.168.0.244, domain=, nis-domain=(none),
host=192.168.0.244, domain=, nis-domain=(none),
bootserver=255.255.255.255,
bootserver=255.255.255.255, rootserver=255.255.255.255,
rootserver=255.255.255.255, rootpath=, rootpath=
<3>Root-NFS: No NFS server available, giving up.
Root-NFS: No NFS server available, giving up.
<3>VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
List of all partitions:
0100 32768 ram00100 32768 ram0 (driver?)
(driver?)
No filesystem could mount root, tried: No filesystem could mount root, tried:
jffs2 jffs2
<0>Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(2,0)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Did I miss something else?
Gabriele
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source