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.

8168evm启动挂载nfs错误,无法进入linux根目录

Other Parts Discussed in Thread: TVP5158

大家好,我拿到TI的8168EVM后按照其文档进行了如下操作,串口工具为MINICOM,启动板子后,终止系统,进入UBOOT环境,进行如下配置:(目的就是想通过TFTP下载内核,用NFS挂载跟文件系统)

(1)Flashing U-Boot from U-Boot  (Using NAND Boot):

mw.b 0x81000000 0xFF 0x32800;tftp 0x81000000 uboot_NAND_DM816X_EVM;nandecc hw 2;nand erase 0x0 0x240000;nand write.i 0x81000000 0x0 0x32800

(2)Flashing Linux Kernel from U-Boot (Using TFTP For flashing uImage to NAND):

mw.b 0x81000000 0xFF 0x300000;tftp 0x81000000 uImage_DM816X_EVM;nand erase 0x00580000 0x440000;nand write.i 0x81000000 0x00580000 0x300000

(3)TFTP server is used for booting kernel, NFS is used as root filesystem:

setenv bootargs 'mem=116M console=ttyO2,115200n8 root=/dev/nfs rw nfsroot=192.168.0.153:/usr/DVRRDK_03.00.00.00/target/rfs_816x ip=192.168.0.152:192.168.0.153:192.168.0.1:255.255.255.0::eth1:off vram=20M notifyk.vpssm3_sva=0xBEE00000'

setenv bootcmd 'tftp 0x81000000 uImage_DM816X_EVM;bootm 0x81000000'

板子的配置参数为:

TI8168_EVM#print

baudrate=115200

verify=yes

loadaddr=0x81000000

script_addr=0x80900000

loadbootscript=fatload mmc 0 ${script_addr} boot.scr

bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}

ethact=DaVinci EMAC

autoload=no

bootdelay=3

ethaddr=00:0c:29:23:01:89

logoreadaddr=0x81000000

hwver=0.3

bootfile=uImage-dm816x-evm.bin

stdin=serial

stdout=serial

stderr=serial

ver=U-Boot 2010.06 (Jul 29 2012 - 19:38:07)

filesize=270D80

fileaddr=81000000

gatewayip=192.168.0.1

netmask=255.255.255.0

ipaddr=192.168.0.152

serverip=192.168.0.153

bootargs=mem=116M console=ttyO2,115200n8 root=/dev/nfs rw nfsroot=192.168.0.153:/usr/DVRRDK_03.

00.00.00/target/rfs_816x ip=192.168.0.152:192.168.0.153:192.168.0.1:255.255.255.0::eth1:off vra

m=20M notifyk.vpssm3_sva=0xBEE00000

bootcmd=tftp 0x81000000 uImage_DM816X_EVM;bootm 0x81000000

Environment size: 839/8188 bytes

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

save后重启板子,系统开始进入LINUX,打印了如下信息:

Net:   Detected MACID:0:c:29:23:1:89

Ethernet PHY: GENERIC @ 0x01

DaVinci EMAC

Hit any key to stop autoboot:  0

Using DaVinci EMAC device

TFTP from server 192.168.0.153; our IP address is 192.168.0.152

Filename 'uImage_DM816X_EVM'.

Load address: 0x81000000

Loading: T #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #############################################

done

Bytes transferred = 2559360 (270d80 hex)

## Booting kernel from Legacy Image at 81000000 ...

   Image Name:   Linux-2.6.37+

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2559296 Bytes = 2.4 MiB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

Linux version 2.6.37+ (x0161644@bangvideoapps01) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-2

03) ) #1 Wed Aug 1 22:24:09 IST 2012

CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: ti8168evm

vram size = 20971520 at 0x0

reserved size = 20971520 at 0x0

FB: Reserving 20971520 bytes SDRAM for VRAM

Memory policy: ECC disabled, Data cache writeback

OMAP chip is TI8168 2.0

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24344

Kernel command line: mem=116M console=ttyO2,115200n8 root=/dev/nfs rw nfsroot=192.168.0.153:/us

r/DVRRDK_03.00.00.00/target/rfs_816x ip=192.168.0.152:192.168.0.153:192.168.0.1:255.255.255.0::

eth1:off vram=20M notifyk.vpssm3_sva=0xBEE00000

