Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9139287
  • 博文数量: 1725
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19840
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1725)

文章存档

2024年(1)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: LINUX

2011-10-07 21:57:05

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!

阅读(7148) | 评论(0) | 转发(1) |
0

上一篇:rvds 4.x 总结与延展

下一篇:BCB

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