Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4430576
  • 博文数量: 252
  • 博客积分: 5347
  • 博客等级: 大校
  • 技术积分: 13838
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-30 10:13
文章分类
文章存档

2022年(12)

2017年(11)

2016年(7)

2015年(14)

2014年(20)

2012年(9)

2011年(20)

2010年(153)

2009年(6)

分类: 嵌入式

2010-04-16 15:03:41

    自从学习嵌入式Linux开发以来,一直在使用Windows下的DNW工具。每次下载u-boot到NandFlash都必须要切换到Windows下面,比较的麻烦,今天发现了一个在Linux下也很好用的DNW工具。就以usb2ram,其具体的安装和使用方法记录如下:
   必须先下载该安装文件。下载下来的文件必须再从新编译一下才能使用,不过要确保你安装了下面的两个文件:
libusb和libusb-dev。我的操作系统是Ubuntu,可以使用命令

sudo apt-get install libusb-dev

我只安装了libusb-dev就可以使用了。
然后,在Makefile文件中第一行后面添加一行

CC=gcc

其整个Makefile文件修改后的内容如下:

#!/usr/bin/make
CC=gcc
LDFLAGS=-lusb -lm

all: usb2ram

clean:
    -rm -f *.o usb2ram

usb2ram: usb2ram.o
    $(CC) $(LDFLAGS) -o $@ $<

boot_usb.o: boot_usb.c
    $(CC) $(CFLAGS) -o $@ -c $<

.PHONEY: all clean

然后,在make一下,
生成了usb2ram的执行文件。
使用方法,当在NorFlash启动supervivi时,可以像在windows下面使用DNW一样,选择a

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[a] Absolute User Application
[n] Download Nboot for WinCE
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
[b] Boot the system
[s] Set the boot parameters
[u] Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi
[i] Version: 0945-2K
Enter your selection:

出现USB host is connected. Waiting a download.
就可以使用usb2ram了。
sudo ./usb2ram 地址 文件名
这样就可以下载到NandFlash中了。文件放在usb2ram目录下面

阅读(3712) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~