This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
My software is IPNC368 20100713_version2.0, I use the davinci_dm368_ipnc_defconfig_rel kernel config, then "make sysall" , "make cramfs" to build whole software newly, finaly download in IPNC368 machine, write to nand flash, set the corresponding bootcmd and bootargs in uboot accroding "Users_Guide_IPNC_DM36x.pdf". I get following error when linux start
........................................
yaffs: dev is 1048576 name is "ram0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 1.0, "ram0"
yaffs: dev is 1048576 name is "ram0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 1.0, "ram0"
XFS: bad magic number
XFS: SB validate failed
No filesystem could mount root, tried: ext3 ext2 cramfs squashfs msdos vfat yaf
fs yaffs2 xfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
I found my new build cramfs image is about 16M, more larger than that containd in Appro release (prebuild image \Application\bin\dm368\cramfsImage_ipnc_dm368_2.0.0, about 12M), I just change a little c language code in sys_server(less than 100 lines modify and new create a helloworld test thread in system process). I use compare the directory structures in the two cramfs image, found many difference, I don't this is why? can anyone get some help? My detail set and boot log as follow,
-----------------------------------------------------------------------------
Uboot log
------------------------------------------------------------------------------
DM368 IPNC :>tftpboot 0x80700000 uImage_ipnc_DM368
TFTP from server 192.168.1.12; our IP address is 192.168.1.168
Filename 'uImage_ipnc_DM368'.
Load address: 0x80700000
Loading: #################################################################
############################################################
done
Bytes transferred = 1825908 (1bdc74 hex)
DM368 IPNC :>tftpboot 0x82000000 cramfsImage_ipnc_DM368
TFTP from server 192.168.1.12; our IP address is 192.168.1.168
Filename 'cramfsImage_ipnc_DM368'.
Load address: 0x82000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###################################
done
Bytes transferred = 16728064 (ff4000 hex)
DM368 IPNC :>nand erase 0x500000 0x1200000
NAND erase: device 0 offset 0x500000, size 0x1200000
Erasing at 0x16e0000 -- 100% complete.
OK
DM368 IPNC :>nand write 0x80700000 0x500000 0x200000
NAND write: device 0 offset 0x500000, size 0x200000
2097152 bytes written: OK
DM368 IPNC :>nand write 0x82000000 0x700000 0x1000000
NAND write: device 0 offset 0x700000, size 0x1000000
16777216 bytes written: OK
DM368 IPNC :>setenv bootcmd 'nand read 0x82000000 0x700000 0x1000000;nboot 0x807
00000 0 0x500000;bootm 0x80700000'
DM368 IPNC :>
DM368 IPNC :>setenv bootargs 'mem=46M console=ttyS1,115200n8 root=/dev/ram0 rw i
nitrd=0x82000000,16M ip=192.168.1.168:192.168.1.12:192.168.1.1:255.255.255.0:::o
ff eth=00:0c:0c:a0:05:5f'
DM368 IPNC :>printenv
bootdelay=4
baudrate=115200
bootfile="uImage"
ethaddr=00:0c:0c:a0:05:5f
dnsip=192.168.1.1
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.3.4 (Apr 20 2010 - 11:42:44) DM368-IPNC-1.0.0
filesize=FF4000
fileaddr=82000000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.168
serverip=192.168.1.12
bootcmd=nand read 0x82000000 0x700000 0x1000000;nboot 0x80700000 0 0x500000;boot
m 0x80700000
bootargs=mem=46M console=ttyS1,115200n8 root=/dev/ram0 rw initrd=0x82000000,16M
ip=192.168.1.168:192.168.1.12:192.168.1.1:255.255.255.0:::off eth=00:0c:0c:a0:05
:5f
Environment size: 568/131068 bytes
---------------------------------------------------------------------------------------
linux start log
---------------------------------------------------------------------------------------
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000008.
DONE
Jumping to entry point at 0x81080000.
DM368_IPNC_UBL_1.0.0
U-Boot 1.3.4 (Apr 20 2010 - 11:42:44) DM368-IPNC-1.0.0
I2C: ready
DRAM: 128 MB
NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,
3V 8-bit)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
128 MiB
In: serial
Out: serial
Err: serial
ARM Clock :- 432MHz
DDR Clock :- 340MHz
Ethernet PHY: GENERIC @ 0x01
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x700000, size 0x1000000
16777216 bytes read: OK
Loading from NAND 128MiB 3,3V 8-bit, offset 0x500000
Image Name: Linux-2.6.18_pro500-davinci_IPNC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1825844 Bytes = 1.7 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.18_pro500-davinci_IPNC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1825844 Bytes = 1.7 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Linux version 2.6.18_pro500-davinci_IPNC_DM368_2.0.0 (root@localhost.localdomain
) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT W
ed Oct 20 01:19:41 PDT 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM368 IPNC
Memory policy: ECC disabled, Data cache writeback
initrd (0x82000000 - 0x83000000) extends beyond physical memory - disabling init
rd
DaVinci DM0365 variant 0x8
PLL0: fixedrate: 24000000, commonrate: 170000000, vpssrate: 340000000
PLL0: vencrate_sd: 75555555, ddrrate: 340000000 mmcsdrate: 48571428
PLL1: armrate: 432000000, voicerate: 20571428, vencrate_hd: 27000000
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: 11776
Kernel command line: mem=46M console=ttyS1,115200n8 root=/dev/ram0 rw initrd=0x8
2000000,16M ip=192.168.1.168:192.168.1.12:192.168.1.1:255.255.255.0:::off eth=00
:0c:0c:a0:05:5f
TI DaVinci EMAC: kernel boot params Ethernet address: 00:0c:0c:a0:05:5f
PID hash table entries: 256 (order: 8, 1024 bytes)
Clock event device timer0_0 configured with caps set: 07
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 46MB = 46MB total
Memory: 42652KB available (3129K code, 645K data, 176K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
DaVinci: 104 gpio irqs
MUX: initialized GPIO20
MUX: initialized I2C_SCL
Generic PHY: Registered new driver
ch0 default output "COMPOSITE", mode "NTSC"
VPBE Encoder Initialized
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Oct 20 2010 01:16:57 Installing.
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A
serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
Davinci EMAC MII Bus: probed
MAC address is 00:0c:0c:a0:05:5f
TI DaVinci EMAC Linux version updated 4.0
Linux video capture interface: v2.00
Trying to register davinci display video device.
layer=c0544800,layer->video_dev=c0544960
Trying to register davinci display video device.
layer=c0544600,layer->video_dev=c0544760
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
i2c /dev entries driver
nand_davinci nand_davinci.0: Using 4-bit hardware ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
Creating 6 MTD partitions on "nand_davinci.0":
0x00000000-0x00300000 : "bootloader"
0x00300000-0x00500000 : "params"
0x00500000-0x00700000 : "kernel"
0x00700000-0x01f00000 : "filesystem"
0x01f00000-0x02100000 : "data1"
0x02100000-0x08000000 : "data2"
nand_davinci nand_davinci.0: hardware revision: 2.3
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as
rtc0
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50
2006 UTC).
ASoC version 0.13.1
CQ0093 Voice Codec 0.1
asoc: cq93vc <-> davinci-vcif mapping ok
ALSA device list:
#0: On-chip voice codec (cq93vc)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-01-03 17
:47:24 (946921644)
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
IP-Config: Complete:
device=eth0, addr=192.168.1.168, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.168, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
yaffs: dev is 1048576 name is "ram0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 1.0, "ram0"
yaffs: dev is 1048576 name is "ram0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 1.0, "ram0"
XFS: bad magic number
XFS: SB validate failed
No filesystem could mount root, tried: ext3 ext2 cramfs squashfs msdos vfat yaf
fs yaffs2 xfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
to compare, I teset the Appro release prebuild images(uImage_ipnc_dm368_2.0.0, cramfsImage_ipnc_dm368_2.0.0), It is OK.
I think It maybe may image size don't match IPNC368 hardware nand and sdram memory layout, but I don't know how to resolve this problem. I don't know how and where to get the IPNC368's hardware memory layout and software use arrange(such as uboot, kernel, roofs, /dev/mtd*,....), who can tell these ?
Due to increase in cramfs size, the 46M size is not enough to uncompress the cramfs during boot up.
You need to free some more Cmem memory and change it to mem=52M or higher.
Regards,
Raghu
Thanks Raghu!
I have resolved the kernel panic(increase the initrd uncompress sdram size).
But the increased initrd size cause new problems, It conflict with mtd partition 'data1' in nand and 'cmem' address space in sdram. I don't know why the initrd size increase so large, my build get a 19M cramfs image, but the appro prebuild is about 12M. I just add a little code to test
I found problem is caused because I my use nfs, I mount nfs root filesys directly to my PC's target/filesys. But I generate some snapshot jpg file in IPNC36X, those are saved in target/filesys/mnt/mmc(in this situation, the mmc directory's space is not storage card).