使用NFS启动linux

板级头文件定义

修改bootcmd

在这里插入图片描述
编译下载后,在uboot中使用命令恢复宏定义中的默认值。

=> env default bootcmd
=> saveenv

设置bootfile环境变量

=> setenv bootfile /home/nanty/linux/nfs
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
=> 

重启

重启,倒计时结束后会自动通过nfs传输数文件

U-Boot 2016.03 (May 18 2020 - 00:15:29 +0800)

CPU:   Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 52C
Reset cause: POR
Board: MX6ULL my test board
I2C:   ready
DRAM:  512 MiB
nanty test
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Display: my_lcd_test (800x480)
Video: 800x480x24
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
Net:   FEC1
Normal Boot
Hit any key to stop autoboot:  0 
FEC1 Waiting for PHY auto negotiation to complete.... done
Using FEC1 device
File transfer via NFS from server 192.168.1.250; our IP address is 192.168.1.33
Filename '/home/nanty/linux/nfs/zImage'.
Load address: 0x80800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################
done
Bytes transferred = 6777096 (676908 hex)
Using FEC1 device
File transfer via NFS from server 192.168.1.250; our IP address is 192.168.1.33
Filename '/home/nanty/linux/nfs/imx6ull_my_evk.dtb'.
Load address: 0x83000000
Loading: ########
done
Bytes transferred = 38270 (957e hex)
Kernel image @ 0x80800000 [ 0x000000 - 0x676908 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300c57d

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.15-g49efdaa (alientek@ubuntu) (gcc version 5.3.0 (GCC) ) #1 SMP PREEMPT Mon Oct 14 12:41:57 CST 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

可以看到,内核成功启动。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

loveshipting

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值