[yocto] nfs-boot problem

Matthias.Heise at atlas-elektronik.com Matthias.Heise at atlas-elektronik.com
Wed Dec 10 00:31:04 PST 2014


Hello Jim,
thank you for your reply, yes in the meantime I found out why that nfsroot path isn't set correctly, there is a wrong line in the "wandboard.h" in u-boot.
Now the regarding line looks like this
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.1:/home/theuser/linktorootfs,v3,tcp
Which seems to be correct as the system starts now. The "rootpath" however is still empty.
The remaining problem I have is a write problem, somewhere a "rw" setting seems to be missing, although the "mount" command tells that the filesystem is mounted "rw".
As to the rootfs, this folder
fsl-community-bsp/build/tmp/work/wandboard_quad-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs
seems to be exactly the structure that is packed into the image.tar.bz2 so I thought it is a good idea to directly use it as nfs share. Is there some reason not to do so ?
Thank you
Regards,
Mat



Von: Jim Rafert [mailto:jimr at spectralogic.com]
Gesendet: Dienstag, 9. Dezember 2014 17:28
An: Heise, Matthias; yocto at yoctoproject.org
Betreff: RE: [yocto] nfs-boot problem

Hi Matthias,

Sorry, I missed the kernel command line in all the other gobbledy-gook put out by the boot.
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=:,v3,tcp
That doesn't look right to me.

-Jim-


________________________________
From: Matthias.Heise at atlas-elektronik.com<mailto:Matthias.Heise at atlas-elektronik.com> [Matthias.Heise at atlas-elektronik.com]
Sent: Tuesday, December 09, 2014 5:17 AM
To: yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>
Subject: [yocto] nfs-boot problem
Hello,

I'm struggling getting my wandboard booting via tftp/nfs.
The first part was easy I just set up the tftp server and pointed it to the kernel image and *.dtb file,
in the wandboard.h of u-boot I set

#define CONFIG_BOOTCOMMAND \
                               "run netboot;"

The kernel starts ok I think :

U-Boot 2014.10+fslc+g5fd0b60 (Dec 09 2014 - 11:39:57)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: Wandboard
I2C:   ready
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

auto-detected panel HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
Booting from net ...
BOOTP broadcast 1
DHCP client bound to address 10.42.0.84 (3 ms)
Using FEC device
TFTP from server 10.42.0.1; our IP address is 10.42.0.84
Filename 'zImage'.
Load address: 0x12000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################
         8.4 MiB/s
done
Bytes transferred = 5442656 (530c60 hex)
BOOTP broadcast 1
DHCP client bound to address 10.42.0.84 (2 ms)
Using FEC device
TFTP from server 10.42.0.1; our IP address is 10.42.0.84
Filename 'imx6q-wandboard.dtb'.
Load address: 0x18000000
Loading: #########
         4.1 MiB/s
done
Bytes transferred = 43370 (a96a hex)
Kernel image @ 0x12000000 [ 0x000000 - 0x530c60 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Using Device Tree in place at 18000000, end 1800d969

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.10.17-1.0.1-wandboard+ga6e7fc5 (theuser at debianDevHost) (gcc version 4.9.1 (GCC) ) #1 SMP PREEMPT Fri Nov 28 15:51:4
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Wandboard Quad based on Freescale i.MX6 Quad
Truncating RAM at 10000000-8fffffff to -7f7fffff (vmalloc region overlap).
cma: CMA: reserved 256 MiB at 6e000000
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @81b57000 s8832 r8192 d15744 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 453136
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=:,v3,tcp
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 1784MB = 1784MB total
Memory: 1534420k/1534420k available, 292396k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0x80000000 - 0xef800000   (1784 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x80c429c8   (12523 kB)
      .init : 0x80c43000 - 0x80c87280   ( 273 kB)
      .data : 0x80c88000 - 0x80cd9700   ( 326 kB)
       .bss : 0x80cd9700 - 0x80d3e8b8   ( 405 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.

.....

then it tries to get the rootfs which fails. On the host I set up the nfs server and made some tests - it is accessible.

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1)
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
libphy: 2188000.ethernet:01 - Link is Up - 1000/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 10.42.0.1, my address is 10.42.0.84
IP-Config: Complete:
     device=eth0, hwaddr=00:1f:7b:b4:12:00, ipaddr=10.42.0.84, mask=255.255.255.0, gw=10.42.0.1
     host=10.42.0.84, domain=, nis-domain=(none)
     bootserver=10.42.0.1, rootserver=10.42.0.1, rootpath=
     nameserver0=10.42.0.1
ALSA device list:
  #0: imx6-wandboard-sgtl5000
  #1: imx-spdif
  #2: imx-hdmi-soc
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
b300        15558144 mmcblk0  driver: mmcblk
  b301            8192 mmcblk0p1 000c648f-01
  b302           28672 mmcblk0p2 000c648f-02
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU2: stopping
CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.10.17-1.0.1-wandboard+ga6e7fc5

During the boot process I recognized two things in the log which I suspect to be not ok, but wasn't able to resolve them, these
are the empty nfsroot :  Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=:,v3,tcp
And the empty rootpath : bootserver=10.42.0.1, rootserver=10.42.0.1, rootpath=

I tried to set them as CONFIG_EXTRA_ENV_SETTINGS  but that didn't succeed (was ignored or didn't have any effect).
Do you have a hint for me what could be wrong and how to resolve this ?
Also (probably secondary problem) : I just set the folder fsl-community-bsp/build/tmp/work/wandboard_quad-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs in my /etc/exports file for the nfs, is that ok ? or which rootfs should I use?
Thank you very much,
Regards,
Mat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20141210/9ee99e50/attachment.html>


More information about the yocto mailing list