- Status Closed
- Percent Complete
- Task Type Patches
- Category
- Assigned To No-one
- Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2960 - Unix command line interface to Iriver fwpatcher utility
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.
Compiling:
The Makefile has not yet been modified for
fwpatchercli, so something like the following will
compile it:
gcc -o fwpatchercli cli.c iriver.c md5.c
Usage:
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:
./fwpatchercli firmware_filename
where firmware_filename is the name of the firmware
file to be patched; e.g. h300.hex.
Problems:
* 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.
2008-08-22 22:18
Reason for closing: Rejected
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
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.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Patch version 2006013102:
* Added a missing \n.
* Now using FILENAME_MAX rather than self-defined MAX_PATH.
* Removed comment stating that temp files are stored in
temp dir.
One issue I forgot to mention in the description is that I
am not certain #ifdef WIN32 is the right way to check
if we are compiling for Win32 in iriver.h. I don’t have a
Win32 cross-compiler to test this.
won’t it suffice to write a minor shell script around the
existing tools?
Like so. I have tested it a bit, but you may want to check it a bit more if you want to use it. Just a quick hack, really.