x210项目重新回顾之七uboot_2013.10之nfs方式启动内核-问题排查

这篇博客介绍了S5PV210平台在使用uboot启动过程中遇到的NFS问题,包括bootargs的nfsroot参数缺少tcp和nfsvers选项,以及Linux内核中未配置NFS支持。博主提供了详细的解决步骤,包括修改bootargs,配置内核选项,并在uboot中设置启动命令。同时,还提到了从MMC卡启动改为NFS启动的方法,以及如何将Linux烧录到MMC卡上。

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

参考我之前的:s5pv210的学习之路(21)x210的kernel的NFS的根文件系统编译,使用_weixin_43097675的博客-优快云博客

uboot:九鼎x210(而不是goni aston_u-boot-2013.10)

问题总结:

1)bootargs的nfsroot=192.168.254.33:/tftpboot/nfs没有添加proto=tcp,nfsvers=3,nolock

   应该是:nfsroot=192.168.254.33:/tftpboot/nfs,proto=tcp,nfsvers=3,nolock

2)linux内核没有配置nfs选项:

A)make menuconfig
(a)*] Networking support —>
Networking options —>
[*] IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
[*] IP: RARP support

(b)File systems —>
[*] Network File Systems —>
[*] Root file system on NFS

B) vi .config
CONFIG_CMDLINE=”noinitrd mem=512M console=ttySAC2,115200 root=/dev/nfs nfsroot=172.16.96.215:/arm-nfs ip=172.16.96.250:172.16.96.215:172.16.96.215:255.255.254.0::eth0:off”

C)make menuconfig

general setup->
[ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support(取消)

D)
make ;
uboot> tftp 30008000 zImage
uboot> bootm 30008000

结果如下:
Boot with zImage
The input address don’t need a virtual-to-physical translation : 30008000

Starting kernel …

Uncompressing Linux… done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.35.7+ (root@mo-cn-491.int.hrs.com) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #9 PREEMPT Fri Sep 14 17:37:04 CST 2018
[ 0.000000] CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: SMDKV210
[ 0.000000] @@@@@@@ atags_pointer not null
[ 0.000000] @@@@@@@linter#####boot_params:c0000100,mdesc->boot_params:40000002
[ 0.000000] Ignoring unrecognised tag 0x41001099
[ 0.000000]

Please press Enter to activate this console.
/ # ls
bin driver-xiong jimmy-driver linux_driver sbin usr
build driver_test jimmy_test proc sys
dev etc lib root tmp

-----------------------------------------------------------------------------------------

3)注意事项:

A)虽然我们用的时从mmc2卡启动uboot,但是启动后3秒不动,默认从inand下载启动linux:
#setenv bootcmd "movi read kernel 30008000; movi read rootfs 30B00000 300000; bootm 30008000 30B00000"

B)我们可以改为nfs 启动:
setenv bootargs "root=/dev/nfs rw nfsroot=192.168.254.33:/tftpboot/nfs,proto=tcp,nfsvers=3,nolock  ip=192.168.254.39:192.168.254.33:192.168.254.254:255.255.255.0::eth0:off console=ttySAC2,115200 init=/linuxrc"

或者linux的.config文件 CMD_LINE:noinitrd mem=512M console=ttySAC2,115200 root=/dev/nfs nfsroot=172.16.96.215:/arm-nfs ip=192.168.254.39:192.168.254.33:192.168.254.33:255.255.255.0::eth0:off

并且保存linux到inand(如果有movi的话,还是可以操作inand)
movi write kernel 30008000
并且设置uboot环境变量
setenv bootcmd "movi read kernel 30008000; bootm 30008000"
 

C)如果想用mmc保存linux到mmc2卡,可以先移植mmc命令:
uboot大小:161332 bytes (161 kB, 158 KiB) copied, 2.17452 s, 74.2 kB/s
linux: 3633388 (3770ec hex)=400000*2/1K (1个扇区512字节 0.5k)=8k
规划
mbr 0-1 扇区
bl0 1-49 扇区
uboot  49 500扇区
linux    500-8196(十进制)扇区
那么我们可以烧写(注意我用的x210的uboot是没有mmc命令的):
x210》mmc write 1 30008000 500# 8196
x210》mmc read  1 30008000 500# 8196

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值