Use the USB tool dnw in mini2440 Linux (2440) [Switch]

Source: Internet
Author: User
Tags dmesg

It is very troublesome to run the image back to XP and fl the system.
Find the two Super Terminal tools and the USB tool dnw replaced in Linux.
1. First of all, the Super Terminal I used is gtkterm. I felt that the interface could still go in, and then click configration-port to change to 15200 OK.
Then 2440 use norm to start the interface as follows:

Let's take a look at the background interface after Linux is started.

2. Download the PC-side USB driver and write tool for dnw in Linux
: Http://arm9home.com/bbs/job.php? Action = download & pid = TPC & tid = 817 & Aid = 86
File Name: dnw_linux.zip
After the download, change the suffix to. tgz.
# Or search for Linux dnw
Compile a PC-side USB driver and write Tool
2.1 decompress
$ Tar xzvf/home/haozi/dnw_linux.tgz
Dnw_linux/
Dnw_linux/secbulk/
Dnw_linux/secbulk/makefile
Dnw_linux/secbulk. c
Dnw_linux/dnw/
Dnw_linux/dnw. c

Secbulk. C is a PC-side USB driver, and dnw. C is a write tool.

2.2 compile and load the secbulk. c kernel module
$ CD secbulk
$ Make-C/lib/modules/'uname-R'/build M = 'pwd' modules

After compilation, You can see secbulk. KO in the current directory.
Alex @ Alex-desktop :~ /Project3/qq2440/dnw_linux/secbulk $ ls
Makefile

Module. symvers Secbulk. c Secbulk. Ko Secbulk. Mod. c Secbulk. Mod. o Secbulk. o

 

Use the insmod command to load the module. This requires the root permission.
$ Sudo insmod./secbulk. Ko

After loading, run the dmesg command to check that the module has been successfully loaded.
[238.007970] secbulk: secbulk loaded
[238.009101] usbcore: registered new interface driver secbulk

2.3 compile the dnw Writing Tool
$ CD dnw
$ Gcc-O dnw. c
After compilation is successful, the executable file dnw is generated.

3. Download with dnw
3.1 start the Development Board, enter supervivi, and connect the Development Board and PC with a USB cable. Then, run the dmesg command to see the secbulk driver loading:
[283.677772] USB 1-1: new full speed USB device using uhci_hcd and address 2
[284.084835] USB 1-1: configuration #1 chosen from 1 choice
[284.140430] secbulk: secbulk probing...
[284.140482] secbulk: bulk out endpoint found!

3.2 at this time, you can use supervivi for USB download. For more information about Vivi, see the user manual. waiting a download. ", write the file to be downloaded using the dnw tool on PC Linux
$ Sudo./dnw/path/to/what/you/want/download
# Use commands to write data here, with no interface
For specific commands, see

The write environment is as follows:

Root @ haozi-desktop:/home/haozi/desktop/dnw_linux/dnw # sudo./dnw/home/haozi/Ruanjian/Linux/supervivi-128M

File Name:/home/haozi/Ruanjian/Linux/supervivi-128M.
File Size: 253912 bytes
Writing data...
100% 253922 bytes OK

Root @ haozi-desktop:/home/haozi/desktop/dnw_linux/dnw # sudo./dnw/home/haozi/Ruanjian/Linux/zimage_t35
File Name:/home/haozi/Ruanjian/Linux/zimage_t35
File Size: 2022348 bytes
Writing data...
100% 2022358 bytes OK

Root @ haozi-desktop:/home/haozi/desktop/dnw_linux/dnw # sudo./dnw/home/haozi/Ruanjian/Linux/root_qtopia-128M.img
File Name:/home/haozi/Ruanjian/Linux/root_qtopia-128M.img.
File Size: 58487616 bytes
Writing data...
26% 58487626 bytes OK
(The previous supervivi and kernel writing can also be followed by the QT File System writing speed. The speed of the super slow file is a little higher)

 

# $ Sudo insmod./secbulk. Ko loads modules into the kernel
It will not be automatically loaded when it is started, so that it can be used only after it is loaded every time. In this case, add it to the boot script,
Make it loaded automatically. edit/etc/init. d/rc. Local and add the insmod/path/secbulk. Ko at the end.

Gedit/etc/init. d/rc. Local
Insmod/home/haozi/desktop/dnw_linux/secbulk. Ko

# When calling dnw, you can only use./dnw in the current directory. In this case, add dnw to/usr/local/sbin.
Any directory, useSudo dnw filename.

Now the flash is finished in Linux.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.