* 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
|
| .__ / \/ . ____/ _/ _/ The 0pen
|
||||||
@@ -11,19 +10,23 @@
|
|||||||
_/ ___|_.|__|
|
_/ ___|_.|__|
|
||||||
'`
|
'`
|
||||||
|
|
||||||
The 'Free Fiasco Firmware Flasher' aka 0xFFFF utility tries to implement
|
The 'Free Fiasco Firmware Flasher' aka 0xFFFF utility implements a free
|
||||||
a free (GPL'd) userspace handler for the NOLO bootloader.
|
(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.
|
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
|
It's not suposed to be stable, so nokia will probably release incompatible
|
||||||
bootloaders to break this tool. USE IT AT YOUR OWN RISK.
|
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
|
PLEASE. Read carefully all the documentation inside doc/* for more information
|
||||||
before building or using the flasher to avoid questions, problems or so.
|
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!
|
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
|
- reboot de mother board
|
||||||
- extract the current firmware pieces from the device (dump)
|
- extract the current firmware pieces from the device (dump)
|
||||||
- set the USB host/slave mode
|
- set the USB host/slave mode
|
||||||
- set the R&R mode
|
- fine grained R&D flags support
|
||||||
- identify firmware pieces
|
- 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>
|
</pre>
|
||||||
This is the help message of the tool:
|
This is the help message of the tool:
|
||||||
<pre>
|
<pre>
|
||||||
<b>~$ 0xFFFF -h</b>
|
<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
|
-b [arg] boots the kernel with arguments
|
||||||
-e [path] dump the firmware pieces into the path
|
-e [path] dump and extract pieces to path
|
||||||
-p [[p:]file] piece-of-firmware : file-where-this-piece-is
|
|
||||||
-r [0|1] disable/enable R&D mode
|
-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 [fiasco] unpack target fiasco image
|
||||||
-U [0|1] disable/enable the usb host mode
|
-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
|
-h show this help message
|
||||||
-i show device information (let standby mode)
|
-i show device information (let standby mode)
|
||||||
-I [piece] identify a firmware piece
|
-I [piece] identify a firmware piece
|
||||||
-l list supported usb device ids
|
-l list supported usb device ids
|
||||||
-d [vid:pid] injects a usb device into the supported list
|
-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
|
-R reboot the omap board
|
||||||
|
-x extract configuration entries from /dev/mtd1
|
||||||
-v be verbose and noisy
|
-v be verbose and noisy
|
||||||
-V show 0xFFFF version information
|
-V show 0xFFFF version information
|
||||||
Pieces are: xloader secondary kernel initfs rootfs omap-nand
|
Pieces are: xloader secondary kernel initfs rootfs omap-nand
|
||||||
|
|||||||
+22
-3
@@ -23,6 +23,18 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.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] = {
|
struct devices supported_devices[SUPPORTED_DEVICES] = {
|
||||||
{ "FFFF", 0x000, 0x0000, 0x0000 }, // dummy
|
{ "FFFF", 0x000, 0x0000, 0x0000 }, // dummy
|
||||||
{ "unkn", 0x421, 0x3f00, 0x0000 }, // probably a development board
|
{ "unkn", 0x421, 0x3f00, 0x0000 }, // probably a development board
|
||||||
@@ -53,6 +65,10 @@ int is_valid_device(struct usb_device_descriptor *udd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List all supported device-ids and it's names
|
||||||
|
*
|
||||||
|
*/
|
||||||
void list_valid_devices()
|
void list_valid_devices()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -62,6 +78,12 @@ void list_valid_devices()
|
|||||||
printf("%04x:%04x %s\n", ptr.vendor_id, ptr.product_id, ptr.name);
|
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)
|
int usb_device_found(struct usb_device_descriptor *udd, struct devices *it_device)
|
||||||
{
|
{
|
||||||
struct usb_bus *bus;
|
struct usb_bus *bus;
|
||||||
@@ -75,9 +97,6 @@ int usb_device_found(struct usb_device_descriptor *udd, struct devices *it_devic
|
|||||||
case -1:
|
case -1:
|
||||||
fprintf(stderr, "\nerror: no devices found.\n");
|
fprintf(stderr, "\nerror: no devices found.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
case 0:
|
|
||||||
fprintf(stderr, "\noops: no permission to usb. got root?\n");
|
|
||||||
exit(1);
|
|
||||||
default:
|
default:
|
||||||
for (bus = usb_busses; bus; bus = bus->next) {
|
for (bus = usb_busses; bus; bus = bus->next) {
|
||||||
struct usb_device *dev = bus->devices;
|
struct usb_device *dev = bus->devices;
|
||||||
|
|||||||
Reference in new issue
Block a user