* Update documentation for the 0.2 release
* Fix case0 bug of libusb in usb_device_found function
This commit is contained in:
1 parent
3728cdea31
commit
6521a8e9d1
4 files changed
+46
-15
No files matched your search
@@ -1,6 +1,5 @@
|
||||
|
||||
|
||||
|
||||
------. ,---------.--.--.
|
||||
/ | ___ | | | \\------------ -- .
|
||||
| .__ / \/ . ____/ _/ _/ The 0pen
|
||||
@@ -11,19 +10,23 @@
|
||||
_/ ___|_.|__|
|
||||
'`
|
||||
|
||||
The 'Free Fiasco Firmware Flasher' aka 0xFFFF utility tries to implement
|
||||
a free (GPL'd) userspace handler for the NOLO bootloader.
|
||||
The 'Free Fiasco Firmware Flasher' aka 0xFFFF utility implements a free
|
||||
(under the GPLv3 license) userspace handler for the NOLO bootloader and
|
||||
extended features for flashing, dumping and getting information for the
|
||||
Nokia Internet Tablets.
|
||||
|
||||
Use it with CARE. This is an experimental tool and it can brick your device.
|
||||
It's not suposed to be stable, so nokia will probably release incompatible
|
||||
bootloaders to break this tool. USE IT AT YOUR OWN RISK.
|
||||
|
||||
This tool has been designed and tested on n770. The n800 flash should work
|
||||
but it's not tested and is known to use different request codes.
|
||||
|
||||
PLEASE. Read carefully all the documentation inside doc/* for more information
|
||||
before building or using the flasher to avoid questions, problems or so.
|
||||
|
||||
Feel free to join to the mailing list and visit the homepage for more info:
|
||||
|
||||
0xffff@lists.nopcode.org
|
||||
http://www.nopcode.org/0xFFFF
|
||||
|
||||
|
||||
Have phun!
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Consequences of a weird flashing :)<br />
|
||||
<img src="img/n770bars.jpg">
|
||||
@@ -8,25 +8,36 @@ Tablets (n770 and n800).
|
||||
- reboot de mother board
|
||||
- extract the current firmware pieces from the device (dump)
|
||||
- set the USB host/slave mode
|
||||
- set the R&R mode
|
||||
- fine grained R&D flags support
|
||||
- identify firmware pieces
|
||||
- dump mtd partitions (embedded mtd-utils source code)
|
||||
- reconstruct initfs from a dump
|
||||
- dump config partition
|
||||
- automatic piece identifier
|
||||
- console mode (shell like)
|
||||
</pre>
|
||||
This is the help message of the tool:
|
||||
<pre>
|
||||
<b>~$ 0xFFFF -h</b>
|
||||
0xFFFF v0.1 - The Open Free Fiasco Firmware Flasher
|
||||
0xFFFF v0.2 // The Free Fiasco Firmware Flasher
|
||||
-b [arg] boots the kernel with arguments
|
||||
-e [path] dump the firmware pieces into the path
|
||||
-p [[p:]file] piece-of-firmware : file-where-this-piece-is
|
||||
-e [path] dump and extract pieces to path
|
||||
-r [0|1] disable/enable R&D mode
|
||||
-f <flags> set the given RD flags (see '-f help')
|
||||
-p [[p%]file] piece-of-firmware % file-where-this-piece-is
|
||||
-u [fiasco] unpack target fiasco image
|
||||
-U [0|1] disable/enable the usb host mode
|
||||
-s [serial] serial port console (minicom like terminal)
|
||||
-C [/dev/mtd] check bad blocks on mtd
|
||||
-c console prompt mode
|
||||
-h show this help message
|
||||
-i show device information (let standby mode)
|
||||
-I [piece] identify a firmware piece
|
||||
-l list supported usb device ids
|
||||
-d [vid:pid] injects a usb device into the supported list
|
||||
-D [0|1|2] sets the root device to flash (0), mmc (1) or usb (2)
|
||||
-R reboot the omap board
|
||||
-x extract configuration entries from /dev/mtd1
|
||||
-v be verbose and noisy
|
||||
-V show 0xFFFF version information
|
||||
Pieces are: xloader secondary kernel initfs rootfs omap-nand
|
||||
|
||||
+22
-3
@@ -23,6 +23,18 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* The internet tablet PC (and probably most of
|
||||
* Nokia devices have different USB-IDs depending
|
||||
* on the boot state.
|
||||
*
|
||||
* The following table shows this info:
|
||||
*
|
||||
* boot os
|
||||
* n770 0421:0105 0421:0431
|
||||
* n800 0421:0431
|
||||
*
|
||||
*/
|
||||
struct devices supported_devices[SUPPORTED_DEVICES] = {
|
||||
{ "FFFF", 0x000, 0x0000, 0x0000 }, // dummy
|
||||
{ "unkn", 0x421, 0x3f00, 0x0000 }, // probably a development board
|
||||
@@ -53,6 +65,10 @@ int is_valid_device(struct usb_device_descriptor *udd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* List all supported device-ids and it's names
|
||||
*
|
||||
*/
|
||||
void list_valid_devices()
|
||||
{
|
||||
int i;
|
||||
@@ -62,6 +78,12 @@ void list_valid_devices()
|
||||
printf("%04x:%04x %s\n", ptr.vendor_id, ptr.product_id, ptr.name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns true (1) when a valid usb device is found and stores the udd and devices
|
||||
* structures for the specified device.
|
||||
* Otherwise returns false (0)
|
||||
*/
|
||||
|
||||
int usb_device_found(struct usb_device_descriptor *udd, struct devices *it_device)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
@@ -75,9 +97,6 @@ int usb_device_found(struct usb_device_descriptor *udd, struct devices *it_devic
|
||||
case -1:
|
||||
fprintf(stderr, "\nerror: no devices found.\n");
|
||||
exit(1);
|
||||
case 0:
|
||||
fprintf(stderr, "\noops: no permission to usb. got root?\n");
|
||||
exit(1);
|
||||
default:
|
||||
for (bus = usb_busses; bus; bus = bus->next) {
|
||||
struct usb_device *dev = bus->devices;
|
||||
|
||||
Reference in new issue
Block a user