summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpancake <pancake@dazo>2007-06-25 15:14:14 +0200
committerpancake <pancake@dazo>2007-06-25 15:14:14 +0200
commit6521a8e9d11b8e87bb8d400238cb5a340202674e (patch)
treeec153e2e7071e3a34af2f89eb2a10367244733d5
parent3728cdea3130c62f3d766df040d2cb85f1e6caa4 (diff)
download0xFFFF-6521a8e9d11b8e87bb8d400238cb5a340202674e.tar.bz2
* Update documentation for the 0.2 release
* Fix case0 bug of libusb in usb_device_found function
-rw-r--r--README15
-rw-r--r--doc/oops2
-rw-r--r--doc/usage43
-rw-r--r--src/devices.c25
4 files changed, 58 insertions, 27 deletions
diff --git a/README b/README
index 64ca4fc..4125cb8 100644
--- a/README
+++ b/README
@@ -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!
diff --git a/doc/oops b/doc/oops
deleted file mode 100644
index 947a31e..0000000
--- a/doc/oops
+++ /dev/null
@@ -1,2 +0,0 @@
-Consequences of a weird flashing :)<br />
-<img src="img/n770bars.jpg">
diff --git a/doc/usage b/doc/usage
index 59caa17..d297505 100644
--- a/doc/usage
+++ b/doc/usage
@@ -8,27 +8,38 @@ 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
- -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
- -r [0|1] disable/enable R&D mode
- -u [fiasco] unpack target fiasco image
- -U [0|1] disable/enable the usb host 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
- -R reboot the omap board
- -v be verbose and noisy
- -V show 0xFFFF version information
+0xFFFF v0.2 // The Free Fiasco Firmware Flasher
+ -b [arg] boots the kernel with arguments
+ -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
</pre>
diff --git a/src/devices.c b/src/devices.c
index 0739905..bd4a4d3 100644
--- a/src/devices.c
+++ b/src/devices.c
@@ -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;