* Oops missing up
* Added fixups for make install/deinstall * HAVE_GUI is now enabled by default * New 'stop' button for goxf GUI * Fix lil bug in squeue.c * Initial .desktop icon for freedesktop environments (GNOME)
This commit is contained in:
1 parent
fc3a613276
commit
3a1053b29e
12 files changed
+68
-34
No files matched your search
@@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=0xFFFF
|
||||||
|
Comment=Free flasher for the Nokia internet tablets
|
||||||
|
Exec=gnome-terminal -e goxf
|
||||||
|
Icon=gnome-terminal.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=GTK;Application;Utility;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
include config.mk
|
include config.mk
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
|
DESTDIR?=
|
||||||
|
|
||||||
all: logot frontend
|
all: logot frontend
|
||||||
cd src && ${MAKE} all
|
cd src && ${MAKE} all
|
||||||
@@ -10,6 +11,7 @@ frontend:
|
|||||||
static: logot
|
static: logot
|
||||||
cd libusb && ${MAKE} all
|
cd libusb && ${MAKE} all
|
||||||
cd src && ${MAKE} static
|
cd src && ${MAKE} static
|
||||||
|
cd logotool && ${MAKE} static
|
||||||
|
|
||||||
allusb: logot
|
allusb: logot
|
||||||
cd libusb && ${MAKE} all
|
cd libusb && ${MAKE} all
|
||||||
@@ -23,10 +25,15 @@ clean:
|
|||||||
cd logotool && ${MAKE} clean
|
cd logotool && ${MAKE} clean
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp src/0xFFFF ${PREFIX}/bin
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||||
-cp src/gui/goxf ${PREFIX}/bin
|
mkdir -p ${DESTDIR}${PREFIX}/share/applications/
|
||||||
cp logotool/logotool ${PREFIX}/bin
|
cp src/0xFFFF ${DESTDIR}${PREFIX}/bin
|
||||||
|
-cp src/gui/goxf ${DESTDIR}${PREFIX}/bin
|
||||||
|
cp logotool/logotool ${DESTDIR}${PREFIX}/bin
|
||||||
|
cp 0xFFFF.desktop ${DESTDIR}${PREFIX}/share/applications/
|
||||||
|
|
||||||
deinstall:
|
deinstall:
|
||||||
rm -f ${PREFIX}/bin/0xFFFF
|
rm -f ${DESTDIR}${PREFIX}/bin/0xFFFF
|
||||||
rm -f ${PREFIX}/bin/logotool
|
rm -f ${DESTDIR}${PREFIX}/bin/logotool
|
||||||
|
rm -f ${DESTDIR}${PREFIX}/bin/goxf
|
||||||
|
rm ${DESTDIR}${PREFIX}/share/applications/0xFFFF.desktop
|
||||||
@@ -27,8 +27,15 @@ Feel free to join to the mailing list and visit the homepage for more info:
|
|||||||
0xffff@lists.nopcode.org
|
0xffff@lists.nopcode.org
|
||||||
http://www.nopcode.org/0xFFFF
|
http://www.nopcode.org/0xFFFF
|
||||||
|
|
||||||
|
-----------8<---------------------------------------------------------------
|
||||||
|
|
||||||
|
Build:
|
||||||
|
$ make
|
||||||
|
|
||||||
|
To install: (by default is /usr/local)
|
||||||
|
$ make install PREFIX=/usr DESTDIR=/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Have phun!
|
Have phun!
|
||||||
|
|
||||||
|
|
||||||
--pancake
|
--pancake
|
||||||
@@ -3,8 +3,8 @@ PREFIX=/usr
|
|||||||
|
|
||||||
|
|
||||||
# NetBSD stuff
|
# NetBSD stuff
|
||||||
CFLAGS+=-I/usr/pkg/include
|
CFLAGS+=-I/usr/pkg/include -O2
|
||||||
LDFLAGS+=-L/usr/pkg/lib -Wl,-R/usr/pkg/lib
|
LDFLAGS+=-L/usr/pkg/lib -Wl,-R/usr/pkg/lib
|
||||||
|
|
||||||
HAVE_USB=1
|
HAVE_USB=1
|
||||||
HAVE_GUI=0
|
HAVE_GUI=1
|
||||||
+4
-1
@@ -1,5 +1,5 @@
|
|||||||
OBJ=logotool.o compress.o uncompress.o rgb2yuv.o
|
OBJ=logotool.o compress.o uncompress.o rgb2yuv.o
|
||||||
CFLAGS=-Wall -g
|
#CFLAGS=-Wall -g
|
||||||
BIN=logotool
|
BIN=logotool
|
||||||
|
|
||||||
all: ${BIN}
|
all: ${BIN}
|
||||||
@@ -7,5 +7,8 @@ all: ${BIN}
|
|||||||
${BIN}: ${OBJ}
|
${BIN}: ${OBJ}
|
||||||
${CC} ${OBJ} -o logotool
|
${CC} ${OBJ} -o logotool
|
||||||
|
|
||||||
|
static: ${BIN}
|
||||||
|
${CC} -static ${OBJ} -o logotool
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${OBJ} logotool
|
rm -f ${OBJ} logotool
|
||||||
+1
-1
@@ -5,7 +5,7 @@ OBJ+=squeue/squeue.o
|
|||||||
BIN=0xFFFF
|
BIN=0xFFFF
|
||||||
#LIBS=`${HAVE_USB} && echo -- '-lusb'`
|
#LIBS=`${HAVE_USB} && echo -- '-lusb'`
|
||||||
LIBS=`if [ "${HAVE_USB}" = 1 ]; then echo '-lusb'; fi`
|
LIBS=`if [ "${HAVE_USB}" = 1 ]; then echo '-lusb'; fi`
|
||||||
CFLAGS+=-DVERSION=\"${VERSION}\" -Wall -g -I .
|
CFLAGS+=-DVERSION=\"${VERSION}\" -Wall -I .
|
||||||
CFLAGS+=-pedantic -std=c99 -DHAVE_USB=${HAVE_USB}
|
CFLAGS+=-pedantic -std=c99 -DHAVE_USB=${HAVE_USB}
|
||||||
USBOBJ=../libusb/error.o ../libusb/usb.o ../libusb/descriptors.o
|
USBOBJ=../libusb/error.o ../libusb/usb.o ../libusb/descriptors.o
|
||||||
USBOBJ+=../libusb/linux.o ## XXX not portable
|
USBOBJ+=../libusb/linux.o ## XXX not portable
|
||||||
|
|||||||
@@ -96,6 +96,13 @@ void flash_image(const char *filename, const char *piece, const char *version)
|
|||||||
printf("Piece type: %s\n", piece);
|
printf("Piece type: %s\n", piece);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (piece != NULL) {
|
||||||
|
if (!strcmp(piece, "fiasco")) {
|
||||||
|
fiasco_flash(filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (version)
|
if (version)
|
||||||
vlen = strlen(version)+1;
|
vlen = strlen(version)+1;
|
||||||
|
|
||||||
|
|||||||
+8
-4
@@ -48,7 +48,6 @@ const char *fpid_file(const char *filename)
|
|||||||
FILE *fd;
|
FILE *fd;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
unsigned char *b = (unsigned char *)&buf;
|
unsigned char *b = (unsigned char *)&buf;
|
||||||
char *piece = NULL;
|
|
||||||
long size;
|
long size;
|
||||||
|
|
||||||
// 2nd : +0x34 = 2NDAPE
|
// 2nd : +0x34 = 2NDAPE
|
||||||
@@ -80,10 +79,15 @@ const char *fpid_file(const char *filename)
|
|||||||
if (!memcmp(b+0x14, "X-LOADER", 8))
|
if (!memcmp(b+0x14, "X-LOADER", 8))
|
||||||
return pieces[PIECE_XLOADER];
|
return pieces[PIECE_XLOADER];
|
||||||
else
|
else
|
||||||
if (!memcmp(b+0x0c, "NOLOXldr", 8)) // TODO: this is xloader800, not valid on 770?
|
if (!memcmp(b+0x0c, "NOLOXldr", 8))
|
||||||
return pieces[PIECE_XLOADER];
|
return pieces[PIECE_XLOADER];
|
||||||
else
|
else
|
||||||
if (!memcmp(b+0x00, "\x00\x00\xa0\xe1\x00\x00\xa0\xe1", 8))
|
if (!memcmp(b+4,"NOLOXldr",8))
|
||||||
|
// TODO: this is xloader800, not valid on 770?
|
||||||
|
return pieces[PIECE_2ND];
|
||||||
|
else
|
||||||
|
if (!memcmp(b+0x00, "\x00\x00\xa0\xe1\x00\x00\xa0\xe1", 8)
|
||||||
|
|| (!memcmp(b, "\x21\x01\x01", 3)))
|
||||||
return pieces[PIECE_KERNEL];
|
return pieces[PIECE_KERNEL];
|
||||||
else
|
else
|
||||||
// JFFS2 MAGIC
|
// JFFS2 MAGIC
|
||||||
@@ -94,5 +98,5 @@ const char *fpid_file(const char *filename)
|
|||||||
return pieces[PIECE_ROOTFS];
|
return pieces[PIECE_ROOTFS];
|
||||||
}
|
}
|
||||||
|
|
||||||
return piece;
|
return NULL;
|
||||||
}
|
}
|
||||||
+13
-17
@@ -12,8 +12,8 @@
|
|||||||
xmlns:SQueues="SQueues"
|
xmlns:SQueues="SQueues"
|
||||||
xmlns:class="http://gtkaml.org/0.2"
|
xmlns:class="http://gtkaml.org/0.2"
|
||||||
class:name="MainWindow"
|
class:name="MainWindow"
|
||||||
title="0xFFFF GUI"
|
title="0xFFFF GUI">
|
||||||
delete-event="{OnWindow1DeleteEvent}">
|
<!-- delete-event="{OnWindow1DeleteEvent}" -->
|
||||||
<VBox>
|
<VBox>
|
||||||
<MenuBar expand="false">
|
<MenuBar expand="false">
|
||||||
<MenuItem label="_File" with-mnemonic="true">
|
<MenuItem label="_File" with-mnemonic="true">
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
<submenu>
|
<submenu>
|
||||||
<Menu>
|
<Menu>
|
||||||
<ImageMenuItem stock-id="gtk-connect" activate="{OnConnect}"/>
|
<ImageMenuItem stock-id="gtk-connect" activate="{OnConnect}"/>
|
||||||
|
<ImageMenuItem stock-id="gtk-stop" activate="{OnStop}"/>
|
||||||
<ImageMenuItem stock-id="gtk-info" activate="{OnGetInformation}"/>
|
<ImageMenuItem stock-id="gtk-info" activate="{OnGetInformation}"/>
|
||||||
<ImageMenuItem label="Reset" activate="{OnReset}"/>
|
<ImageMenuItem label="Reset" activate="{OnReset}"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
<VBox expand="false" border-width="3" spacing="3">
|
<VBox expand="false" border-width="3" spacing="3">
|
||||||
<Button label="gtk-connect" use-stock="true" expand="false" clicked="{OnConnect}"/>
|
<Button label="gtk-connect" use-stock="true" expand="false" clicked="{OnConnect}"/>
|
||||||
|
<Button label="gtk-stop" use-stock="true" expand="false" clicked="{OnStop}"/>
|
||||||
<Button label="gtk-info" use-stock="true" expand="false" clicked="{OnGetInformation}"/>
|
<Button label="gtk-info" use-stock="true" expand="false" clicked="{OnGetInformation}"/>
|
||||||
<Label label="" />
|
<Label label="" />
|
||||||
<!-- <Button label="Options" use-stock="false" expand="false"/>
|
<!-- <Button label="Options" use-stock="false" expand="false"/>
|
||||||
@@ -85,11 +87,6 @@
|
|||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
||||||
|
|
||||||
private void OnWindow1DeleteEvent ()
|
|
||||||
{
|
|
||||||
doCloseApplication ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doCloseApplication ()
|
private void doCloseApplication ()
|
||||||
{
|
{
|
||||||
Gtk.main_quit ();
|
Gtk.main_quit ();
|
||||||
@@ -202,7 +199,6 @@ private void OnFileNewEvent ()
|
|||||||
private void OnQuitEvent ()
|
private void OnQuitEvent ()
|
||||||
{
|
{
|
||||||
doCloseApplication();
|
doCloseApplication();
|
||||||
External.system("sudo pkill 0xFFFF");
|
|
||||||
// TODO: send message to gracefully kill 0xFFFF
|
// TODO: send message to gracefully kill 0xFFFF
|
||||||
// TODO: handle ^C when flashing
|
// TODO: handle ^C when flashing
|
||||||
}
|
}
|
||||||
@@ -216,19 +212,13 @@ public void list_del()
|
|||||||
{
|
{
|
||||||
TreeIter iter;
|
TreeIter iter;
|
||||||
TreeModel model;
|
TreeModel model;
|
||||||
weak string str = "";
|
|
||||||
|
|
||||||
TreeSelection sel = tv.get_selection();
|
TreeSelection sel = tv.get_selection();
|
||||||
|
|
||||||
if (sel.count_selected_rows() == 1) {
|
if (sel.count_selected_rows() == 1) {
|
||||||
sel.get_selected(out model, out iter);
|
sel.get_selected(out model, out iter);
|
||||||
//((ListStore)tv.model)).get(ref iter, 2, out str, -1);
|
|
||||||
|
|
||||||
//stdout.printf("NAME IS: "+str);
|
|
||||||
((ListStore)tv.model).remove(iter);
|
((ListStore)tv.model).remove(iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
//return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add_file(string type, string size, string file)
|
public void add_file(string type, string size, string file)
|
||||||
@@ -304,13 +294,18 @@ private void OnGetInformation()
|
|||||||
private void OnConnect()
|
private void OnConnect()
|
||||||
{
|
{
|
||||||
//msg("connect:device");
|
//msg("connect:device");
|
||||||
External.system("sudo pkill 0xFFFF");
|
OnStop();
|
||||||
External.system("sudo ../0xFFFF -Q &");
|
External.system("sudo 0xFFFF -Q &");
|
||||||
p->close();
|
p->close();
|
||||||
q->close();
|
q->close();
|
||||||
p = q = null;
|
p = q = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnStop()
|
||||||
|
{
|
||||||
|
External.system("sudo pkill 0xFFFF");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private bool chk_queues()
|
private bool chk_queues()
|
||||||
{
|
{
|
||||||
@@ -348,9 +343,10 @@ static int main (string[] args)
|
|||||||
viewer.loadFile (args[1]);
|
viewer.loadFile (args[1]);
|
||||||
viewer.resize(600,400);
|
viewer.resize(600,400);
|
||||||
viewer.set_position(WindowPosition.CENTER);
|
viewer.set_position(WindowPosition.CENTER);
|
||||||
|
viewer.delete_event += (x,y) => { Gtk.main_quit(); };
|
||||||
setup_treeview(viewer.tv);
|
setup_treeview(viewer.tv);
|
||||||
viewer.show_all ();
|
viewer.show_all ();
|
||||||
viewer.showMessage("This software is beta and does not guaranties correct functionality", MessageType.WARNING);
|
// viewer.showMessage("This software is beta and does not guaranties correct functionality", MessageType.WARNING);
|
||||||
Timeout.add(200, (SourceFunc)(readFunc));
|
Timeout.add(200, (SourceFunc)(readFunc));
|
||||||
Gtk.main ();
|
Gtk.main ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+1
-1
@@ -161,7 +161,7 @@ void unpack_fiasco_image(char *file)
|
|||||||
openfiasco(file, NULL ,1);
|
openfiasco(file, NULL ,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fiasco_flash(char *file)
|
int fiasco_flash(const char *file)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
char version[64];
|
char version[64];
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ void eprintf(const char *format, ...);
|
|||||||
#if HAVE_USB
|
#if HAVE_USB
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
|
|
||||||
|
int fiasco_flash(const char *file);
|
||||||
extern struct usb_device *device;
|
extern struct usb_device *device;
|
||||||
extern struct usb_dev_handle *dev;
|
extern struct usb_dev_handle *dev;
|
||||||
int is_valid_device(struct usb_device_descriptor *udd);
|
int is_valid_device(struct usb_device_descriptor *udd);
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ void process_message(char *msg)
|
|||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
char *arg;
|
char *arg;
|
||||||
int c;
|
int c=1;
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return;
|
return;
|
||||||
printf("[x] (%s)\n", msg);
|
printf("[x] (%s)\n", msg);
|
||||||
|
|||||||
Reference in new issue
Block a user