DM3730调试心得,与问题

来源:互联网 发布:c语言病毒代码大全 编辑:程序博客网 时间:2024/05/24 00:52

开发环境ubuntu11.04

1.usb 转串口:minicom 配置。lsusb看是否有对应到usb口,无到话要安装驱动(一般可以看到厂家提供到驱动和相对应到该设备名字);有到话看ls /dev/ttyUSB0是否存在


然后是简单到陪在minicom -s

+-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D - Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?   


一般串口是ttyS0,在串口转usb中,USB是0还是1自己查看后确定。


ADB over ethernet

1.首先让android手机监听指定的端口:
  这一步需要使用shell,因此手机上要有终端模拟器,不过网上很多,随便找个就行了,依次敲入下列几行:

?
1
2
3
4
su//获取root权限
setprop service.adb.tcp.port5555//设置监听的端口,端口可以自定义,如5554,5555是默认的
stop adbd//关闭adbd
start adbd//重新启动adbd

2.手机连接wifi并确保手机和电脑连接同一个网络,记下手机的ip地址,假设为a.b.c.d

3.电脑上打开命令提示符,敲入以下命令:

?
1
adb connect a.b.c.d//如果不输入端口号,默认是5555,自定义的端口号必须写明,对应第1步中自定义的端口号,例如:a.b.c.d:5554

4.配置成功,命令行显示:“connected to a.b.c.d”,然后就可以调试程序了,^_^。


现在ADB已经完成了usb,wifi,有线ethernet


一个晚上到成果



3.DM3730 挂载文件系统

本操作是使用网络下载内核,前提是需要配置好tftp和nfs(一般现在也可以使用usb,otg,uart等等)

tftp :vim/etc/xinetd.d/tftp

/etc/init.d/xinetd restart

nfs :vim /etc/exports

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

nfs配置时,使用,no_root_squash这个参数,使访问nfs时的权限以root访问。不要使用no_subtree_check..    同时文件系统使用chmod 777 -R rootfs.

.

boot下参数设置:

setenvbootargs 'init=/init console=ttyO0,115200n8 rootfs=/dev/nfs

ip=169.254.7.210:169.254.7.218:169.254.255.255:255.255.0.0 rw

rootdelay=3 nfsroot=169.254.7.218:/home/linux/android_rootfs,nolock

mem=256Mnoinitrd androidboot.console=ttyO0 vram=8M omapfb.vram=0:8M '

(参考TI 的用户手册)

setenvserverip 192.168.1.38

setenvipaddr 192.168.1.48 //用于TFTP

setenv bootcmd 'tftp 0x82000000 uImage;bootm' //boot不进入终端,自动跳过后执行到命令

saveenv


3 TI有2种nand ,onenand 和nand 配置,3730内部不存在onenand :onenand 是兼容了nand 和nor 的特性,常常用于3G移动通信等等。

简单介绍下nandflash启动的配置,

nand启动参数设置

setenvserverip 169.254.7.218

setenvipaddr 169.254.7.210 //用于TFTP

加载各系统镜像x-loader,kernel,rootfs,uboot



setenvnandboot ' nand read 0x82000000 0x280000 0x500000 '

setenvbootcmd 'run nandboot ; bootm 0x82000000 '配置kernel启动从flash加载内核到内存0x82000000,启动bootcmd

saveenv


Flashing x-loader
To flash MLO (x-load.bin.ift) to the NAND Flash, execute the commands listed below:
OMAP3_EVM  tftp 0x80000000 MLO
OMAP3_EVM nand erase 0x0 0x50000
OMAP3_EVM nandecc hw 2
OMAP3_EVM  nand write 0x80000000 0x0 0x50000


Flashing U-boot
To flash u-boot.bin to the NAND Flash, execute the commands listed below:
OMAP3_EVM tftp 0x80000000 u-boot.bin
OMAP3_EVM nand erase 0x80000 0x1C0000
OMAP3_EVM nandecc hw 2
OMAP3_EVM nand write 0x80000000 0x80000 0x1C0000


Flashing Linux kernel

To flash uImage to the NAND Flash execute the commands listed below:

OMAP3_EVM  tftp 0x80000000 uImage
OMAP3_EVM  nand erase 0x280000 <kernel image size>
OMAP3_EVM  nandecc hw 1
OMAP3_EVM  nand write 0x80000000 0x280000 <kernel image size>

同理文件系统下载,但是貌似由于我的系统过大,在80000000处会下载不成功,改为82000000就可以了,可能是中间端有坏块写不下去

setenvbootargs 'init=/init console=ttyO0,115200n8 noinitrd ip=offandroidboot.console=ttyO0 rootwait mem=256Momap_vout.vid1_static_vrfb_alloc=y rw ubi.mtd=4,2048 rootfstype=ubifsroot=ubi0:rootfs rootdelay=2 vram=8M omapfb.vram=0:8M '


nfs 参数:

setenvbootargs init=/init console=ttyO0,115200n8ip=192.168.1.48:192.168.1.1:255:255:255.0 rwrootdelay=3root=/dev/nfsnfsroot=192.168.1.38:/home/zhangfang/zf/DM3730/source/out/target/product/omap3evm/android_rootfs,nolockmem=256M noinitrd androidboot.console=ttyO0 vram=8M omapfb.vram=0:8M



原创粉丝点击