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.

EVMK2H Rev40 uboot tftp nfs

我的板子是EVMK2H  Rev40 ,希望通过tftp下载内核,nfs挂载文件系统,uboot(ver=U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 14:05:34 -0400) 中设置如下:

setenv serverip 192.168.2.192
setenv ipaddr 192.168.2.193
setenv tftp_root k2h                  
setenv nfs_root /opt/tftproot/nfsroot
setenv boot net

setenv name_fdt uImage-k2hk-evm.dtb
setenv name_kern uImage-keystone-evm.bin
setenv name_mon skern-k2hk-evm.bin
name_fw_rd=k2-fw-initrd.cpio.gz

saveenv

当在uboot中输入命令boot时,能下载所有文件,但是没有我期望的运行内核并挂载NFS文件系统,

下载完成后就停下了,显示如下:

-----------------------------------------------------------------------------------------------------------

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.2.177 (257 ms)
Using netcp@2000000 device
TFTP from server 192.168.2.192; our IP address is 192.168.2.177
Filename 'k2h/skern-k2hk-evm.bin'.
Load address: 0x87000000
Loading: ###
         1.6 MiB/s
done
Bytes transferred = 32832 (8040 hex)
## installed monitor @ 0xc5f0000, freq [200000000], status 207552512

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.2.177 (257 ms)
Using netcp@2000000 device
TFTP from server 192.168.2.192; our IP address is 192.168.2.177
Filename 'k2h/uImage-keystone-evm.bin'.
Load address: 0x82000000
Loading: #################################################################
         #################################################################
         #################################################################
         #######################################
         1.9 MiB/s
done
Bytes transferred = 3432704 (346100 hex)

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
DHCP client bound to address 192.168.2.177 (4 ms)
Using netcp@2000000 device
TFTP from server 192.168.2.192; our IP address is 192.168.2.177
Filename 'k2h/k2-fw-initrd.cpio.gz'.
Load address: 0x88080000
Loading: ####
         1.6 MiB/s
done
Bytes transferred = 50093 (c3ad hex)

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
DHCP client bound to address 192.168.2.177 (4 ms)
Using netcp@2000000 device
TFTP from server 192.168.2.192; our IP address is 192.168.2.177
Filename 'k2h/uImage-k2hk-evm.dtb'.
Load address: 0x88000000
Loading: ###
         1.7 MiB/s
