Jetson-AGX-Xavier NFS 文件系统挂载

Jetson-AGX-Xavier NFS 文件系统挂载

一、host端搭建nfs server

1、在host端安装nfs server
sudo apt update
sudo apt install nfs-common nfs-server
2、创建目录/home/nfsroot用于共享
#create /home/nfsroot
sudo mkdir /home/nfsroot
sudo chmod 755 /home/nfsroot
#Copy the root file system to the nfsroot directory
cd /home/nvidia/xavier_test/Linux_for_Tegra/rootfs
sudo cp -a * /home/nfsroot
cd /home/nfsroot
sudo exportfs -au
#configure ntp server
echo "/home/nfsroot *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)">>/etc/exports
3、重启NFS服务
sudo service nfs-server restart
4、本地测试NFS是否可以挂载
sudo mkdir /mnt/nfsroot
sudo mount -t nfs 127.0.0.1:/home/nfsroot /mnt/nfsroot

xavier端配置NFS启动

xavier的emmc里面已经预先烧写好了可用固件。

1、配置extlinux.conf

修改/boot/extlinux/extlinux.conf配置文件,添加nfs网络文件系统启动项

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# nfs network rootfs you can choose in bootloader
LABEL NFS-rootfs
   MENU LABEL NFS-rootfs
   LINUX /boot/Image
   INITRD /boot/initrd
   APPEND ${cbootargs} quiet console=ttyTCU0,115200 root=/dev/nfs rw netdevwait ip=192.168.10.102:192.168.10.90:192.168.10.1:255.255.255.0::eth0:off nfsroot=192.168.10.90:/home/nfsroot console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4  video=tegrafb earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt memtype=0 androidboot.secureos=trusty usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 tegra_keep_boot_clocks android.kerneltype=normal androidboot.security=non-secure androidboot.bootmode=ui vpr=0x8000000@0xf0000000 bl_prof_dataptr=0x10000@0xea810000 sdhci_tegra.en_boot_part_access=1

2、连接调试串口,重启xavier,选择NFS或EMMC启动

[0003.889] I> Detect filesystem
[0003.916] I> Loading extlinux.conf ...
[0003.916] I> Loading extlinux.conf binary from rootfs ...
[0003.916] I> rootfs path: /sdmmc_user/boot/extlinux/extlinux.conf
[0003.953] I> Loading extlinux.conf sig file from rootfs ...
[0003.954] I> rootfs path: /sdmmc_user/boot/extlinux/extlinux.conf.sig
[0003.984] I> overload load_size to 864 (from 1495)
[0003.985] I> Validate extlinux.conf ...
[0003.985] I> T19x: Authenticate extlinux.conf (bin_type: 54), max size 0x2000
[0003.986] E> digest on binary did not match!!
[0003.986] C> OEM authentication of extlinux.conf payload failed!
[0003.986] W> Failed to validate extlinux.conf binary from rootfs (err=1077936152, fail=0)
[0003.993] W> Security fuse not burned, ignore validation failure
[0003.998] I> restore load_size to 1495
[0004.002] I> L4T boot options
[0004.005] I> [1]: "primary kernel"
[0004.008] I> [2]: "NFS-rootfs"
#在这里选择你要启动得系统 1是启动emmc系统,2是启动网络文件系统。默认为1
[0004.011] I> Enter choice: 
[0007.014] I> Continuing with default option: 1
[0007.014] I> Loading kernel ...
[0007.014] I> Loading kernel binary from rootfs ...
[0007.015] I> rootfs path: /sdmmc_user/boot/Image
[0007.236] I> Loading kernel sig file from rootfs ...
[0007.236] I> rootfs path: /sdmmc_user/boot/Image.sig
[0007.255] I> overload load_size to 34551816 (from 34551824)
[0007.255] I> Validate kernel ...
[0007.255] I> T19x: Authenticate kernel (bin_type: 37), max size 0x5000000
[0007.570] I> Encryption fuse is not ON
[0007.584] I> Loading kernel-dtb ...

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值