PID hash table entries: 512 (order: -1, 2048 bytes)

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Memory: 96MB = 96MB total

Memory: 91752k/91752k available, 27032k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)

    vmalloc : 0x87800000 - 0xf8000000   (1800 MB)

    lowmem  : 0x80000000 - 0x87400000   ( 116 MB)

    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

    modules : 0x7f000000 - 0x7fe00000   (  14 MB)

      .init : 0x80008000 - 0x8003b000   ( 204 kB)

      .text : 0x8003b000 - 0x804d7000   (4720 kB)

      .data : 0x804d8000 - 0x80520f40   ( 292 kB)

SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

NR_IRQS:407

IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts

Total of 128 interrupts on 1 active controller

GPMC revision 6.0

Trying to install interrupt handler for IRQ400

Trying to install interrupt handler for IRQ401

Trying to install interrupt handler for IRQ402

Trying to install interrupt handler for IRQ403

Trying to install interrupt handler for IRQ404

Trying to install interrupt handler for IRQ405

Trying to install interrupt handler for IRQ406

Trying to install type control for IRQ407

Trying to set irq flags for IRQ407

OMAP clockevent source: GPTIMER1 at 27000000 Hz

Console: colour dummy device 80x30

Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)

pid_max: default: 32768 minimum: 301

Security Framework initialized

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

devtmpfs: initialized

omap_voltage_early_init: voltage driver support not added

regulator: core version 0.5

regulator: dummy:

NET: Registered protocol family 16

omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!

omap_voltage_add_dev: VDD specified does not exist!

OMAP GPIO hardware version 0.1

OMAP GPIO hardware version 0.1

omap_mux_init: Add partition: #1: core, flags: 0

_omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl

_omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda

NOR: Can't request GPMC CS

registered ti816x_sr device

pm_dbg_init: only OMAP3 supported

registered ti81xx_vpss device

registered ti81xx_vidout device

registered ti81xx on-chip HDMI device

registered ti81xx_fb device

ti81xx_pcie: Invoking PCI BIOS...

ti81xx_pcie: Setting up Host Controller...

ti81xx_pcie: Register base mapped @0x87820000

ti81xx_pcie: Starting PCI scan...

PCI: bus0: Fast back to back transfers enabled

bio: create slab <bio-0> at 0

vgaarb: loaded

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

USBSS revision 4ea20809

registerd cppi-dma Intr @ IRQ 17

Cppi41 Init Done

omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz

omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz

Advanced Linux Sound Architecture Driver Version 1.0.23.

Switching to clocksource gp timer

musb-hdrc: version 6.0, host, debug=0

musb-hdrc musb-hdrc.0: dma type: dma-cppi41

MUSB controller-0 revision 4ea20800

musb-hdrc musb-hdrc.0: MUSB HDRC host driver

musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: MUSB HDRC host driver

usb usb1: Manufacturer: Linux 2.6.37+ musb-hcd

usb usb1: SerialNumber: musb-hdrc.0

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

musb-hdrc musb-hdrc.0: USB Host mode controller at 8781e000 using DMA, IRQ 18

musb-hdrc musb-hdrc.1: dma type: dma-cppi41

MUSB controller-1 revision 4ea20800

musb-hdrc musb-hdrc.1: MUSB HDRC host driver

musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2

usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb2: Product: MUSB HDRC host driver

usb usb2: Manufacturer: Linux 2.6.37+ musb-hcd

usb usb2: SerialNumber: musb-hdrc.1

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

musb-hdrc musb-hdrc.1: USB Host mode controller at 87826800 using DMA, IRQ 19

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

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

NetWinder Floating Point Emulator V0.97 (double precision)

PMU: registered new PMU device of type 0

omap-iommu omap-iommu.0: ducati registered

omap-iommu omap-iommu.1: sys registered

JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.

msgmni has been set to 179

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0

omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1

omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2

console [ttyO2] enabled

brd: module loaded

loop: module loaded

ahci ahci.0: forcing PORTS_IMPL to 0x3

ahci ahci.0: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform mode

ahci ahci.0: flags: ncq sntf pm led clo only pmp pio slum part ccc

scsi0 : ahci_platform

scsi1 : ahci_platform

ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x100 irq 16

ata2: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x180 irq 16

