AT91SAM9X5-EK开发板从NFS启动
来源:互联网 发布:mac os最新系统 编辑:程序博客网 时间:2024/04/26 22:15
主机:Ubuntu12.04
目标板:Atmel AT91SAM9X5-EK开发板
1、在主机上安装nfs服务
#apt-get install nfs-kernel-server
2、完成安装之后,配置/etc/exports文件
编辑exports(如果之前没有配置过,改文件是空的)
#vim exports
添加/home/at91samx35/buildroot/output/target *(rw,sync,no_root_squash)
/home/at91samx35/buildroot/output/target :目标主机共享的目录
* :表示任意用户都可以使用,也可以使用IP(如:192.168.0.*)
rw :目标机对该目录具有读写权限
no_root_squash :挂载此目录的目标机享有主机的root权限
3、使修改完成由的/etc/exports生效
#exportfs -rv
4、启动nfs
#service nfs-kernel-server start
5、在目标机挂载
#mount -t nfs -o nolock 192.168.0.252:/home/at91samx35/buildroot/output/target /mnt
将主机上的/home/at91samx35/buildroot/output/target挂载到目标机上的/mnt上。
(主机的ip跟目标的ip必须在同一个网段,且在局域网内不能有IP冲突)
取消挂载:
#umount /mnt
通过NFS启动系统
当nfs服务配置好并启动之后,我们就可以把nfs作为根文件系统来启动开发板。通过使用nfs作为根文件系统,开发板的“硬盘”就可以变得很大,因为我们使用的是主机的硬盘。
方法:
在开发板启动时按下空格键,进入uboot模式。
#setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.0.252:/home/at91samx35/buildroot/output/target ip=192.168.0.90:192.168.0.252:192.168.0.1:255.255.255.0:AT91SAM9X35:eth0:off
#saveenv
需要内核支持的:
在内核版本2.6.29–2.6.39, 3.0–3.8, 3.9-rc+HEAD,在menuconfig找不到Root file system on NFS,所以需要修改我们板级的配置文件
#gedit arch/arm/configs/at91sam9x5ek_defconfig
在大概230行出添加CONFIG_IP_PNP=y。
#make at91sam9x5ek_defconfig
#make menuconfig
File systems --->
[*] Network File Systems --->
[*] Root file system on NFS
为了安全起见,以下这些选项也选上。
[*] Networking support --->
Networking options --->
[*] IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
[*] IP: RARP support
#make
关于内核启动参数和nfs需要哪些配置选项的更多详细信息就参考:
http://cateee.net/lkddb/web-lkddb/ROOT_NFS.html
不使用从NFS启动的参数:
bootargs mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs
目标板:Atmel AT91SAM9X5-EK开发板
1、在主机上安装nfs服务
#apt-get install nfs-kernel-server
2、完成安装之后,配置/etc/exports文件
编辑exports(如果之前没有配置过,改文件是空的)
#vim exports
添加/home/at91samx35/buildroot/output/target *(rw,sync,no_root_squash)
/home/at91samx35/buildroot/output/target :目标主机共享的目录
* :表示任意用户都可以使用,也可以使用IP(如:192.168.0.*)
rw :目标机对该目录具有读写权限
no_root_squash :挂载此目录的目标机享有主机的root权限
3、使修改完成由的/etc/exports生效
#exportfs -rv
4、启动nfs
#service nfs-kernel-server start
5、在目标机挂载
#mount -t nfs -o nolock 192.168.0.252:/home/at91samx35/buildroot/output/target /mnt
将主机上的/home/at91samx35/buildroot/output/target挂载到目标机上的/mnt上。
(主机的ip跟目标的ip必须在同一个网段,且在局域网内不能有IP冲突)
取消挂载:
#umount /mnt
通过NFS启动系统
当nfs服务配置好并启动之后,我们就可以把nfs作为根文件系统来启动开发板。通过使用nfs作为根文件系统,开发板的“硬盘”就可以变得很大,因为我们使用的是主机的硬盘。
方法:
在开发板启动时按下空格键,进入uboot模式。
#setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.0.252:/home/at91samx35/buildroot/output/target ip=192.168.0.90:192.168.0.252:192.168.0.1:255.255.255.0:AT91SAM9X35:eth0:off
#saveenv
需要内核支持的:
在内核版本2.6.29–2.6.39, 3.0–3.8, 3.9-rc+HEAD,在menuconfig找不到Root file system on NFS,所以需要修改我们板级的配置文件
#gedit arch/arm/configs/at91sam9x5ek_defconfig
在大概230行出添加CONFIG_IP_PNP=y。
#make at91sam9x5ek_defconfig
#make menuconfig
File systems --->
[*] Network File Systems --->
[*] Root file system on NFS
为了安全起见,以下这些选项也选上。
[*] Networking support --->
Networking options --->
[*] IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
[*] IP: RARP support
#make
关于内核启动参数和nfs需要哪些配置选项的更多详细信息就参考:
http://cateee.net/lkddb/web-lkddb/ROOT_NFS.html
不使用从NFS启动的参数:
bootargs mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs
- AT91SAM9X5-EK开发板从NFS启动
- AT91SAM9X35-EK 从NFS启动
- 开发板从nfs文件系统启动
- 开发板设置从nfs启动
- OK6410开发板:挂载NFS、从NFS启动:
- E9 搭建 NFS 环境并从 NFS 启动开发板
- 搭建NFS环境并从NFS启动开发板
- NFS启动开发板
- 开发板NFS启动
- 6410开发板从NFS挂载 变为 自启动
- 天嵌E9卡片i.mx6q-Linux12.04搭建nfs环境以及从nfs启动开发板
- 天嵌E9卡片i.mx6q-Linux12.04搭建nfs环境以及从nfs启动开发板
- AT91SAM9x5 如果通过VMware实现NFS
- nfs启动开发板总结
- JZ2440设置从开发板启动或使用NFS作为根文件系统启动
- 从NFS启动TQ2440
- 从NFS启动Linux
- 从NFS启动linux
- android中图片异步加载工具类 ---利用双缓存技术和线程池
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eproductServ
- hbase条件查询
- Dijkstra_And_Ford
- 字节对齐方式引起的血案
- AT91SAM9X5-EK开发板从NFS启动
- 使用Aspose.Pdf从PDF文件中获取个别的附件
- c++实现使用内存映射文件处理大文件
- STL面试题
- 逻辑和物理数据模型的区别
- WebLogic优化大全
- 块设备、字符设备
- 头文件的用途和结构
- 例题9.9