(secbulk目录下是PC端USB驱动, dnw目录是下载工具)
1.首先解压缩文件:
# tar xvf dnw_for_linux.tar.gz
复制代码2.然后切换到下面的目录,编译usb驱动模块:
# cd dnw_for_linux/secbulk
# make -C /lib/modules/2.6.33.6-147.fc13.i686/build/ M=/home/lhc/Desktop/dnw_for_linux/secbulk/ modules
3.编译完成后,会生成secbulk.ko文件:
# ls
Makefile Module.symvers secbulk.ko secbulk.mod.o
modules.order secbulk.c secbulk.mod.c secbulk.o
# insmod ./secbulk.ko (注意要在root权限下)
# dmesg (查看是否加载成功)
secbulk:secbulk loaded
usbcore: registered new interface driver secbulk (看到这样两行就说明成功了)
# cd ../dnw
# gcc -o dnw dnw.c
6.将文件copy到/usr/local/bin目录
# cp dnw /usr/local/bin
复制代码(这样就可以在shell下面直接使用dnw命令了)使用方法如下:
1.在minicom下,从Nor Flash启动TQ2440,选择3功能:
[3] Download Linux Kernel (zImage.bin) to Nand Flash
复制代码2.此时,打开另一个终端:
# su
# dnw work/linux-2.6.30.4/zImage.bin
file name : work/linux-2.6.30.4/zImage.bin
file size : 2305544 bytes
Writing data...
100% 2305554 bytes OK (此时就将zImage镜像下载到开发板了)
Enter your selection: 3
USB host is connected. Waiting a download.
Now, Downloading [ADDRESS:30000000h,TOTAL:2305554]
RECEIVED FILE SIZE: 2305554 (562KB/S, 4S)
NAND erase: device 0 offset 0x200000, size 0x300000
Erasing at 0x4e0000 -- 100% complete.
OK
NAND write: device 0 offset 0x200000, size 0x232e08
Writing data at 0x432800 -- 100% complete.
2305544 bytes written: OK