orangepi one nfs启动

本文详细介绍了如何在开发板上通过NFS快速调试,包括制作启动TF卡、设置网络连接、配置NFS服务、加载内核及设备树,以便于无需频繁制作启动卡进行调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

先制作好启动tf卡,之后为了快速调试,可以通过nfs替换内核与设备树,无需重新制作启动tf卡。

开发板需要连接网线,uboot默认的网卡驱动在orangepi one上是可以使用的。

下面是nfs启动的步骤:

1、启动开发版,观测log,中断uboot的autoboot

2、在启动参数中设置根文件系统的路径和类型

setenv bootargs 'root=/dev/mmcblk0p2 rw rootfstype=ext4'

根文件系统已事先保存在sd卡中

3. ubuntu主机需要开启nfs服务

安装服务:

sudo apt-get install nfs-kernel-server rpcbind

设置nfs服务使用的文件夹,在/etc/exports文件中添加以下内容:

 /home/mypc/linux/nfs *(rw,sync,no_root_squash)

重启nfs服务

sudo /etc/init.d/nfs-kernel-server restart

4、将zImage和dtb拷贝到nfs使用的路径 /home/mypc/linux/nfs下

5、在uboot中设置开发版的ip地址

=> setenv ipaddr 192.168.31.120  

6、ping nfs服务所在的主机,查看能否ping通

=> ping 192.168.31.124                                                          
Using ethernet@1c30000 device                                                   
host 192.168.31.124 is alive  

能ping通则可以通过nfs将服务器上的zImage和dtb拷贝到RAM中

7、通过nfs命令将zImage和dtb下载到开发板RAM中的指定地址中

将zImage下载到0x42000000地址处

=> nfs 0x42000000 192.168.31.124:/home/liby/linux/nfs/zImage                    
Using ethernet@1c30000 device                                                   
File transfer via NFS from server 192.168.31.124; our IP address is 192.168.31.0
Filename '/home/liby/linux/nfs/zImage'.                                         
Load address: 0x42000000                                                        
Loading: ########################################################T #########    
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         #################################################################      
         ##################################                                     
done                                                                            
Bytes transferred = 4832696 (49bdb8 hex)  

将dtb下载到0x43000000地址处

=> nfs 0x43000000 192.168.31.124:/home/liby/linux/nfs/sun8i-h3-orangepi-one.dtb 
Using ethernet@1c30000 device                                                   
File transfer via NFS from server 192.168.31.124; our IP address is 192.168.31.0
Filename '/home/liby/linux/nfs/sun8i-h3-orangepi-one.dtb'.                      
Load address: 0x43000000                                                        
Loading: #####                                                                  
done                                                                            
Bytes transferred = 20744 (5108 hex) 

8、启动内核

=> bootz 0x42000000 - 0x43000000                                                
## Flattened Device Tree blob at 43000000                                       
   Booting using the fdt blob at 0x43000000                                     
EHCI failed to shut down host controller.                                       
   Loading Device Tree to 49ff7000, end 49fff107 ... OK                         
                                                                                
Starting kernel ...                                                             
                                                                                
[    0.000000] Booting Linux on physical CPU 0x0  
...

9. 登陆

Welcome to Buildroot                                                            
orangepipc login: root                                                          
Password:                                                                       
# ls                                                                            
# pwd                                                                           
/root 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值