「linux」s3c2416uboot相关配置nfs等

本文介绍了在Linux环境下,针对S3C2416开发板如何配置UBoot命令,包括查看参数、设置IP地址以及挂载NFS文件系统。在PC端,安装了nfs-kernel-server并配置了/export文件,而在2416板上,设置了IP、服务器IP和网关,并通过UBoot命令启动NFS挂载。

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

  • Uboot命令下查看参数命令:

print


  • 设置板子IPLINUX虚拟机服务器IP、网关IP命令:

setenv ipaddr 192.168.3.128;setenv serverip 192.168.3.15;setenv gatewayip192.168.3.255


  • NFS挂载:

PC:

apt-get install nfs-common

aptitude install nfs-kernel-server

/etc/exports文件中加入一句/opt/root_qtopia *(rw,sync,no_subtree_check)//no_root_squash

exportfs -r

/etc/init.d/portmap restart

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

ufw disable

shutdown -r now

mount -t nfs 192.168.0.15:/opt/nfsfile /mnt

2416板:


设置板子IPLINUX虚拟机服务器IP、网关IP命令:

setenv ipaddr 192.168.3.128;setenv serverip 192.168.3.15;setenv gatewayip192.168.3.255


setenv bootargs noinitrd root=/dev/nfs rwnfsroot=192.168.3.15:/opt/root_qtopia/ip=192.168.3.128:192.168.3.15:255.255.255.0 console=ttySAC1,115200


  • 直接板上启动命令:

set bootargs root=/dev/mtdblock2 console=ttySAC1,115200


  • 参数设置完成保存命令:(每个参数设置后均要保存)

save


  • 2416SDuboot启动下载命令:

bootcmd=sleep1;nand scrub ;sleep 1;nand erase;sleep 1;movi read 3800000# 40000c0000000 ;sleep 1;nand write c0000000 0 40000;sleep 1;movi readkernel c0000000;sleep 1;nand write c0000000 40000 200000;sleep 1;moviread 3600000# 3800000 c0000000;sleep 1;nand write.yaffs c0000000400000 35db4c0


  • 2416SDuboot启动打印信息:

U-Boot1.3.4 (Mar 24 2010 - 09:51:13) for SMDK2416

CPU: S3C2416@400MHz

Fclk= 800MHz, Hclk = 133MHz, Pclk = 66MHz

Board:SMDK2416 DDR2

DRAM: 64 MB

Flash: 1 MB

NAND: 1024 MB

SD/MMC: 1883 MB

AfterSD/MMC boot

In: serial

Out: serial

Err: serial

smc911x:MAC 00:40:5c:26:0a:5b

Hitany key to stop autoboot: 0


NANDscrub: device 0 whole chip

Warning:scrub option will erase all factory set bad blocks!

Thereis no reliable way to recover them.

Usethis command only for testing purposes if you

aresure of what you are doing!


Reallyscrub this NAND flash? <y/N>

scrubaborted


NANDerase: device 0 whole chip

Erasingat 0x3ffc0000 -- 100% complete.

OK

Readingdata from sector 3800000 (512 sectors).. completed


NANDwrite: device 0 offset 0x0, size 0x40000

262144bytes written: OK

Readingkernel from sector 3845070 (8192 sectors).. completed


NANDwrite: device 0 offset 0x40000, size 0x200000

2097152bytes written: OK

Readingdata from sector 3600000 (114688 sectors).. completed


NANDwrite: device 0 offset 0x400000, size 0x35db4c0


Writingdata at 0x3839000 -- 100% complete.

56472768bytes written: OK

SAM2416EDK#


  • 2416NANDflash启动uboot打印信息:

U-Boot1.3.4 (May 2 2012 - 18:27:59) for SMDK2416


CPU: S3C2416@400MHz

Fclk= 800MHz, Hclk = 133MHz, Pclk = 66MHz

Board:SMDK2416 DDR2

DRAM: 64 MB

Flash: 1 MB

NAND: 1024 MB

In: serial

Out: serial

Err: serial

smc911x:MAC 00:40:5c:26:0a:5b

Hitany key to stop autoboot: 0

SAM2416EDK# print

bootcmd=nandread c0008000 40000 1c0000;bootm c0008000

bootdelay=3

baudrate=115200

ethaddr=00:40:5c:26:0a:5b

netmask=255.255.255.0

ipaddr=192.168.1.128

serverip=192.168.1.55

gatewayip=192.168.1.1

bootargs=noinitrdroot=/dev/nfs rw nfsroot=192.168.1.55:/opt/sam2416edk/root_qtopia/ip=192.168.1.128:192.168.1.55:255.255.255.0 console=ttySAC1,115200

stdin=serial

stdout=serial

stderr=serial


Environmentsize: 389/16380 bytes

SAM2416EDK#



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值