From edac98d26ee29bbdc3e16be8ecec5cbfff80482f Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 7 Mar 2008 00:20:45 +0100 Subject: * Shift doc/faq to doc/faq2 * Add 'doc/faq' with most used commands * -e can be used with -u to specify the path to extract the files * Remove gui directory - GUI source is in src/gui - Incrusted inside the build and install targets (ignores build and install errors) --- Makefile | 6 +- doc/faq | 78 +++++---------- doc/faq2 | 80 ++++++++++++++++ gui/DESCR | 53 ----------- gui/Makefile | 11 --- gui/g0xFFFF.glade | 279 ------------------------------------------------------ gui/main.c | 77 --------------- src/main.c | 6 +- 8 files changed, 113 insertions(+), 477 deletions(-) create mode 100644 doc/faq2 delete mode 100644 gui/DESCR delete mode 100644 gui/Makefile delete mode 100644 gui/g0xFFFF.glade delete mode 100644 gui/main.c diff --git a/Makefile b/Makefile index 320ea65..e5c6135 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ include config.mk PREFIX?=/usr/local -all: logot +all: logot frontend cd src && ${MAKE} all +frontend: + -cd src/gui && ${MAKE} all + static: logot cd libusb && ${MAKE} all cd src && ${MAKE} static @@ -21,6 +24,7 @@ clean: install: cp src/0xFFFF ${PREFIX}/bin + -cp src/gui/goxf ${PREFIX}/bin cp logotool/logotool ${PREFIX}/bin deinstall: diff --git a/doc/faq b/doc/faq index 5212753..5a5ec7a 100644 --- a/doc/faq +++ b/doc/faq @@ -1,79 +1,49 @@ -FAQ +

FAQ

-This file tries to collect a bunch of common questions/answers about flashing +*) How can I set my Internet Tablet into RD mode with 0xFFFF? -*) Why implement a free software flasher? + Just type '0xFFFF -r 1' as root - The Nokia Internet Tablets are based on Free Software (software libre), but - not everything included *is* free software, for instance, the firmware flasher - tool. - The 0xFFFF project aims to feed the minds of those who really want to - understand how these gadgets work internally, free the knowledge to - avoid the restrictions and fill the lack of information on the most - important part of the system. +*) How can I unpack a FIASCO firmware? - That's it, now you can build and run this flasher on *BSD, w32, MacOSX on ARM, - powerpc, x86, mips, etc... + Just type '0xFFFF -r 1' as root -*) Can I brick my device? +*) How can I unpack a FIASCO firmware? - Of course! You're free to do what you want with your device :) + Just type '0xFFFF -u FiascoFirmware.bin -e /tmp' as root - Seriously. Flashing a device is not a safe thing, so I give no warranty - of what will happen to your device when using this tool. - BTW, after a huge number of tests I can say that these devices are hard - to brick, but if you are scared about bricking your device you should - use the flasher provided by Nokia, it's better for your heart's health. +*) How can I flash a new rootfs? + Unpack the pieces from the fiasco firmware (the one distributed by Nokia for example) and then type: -*) What can I do with 0xFFFF? + # 0xFFFF -R -p rootfs.jffs - Actually 0xFFFF allows you to: - - - flash separated pieces of the firmware. - - retrieve information about the device - - reboot de mother board - - extract the current firmware pieces from the device (reverse flash) - - set the USB host/slave mode - - set the R&R mode - - identify firmware pieces +*) How can I flash a full FIASCO image? -*) What is NOLO? + It is not recommended to use, it needs more testing, and is more secure to unpack them first manually + and flash the pieces manually with multiple '-p' flags. If you are brave try: - NOLO is the 'server-side' part of the flasher from Nokia. NOLO means - NOkia LOader and it's composed by two pieces of the firmware that are - flashed together. + # 0xFFFF -F FiascoFirmware.fiasco - On the n800 firmwares, these two pieces are distributed in a single - file, but when flashing a n770, NOLO requires to provide the xloader - (without commiting) and then the secondary piece. - This piece of software is closed source and is the responsable of - handling the requests from the client-side flasher. It provides a - query-like interface via usb control messages for doing different - actions on the device. +

Advanced commands

