Baidu Linux dnw can find a lot of download information. The download file contains two files, one is the dnw USB driver secbulk, and the other is the dnw application. The two files must be compiled separately.
The method used to compile secbulk is the same as that used to compile the kernel driver. You can directly use the GCC-O dnw. C command to compile the dnw application.
Note that the USB driver downloaded on the internet is generally based on 2240, and the situation varies with Samsung's 6410, so you need to make a slight modification: In the secbulk. c file
Static struct usb_device_idsecbulk_table [] = {
{Usb_device (0x04e8, 0x1234 )},
{}
}; Samsung 6410 needs to be changed to 0x04e8 & 0x1234
Second, after the secbulk. c downloaded from the internet is compiled, the device node cannot be automatically created. You need to manually create the device node. You can use the following method to automatically create the device node when loading the driver.
Struct class * my_class;
Add the following to the _ init function:
My_class = class_create (this_module, "my_class ");
If (is_err (my_class ))
{
Printk ("Err: failedin creating class. \ n ");
Return-1;
}
Device_create (my_class, null, mkdev (hello_major, 0), "hello", "% d", 0 );
Add the following to the _ exit function:
Device_destroy (my_class, mkdev (adc_major, 0); // deletedevice node under/dev
Class_destroy (my_class); // Delete class created by us
Other drivers can also be used as above.
After compilation, copy the dnw executable file generated under dnw to/usr/local/bin and use insmod to load the generated secbulk. Ko module.
Use the sudo dnw file name directly when you need to download the image file via USB.
Has been engaged in the simulation of the original Linux system can also use dnw, learning, reproduced from: http://blog.csdn.net/xyl_nuaa/article/details/6636076