m25p80 spi1.0: found m25p05-nonjedec, expected w25x32

m25p80 spi1.0: m25p05-nonjedec (64 Kbytes)

Creating 4 MTD partitions on "spi_flash":

0x000000000000-0x000000040000 : "U-Boot"

mtd: partition "U-Boot" extends beyond the end of device "spi_flash" -- size truncated to 0x100

00

0x000000010000-0x000000012000 : "U-Boot Env"

mtd: partition "U-Boot Env" is out of reach -- disabled

0x000000000000-0x000000280000 : "Kernel"

mtd: partition "Kernel" extends beyond the end of device "spi_flash" -- size truncated to 0x100

00

0x000000010000-0x000000010000 : "File System"

mtd: partition "File System" is out of reach -- disabled

omap2-nand driver initializing

NAND device: Maf ID: 0x2c, Chip ID: 0xca (Micron, )

 erasesize: 0x20000, writesize: 2048, oobsize: 64

Creating 6 MTD partitions on "omap2-nand.0":

0x000000000000-0x000000260000 : "U-Boot"

0x000000260000-0x000000280000 : "U-Boot Env"

0x000000280000-0x000000580000 : "U-Boot Logo"

0x000000580000-0x0000009c0000 : "Kernel"

0x0000009c0000-0x00000d1e0000 : "File System"

0x00000d1e0000-0x000010000000 : "Reserved"

davinci_mdio davinci_mdio.0: davinci mdio revision 1.6

davinci_mdio davinci_mdio.0: detected phy mask fffffff9

davinci_mdio.0: probed

davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown

davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown

usbcore: registered new interface driver cdc_ether

usbcore: registered new interface driver dm9601

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

mice: PS/2 mouse device common for all mice

omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0

i2c /dev entries driver

Linux video capture interface: v2.00

usbcore: registered new interface driver uvcvideo

USB Video Class driver (v1.0.0)

OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbee00000

usbcore: registered new interface driver snd-usb-audio

Registered tvp5158 audio codec

asoc: tvp5158-hifi <-> davinci-mcasp.0 mapping ok

asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok

asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok

ALSA device list:

  #0: TI81XX EVM

TCP cubic registered

NET: Registered protocol family 17

VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3

omap_voltage_late_init: Voltage driver support not added

Power Management for TI81XX.

smartreflex-ti816x: ti816x_sr_probe done!

omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

net eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:02, id=282f014)

IP-Config: Complete:

     device=eth1, addr=192.168.0.152, mask=255.255.255.0, gw=192.168.0.1,

     host=192.168.0.152, domain=, nis-domain=(none),

     bootserver=192.168.0.153, rootserver=192.168.0.153, rootpath=

ata2: SATA link down (SStatus 0 SControl 300)

ata1: SATA link down (SStatus 0 SControl 300)

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; here are the available partitions:

1f00              64 mtdblock0  (driver?)

1f02              64 mtdblock2  (driver?)

1f04            2432 mtdblock4  (driver?)

1f05             128 mtdblock5  (driver?)

1f06            3072 mtdblock6  (driver?)

1f07            4352 mtdblock7  (driver?)

1f08          204928 mtdblock8  (driver?)

