imx53 uboot tftp nfs启动, linux tftp,复制gdb, linux host 创建sd卡启动,ddr stress tester

生成uImage,在ltib编译的目录 rootfs/boot下:sudo mkimage -A arm -O linux -T kernel -C none -a 0x70008000 -e 0x70008000 -n "Linux-2.6.35.3-744-g27fdf7b" -d zImage uImage

ddr stress tester

D:\ubootDebug\DDR_Stress_Tester_for MX51_MX53>DDR_Stress_Tester.exe -t mx53 -df
MX53_TO2_DDR3_LCB_SMD_ARDb.inc -com 1
rom_check_hab: reading ERROR ack failed 0x00000000
rom_check_hab() failed

sudo /etc/init.d/xinetd restart                                  //tftp

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

host创建sd卡启动:


env: 0x600  0x100 

skip=xxx是在备份时对ifseek=xxx则是在备份时对of后面的部分也就是目标文件跳过多少块再开始写

sudo dd if=u-boot.bin of=/dev/sdb bs=512 && sync && sync

sudo dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2&& sync &&  sync     //更新

sudo dd if=uImage of=/dev/sdb bs=512 seek=2048 && sync && sync

sudo dd if=/dev/sdb   bs=512 skip=2048  of=sdreaduimage count=2000

sudo dd if=/dev/sdb   bs=512 skip=1536 of=sdreaduimage count=256       //读

sudo fdisk /dev/sdb

Type the following parameters (each followed by <ENTER>):
u [switch the unit to sectors instead of cylinders]
d [repeat this until no partition is reported by the ‘p’ command ]
n [create a new partition]
p [create a primary partition]
1 [the first partition]
8192 [starting at offset sector #8192, i.e. 4MB, which leaves enough space
for the kernel, the boot loader and its configuration data]
<enter> [using the default value will create a partition that spans to the
last sector of the medium]
w [ this writes the partition table to the medium and fdisk exits]

sudo mkfs.ext3 /dev/sdb1

Copy the target file system to the partition:
$ mkdir /home/user/mountpoint
$ sudo mount /dev/sdb1 /home/user/mountpoint

$ cd /home/user/rootfs
$ sudo cp –rpa [A-z]* /home/user/mountpoint
$ sudo umount /home/user/mountpoint


host端(10.0.1.90):

配置tftp,nfs服务器

验证nfs:mount   -t   nfs   127.0.0.1:/home/lucid/Desktop/ltib/rootfs   /mnt

export ROOTFS_DIR=/tftpboot/rootfs  (机器重启后,就要配置一次)

//压缩文件系统

NFS文件系统编译

内核编译配置界面,按/进行搜索

[ -n /home/lucid/ltib/config/platform/imx/imx5_updater_defconfig.dev ]
+ cp -f /home/lucid/ltib/config/platform/imx/imx5_updater_defconfig.dev ./.config
+ make ARCH=arm CROSS_COMPILE= HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ menuconfig
scripts/kconfig/mconf arch/arm/Kconfig

networking options-》IP:kernel level auloconfiguralion项
file systems-》network file systems-》下的root file system on nfs 和nfs file system support

cd your_rootfs_dir
tar -cjf rootfs.tar.bz2 *

tftp -g -r libstdc++.so.6.0.13  192.168.1.144


mfg烧写uboot、uImage,rootfs到裸板(sd卡)后,sd卡不能启动系统,只能到uboot界面

setenv serverip 192.168.1.144

setenv ipaddr 192.168.1.173

setenv    nfsroot  /tftpboot/rootfs

setenv bootargs_base setenv bootargs console=ttymxc0,115200
setenv bootargs_nfs  setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
setenv  bootargs_mmc  'setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1   rootwait rw'
setenv   bootcmd_mmc  'run bootargs_base bootargs_mmc; mmc read 0 ${loadaddr} 0x800 0x1800; bootm'
setenv   bootcmd  run bootcmd_mmc
setenv   bootargs  console=ttymxc0,115200 ; tftpboot $(loadaddr) $(kernel); bootm
setenv   boottf  run bootargs_base ; tftpboot $(loadaddr) $(kernel); bootm

setenv  bootcmd_net  run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm

saveenv

先用uboot中的tftp下载内核,在手动烧写到mmc,可以启动系统:

tftpboot 0x70800000 uImage
(Bytes transferred = 2513532 (265a7c hex) )
mmcinfo : Rd Block Len: 512
 mmc write 0 0x70800000 0x800 0x1800
 setenv bootargs_mmc 'setenv bootargs ${bootargs} console=tty1 root=/dev/mmcblk0p1    rootwait  rw video=mxcdi1fb:BGR24,XGA di1_primary tve'
 setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'
