当前位置:网站首页>TFTP下载kernel,nfs挂载文件系统
TFTP下载kernel,nfs挂载文件系统
2022-06-30 16:16:00 【曹乐乐爱学习】
TFTP下载功能:
1、首先要搭建tftp服务器:虚拟机下的Ubuntu20
sudo apt-get install tftp-hpa tftpd-hpa
sudo apt-get install xinetdmkdir -p /home/ckl/my_board/tftp
sudo chmod 777 /home/ckl/my_board/tftp
2、配置 tftp:
新建文件/etc/xinetd.d/tftp
server tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home/ckl/my_board/tftp
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
修改文件:/etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/ckl/my_board/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s"
3、将Image和dtb放到tftp目录下

挂载:
1、格式化一张SD卡(fat32格式)
2、只烧录原子修改后的uboot
sudo dd if=./u-boot.imx of=/dev/sdc bs=1024 seek=1

3、设置网络相关参数:
==> setenv ipaddr 192.168.1.100
==> setenv ethaddr 0:0c:29:c6:ff:c9
==> setenv gatewayip 192.168.1.1
==> setenv netmask 255.255.255.0
==> setenv serverip 192.168.1.99
【前提:已经设置好】:参考:uboot下使用nfs网络下载kernel
4、重点:
1、设置bootarges(设置nfs挂载文件系统)
setenv bootargs 'console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.1.99:/home/ckl/my_board/nfs/rootfs,proto=tcp nfsvers=4 rw ip=192.168.1.100:192.168.1.99:192.168.1.1:255.255.255.0:ckl:eth0:off'$ root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] ip=<client-ip>:<server-ip>:<gwip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>
<server-ip>:服务器 IP 地址,也就是存放根文件系统主机的 IP 地址
<root-dir>: 根文件系统的存放路径
<nfs-options>: NFS 的其他可选选项,一般不设置
<client-ip>: 客户端 IP 地址,也就是我们开发板的 IP 地址
<server-ip>: 服务器 IP 地址,同上<gw-ip>: 网关地址
<netmask>:子网掩码,一般是 255.255.255.0<hostname>:客户机的名字,此值可以空着
<device>: 设备名,也就是网卡名,原子的阿尔法使用的使用 ENET2,网卡名是eth0
<autoconf>: 自动配置,一般不使用,所以设置为 off
<dns0-ip>: DNS0 服务器 IP 地址,不使用
<dns1-ip>: DNS1 服务器 IP 地址,不使用
所以:root=/dev/nfs nfsroot=192.168.1.99:/home/ckl/my_board/nfs/rootfs,proto=tcp rw ip=192.168.1.100:192.168.1.99:192.168.1.1:255.255.255.0:ckl:eth0:off
proto=tcp”表示使用 TCP 协议,“rw”表示 nfs 挂载的根文件系统为可读可写
百度:nfs挂载有不兼容,所以将bootargs改成指定NFSv4
2、设置bootcmd
setenv bootcmd 'tftp 80800000 zImage;tftp 83000000 standerd.dtb;bootz 80800000 - 83000000'=> saveenv
=> reset
边栏推荐
- A scheduled task deletes data at a specified time
- 面试突击60:什么情况会导致 MySQL 索引失效?
- 开发那些事儿:Linux系统中如何安装离线版本MySQL?
- Design of piece counter based on 51 single chip microcomputer
- 【OpenCV 例程200篇】215. 基于多段线绘制近似椭圆
- 基于SSM实现毕业设计管理系统
- Differential analysis between different groups nichenet for silicosis runs successfully!
- leetcode:787. K 站中转内最便宜的航班【k步最短路 + dfs记忆化 + defaultdict(dict)】
- SSH tool pyqt
- 中基协:推荐使用电子合同
猜你喜欢

k线图快速入门必读

differential analysis between different groups nichenet for silicosis成功运行!

The new version of Shangding cloud | favorites function has been launched to meet personal use needs

splitting. JS password display hidden JS effect

leetcode:1042. 不邻接植花【随机填入符合要求的 + 后面不会形成矛盾 + set.pop】

JS from prototype chain to inheritance

Exercise book of introduction to database system

splitting.js密码显示隐藏js特效

redis淘汰策略

Write the simplest small program in C language Hello World
随机推荐
基于SSM实现毕业设计管理系统
China Infrastructure Development Association: electronic contract is recommended
博士毕业去县城工作,如何是你,怎么选?
6 张图带你搞懂 TCP 为什么是三次握手?
geo 读取单细胞csv表达矩阵 单细胞 改列名 seurat
nichenet实战silicosis
每日刷题记录 (九)
以往我们认识的产业互联网,只是以消费互联网的替代者的身份出现
Mysql8 NDB cluster installation and deployment
leetcode:787. K 站中转内最便宜的航班【k步最短路 + dfs记忆化 + defaultdict(dict)】
[untitled] write a student achievement and information management system in C language to realize the operation interface, clear screen display of current operation functions, reading and inputting st
Construction schedule of intelligent management and control platform in Shanxi Chemical Industry Park
Cloud practice of key business migration of Internet of things by well-known Internet housing rental service companies
[JVM] takes you to learn about the garbage collection mechanism (GC) in the JVM -- including diagrams
k线图精解与实战应用技巧(见位进场)
flutter自定义组件
splitting.js密码显示隐藏js特效
List becomes vector list becomes vector list vector
EMQ 助力青岛研博建设智慧水务平台
Redis data structure analysis