Setup NFS Root Filesystem on Host Machine
1. Install nfs server on Host:
$ sudo apt-get install nfs-common nfs-kernel-server
2. Add rootfs path to /etc/exports and restart nfs server
<nfs-rootfs-path> *(rw,sync,no_subtree_check,no_root_squash)
$ /etc/init.d/nfs-kernel-server restart
3. Export Directories:
$ sudo exportfs -a
4. Check NFS mounts with:
$ showmount -e OR sudo exportfs -v
Build kernel with below configuration:
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_ROOT_NFS=y
Build boot.img for NFS:
$ mkbootimg --kernel zImage_file --ramdisk /dev/null --cmdline "console=ttyHSL2,115200,n8 root=/dev/nfs rw rootfstype=nfs nfsroot=192.168.11.157:/nfs-rootfs-path,tcp,nfsvers=3 ip=:::::eth0:dhcp init=/sbin/init rootwait noinitrd androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" --base 0x80200000 --output boot.img
Build boot.img for SD Card:
$ mkbootimg --kernel zImage-file --ramdisk /dev/null --cmdline "console=ttyHSL2,115200,n8 root=/dev/mmcblk1p3 rw rootfstype=ext4 init=/sbin/init rootwait noinitrd androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" --base 0x80200000 --output boot.img
1. Install nfs server on Host:
$ sudo apt-get install nfs-common nfs-kernel-server
2. Add rootfs path to /etc/exports and restart nfs server
<nfs-rootfs-path> *(rw,sync,no_subtree_check,no_root_squash)
$ /etc/init.d/nfs-kernel-server restart
3. Export Directories:
$ sudo exportfs -a
4. Check NFS mounts with:
$ showmount -e OR sudo exportfs -v
Build kernel with below configuration:
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_ROOT_NFS=y
Build boot.img for NFS:
$ mkbootimg --kernel zImage_file --ramdisk /dev/null --cmdline "console=ttyHSL2,115200,n8 root=/dev/nfs rw rootfstype=nfs nfsroot=192.168.11.157:/nfs-rootfs-path,tcp,nfsvers=3 ip=:::::eth0:dhcp init=/sbin/init rootwait noinitrd androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" --base 0x80200000 --output boot.img
Build boot.img for SD Card:
$ mkbootimg --kernel zImage-file --ramdisk /dev/null --cmdline "console=ttyHSL2,115200,n8 root=/dev/mmcblk1p3 rw rootfstype=ext4 init=/sbin/init rootwait noinitrd androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2" --base 0x80200000 --output boot.img