* 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)
This commit is contained in:
1 parent
83c25d7eb2
commit
edac98d26e
8 files changed
+117
-481
No files matched your search
@@ -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:
|
||||
|
||||
@@ -1,79 +1,49 @@
|
||||
<b>FAQ</b>
|
||||
<h2>FAQ</h2>
|
||||
|
||||
This file tries to collect a bunch of common questions/answers about flashing
|
||||
<b>*) How can I set my Internet Tablet into RD mode with 0xFFFF?</b>
|
||||
|
||||
<b>*) Why implement a free software flasher?</b>
|
||||
|
||||
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...
|
||||
Just type '0xFFFF -r 1' as root
|
||||
|
||||
|
||||
<b>*) Can I brick my device?</b>
|
||||
<b>*) How can I unpack a FIASCO firmware?
|
||||
|
||||
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.
|
||||
Just type '0xFFFF -r 1' as root
|
||||
|
||||
|
||||
<b>*) What can I do with 0xFFFF?</b>
|
||||
<b>*) How can I unpack a FIASCO firmware?</b>
|
||||
|
||||
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
|
||||
Just type '0xFFFF -u FiascoFirmware.bin -e /tmp' as root
|
||||
|
||||
|
||||
<b>*) What is NOLO?</b>
|
||||
<b>*) How can I flash a new rootfs?
|
||||
|
||||
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.
|
||||
Unpack the pieces from the fiasco firmware (the one distributed by Nokia for example) and then type:
|
||||
|
||||
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.
|
||||
# 0xFFFF -R -p rootfs.jffs
|
||||
|
||||
|
||||
<b>*) How can I identify my device?</b>
|
||||
<b>*) How can I flash a full FIASCO image?</b>
|
||||
|
||||
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!
|
||||
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:
|
||||
|
||||
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 :)
|
||||
# 0xFFFF -F FiascoFirmware.fiasco
|
||||
|
||||
|
||||
<b>*) Can I unpack fiasco blobs?</b>
|
||||
<h2>Advanced commands</h2>
|
||||
|
||||
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.
|
||||
<b>*) How to extract the firmware pieces from a running device?</b>
|
||||
|
||||
We can just use tarballs containing the desired pieces.
|
||||
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:
|
||||
|
||||
# mkdir /media/mmc1/backup
|
||||
# 0xFFFF -e /media/mmc1/backup
|
||||
|
||||
|
||||
<b>*) Dumping configuration region</b>
|
||||
|
||||
There's a hidden mtd partition containing undocumented configuration information. This one can be
|
||||
dumped from the device using the following command:
|
||||
|
||||
# 0xFFFF -x
|
||||
@@ -0,0 +1,80 @@
|
||||
<b>FAQ</b>
|
||||
|
||||
This file tries to collect a bunch of common questions/answers about flashing
|
||||
|
||||
|
||||
<b>*) Why implement a free software flasher?</b>
|
||||
|
||||
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...
|
||||
|
||||
|
||||
<b>*) Can I brick my device?</b>
|
||||
|
||||
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.
|
||||
|
||||
|
||||
<b>*) What can I do with 0xFFFF?</b>
|
||||
|
||||
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
|
||||
|
||||
|
||||
<b>*) What is NOLO?</b>
|
||||
|
||||
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.
|
||||
|
||||
|
||||
<b>*) How can I identify my device?</b>
|
||||
|
||||
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 :)
|
||||
|
||||
|
||||
<b>*) Can I unpack fiasco blobs?</b>
|
||||
|
||||
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.
|
||||
@@ -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
|
||||
@@ -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}
|
||||
@@ -1,279 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!--*- mode: xml -*-->
|
||||
<glade-interface>
|
||||
<widget class="GtkWindow" id="main_window">
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes" context="yes">g0xFFFF</property>
|
||||
<property name="default_width">501</property>
|
||||
<property name="default_height">329</property>
|
||||
<property name="icon_name">gtk-connect</property>
|
||||
<signal name="destroy_event" handler="gtk_main_quit" object="0"/>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_START</property>
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="combobox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="active">0</property>
|
||||
<property name="items" translatable="yes" context="yes">n770/n800/n810
|
||||
HERMflasher</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="tree">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<widget class="GtkFileChooserButton" id="file">
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="piece">
|
||||
<property name="row_span_column">0</property>
|
||||
<property name="column_span_column">0</property>
|
||||
<property name="active">0</property>
|
||||
<property name="tearoff_title">patata</property>
|
||||
<property name="items" translatable="yes" context="yes">rootfs
|
||||
initfs
|
||||
kernel
|
||||
secondary
|
||||
xloader</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox4">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" context="yes">Remove</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="gui_remove"/>
|
||||
<signal name="activate" handler="gui_remove"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="add">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" context="yes">Add</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="gui_add"/>
|
||||
<signal name="activate" handler="gui_add"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="usbhost">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes" context="yes">USB host mode</property>
|
||||
<property name="response_id">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="rdmode">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes" context="yes">R&D mode</property>
|
||||
<property name="response_id">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="reboot">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes" context="yes">Reboot</property>
|
||||
<property name="response_id">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkProgressBar" id="pbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="show_text">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox5">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="info">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes" context="yes">gtk-dialog-info</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="gui_information" object="main_window"/>
|
||||
<signal name="activate" handler="gui_information" object="main_window"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="but_commit">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes" context="yes">gtk-execute</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="gui_run"/>
|
||||
<signal name="activate" handler="gui_run"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="GtkAboutDialog" id="information">
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes" context="yes">About Glade</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="has_separator">False</property>
|
||||
<property name="program_name">Glade</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="textview1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="pixels_below_lines">2</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="cursor_visible">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area3">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* 0xFFFF - Open Free Fiasco Firmware Flasher
|
||||
* Copyright (C) 2007 pancake <pancake@youterm.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <glade/glade.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user