RZ/A1H nfs file system with xip kernel

Currently i am using xip based kernel for the Rz/A1H based board, And i am currently trying  to load  nfs file system.

In u-boot i changed

serverip=<nfs host ip address>

nfsroot=<nfs server location on host pc>

fs_nfs=root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp rootwait

cmdline_common=ignore_loglevel earlyprintk earlycon=scif,0xE8008000

xnfs_boot=run dtb_read_sdram; run dtb_mem_sdram; run dtb_lcdfb_fixed; setenv bootargs ${cmdline_common} ${fs_nfs}; fdt chosen; run xImg

 

But booting using "run xnfs_root" command getting following errors

"

Key type dns_resolver registered
List of all partitions:
1f00            8192 mtdblock0  (driver?)
No filesystem could mount root, tried:  ext3
 ext2 ext4
 squashfs vfat
 msdos
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.76-g1cf6236-dirty #13
Hardware name: Generic R7S72100 (Flattened Device Tree)
[<bf809261>] (unwind_backtrace) from [<bf807707>] (show_stack+0xb/0xc)
[<bf807707>] (show_stack) from [<bf83f12b>] (panic+0x6f/0x190)
[<bf83f12b>] (panic) from [<bfc28dc9>] (mount_block_root+0x179/0x1f4)
[<bfc28dc9>] (mount_block_root) from [<bfc28f4d>] (prepare_namespace+0xb5/0xf0)
[<bfc28f4d>] (prepare_namespace) from [<bfc28afb>] (kernel_init_freeable+0xdb/0x134)
[<bfc28afb>] (kernel_init_freeable) from [<bfab864b>] (kernel_init+0x7/0x98)
[<bfab864b>] (kernel_init) from [<bf805101>] (ret_from_fork+0x11/0x30)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
random: fast init done

"

Is it possible to use nfs file system with xip image in A1H, How can i solve this issue?

  • Yes, you can use NFS file system with xip Image.

    Did you enable NFS support in the kernel config (menuconfig) ?
  • Thanks for the reply Chris

    I enabled following features in kernel menuconfig

    In File systems -> Network File Systems

    --- Network File Systems │ │
    │ │ <*> NFS client support │ │
    │ │ <*> NFS client support for NFS version 2 │ │
    │ │ <*> NFS client support for NFS version 3 │ │
    │ │ [*] NFS client support for the NFSv3 ACL protocol extension│ │
    │ │ <*> NFS client support for NFS version 4 │ │
    │ │ [ ] Provide swap over NFS support │ │
    │ │ [*] NFS client support for NFSv4.1 │ │
    │ │ (kernel.org) NFSv4.1 Implementation ID Domain │ │
    │ │ [*] Root file system on NFS │ │




    But still getting following error

    "
    NET: Registered protocol family 10
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    Key type dns_resolver registered
    List of all partitions:
    1f00 8192 mtdblock0 (driver?)
    No filesystem could mount root, tried: ext3
    ext2 ext4
    squashfs vfat
    msdos
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.76-g1cf6236-dirty #14
    Hardware name: Generic R7S72100 (Flattened Device Tree)
    [<bf809261>] (unwind_backtrace) from [<bf807707>] (show_stack+0xb/0xc)
    [<bf807707>] (show_stack) from [<bf83f12b>] (panic+0x6f/0x190)
    [<bf83f12b>] (panic) from [<bfc41e9d>] (mount_block_root+0x10d/0x1b0)
    [<bfc41e9d>] (mount_block_root) from [<bfc41fbf>] (mount_root+0x7f/0xc0)
    [<bfc41fbf>] (mount_root) from [<bfc420b5>] (prepare_namespace+0xb5/0xf0)
    [<bfc420b5>] (prepare_namespace) from [<bfc41bdb>] (kernel_init_freeable+0xdb/0x134)
    [<bfc41bdb>] (kernel_init_freeable) from [<bfacc0eb>] (kernel_init+0x7/0x98)
    [<bfacc0eb>] (kernel_init) from [<bf805101>] (ret_from_fork+0x11/0x30)
    ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
    random: fast init done
    "
  • In reply to jomon:

    When your system boots, what does it say the "command line" is? It should print that out as the system is booting. It should be towards the beginning of the kernel boot.

    Another thing I have done is first boot up without NFS (just use SPI flash). Then make sure you can mount an NFS system from the command line to some directory (like /mnt). That will at least make sure you have all the driver and subsystems enabled that you need. After you have that working, then you know you it can work for mounting the rootfs.

    I say that because I've screwed things up before and doing it that way made it much easier to figure out what I was doing wrong.
  • This thread will be archived due to inactivity.

    Mike Clements
    RenesasRulz Moderator