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.

DM365/DM368 boot from Flash using shared NFS file system, problem

Hello,

I have a DMVA2 IP camera, that is based on DM368. I am trying to boot from flash using a file system on my host Linux pc, but it ends in kernel panic: anyone can help?

So, on my Fedora9 host PC (a virtual machine) I have the folder

/home/giovanni/Desktop/ipnc/target/filesys

with the file system. 

The firewall is down. The /etc/exports is properly configured. The nfs is up and running. (I followed the instructions in http://processors.wiki.ti.com/index.php/GSG:_DM365_DVEVM_Software_Setup_for_MontaVista_Kernel#Testing_the_Shared_File_System)

On the IP cam, I abort the boot sequence, and do the following

setenv bootcmd 'nboot 0x80700000 0 0x500000;bootm'
setenv nfshost 192.168.1.107 (that is my host pc)
setenv rootpath /home/giovanni/Desktop/ipnc/target/filesys
setenv bootargs console=ttyS1,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=$(nfshost):$(rootpath), nolock mem=48M
boot
(btw: dhcp is up and running. If I run "dhcp" from the uboot consolle, it gets a proper Ip and everything)
and this is what I get:


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: 1809716 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: 1809716 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.6.0 (anandyk@mapplinux03.india.ti.com) (gcc version 4.2.0 20070126 (prerelease) (MontaVista 4.2.0-3.0.0.0702771 2007-03-10)) #1 PREEMPT Thu May 12 17:12:45 IST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM368 IPNC
Memory policy: ECC disabled, Data cache writeback
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: 12288
Kernel command line: console=ttyS1,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.1.107:/home/giovanni/Desktop/ipnc/target/filesys, nolock mem=48M
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: 48MB = 48MB total
Memory: 44684KB available (3105K code, 643K data, 180K 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 May 12 2011 17:09:48 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
Linux video capture interface: v2.00
Trying to register davinci display video device.
layer=c0635a00,layer->video_dev=c0635b60
Trying to register davinci display video device.
layer=c0635800,layer->video_dev=c0635960
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-bit)
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-01 00:58:22 (946688302)
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: No network devices available.
Looking up port of RPC 100003/2 on 192.168.1.107
portmap: RPC call returned error 101
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.107
portmap: RPC call returned error 101
Root-NFS: Unable to get mountd port number from server, using default
mount: RPC call returned error 101
Root-NFS: Server returned error -101 while mounting /home/giovanni/Desktop/ipnc/target/filesys
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
any idea on what I might do? Any help is greatly appreciated.
Giovanni
  • Hi,

    Looks ok from  the bootargs. Did you check from the uboot console  can you ping your host machine(virtual machine) ?

    If it doesn't work try giving a static ip.

    Regards,

    --Prabhakar Lad

  • Hi,

    It looks like you have built with RELEASE config of running by NAND.

    Can you run these for running using NFS as mentioned in Userguide

    cd ti-davinci/arch/arm/configs
    cp davinci_dm368_ipnc_defconfig_dbg davinci_dm368_ipnc_defconfig

    Let us know if it helps, or please share you ENV params

    Regards,

    Raghu

  • Dear Prabhakar,

    following your suggestion, I tried with static IP, from Uboot console the ping toward my nfs server 192.168.1.107 is OK, but the boot fails in the same way

    DM368 IPNC :>setenv bootcmd 'nboot 0x80700000 0 0x500000;bootm'
    DM368 IPNC :>setenv nfshost 192.168.1.107
    DM368 IPNC :>setenv ipaddr 192.168.1.110
    DM368 IPNC :>setenv serverip 192.168.1.107
    DM368 IPNC :>setenv rootpath /home/giovanni/Desktop/ipnc/target/filesys
    DM368 IPNC :>setenv bootargs console=ttyS1,115200n8 noinitrd rw ip=192.168.1.110:192.168.1.107:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:A0:08:ab root=/dev/nfs nfsroot=$(nfshost):$(rootpath), nolock mem=48M
    DM368 IPNC :>ping 192.168.1.107
    host 192.168.1.107 is alive
    DM368 IPNC :>boot
    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: 1809716 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: 1809716 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.6.0 (anandyk@mapplinux03.india.ti.com) (gcc version 4.2.0 20070126 (prerelease) (MontaVista 4.2.0-3.0.0.0702771 2007-03-10)) #1 PREEMPT Thu May 12 17:12:45 IST 2011
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    Machine: DaVinci DM368 IPNC
    Memory policy: ECC disabled, Data cache writeback
    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: 12288
    Kernel command line: console=ttyS1,115200n8 noinitrd rw ip=192.168.1.110:192.168.1.107:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:A0:08:ab root=/dev/nfs nfsroot=192.168.1.107:/home/giovanni/Desktop/ipnc/target/filesys, nolock mem=48M
    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: 48MB = 48MB total
    Memory: 44684KB available (3105K code, 643K data, 180K 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 May 12 2011 17:09:48 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
    Linux video capture interface: v2.00
    Trying to register davinci display video device.
    layer=c060da00,layer->video_dev=c060db60
    Trying to register davinci display video device.
    layer=c060d800,layer->video_dev=c060d960
    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-bit)
    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-01 00:18:49 (946685929)
    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: No network devices available.
    Looking up port of RPC 100003/2 on 192.168.1.107
    portmap: RPC call returned error 101
    Root-NFS: Unable to get nfsd port number from server, using default
    Looking up port of RPC 100005/1 on 192.168.1.107
    portmap: RPC call returned error 101
    Root-NFS: Unable to get mountd port number from server, using default
    mount: RPC call returned error 101
    Root-NFS: Server returned error -101 while mounting /home/giovanni/Desktop/ipnc/target/filesys
    VFS: Unable to mount root fs via NFS, trying floppy.
    VFS: Cannot open root device "nfs" or unknown-block(2,0)
    Please append a correct "root=" boot option
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
    
    

    Any further idea?

    Actually, in all this matter on DM36x/DMVA programming (from setting up an NFS to building my own video analysis application, managing the camera and the DSPs), I would like to understand better what is going on, but I could find only fragmented documentation that gives _a lot_ of things for granted; therefore I am just blindly trying one thing after another. Do you know if there is a _comprehensive_ documentation that might fit for beginners on these architectures? This would be highly appreciated!

    best regards 

    Giovanni

  • Hi,

    Well looks like ethernet is working fine. The error code -101 means "OS error code 101: Network is unreachable".

    Can you perform a quick check ,

    1:  check whether the path in /etc/exports is correct.

    2:  sudo exportfs -ra

    3:  sudo /etc/init.d/nfs-kernel-server restart

    One more thing how did you extract the nfs tar file? you need to extract it as sudo.

    Also have a look at this link http://wiki.voyage.hk/nfs_voyage.txt

    One more thing in mind since you have you NFS in in you virtual box, How is you network configured by NAT or bridge adapter,

    also try changing this.

    Regards,

    --Prabhakar Lad


  • Dear Raghu,

    indeed, I was wrongly using the release; however, I tried now using dbg as suggested on the user guide and also by you, recompiled all using make sysall, 

    restarted nfs just in case, repeated the setenv commands on uboot, but still getting the same identical kernel panic, no one bit of difference.

    This is what I get from printenv just after uboot abort (let me paste also the uboot initial lines, just in case...)

    DM36x initialization passed!
    TI UBL Base Version: 1.50
    Boot Loader BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000008.
    Boot Mode Task Completed

    IPNC UBL Version: 1.1.0
    Platform: DM368

    Jumping to entry point at 0x81080000

    U-Boot 1.3.4 (Dec 9 2010 - 17:44:14) DM368-IPNC-1.0.1

    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
    DM368 IPNC :>
    DM368 IPNC :>
    DM368 IPNC :>printenv
    bootdelay=4
    baudrate=115200
    bootfile="uImage"
    ethaddr=00:0C:0C:A0:FF:FA
    setboot=setenv bootargs $(bootargs)
    filesize=F50000
    fileaddr=82000000
    ipaddr=10.2.1.5
    serverip=10.2.1.231
    bootcmd=nand read 0x82000000 0x700000 0xf60000;nboot 0x80700000 0 0x500000;bootm 0x80700000
    bootargs=mem=48M console=ttyS1,115200n8 root=/dev/ram0 rw initrd=0x82000000,16M ip=192.168.1.101:192.168.1.100:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:A0:08:ab
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 1.3.4 (Dec 9 2010 - 17:44:14) DM368-IPNC-1.0.1

    Environment size: 535/131068 bytes
    and this is what I uses for trying NFS file system:
    setenv bootcmd 'nboot 0x80700000 0 0x500000;bootm' 
    setenv nfshost 192.168.1.107
    setenv ipaddr 192.168.1.110
    setenv serverip 192.168.1.107 (this should be for TFTP if I am not wrong: I am not using it, but I set this anyway just in case)
    setenv rootpath /home/giovanni/Desktop/ipnc/target/filesys
    setenv bootargs console=ttyS1,115200n8 noinitrd rw ip=192.168.1.110:192.168.1.107:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:A0:08:ab root=/dev/nfs nfsroot=$(nfshost):$(rootpath), nolock mem=48M
    boot
    the result is the same kernel panic as written in my other posts.
    I've never used NFS before, however I wonder: should I not set somewhere some user authentication from my DM368 to the NFS server?
    Thanks in advance for any hint. 
    best regards,
    Giovanni
  • Dear Prabhakar and Raghu,

    it is fixed now. On top of your suggestions, that were pointing to real problems in my set up, there was a further problem that was hindering the correct NFS booting;

    I write it here as reference to others: I was trying to use a compiled file system (through NFS) but before doing that, I missed to pre-load the corresponding kernel on the DM36x (uImage_ipnc_dmvax_xxx): indeed, I was using the kernel that was preloaded by the manifacturer, and that was most likely not compatible with the file system I had compiled on my host machine. So, I simply flashed through TFTP the compiled kernel and it works.

    well, thanks a lot, now my compiled "hello world" is visible and runs correctly.

    best regards

    Giovanni

  • Hi, 

    I had the same problem of kernel panic. And I loaded  my compiled uImage also, but it could not resolve the issue. Because it was not able to find root = /dev/nfs, and in my filesys compiled filesys does not have /dev/nfs.

    How can I fix this issue?

    Any suggestion will be helpful in solving this...

    Thanks in advance..