done
Bytes transferred = 43942 (aba6 hex)
=>
--------------------------------------------------------------------------------------------------------

  • 问题已解决,是内核文件拷贝错误。但是,遇到一个新问题,昨天tftp下载内核,nfs主机文件系统都能成功登录,今天上班开机,出现把示:Welcome to emergPress enter for maintenance.详细信息如下:
    [ 5.084881] Sending DHCP requests ., OK
    [ 5.164820] IP-Config: Got DHCP answer from 192.168.2.55, my address is 192.168.2.182
    [ 5.172678] IP-Config: Complete:
    [ 5.175943] device=eth0, hwaddr=b4:99:4c:9f:7f:93, ipaddr=192.168.2.182, mask=255.2555
    [ 5.186286] host=192.168.2.182, domain=DHCP HOST, nis-domain=(none)
    [ 5.193009] bootserver=0.0.0.0, rootserver=192.168.2.192, rootpath= nameserver0=14
    [ 5.476604] VFS: Mounted root (nfs filesystem) on device 0:14.
    [ 5.482903] devtmpfs: mounted
    [ 5.486903] Freeing unused kernel memory: 2048K
    [ 5.501444] random: fast init done
    [ 5.777913] systemd[1]: System time before build time, advancing clock.
    [ 5.830317] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -AP)
    [ 5.848716] systemd[1]: Detected architecture arm.

    Welcome to Arago 2017.12!

    [ 5.886614] systemd[1]: Set hostname to <k2hk-evm>.
    [ 6.430896] systemd[1]: Reached target Swap.
    [ OK ] Reached target Swap.
    [ 6.466091] systemd[1]: Created slice System Slice.
    [ OK ] Created slice System Slice.
    [ 6.495047] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [ OK ] Started Dispatch Password Requests to Console Directory Watch.
    [ 6.534899] systemd[1]: Reached target Remote File Systems.
    [ OK ] Reached target Remote File Systems.
    [ 6.575006] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [ OK ] Started Forward Password Requests to Wall Directory Watch.
    [ 6.615402] systemd[1]: Created slice system-getty.slice.
    [ OK ] Created slice system-getty.slice.
    [ 6.655394] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [ OK ] Created slice system-serial\x2dgetty.slice.
    [ OK ] Listening on udev Kernel Socket.
    [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
    [ OK ] Listening on Journal Socket.
    Starting Setup Virtual Console...
    Mounting Debug File System...
    Starting alignment.service...
    Starting Remount Root and Kernel File Systems...
    [ OK ] Listening on Journal Socket (/dev/log).
    [ OK ] Created slice User and Session Slice.
    [ OK ] Listening on Syslog Socket.
    [ OK ] Listening on Process Core Dump Socket.
    [ OK ] Reached target Paths.
    Mounting POSIX Message Queue File System...
    Starting Create list of required st... nodes for the current kernel...
    Starting Load Kernel Modules...
    [ 7.219695] cmemk: loading out-of-tree module taints kernel.
    [ 7.226044] CMEMK module: reference Linux version 4.9.69
    [ 7.231763] allocated heap buffer 0xc100000 of size 0x480000
    [ 7.237470] cmemk initialized
    Starting Journal Service...
    [ 7.254709] cryptodev: driver 1.8 loaded.
    Mounting Temporary Directory...
    [ OK ] Listening on Network Service Netlink Socket.
    [ OK ] Listening on udev Control Socket.
    [ OK ] Reached targe[ 7.336927] NET: Registered protocol family 43
    t Slices.
    [ 7.354573] uio_module_drv soc:mpax: registered misc device mpax
    [ 7.360848] uio_module_drv soc:edma3: registered misc device edma3
    [ 7.367267] uio_module_drv soc:secmgr: registered misc device secmgr
    [ 7.373819] uio_module_drv soc:qmss: registered misc device qmss
    [ OK ] Started Journ[ 7.385804] uio_module_drv soc:hyperlink0: registered misc device hy0
    al Service.
    [ 7.394543] uio_module_drv soc:hyperlink1: registered misc device hyperlink1
    [ 7.402803] uio_module_drv soc:srio: registered misc device srio
    [ OK ] Started Setup Virtual Console.
    [FAILED] Failed to mount Debug File System.
    See 'systemctl status sys-kernel-debug.mount' for details.
    [ OK ] Started alignment.service.
    [FAILED] Failed to start Remount Root and Kernel File Systems.
    See 'systemctl status systemd-remount-fs.service' for details.
    [FAILED] Failed to mount POSIX Message Queue File System.
    See 'systemctl status dev-mqueue.mount' for details.
    [ OK ] Started Create list of required sta...ce nodes for the current kernel.
    [ OK ] Started Load Kernel Modules.
    [FAILED] Failed to mount Temporary Directory.
    See 'systemctl status tmp.mount' for details.
    [DEPEND] Dependency failed for Network Time Synchronization.
    [ OK ] Reached target System Time Synchronized.
    Mounting Configuration File System...
    Starting Apply Kernel Variables...
    Starting Create Static Device Nodes in /dev...
    Starting udev Coldplug all Devices...
    Starting Flush Journal to Persistent Storage...
    [FAILED] Failed to mount Configuration File System.
    See 'systemctl status sys-kernel-config.mount' for details.
    [ OK ] Started Apply Kernel Variables.
    [ OK ] Started Create Static Device Nodes in /dev.
    [ 8.166671] systemd-journald[131]: Received request to flush runtime journal from PID 1
    [ OK ] Reached target Local File Systems (Pre).
    Mounting /media/ram...
    Mounting /var/volatile...
    Starting udev Kernel Device Manager...
    [ OK ] Started Flush Journal to Persistent Storage.
    [FAILED] Failed to mount /media/ram.
    [ 8.363988] random: crng init done
    See 'systemctl status media-ram.mount' for details.
    [DEPEND] Dependency failed for Local File Systems.
    [FAILED] Failed to mount /var/volatile.
    See 'systemctl status var-volatile.mount' for details.
    [DEPEND] Dependency failed for Bind mount volatile /var/cache.
    [DEPEND] Dependency failed for Bind mount volatile /srv.
    [DEPEND] Dependency failed for Bind [ 8.559433] keystone-rproc 10800000.dsp: assigned rese0
    mount volatile /[ 8.570135] remoteproc remoteproc0: 10800000.dsp is available
    var/lib.
    [ 8.596524] keystone-rproc 11800000.dsp: assigned reserved memory node dsp_common_cma_pool0
    [ 8.607851] remoteproc remoteproc1: 11800000.dsp is available
    [DEPEND] Dependency failed for Bind mount volatile /var/spool.
    [ 8.624467] keystone-rproc 12800000.dsp: assigned reserved memory node dsp_common_cma_pool0
    [ 8.634192] remoteproc remoteproc2: 12800000.dsp is available
    [ 8.642804] keystone-rproc 13800000.dsp: assigned reserved memory node dsp_common_cma_pool0
    [ 8.653349] remoteproc remoteproc3: 13800000.dsp is available
    [ OK ] Started udev Coldplug all Dev[ 8.663182] keystone-rproc 14800000.dsp: assigned re0
    ices.
    [ 8.673900] remoteproc remoteproc4: 14800000.dsp is available
    [ 8.685059] keystone-rproc 15800000.dsp: assigned reserved memory node dsp_common_cma_pool0
    [ 8.694325] remoteproc remoteproc5: 15800000.dsp is available
    [ 8.702085] keystone-rproc 16800000.dsp: assigned reserved memory node dsp_common_cma_pool0
    [ 8.711356] remoteproc remoteproc6: 16800000.dsp is available
    [ OK 8.719041] keystone-rproc 17800000.dsp: assigned reserved memory node dsp_common_cm0
    m] Started udev [ 8.729015] remoteproc remoteproc7: 17800000.dsp is available
    Kernel Device Ma[ 8.736980] davinci-wdt 22f0080.wdt: heartbeat 60 sec
    nager.
    [ 8.818047] keystone-dsp-mem a0000000.dspmem: registered misc device dspmem
    [ 8.835070] 2620738.usb_phy supply vcc not found, using dummy regulator
    [ OK ] Found device /dev/ttyS0.
    [ 9.234689] keystone-crypto soc:subsys@20c0000:crypto@0: crypto accelerator enabled
    [ 9.766611] platform xhci-hcd.0.auto: set dma_pfn_offset00780000
    [ 9.818616] usbcore: registered new interface driver usbfs
    [ 9.824621] usbcore: registered new interface driver hub
    [ 9.830577] usbcore: registered new device driver usb
    [ 9.856668] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [ 9.862240] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    [ 9.871070] xhci-hcd xhci-hcd.0.auto: hcc params 0x0298f06d hci version 0x100 quirks 0x0200
    [ 9.879943] xhci-hcd xhci-hcd.0.auto: irq 34, io mem 0x02690000
    [ 9.886602] hub 1-0:1.0: USB hub found
    [ 9.890453] hub 1-0:1.0: 1 port detected
    [ 9.894746] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [ 9.900332] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    [ 9.908138] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 9.916902] hub 2-0:1.0: USB hub found
    [ 9.920743] hub 2-0:1.0: 1 port detected
    [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [ OK ] Reached target Login Prompts.
    Starting Synchronize System and HW clocks...
    [ OK ] Closed Syslog Socket.
    Starting Network Service...
    [ OK ] Reached target Timers.
    Starting Load/Save Random Seed...
    [ OK ] Started Emergency Shell.
    Mounting Configuration File System...
    [ OK ] Reached target Emergency Mode.
    [ OK ] Reached target Sockets.
    Starting Create Volatile Files and Directories...
    [ OK ] Started Network Service.
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    [ OK ] Started Load/Save Random Seed.
    [FAILED] Failed to mount Configuration File System.
    See 'systemctl status sys-kernel-config.mount' for details.
    [ OK ] Started Create Volatile Files and Directories.
    Starting Update UTMP about System Boot/Shutdown...
    [ OK ] Reached target Network.
    [ OK ] Started Update UTMP about System Boot/Shutdown.
    Starting Update UTMP about System Runlevel Changes...
    [ OK ] Started Update UTMP about System Runlevel Changes.
    Welcome to emergPress Enter for maintenance
    (or press Control-D to continue):
    sh-3.2#
  • uboot2017支持支持tftp下载zImage内核,不需要使用uImage。
  • Welcome to emergPress Enter for maintenance (or press Control-D to continue): sh-3.2#

    出现上面的问题的原因是:使用ubuntu的归档管理器(图形界面)解压文件系统。
    解决办法:在终端使用命令行解压: sudo tar -xf your-file-system.tar.xz