当前位置:网站首页>Implementation of Ti am335x industrial control module network and file system nfs
Implementation of Ti am335x industrial control module network and file system nfs
2022-07-26 02:02:00 【szembed】
The verification of this content uses yingpengfei embedded CoM-335x Core module and Evaluation Board EAC-335X, The brief introduction is as follows :



1 summary
Software debugging is a necessary stage in the product development life cycle , Include kernel 、 The root file system 、 Application software, etc . The usual practice is to burn first BootLoader、 kernel 、 The root file system , Re debug application software . During the debugging phase, you may need to burn the kernel frequently 、 Root file or download application , This will take a lot of time . Download the kernel and mount the root file system through the network , It can solve the problem of frequent burning .
This manual , It mainly introduces how to pass TFTP Download the kernel and mount NFS The root file system .
Operating environment :
- platform :EVB-335x
- operating system :Ubuntu 16.04server 64-bit ( Kernel version 4.4.0-131-generic)
- nfs:nfs-kernel-server_1.2.8-9ubuntu12_amd64
2 The software requirements
NFS The agreement includes version 2、version 3、 version 4 Three versions ( Hereinafter referred to as NFSv2、NFSv3、NFSv4), It should be implemented when the motherboard starts the kernel NFS Mount the file system , Must ensure u-boot、kernel And NFS server The versions are consistent .
2.1 u-boot NFS Instructions
Support NFS Instructions , To configure u-boot To be defined :
#define CONFIG_CMD_NFS //u-boot The default support NFS, stay u-boot Source code include/config_cmd_default.h View in
#define CONFIG_NFSBOOTCOMMAND // You can configure files at the board level include/configs/com335x.h In the definition of ( It's not necessary , This configuration is used for ease of understanding , Because it knows its meaning by seeing its name ). If this item is defined ,u-boot In the environment variable “nfsboot=” Parameters , by nfsboot Assignment as NFS Configuration of .
explain :
1、U-boot 2014.04(COM-335x Use this version ) Support NFSv2, stay u-boot Source code net/nfs.c View in , Such as code list 2-1 Shown ( In red );
Code list 2-1
static void
rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int datalen)
{
Of ubuntu 16.04 host , Because the default does not support NFSv2, So set compatibility , stay “2.3 NFS server matters needing attention ” Described in the .
3、 The new version of the u-boot Supported by NFS Higher protocol version , for example u-boot 2018.01 The default support NFSv2, If the host does not support NFSv2, Then use NFSv3.
4、 Kernel version matching problem , see “2.2 kernel To configure ”.
5、NFS The revision of the version is not simple “ Code list 2-1” Medium pkt.u.call.rpcvers = htonl(2); And pkt.u.call.vers = htonl(2); Value , It can be compatible with other versions NFS. Besides , The new version u-boot The workload of transplantation is heavy . therefore , Recommended in the NFS server End solve the problem of version compatibility .
2.2 kernel To configure
The kernel needs to support NFS Type root file system . Execute in the root directory of the kernel source code :
make ARCH=arm menuconfig
Choose in turn
File systems --->
[*] Network File Systems --->
--- Network File Systems
<*> NFS client support
[*] NFS client support for NFS version 3
[*] NFS client support for the NFSv3 ACL protocol extension
[*] NFS client support for NFS version 4
[*] NFS client support for NFSv4.1 (EXPERIMENTAL)
[*] Root file system on NFS
Configuration is shown in figure 2-2 Shown .

explain : When chosen NFS client support , Namely support NFSv2.NFSv3、NFSv4、NFSv4.1 Optional , It depends on the actual situation .
Besides , Still need to choose kernel level autoconfiguration. Choose in turn :
[*] Networking support --->
--- Networking support
[*] IP: kernel level autoconfiguration
Pictured 2-3 Shown :

2.3 NFS server matters needing attention
build NFS server Please refer to Ubuntu Official website .
COM-335x Of U-boot Supported by NFS v2 edition , and Ubuntu 16.04 Support NFS v4 edition . Due to version incompatibility , When mounting NFS File system , Appear as shown in figure 2-4 The error shown .

modify “/etc/default/nfs-kernel-server” file , Make it compatible with NFS v2 edition , Add the following statement at the end of the file , Pictured 2-5 Shown .
RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog"

To configure NFS server, Use the document editing tool to open /etc/exports , Set directories respectively 、 visit IP、 Options ( Usually set permissions, etc ), Pictured 2-6 Shown .

explain :
/home/daniel/rootfs Appoint NFS File system load directory ;
* Set access IP,* On behalf of all IP, It can also be a host or a IP paragraph ( for example 192.168.x.x);
(rw,sync,no_root_squash) Set permissions and other options , Set according to the demand .
2.4 other
TFTP For downloading kernel images , Set up in NFS server On the same host , Please refer to Ubuntu Official website .
3 Implementation process
With NVM Storage u-boot Of COM-335x For example , Brief introduction NFS The implementation process of file mounting .
1、 Prepare the kernel and root file system :
Put the kernel (uImage) Save to TFTP To configure (/etc/default/tftpd-hpa file ) Specified directory , Pictured 3-1 Shown ,TFTP_DIRECTORY The value is TFTP The directory of the server .

Unzip the root file system to /etc/exports The directory specified , Pictured 3-2 Shown .

explain : Replace the kernel , Replace uImage File can ; The application is saved to the root file system .
2、 burn u-boot
erase Nand Flash, Will be used to start NFS Of MLO And u-boot.img Save to SD The root directory of the card , Power on and automatically burn u-boot. Burn complete , see u-boot Environment variables of (env) To configure , Pictured 3-3 Shown .

NFS Introduction to environment variable parameters , As shown in the table 3-1 Shown :
surface 3-1
serverip | NFS server IP( necessary ) |
ipaddr | a main board IP( necessary ) |
gatewayip | gateway ( It's not necessary , It is recommended to set ) |
netmask | Subnet mask ( necessary ) |
hostname | Host name ( It's not necessary ) |
netdev | Network devices ( It's not necessary ), for example eth0. |
rootpath | NFS Save directory of root file system ( necessary ) |
here , chart 3-3 The configuration in may not meet the requirements , for example rootpath、serverip etc. . Use according to the actual situation setenv Instruction configuration :
setenv rootpath /your/dirctory/rootfs
setenv serverip 192.168.1.x
saveenv ß---- Setup completed , use saveenv preservation , Unsaved settings are only valid once
After the setting is correct , Input boot or run bootcmd Start the system , Or power on again .
3、 see NFS
After system startup , see NFS Mounting of the root file system , And file system directory structure . Pictured 3-4 Shown :

The information in the figure is displayed normally , It means NFS Start up .
边栏推荐
- Dest0g3 520 orientation (under update)
- I.MX6UL核心模块使用连载-WIFI测试 (八)
- 保护系统日志服务器和设备
- Niuke - bm39 serialized binary tree [hard]
- 登堂入室soc之arm汇编基础
- Qt程序美化之样式表的使用方法,Qt使用图片作为背景与控件透明化,Qt自定义按钮样式
- win下搭建嵌入式开发环境及frp穿透
- Ti AM335X工控模块矩阵键盘电路的设计与驱动移植
- QT program beautification of the use of style sheets, QT uses pictures as the background and transparency of controls, QT custom button styles
- (CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud
猜你喜欢

I.MX6UL核心模块使用连载-Iot-6ULX核心模块简要介绍 (一)

I.MX6UL核心模块使用连载-触摸屏校准 (九)

1. Mx6ul core module serial use - touch screen calibration (IX)

Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)

1. Mx6ul core module use serial RTC test (XII)

还在用==0 null equal 判断空值吗,对isEmpty 和 isBlank有多少了解呢

DialogRPT-Dialog Ranking Pretrained Transformers

# Dest0g3 520迎新赛(更新中)

TI AM335x工控模块网络跟文件系统NFS的实现

SQL manual blind injection and error reporting injection
随机推荐
D. Rating compression (thinking + double pointer)
【深入浅出玩转FPGA学习11----Testbench书写技巧1】
1205 Lock wait timeout exceeded; try restarting transaction处理
IDEA如何快速删除最近打开的项目
[in simple terms, play with FPGA learning 11 --- testbench writing skills 1]
Leetcode algorithm 147. insert and sort the linked list
AutoCAD -- Method of calculating area
Characteristics and determination of neuraminidase from Clostridium perfringens in Worthington
I.MX6UL核心模块使用连载-RTC测试 (十二)
[in simple terms, play with FPGA learning 11 --- testbench writing skills 2]
Zhinai buys melons (DP backpack)
Phoenix中常用shell操作
Add an interceptor to resttemplate to record the request response, and you also need to solve the problem that the flow is read only once
BGP知识点总结
MPLS knowledge points
Installing and using R in Anaconda
Alibaba cloud redis development specification
F. Equal multisets (greedy)
How to display numbers / English time in Excel
pdf. JS introduction