使用U-Boot的TFTP(远程/网络内核)
2024-10-19 17:45:03
前提条件
假设您的主机PC运行的是Ubuntu 14.04.1 LTS或更高版本,并且与您的开发平台在同一个本地网络上;为了简单起见,我们假设网络上也有DHCP服务器。
如果使用Juno,请确保使用的是前端以太网端口。
设置TFTP服务器
在您的主机PC上安装以下软件包:
$ sudo apt-get update && sudo apt-get install xinetd tftpd tftp
创建文件/etc/xinetd.d/tftp,内容如下:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
创建目录'/tftpboot/'(与上面的' server-args'匹配)并设置其权限:
$ sudo mkdir /tftpboot/
$ sudo chmod -R 777 /tftpboot/
$ sudo chown -R nobody /tftpboot/
重新启动xinetd的服务:
$ sudo service xinetd restart
通过在'/tftpboot/'中创建一个简单的' test '文件来测试服务器:
$ cd /tftpboot/
$ echo "this is a test" > test
$ cat test
this is a test
通过' ifconfig'获取主机的IP地址,然后从另一个系统:
$ tftp <host_pc_ip_address>
tftp> get test
Sent 159 bytes in 0.0 seconds
tftp> quit
$ cat test
this is a test
确认TFTP服务器工作正常后,将内核映像、设备树blob和ramdisk(如果合适的话)复制到' /tftpboot/'。本例期望路径如下:
- Kernel image: `/tftpboot/Image'
- Device tree blob:`/tftpboot/juno/juno.dtb'
U-Boot TFTP
打开Juno板并中断U-Boot的默认启动选择:
The default boot selection will start in 3 seconds
将主机PC的IP地址保存到“serverip”环境变量:
VExpress64# set serverip <host_pc_ip_address>
VExpress64# saveenv
下一步修改U-Boot的引导命令,通过TFTP引导:
VExpress64# set origbootcmd "$bootcmd"
VExpress64# set bootcmd "dhcp: tftp ${kernel_addr} ${serverip}:Image; tftp ${fdt_addr} ${serverip}:juno/juno.dtb; booti ${kernel_addr} - ${fdt_addr}"
VExpress64# saveenv
重新启动juno板,现在应该通过TFTP引导。
这是一个永久的更改,即Juno将通过TFTP在每次电源启动时启动。恢复到默认启动行为:
VExpress64# set bootcmd "$origbootcmd"
最新文章
- jQuery 人脸识别插件,支持图片和视频
- Oracle操作
- @Transient注解----Hiberbate
- ApexSQLLog可以只读取ldf文件
- Mac安装Bower
- 手把手windows64位配置安装python2.7
- 分布式架构高可用架构篇_03-redis3集群的安装高可用测试
- firefox 安装flash插件
- 《算法导论》习题解答 Chapter 22.1-6(求universal sink 通用汇点)
- 利用未公开API获取终端会话闲置时间(Idle Time)和登入时间(Logon Time)
- jquery 自动触发事件 trigger
- Space Shooter
- JAVA EE 的学习目标
- 添加RPMfusion仓库
- ZOC7 for Mac连接CentOS7无法输入中文问题
- 说几个python与c区别的地方以及静态变量,全局变量的区别
- Revit中如何给不同构件着色
- [k8s]一些技巧性的yaml和dockerfile-docker学习思路
- timestamp与timedelta,管理信息系统概念与基础
- CADO SAP tcode - Time Sheet: Display Data
热门文章
- VMware 11安装Mac OS X 10.10 及安装Mac Vmware Tools.
- Centos6.6 安装基于系统认证的vsftp服务
- 如何解决Win10预览版一闪而过的disksnapshot.exe进程?
- Typescript编译设置
- opencv 图像各方向旋转
- 多目标跟踪笔记二:Efficient Algorithms for Finding the K Best Paths Through a Trellis
- mitmproxy安装与使用
- snprintf不能使用";字符串指针";赋值,可以使用字符数组
- 20170704-WNDR4300uboot help info
- hdu 5178 pairs