Chinaunix首页 | 论坛 | 博客
  • 博客访问: 315159
  • 博文数量: 135
  • 博客积分: 867
  • 博客等级: 准尉
  • 技术积分: 865
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-15 14:50
文章分类

全部博文(135)

文章存档

2012年(135)

分类:

2012-09-19 11:41:35

原文地址:Uboot对U盘的支持 作者:iibull

uboot中添加U盘支持

 

1.       插入u盘后,运行 usb-start命令,你就可以看到u-boot可以挂在U盘,再用atinfo USB 0:1等命令对USB进行操作了。把u盘的内核拷贝到sdram

2.       fatload usb 0:4 0x80100000 uimagebootm

 

(1)首先阅读uboot目录下CPU/DOC 下文件readme。usb。

(2)再inlcude、cinfigs 目录下找到自己的 平台 ×。h

添加内容

CONFIG_CMD_USB enables basic USB support and the usb command
CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined
if using CONFIG_CMD_USB
CONFIG_USB_KEYBOARD enables the USB Keyboard
CONFIG_USB_STORAGE enables the USB storage devices
(3)编译 ,如果出现 printf(" %s (%s, %dmA)\n",usb_get_class_desc(dev->config.if_desc[0].bInterfaceClass),
dev->slow ? "1.5MBit/s" : "12MBit/s",dev->config.MaxPower * 2); slow 没有定义 修改函数

usb_device 定义 enum usb_device_speed speed; 为 int slow; /* Slow device? */

(4)出现 common/libcommon.a(usb.o)(.text+0x54): In function `usb_init':
/user/srp/u-boot-1.1.3/common/usb.c:96: undefined reference to `usb_lowlevel_init'
common/libcommon.a(usb.o)(.text+0xd4): In function `usb_stop':
/user/srp/u-boot-1.1.3/common/usb.c:117: undefined reference to `usb_lowlevel_stop'
common/libcommon.a(usb.o)(.text+0x140): In function `usb_submit_int_msg':
/user/srp/u-boot-1.1.3/common/usb.c:141: undefined reference to `submit_int_msg'
common/libcommon.a(usb.o)(.text+0x1e0): In function `usb_control_msg':
/user/srp/u-boot-1.1.3/common/usb.c:170: undefined reference to `submit_control_msg'
common/libcommon.a(usb.o)(.text+0x27c): In function `usb_bulk_msg':
/user/srp/u-boot-1.1.3/common/usb.c:197: undefined reference to `submit_bulk_msg'
common/libcommon.a(usb_storage.o)(.text+0x8d4): In function `usb_stor_CBI_get_status':
/user/srp/u-boot-1.1.3/common/usb_storage.c:527: undefined reference to `submit_int_msg'
make: *** [u-boot] Error 1

出现这个问题,是没有添加Usb类似的函数功能,再cpu下面找到自己平台的cpu,添加×。c ,就是添加上面没有出现的函数功能,在 这个目录下makefile里面添加×。o

(5)其他问题 按照提示解决 就可以编译ok!

阅读(834) | 评论(0) | 转发(0) |
0

上一篇:UBOOT USB口测试

下一篇:git使用总结

给主人留下些什么吧!~~