+*) How to extract the firmware pieces from a running device? -*) How can I identify my device? + It is possible to dump the firmware pieces from the internal MTD to reconstruct a FIASCO image. + To do this recompile the flasher for ARM and run this command in the device: - Theorically n770 and n800 have different USB device ID, but this is not - true at all. The first series of the n800 comes with the same usb-id - than n770. That's weird! + # mkdir /media/mmc1/backup + # 0xFFFF -e /media/mmc1/backup - So, the only way to identify the device is by asking nolo for the version - information of different pieces of the firmware. This can be faked, because - you can flash n770 stuff on n800 and viceversa, but it's not recommended - because it wouldn't work :) +*) Dumping configuration region -*) Can I unpack fiasco blobs? + There's a hidden mtd partition containing undocumented configuration information. This one can be + dumped from the device using the following command: - Actually the fiasco format is not yet supported and not planned in - short term. There is no real need for supporting a proprietary - format image containing a proprietary system. - - We can just use tarballs containing the desired pieces. + # 0xFFFF -x diff --git a/doc/faq2 b/doc/faq2 new file mode 100644 index 0000000..29b45c3 --- /dev/null +++ b/doc/faq2 @@ -0,0 +1,80 @@ +FAQ + +This file tries to collect a bunch of common questions/answers about flashing + + +*) Why implement a free software flasher? + + The Nokia Internet Tablets are based on Free Software (software libre), but + not everything included *is* free software, for instance, the firmware flasher + tool. + + The 0xFFFF project aims to feed the minds of those who really want to + understand how these gadgets work internally, free the knowledge to + avoid the restrictions and fill the lack of information on the most + important part of the system. + + That's it, now you can build and run this flasher on *BSD, w32, MacOSX on ARM, + powerpc, x86, mips, etc... + + +*) Can I brick my device? + + Of course! You're free to do what you want with your device :) + + Seriously. Flashing a device is not a safe thing, so I give no warranty + of what will happen to your device when using this tool. + + BTW, after a huge number of tests I can say that these devices are hard + to brick, but if you are scared about bricking your device you should + use the flasher provided by Nokia, it's better for your heart's health. + + +*) What can I do with 0xFFFF? + + Actually 0xFFFF allows you to: + + - flash separated pieces of the firmware. + - retrieve information about the device + - reboot de mother board + - extract the current firmware pieces from the device (reverse flash) + - set the USB host/slave mode + - set the R&R mode + - identify firmware pieces + + +*) What is NOLO? + + NOLO is the 'server-side' part of the flasher from Nokia. NOLO means + NOkia LOader and it's composed by two pieces of the firmware that are + flashed together. + + On the n800 firmwares, these two pieces are distributed in a single + file, but when flashing a n770, NOLO requires to provide the xloader + (without commiting) and then the secondary piece. + + This piece of software is closed source and is the responsable of + handling the requests from the client-side flasher. It provides a + query-like interface via usb control messages for doing different + actions on the device. + + +*) How can I identify my device? + + Theorically n770 and n800 have different USB device ID, but this is not + true at all. The first series of the n800 comes with the same usb-id + than n770. That's weird! + + So, the only way to identify the device is by asking nolo for the version + information of different pieces of the firmware. This can be faked, because + you can flash n770 stuff on n800 and viceversa, but it's not recommended + because it wouldn't work :) + + +*) Can I unpack fiasco blobs? + + Actually the fiasco format is not yet supported and not planned in + short term. There is no real need for supporting a proprietary + format image containing a proprietary system. + + We can just use tarballs containing the desired pieces. diff --git a/gui/DESCR b/gui/DESCR deleted file mode 100644 index eb446e3..0000000 --- a/gui/DESCR +++ /dev/null @@ -1,53 +0,0 @@ -- preferences - - * choose flasher type. - - by default 0xFFFF is used - - * - -piece [file] - | - +-- radio - | - +-- nbh - -info - | - +-- -i - -reboot - | - +-- ??? - ----------- - -piece [file] - | - +-- xloader - | - +-- secondary - | - +-- kernel - | - +-- initfs - | - +-- rootfs - | - +-- autodetected - -info - | - +-- -i - -usb-host-mode - | - +-- -U [0|1] - -rd-mode - | - +-- -r 0|1 - -reboot - | - +-- -R diff --git a/gui/Makefile b/gui/Makefile deleted file mode 100644 index 7308a14..0000000 --- a/gui/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJ=main.o -BIN=goxf - -CFLAGS=`pkg-config gladeui-1.0 libglade-2.0 gmodule-2.0 --cflags` -LDFLAGS=`pkg-config gladeui-1.0 libglade-2.0 gmodule-2.0 --libs` - -all: ${OBJ} - ${CC} ${LDFLAGS} ${OBJ} -o ${BIN} - -clean: - -rm -f ${BIN} ${OBJ} diff --git a/gui/g0xFFFF.glade b/gui/g0xFFFF.glade deleted file mode 100644 index d6ba2be..0000000 --- a/gui/g0xFFFF.glade +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - 5 - g0xFFFF - 501 - 329 - gtk-connect - - - - True - 3 - - - True - GTK_BUTTONBOX_START - - - True - 0 - n770/n800/n810 -HERMflasher - - - False - False - - - - - - - - False - False - - - - - True - 6 - - - True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - - - - - - True - 3 - 2 - - - - - False - - - - - 0 - 0 - 0 - patata - rootfs -initfs -kernel -secondary -xloader - - - False - 1 - - - - - True - - - True - Remove - 0 - - - - - - - True - Add - 0 - - - - - 1 - - - - - False - 2 - - - - - True - USB host mode - 0 - True - - - False - False - 3 - - - - - True - R&D mode - 0 - True - - - False - False - 4 - - - - - True - Reboot - 0 - True - - - False - False - 5 - - - - - False - GTK_PACK_END - 1 - - - - - 3 - 1 - - - - - True - 6 - - - True - True - - - - - True - - - True - gtk-dialog-info - True - 0 - - - - - False - False - - - - - True - gtk-execute - True - 0 - - - - - False - False - 1 - - - - - False - False - GTK_PACK_END - 1 - - - - - False - False - 2 - - - - - - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - About Glade - False - GTK_WIN_POS_CENTER_ON_PARENT - GDK_WINDOW_TYPE_HINT_DIALOG - False - Glade - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - False - False - - - - - 2 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_END - - - False - GTK_PACK_END - - - - - - diff --git a/gui/main.c b/gui/main.c deleted file mode 100644 index 08f379a..0000000 --- a/gui/main.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 0xFFFF - Open Free Fiasco Firmware Flasher - * Copyright (C) 2007 pancake - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include - -#define U(x) printf("%d\n",x); fflush(stdout); - - GladeXML *xml; -int main(int argc, char **argv) -{ - GtkWidget *w; - - gtk_init(&argc, &argv); - - xml = glade_xml_new("g0xFFFF.glade", "main_window", ""); - //xml = glade_xml_new("test.glade", "window1", NULL); - if(!xml) { - g_warning("We could not load the interface!"); - return 1; - } - - glade_xml_signal_autoconnect(xml); - - w = glade_xml_get_widget(xml, "main_window"); - gtk_signal_connect(GTK_OBJECT(w), "destroy", - GTK_SIGNAL_FUNC(gtk_main_quit),NULL); -{ - GtkComboBox *piece = GTK_COMBO_BOX(glade_xml_get_widget(xml, "piece")); - gtk_combo_box_set_active(piece, 0); -} - - gtk_widget_show_all(w); - - gtk_object_unref(GTK_OBJECT(xml)); - - gtk_main(); - return 0; -} -extern void gui_run(); -extern void gui_run() -{ - printf("run\n"); -} - -extern void gui_add(); -extern void gui_add() -{ - GtkTreeView *tree = glade_xml_get_widget(xml, "tree"); - GtkFileChooser *file = GTK_FILE_CHOOSER(glade_xml_get_widget(xml, "file")); - GtkComboBox *piece = GTK_COMBO_BOX(glade_xml_get_widget(xml, "piece")); - - printf("ADD %s\n", gtk_file_chooser_get_filename(file)); - printf("ADD %d\n", gtk_combo_box_get_active(piece)); -} - -extern void gui_information(); -void gui_information() -{ - printf("FUCKMENOT!\n"); - fflush(stdout); -} diff --git a/src/main.c b/src/main.c index fe23392..5ce17ae 100644 --- a/src/main.c +++ b/src/main.c @@ -75,7 +75,7 @@ void show_usage() printf(" -f set the given RD flags (see '-f help')\n"); printf(" -i show device information (let standby mode)\n"); printf(" -l list supported usb device ids\n"); - printf(" -p [[p%%]file] piece-of-firmware %% file-where-this-piece-is\n"); + printf(" -p [[p%%]file] piece-of-firmware %% file-where-this-piece-is\n"); printf(" -r [0|1] disable/enable R&D mode\n"); printf(" -R reboot the omap board\n"); printf(" -U [0|1] disable/enable the usb host mode\n"); @@ -87,7 +87,7 @@ void show_usage() printf(" -s [serial] serial port console (minicom like terminal)\n"); printf(" -h show this help message\n"); printf(" -C [/dev/mtd] check bad blocks on mtd\n"); - printf(" -e [path] dump and extract pieces to path\n"); + printf(" -e [path] dump/extract pieces to path\n"); printf(" -F [fiasco] flash a fiasco firmware image\n"); printf(" -H [file] calculate hash for file\n"); printf(" -I [piece] identify a firmware piece\n"); @@ -328,6 +328,8 @@ int main(int argc, char **argv) } if (unpack) { + if (reverseto) + chdir(reverseto); unpack_fiasco_image(fiasco_image); return 0; } -- cgit v1.2.3