FS#2960 - Unix command line interface to Iriver fwpatcher utility
Opened by James Teh (jteh) - Monday, 30 January 2006, 15:19 GMT
Last edited by Jonas Häggqvist (rasher) - Friday, 22 August 2008, 22:18 GMT
This patch provides a Unix command line interface to
the fwpatcher utility. The command line code (cli.c)
substitutes for main.c, but shares iriver.*, md5.* and
h???sums.h with the fwpatcher GUI. The patch also
modifies iriver.h to not use TCHAR, _tfopen and TEXT()
if not compiling for WIN32.
The Makefile has not yet been modified for
fwpatchercli, so something like the following will
gcc -o fwpatchercli cli.c iriver.c md5.c
fwpatchercli expects bootloader-h100.bin, bootloader-
h120.bin or bootloader-h300.bin, depending on the
firmware to be patched, to reside in the current
directory. An error will be reported if the required
bootloader binary does not exist. Usage is as follows:
where firmware_filename is the name of the firmware
file to be patched; e.g. h300.hex.
* The #ifdef in iriver.h which defines TCHAR as char,
_tfopen as fopen, etc. is a bit of a dirty hack. I'm
not familiar with Windows C library extensions, so am
not sure why these are used. If this hack is not
acceptable, either main.c needs ot be modified to use
char or ifdefs need to be used everywhere in iriver.c
and iriver.h where TCHAR, _tfopen, etc. are used.
* I'm not sure how best to integrate this into the
Makefile for fwpatcher. A different cc needs to be
used (we don't want to be using the cross compiler)
and I'm not sure how to go about setting this up.
* It'd be better to separate interface from back-end
and share the bits of code that do the actual work
between the GUI and CLI to make maintanence easier.
This pretty much means rewriting large chunks of the
code, though, and I'm not sure it is worth it, as I
doubt fwpatcher will change much now.
Friday, 22 August 2008, 22:18 GMT
Reason for closing: Rejected
Additional comments about closing: Fwpatcher is more or less deprecated in favour of rbutil, the comandline tools are still available and the attached script can probably still work.
No need for any change in Rockbox SVN.