Boot IMX6ULL from TFTP/NFS

Hallo,

  1. How to setup Networking for Embedded Linux Application Development | Toradex Developer Center
  2. Boot from a TFTP/NFS Server | Toradex Developer Center

I followed the mentioned two links to boot via TFTP/NFS . The zImage loads and the boot starts but then stops and this message is shown :

[    2.501996] imx_thermal 2000000.aips-bus:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    2.518209] input: gpio-keys as /devices/soc0/gpio-keys/input/input1
[    2.527282] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 02:12:34 UTC (7954)
[    2.640083] Micrel KSZ8041 20b4000.ethernet-1:02: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=20b4000.ethernet-1:02, irq=-1)
[    2.668487] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.730420] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    4.754749] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    4.779517] Sending DHCP requests ., OK
[    4.821935] IP-Config: Got DHCP answer from 192.168.0.1, my address is 192.168.0.10
[    4.833814] IP-Config: Complete:
[    4.839117]      device=eth0, hwaddr=00:14:2d:61:a3:ee, ipaddr=192.168.0.10, mask=255.255.255.0, gw=192.168.0.1
[    4.853554]      host=colibri, domain=colibri.net, nis-domain=(none)
[    4.862206]      bootserver=192.168.0.1, rootserver=192.168.0.1, rootpath=rootfs,v4,tcp,clientaddr=0.0.0.0     nameserver0=192.168.0.1
[    4.879646] soc_in: disabling
[    4.884947] ALSA device list:
[    4.890268]   No soundcards found.
[    4.929280] VFS: Mounted root (nfs4 filesystem) readonly on device 0:13.
[    4.940580] devtmpfs: mounted
[    4.947328] Freeing unused kernel memory: 1024K
[   77.950744] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[   77.982033] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

Could anyone please tell me what should be done here ?

I am facing the same error when i try to boot from sd card by following this link :

I have built the images from Yocto project , which gives me kernel ,dtb and also rootfs.

Thank You

What exact software versions (workstation flavor and version as well as target) of things are you talking about?

I have built the images from Yocto project , which gives me kernel ,dtb and also rootfs.

And if regularly installed (e.g. using the Toradex Easy Installer) they do work?

Most likely your NFS setup is not proper meaning either misconfigured or some security aspect.

Host : Ubuntu 18.04 ,on which the Yocto project is built.
In the Yocto project , MACHINE : colibri-imx6ULL , Distro - poky.

I have the pre-built image running on the board which was installed with the Toradex Easy Installer.
I try to use the same to boot from SD card and also via TFTP/NFS.

But i am facing the same error “Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.” , in both the cases(SD card or TFTP/NFS).

Hi kavya,

Please try first mounting your NFS-drive from a running BSP. Install a stock BSP using Toradex Easy Installer.

After booting you can try mounting your shared folder. I quickly tried too and that worked for me:

 mount -v -t nfs -o vers=4 192.168.10.1:colibri-imx6ull /mnt

For your side a command like the following should work:

 mount -v -t nfs -o vers=4 192.168.0.1:rootfs /mnt
  • This will try to connect to a shared folder on your host (192.168.0.1) in folder /srv/nfs/rootfs. Assuming you shared the folder /srv/nfs (you can check that in /etc/exports file).
  • Make also sure the NFS-Server on your host is running with: systemctl status nfs-server
  • The above command is verbose so you should be able to tell from it’s output what it don’t like.
  • What I also can imagine is that your Ubuntu has some firewall restrictions or restrictions with “AppArmor”.

Hope this helps otherwise, don’t hesitate to ask

Philippe

Hi Phillippe,
Thank you for your reply.

On running the : mount -v -t nfs -o vers=4 192.168.0.1:rootfs /mnt , the rootfs is mounted

but the same is not happening from boot .

I am setting the following from u-boot :

setenv nfsargs 'nfsrootdebug root=/dev/nfs rw nfsroot=192.168.0.1:/srv/nfs/rootfs,nolock ip=192.168.0.10:192.168.0.1:192.168.0.1:255.255.255.0:toradex::off'

setenv nfsboot 'run setup; setenv bootargs ${defargs} ${nfsargs} ${setupargs} ${vidargs}; echo Booting from NFS...;tftp ${kernel_addr_r} zImage && tftp ${fdt_addr_r} imx6ull-colibri-wifi-eval-v3.dtb && run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}'

run nfsboot

The output :

NET: Registered protocol family 29
[    2.323645] can: raw protocol (rev 20120528)
[    2.331909] can: broadcast manager protocol (rev 20161123 t)
[    2.341532] can: netlink gateway (rev 20130117) max_hops=1
[    2.351364] 8021q: 802.1Q VLAN Support v1.8
[    2.359720] Key type dns_resolver registered
[    2.371667] cpu cpu0: Registered imx6q-cpufreq
[    2.401005] Registering SWP/SWPB emulation handler
[    2.408660] registered taskstats version 1
[    2.443966] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.450671] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
[    2.490835] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    2.499384] hub 2-0:1.0: USB hub found
[    2.505129] hub 2-0:1.0: 1 port detected
[    2.513334] imx_thermal 2000000.aips-bus:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    2.529547] input: gpio-keys as /devices/soc0/gpio-keys/input/input1
[    2.538616] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:55:43 UTC (3343)
[    2.651354] Micrel KSZ8041 20b4000.ethernet-1:02: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=20b4000.ethernet-1:02, irq=-1)
[    2.679792] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.731804] fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    4.755698] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    4.780888] IP-Config: Complete:
[    4.792393]      device=eth0, hwaddr=00:14:2d:61:a3:ee, ipaddr=192.168.0.10, mask=255.255.255.0, gw=192.168.0.1
[    4.819447]      host=toradex, domain=, nis-domain=(none)
[    4.833538]      bootserver=192.168.0.1, rootserver=192.168.0.1, rootpath=
[    4.850507] soc_in: disabling
[    4.855930] ALSA device list:
[    4.861164]   No soundcards found.

the process stops here.

It now works!! The configuration that worked for me :

setenv nfsargs ‘nfsrootdebug root=/dev/nfs rw nfsroot=192.168.0.1:rootfs,v4,tcp,clientaddr=0.0.0.0 ip=192.168.0.10:192.168.0.1:192.168.0.1:255.255.255.0:toradex::off’

Thank You all !

Good to hear that it works now!

You’re very welcome.

Best regards,
Philippe