Guide on how to Setup NFS client on STM32MP2X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-01 12:54 AM - edited 2024-07-01 12:58 AM
This guide uses ubuntu22.04 x86 pc(Probably the same on any other Linux system) as host, and mp2 as device.
Its quite a common practice to use NFS as a medium to transfer cross compiled binary to dev board, since using sftp or scp to transfer the file every time you cross compile is tedious and time consuming.
- Install NFS server and prepare the export directory on host :
sudo apt update && sudo apt install nfs-kernel-server
sudo mkdir -p /host_export_srv_dir
sudo chown -R nobody:nogroup /host_export_srv_dir
sudo chmod 777 /home/srv
- Edit export file on host:
sudo vim /etc/exports
/home/srv *(rw,sync,no_subtree_check)
- Export the directory
sudo exportfs -a
sudo systemctl restart nfs-kernel-server
- Disable the firewall on host
sudo ufw allow from MP2IPAddr to any port nfs
sudo ufw enable
sudo ufw status
- Install the nfs client on device:
Please run as su
apt update && apt install nfs-utils
- Mount the NFS directory on device
mount -v -t nfs 138.198.198.58:/home/srv /srv
- To Mount NFS on boot, Edit /etc/fstab file on device to :
Warning: it may make boot time longer
138.198.198.58:/home/srv /srv nfs defaults 0 0
- Extra note:
Please use df command to check mount successfully or not.
To un-mount volume on device:
umount /srv
- Labels:
-
STM32MP25 Lines