setenv bootcmd 'run bootcmd_mmc'

或用uart下载:使用secureCRT

loady 0x70800000

在secureCRT中,使用ymoden模式发送uimage文件


mmc read 0 70800000 2 200

md 70800000 100

loady 70800000

 mmc write 0 70800400 2 186


 uboot命令:

mmc read 0 0x70000000  800 100     //0x800,16进制(=2048), 将sd卡内容读到内存中,mfgtool工具ucl.xml中,将uImage存储位置: dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2048,      u-boot.bin存储在mmc的位置:dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2 skip=2

md 0x70000000 100    //显示读取的内容

可以从nfs启动的配置参数

baudrate=115200
loadaddr=0x70800000
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage

bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait rw
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc read 0 ${loadaddr} 0x800 0x1800; bootm
ethact=FEC0
bootcmd=run bootcmd_net
filesize=2D47EC
fileaddr=70800000
ipaddr=192.168.1.173
serverip=192.168.1.126
nfsroot=/home/lucid/Desktop/ltib/rootfs
tftpDirNotice=/home/lucid/Desktop/ltib/rootfs/boot
bootargs_nfs=setenv bootargs ${bootargs}  root=/dev/nfs ip=dhcp  nfsroot=${serverip}:${nfsroot},,v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm


nand 启动时

sata write ${loadaddr} 0x800 0x1800

MX53-LOCO U-Boot > setenv bootargs_sata 'setenv bootargs ${bootargs} console=tty1 root=/dev/sda1rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'
MX53-LOCO U-Boot > setenv bootcmd_sata 'run bootargs_base bootargs_sata;sata read ${loadaddr} 0x800 0x1800;bootm'

硬盘启动

1, mfgtool 烧写文件到sata后,可参考mfgtool中的ucl.xml: files/u-boot-mx53-loco-sata.bin的烧写位置 dd if=$FILE of=/dev/sda bs=512seek=2 skip=2,  

2,用sd卡启动,在uboot中查看: 首先: sata read 0x70800000 0x2  0x10,  再显示内存:md 0x70800000,与u-boot-mx53-loco-sata.bin对比是否一致


客户端uboot参数(首先保证ping同host,可以先手动运行tftp,nfs命令,检查是否可以连接服务器。):

mfgtool自动的img中,可以正常启动的参数如下:

baudrate=115200
loadaddr=0x70800000
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1rootwait rw
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc read 0 ${loadaddr} 0x800 0x1800; bootm
bootcmd=run bootcmd_mmc

在uboot中运行bootcmd_net从nfs启动文件系统,从tftp服务器启动内核uImage,默认从sd卡启动


root@freescale /usr/bin$ tftp -g -r  gdb  192.168.1.144          
root@freescale /usr/bin$ tftp -g -r  libncurses.a  192.168.1.144
root@freescale /usr/bin$ tftp -g -r  libncurses.so.5.3  192.168.1.144
root@freescale /usr/bin$ tftp -g -r  libncurses.so.5  192.168.1.144  
root@freescale /usr/bin$ tftp -g -r  libncurses.so  192.168.1.144    


root@freescale /usr/bin$ ln -s libncurses.so.5.3 libncurses.so.5  
root@freescale /usr/bin$ ln -s libncurses.so.5 libncurses.so  

root@freescale /usr/bin$ ln -s libncurses.a libcurses.a
root@freescale /usr/bin$ ln -s libncurses.so.5.3 libcurses.so

root@freescale /usr/bin$ mv libstdc\+\+.so.6.0.13 /lib/

root@freescale /usr/bin$ mv libn* ../lib

root@freescale /$ ll usr/bin/libcu*
lrwxrwxrwx    1 root     root           12 Jan  1 00:56 usr/bin/libcurses.a -> libncurses.a
lrwxrwxrwx    1 root     root           17 Jan  1 00:56 usr/bin/libcurses.so -> libncurses.so.5.3
root@freescale /$ ll usr/lib/libnc*
-rwxrwxrwx    1 root     root       423264 Jan  1 00:49 usr/lib/libncurses.a
lrwxrwxrwx    1 root     root           15 Jan  1 00:53 usr/lib/libncurses.so -> libncurses.so.5
lrwxrwxrwx    1 root     root           17 Jan  1 00:53 usr/lib/libncurses.so.5 -> libncurses.so.5.3
-rwxrwxrwx    1 root     root       289724 Jan  1 00:49 usr/lib/libncurses.so.5.3
root@freescale /$ ll usr/bin/gdb
-rwxrwxrwx    1 root     root     11152981 Jan  1 00:46 usr/bin/gdb


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值