Besides aiding source level debugging NFS can help save crucial development time by circumventing the need to flash the board for every little change. If only a small portion of the code changes, selectively compile that particular program and replace the existing program on the board with the newly built program. Copy-And-Paste instead of Flash-And-Burn!!!
1. Build the Kernel Image for the target with NFS support.
2. Install NFS server package on the host. On debian machines it is as simple as
sudo apt-get install nfs-kernel-server
3. A file called /etc/exports is created. Open this file for editing.
add the following line :-
/home/kernelexploit 192.168.1.1(rw,all_squash,anonuid=kernelexploit,anongid=1000,insecure,no_subtree_check)
where /home/kernelexploit is the path on the host. This will be mounted on the target. [192.168.1.1] is the IP address of the target in my system. Replace it with your board specific parameters.
4. On the target type the following command
mkdir -p /home/kernelexploit-target [ This is where the remote directory would be mapped]
mount -t nfs -o async,noatime,exec,rw,nfsvers=2,nolock 192.168.1.11:/home/kernelexploit /home/kernelexploit-target
Where, 192.168.1.11 is the IP address of the host machine and /home/kernelexploit is the path on the host. The trailing /home/kernelexploit-target is a directory we created on the target where the remote directory is mounted.
No comments:
Post a Comment