LX2160ARDB: Issue with NFS rootfs mounting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LX2160ARDB: Issue with NFS rootfs mounting

870 Views
amolshrotri
Contributor II

Hello,

We are working with LX2160ARDB and trying to setup the development environment with network booting and network rootfs / NFS. We could setup tftp and NFS server on our build system. And updated required u-boot environment variables. We are able to load both the kernel image and device tree image successfully but after kernel boots while trying to mount NFS getting kernel panic and failing to mount the rootfs. 

Below are u-boot environment variables setting.

setenv serverip <server ip address>
setenv ipaddr <ip address>
setenv nfs_ethact 'setenv ethact 'DPMAC3@xgmii''
setenv nfs_kernel 'Image.bin'
setenv nfs_dtb '2160ardb.dtb'
setenv nfs_path '/var/nfs/'
setenv nfs_bootargs 'setenv bootargs 'console=ttyAMA0,115200 root=/dev/nfs ip=${ipaddr} nfsroot=${serverip}:${nfs_path},v3,tcp rw''
setenv nfs_boot 'run nfs_ethact;run nfs_bootargs;tftp ${kernel_addr_r} ${nfs_kernel};tftp ${fdt_addr_r} ${nfs_dtb};booti ${kernel_addr_r} - ${fdt_addr_r}'

Build system:
-------------
NFS server is configured as below.

NFS:
----

File: /etc/exports

/var/nfs *(rw,no_root_squash,no_all_squash)

# sudo service nfs-kernel-server restart

 

Also we have double checked kernel configuration. NFS clients for version 2/3/4 all are by default enabled. We are building images with Yocto build system referring NXP SDK (Yocto release: kirkstone (2023 January   v22.04    4.0 Kirkstone   lf-5.15.52-2.1.0)) 

Did anybody face similar issue? Any pointers if any additional configuration needed?

 

Thanks & Regards,
Amol

0 Kudos
5 Replies

837 Views
yipingwang
NXP TechSupport
NXP TechSupport

After deploying rootfs on NFS server, please configure bootargs as the following

=>setenv bootargs root=/dev/nfs rw nfsroot=<tftp_serverip>:<nfs_root_path> ip=<board_ipaddr>:<tftp_serverip>:<your_gatewayip>:<your_netmask>:<board_name>:<ethx>:off console=ttyAMA0,115200

=>saveenv

<ethx> is the port connected on the Linux boot network.

 

=>tftp 0xa0000000 Image

=>tftp 0xb0000000 <dtb_file>

booti 0xa0000000 - 0xb0000000

 

Note:

a. On the Linux host NFS server, add the following line in the file /etc/exports:

nfs_root_path board_ipaddress(rw,no_root_squash,async)

b. Restart the NFS service:

/etc/init.d/portmap restart

/etc/init.d/nfs-kernel-server restart

0 Kudos

823 Views
amolshrotri
Contributor II

Thanks for the inputs.

We tried the similar setting as mentioned in your previous response. But still facing the same issue. We are using LX2160ARDB. We tested the same configuration both on 10GMAC3 and 1GMAC17 ethernet ports.

For using 10GMAC3 port in uboot we first set ethact to DPMAC3@xgmii (cmd: setenv ethact 'DPMAC3@xgmii ') and for 1GMAC17 port we set the ethact to DPMAC17@rgmii-id (cmd: setenv ethact 'DPMAC17@rgmii-id') .

In both cases tftp works fine. And we could load the kernel and dtb images successfully from tftp server. But after kernel boots, it is still giving the same issue of kernel panic with fail to mount NFS rootfs.

We have one query, is there any additional configuration required to enable ethernet while kernel booting? And as ethernet is not active, it is failing to mount NFS.

0 Kudos

775 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to my example:

=>setenv bootargs "console=ttyAMA0,115200 root=/dev/nfs rw nfsroot=192.168.2.1:/nfsroot/b56625,tcp,hard,intr,v3 ip=192.168.2.182"

 

$cat /etc/exports

/nfsroot *(rw,sync,no_root_squash,no_subtree_check)
/nfsroot/b56625 192.168.2.1/24(rw,sync,no_root_squash,no_subtree_check)

0 Kudos

757 Views
amolshrotri
Contributor II

Thanks for the input.

With above bootargs also, we are observing the same failure. When we did some analysis on the booting log, we found below error after booti command.

fsl-mc: DPL not deployed, DPAA2 ethernet not work

As already mentioned from uboot we are able to load the kernel and dtb images over tftp successfully. But after booti command we we are getting above error.

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

=> booti 0x82000000 - 0x8f000000
## Flattened Device Tree blob at 8f000000
     Booting using the fdt blob at 0x8f000000
     Loading Device Tree to 000000009fff4000, end 000000009ffff3f0 ... OK
fsl-mc: DPL not deployed, DPAA2 ethernet not work

Starting kernel ...

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

When booting Tiny image present in NOR flash we are not getting DPL error. We did not change anything in RCW / Uboot as we are using same RCW, uboot from NOR, but loading kernel, dtb and filesystem build with Yocto build system, that time getting DPL error.

Any pointers on DPL error?

We are not sure if this error related to DPL, creating issue for network access and NFS mounting?

0 Kudos

701 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please deploy dpl-eth.19.dtb on NOR flash with the following command.

=>tftp d0000000 <path>/dpl-eth.19.dtb; sf erase d00000 +c0000;sf write d0000000 d00000 c0000;

Then run the following command to boot up Linux Kernel.

=>sf read 0x80d00000 0xd00000 0x100000; fsl_mc lazyapply dpl 0x80d00000

=> booti 0x82000000 - 0x8f000000

0 Kudos