1f09           47232 mtdblock9  (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

Backtrace:

[<80049b7c>] (dump_backtrace+0x0/0x10c) from [<8039a3f0>] (dump_stack+0x18/0x1c)

 r7:85bf8000 r6:00000000 r5:8002e874 r4:80521750

[<8039a3d8>] (dump_stack+0x0/0x1c) from [<8039a454>] (panic+0x60/0x17c)

[<8039a3f4>] (panic+0x0/0x17c) from [<80009254>] (mount_block_root+0x1e0/0x220)

 r3:00000000 r2:00000000 r1:85825f58 r0:804587ec

[<80009074>] (mount_block_root+0x0/0x220) from [<80009340>] (mount_root+0xac/0xcc)

[<80009294>] (mount_root+0x0/0xcc) from [<800094d0>] (prepare_namespace+0x170/0x1d4)

 r4:80520fa4

[<80009360>] (prepare_namespace+0x0/0x1d4) from [<80008784>] (kernel_init+0x114/0x154)

 r5:80008670 r4:80520f40

[<80008670>] (kernel_init+0x0/0x154) from [<80070ae8>] (do_exit+0x0/0x5e4)

 r5:80008670 r4:00000000

 遇到这种情况该如何解决??求救高手!!

 

  • 确认几样东西:

    1. 你在主机上做的NFS服务是否确认正常使用,可以采用mount -t nfs  <要挂载 目录> /<目标目录> 的方式来检测,或者用网络上的其他机器来挂载

    2. 修改bootargs的ip设置到dhcp

    3. 目前你用的binary是pre build还是自己做的?

  • 我也碰到类似的问题,在主机上测试mount自己是可以的,和楼主不同的是

    bootargs=mem=116M console=ttyO2,115200n8 root=/dev/nfs rw nfsroot=192.168.0.153:/usr/DVRRDK_03.

    00.00.00/target/rfs_816x ip=192.168.0.152:192.168.0.153:192.168.0.1:255.255.255.0::eth1:off vra

    m=20M notifyk.vpssm3_sva=0xBEE00000中我用的是eth0, 我用的是开发套件prebuild的内核,我使过ip=dhcp,也是不行,dhcp的时候主机好像没回应,请教可能是什么原因,谢谢

  • 我也碰到类似的问题,在主机上测试mount自己是可以的,和楼主不同的是

    bootargs=mem=116M console=ttyO2,115200n8 root=/dev/nfs rw nfsroot=192.168.0.153:/usr/DVRRDK_03.

    00.00.00/target/rfs_816x ip=192.168.0.152:192.168.0.153:192.168.0.1:255.255.255.0::eth1:off vra

    m=20M notifyk.vpssm3_sva=0xBEE00000中我用的是eth0, 我用的是开发套件prebuild的内核,我使过ip=dhcp,也是不行,dhcp的时候主机好像没回应,请教可能是什么原因,谢谢

  •    从日志上来看,你在uboot下网络是通的,你bootargs的ip地址可以与uboot的环境变量保持一致,如果你用的是母版的网口,请使用eth0。请给/usr/DVRRDK_03.00.00.00/target/rfs_816x 777的权限,另外请根据一下的步骤将NFS server 检查一下。

    More details:http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_User_Guide

    Setup NFS service

       Description: NFS means Network File System, you can follow below steps to install and configure it, “#” prefix means this is command in command line.
    
       Step 1: Downloading and installation:
       #sudo apt-get install nfs-kernel-server
    
       Step 2: Modify configuration file of nfs: (in DIR: /etc/exports) 
       #sudo gedit /etc/exports
       add below lines to file /etc/exports
       /home/your_nfs_directory *(rw, sync, no_subtree_check, no_root_squash)
    
       Step 3: /home/your_nfs_directory is root directory of EVM, so add full mode support to it, “-R” means changes files and directories recursively:
       #chmod –R 777 /home/your_nfs_directory
    
       Step 4: Restart NFS service
       #sudo service portmap restart
       #sudo service nfs-kernel-server restart
    
  • 我的bootargs里IP和u-boot下的是一致的,我用的是母板的网口,是用的eth0,按你说的NFS配置方式重新配置了一遍,还是不行。

    我的环境变量如下:

    printenv

    bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else echo In case ENV on MMC/SD is required; echo Please put a valid script named boot.scr on the card; echo Refer to the User Guide on how to generate the image; fi; else echo Please set bootargs and bootcmd before booting the kernel; echo If that has already been done please ignore this message; fi
    bootdelay=3
    baudrate=115200
    autoload=no
    verify=yes
    bootfile=uImage
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    loadbootscript=fatload mmc 1 ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    stdin=serial
    stdout=serial
    stderr=serial
    ethaddr=00:18:31:e6:cf:3c
    ethact=DaVinci EMAC
    ver=U-Boot 2010.06 (Jun 01 2011 - 12:30:57)
    ipaddr=192.168.0.12
    serverip=192.168.0.11
    bootargs=console=ttyO2,115200n8 rootwait root=/dev/nfs rw nfsroot=192.168.0.11:/home/sony/targetfs mem=256M earlyprintk vram=50M ti816xfb.vram=0:16M,2:6M ip=192.168.0.12:192.168.0.11:192.168.0.1:255.255.255.0::eth0:off noinitrd

    Environment size: 1050/8188 bytes
    TI8168_EVM#