Commit graph

1059 commits

Author SHA1 Message Date
Amaury Pouly
7b590a9536 qeditor: many enhancement
Qeditor has been improved in many ways:
- it can now dump all registers, just like the lua DUMPER.dump_all() command
- several crash were fixed
- when connected to a hwstub command, one can correctly edit individual fields
- the code was simplified in several places

Change-Id: I092b99ce3a12ff6417552de61d62c65f706bcff0
2014-05-11 19:56:56 +02:00
Amaury Pouly
4c1eafc208 regtools: headergen can now output the description in the headers
This is useful to provide some documentation in the code.

Change-Id: Ib440363d82c47c36fffb9567a2e7f374eaaa5cbc
2014-05-11 19:56:50 +02:00
Amaury Pouly
4fef1834e2 regtools: make qeditor aware of PP
Change-Id: I3b4fa625499aa66bb5617971445fa3c1c209134e
2014-05-11 19:56:21 +02:00
Amaury Pouly
d8071221c5 hwstub: add some PP and Sansa View code
Change-Id: If188a01adee2a0e1c7a46c424a0a9cde9f666831
2014-05-11 19:56:15 +02:00
Amaury Pouly
5b89e6618f hwstub: hwstub_shell can now run files/cmd provides on command line
Change-Id: Id5cb3bee52b39e2ddec95c646ca9b4a3334bdf92
2014-05-11 19:55:57 +02:00
Amaury Pouly
dc869e70ac qeditor: add support for deletion of items
Change-Id: I886e15585bd3bfed3303e4b845cd8960a9461277
2014-05-11 19:54:48 +02:00
Amaury Pouly
8d0d3cb6f5 qeditor: fix include
Change-Id: Ie6013be29729267294c13fd4e86edad3904aa114
2014-05-11 19:54:47 +02:00
Amaury Pouly
17affb8085 hwstub: fix hwstub_shell
Change-Id: I008a55675054c86fd206cc5248f2bd9475e80b49
2014-05-11 19:54:47 +02:00
Amaury Pouly
fcb835f61a regtools: normalise description files, and remove obsolete file. No logical change.
Files were generated using utils/regtools/tester in "write" mode.

Change-Id: Ib391b8dbb5ec84eb821e0d0a3699d306414f2aa1
2014-05-01 19:35:05 +02:00
Amaury Pouly
cf93b33613 regtools: fix makefiles
Change-Id: Ib69aac4e7510c99398130467b7fe0f10fc4897f7
2014-05-01 19:34:58 +02:00
Amaury Pouly
4356666101 regtools: completely rework qeditor, improve soc desc library and tools
The graphical editor can now display and editor description files.
The library has been improved to provide more useful function.
The XML format has been slightly changed: only one soc is allowed per file
(this is was already de facto the case since <soc> was the root tag).
Also introduce a DTD to validate the files.

Change-Id: If70ba35b6dc0242bdb87411cf4baee9597798aac
2014-05-01 19:34:18 +02:00
Amaury Pouly
3754624edc regtools: update soc desc parser/header to include desc fields
Change-Id: I32374784d17f4352905f15e404df23b01338235b
2014-05-01 19:32:01 +02:00
Amaury Pouly
238be18d03 hwstub: add proper PP support
- drop support for PP500x: it's very different from other PP and although
  it would be possible to support them, I don't have one to test the code
- make sure only the CPU is started
- add PP descriptor to report chip ID and revision
- add code in shell and lua to support pp (no register description yet)
- compile for ARMv4 because PP502x is an ARM7TDMI

Change-Id: I36c4e465dfc2cfdfe7433b2f65cc8f6f0720fe62
2014-04-12 00:11:13 +02:00
Amaury Pouly
910235b49a hwstub: fix error in config descriptor, cleanup some code
Change-Id: I853340ed2c187a044726ca03ec52aed655707e27
2014-04-12 00:11:13 +02:00
Amaury Pouly
ccfa51835e Add hwstub support for portal player (manufacturer mode)
It is very similar to how e200tool from MrH works but uses the framework
of hwstub which is makes it completely trivial since we already have the
USB driver written.

Change-Id: I61cdc245d3f828c2682bcd6ecfed5a1cc0094139
2014-04-07 22:26:50 +02:00
Amaury Pouly
399acc0387 Add new tool to upload code on e200/c200/view in manufacturer mode
This is actually the trivial part of e200tool from MrH: it simply writes the
code on the bulk endpoint. Code was mostly copied from imxtools/sbloader.

Change-Id: I6c208840d23553aaf3bd8b9374e6b0337e54f3b0
2014-04-07 22:25:06 +02:00
Thomas Martitz
dda54b85da ypr1: Add some commands to rockbox.sh which are needed for playback
Change-Id: I2772e218174b5d1fbc7c066fee41d6fb06c01900
2014-03-09 23:25:50 +01:00
Marcin Bukat
c64b59fc5e atj213x: various fixes in sample code snippets
Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a
2014-03-04 11:07:07 +01:00
Amaury Pouly
c02bc1afd2 imxtools/scsitools: increase SCSI delay to 10 seconds
On some OSes like Windows or if running in a virtual machine, the one second
timeout might be too short.

Change-Id: I717f7a2aaed1cb3d40e8fbe6f9b1081b43ceea95
2014-02-22 20:27:32 +01:00
Amaury Pouly
9517bd86b0 imxtools/scsitool: add progress indicator
Change-Id: I061ddac4f882156139e38fa6d495fee86271a6aa
2014-02-22 18:12:00 +01:00
Amaury Pouly
4e1a043cf0 imxtools/scsitool: improve output formatting
Change-Id: Ifc5b5252e1342f381356f7bd5c2fed5ad8beddfe
2014-02-22 18:11:30 +01:00
Amaury Pouly
49db199a36 regtools: fix headergen variadic macro generation
Change-Id: I5e2439e5dcbeaaafda75c6ea457e53ee1ba26463
2014-02-18 18:14:08 +01:00
Marcin Bukat
101d10ff6c atj213x: rework crt0.S in test code
Rework init code so relocation is safe for binaries linked
into cached unmapped KSEG0 region.

Change-Id: I705ee3f0334f8998237f249a2c3059d6dbe78a43
2014-02-14 08:37:01 +01:00
Marcin Bukat
44afbd3ac2 regtools: Add rk27xx register description file
Change-Id: I27101876d031cbcbb00e741ea742a6f64a7baad7
2014-02-13 21:55:43 +01:00
Amaury Pouly
1210de217e regtools/qeditor: fix crash when hwstub device fails to open
Change-Id: Ica2fd201f2ae8ee63b1ae81f27433c841d2f22cd
2014-02-13 11:51:48 +01:00
Amaury Pouly
c35e4a4b7d Fix red
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-12 13:14:02 +01:00
Amaury Pouly
04fc97b362 regtools/qeditor: implement UI code to write registers
The UI now has a "read-only" check box to prevent accidently changes: once
unchecked, the UI can do write to register (only full register writes are
supported for now). If the register supports it, the UI provides SCT writes
as well. The display register panel was moved to its own class to cleanup
things a bit.

Change-Id: I0fc6aab3b351f9080076102ee6fad0037ab5353b
2014-02-10 23:14:27 +01:00
Amaury Pouly
6e132b48d5 regtools/qeditor: enhance backend write with write mode (SCT)
Change-Id: I723bce7a60fb08c1d1d5f894a225c36bc1ba4394
2014-02-10 23:14:27 +01:00
Amaury Pouly
b8bad8412f regtools/qeditor: clean-up
Free the backend when closing a tab to release some memory. Implement about
dialogs.

Change-Id: Ic8c500a23d38e6c3dd4de6a4ba862012925968be
2014-02-10 23:14:26 +01:00
Amaury Pouly
a66a5af4db regtools/qeditor: prepare support for register writing
Change-Id: Ifef36a3ddb1604db63ec974da2d6a77a5540ff42
2014-02-10 23:14:26 +01:00
Amaury Pouly
3d07706c05 regtools/qeditor: rewrite soc handling
The code was a mess with respect to soc handling: some code just plain copied
the SoC descriptor which are big objects, some was using indexes. The new soc
factor out everything in a few classes which hide these ugly details so that
descriptors are never copied.

Change-Id: I17af8b47f997a528b58221621389d42d24fded93
2014-02-10 23:14:26 +01:00
Amaury Pouly
8358707d82 hwstub/regtools/qeditor: put soc descriptors in a list instead of a vector
A SoC descriptor is not a small object: it can be as large as ~100KiB so
it's better to avoid copying things over.

Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
2014-02-10 23:14:26 +01:00
Amaury Pouly
f982ea6398 utils/regtools: slight rework of tab management in qeditor
Change-Id: Iaf41defb79bb76010f3ff5269c28e4bad991ebc3
2014-02-10 23:14:26 +01:00
Amaury Pouly
0e0c610df0 utils/regtools: make qeditor able to poke directly at a hwstub device
This commit add the very handy feature of being able to read registers
directly from a device using hwstub. This is mostly trivial using the hwstub
library and the biggest change here is actually:
- being able to read registers by name and/or addresses
- being able to enumerate devives
The UI code currently doesn't handle hotplug but the backend does so it should
be trivial to add in the future. It also opens up the possibility the write
registers from hwstub or save the register values to a file.
Since it relies on both hwstub and libusb, a switch has been introduced in
qmake to disable it (use -config nohwstub).

Change-Id: I5d7d7a2a7c97ecd7407227357c8553c2773ea6cc
2014-02-10 23:14:25 +01:00
Amaury Pouly
81dfed27cf utils/hwstub: make stmp stub able to load in a MMU'ed environement
In might be useful to load hwstub in an environment with the MMU active,
in which case care must be taken on the order in which things are done.
Mostly, one should not disable the MMU before moving stuff around. The code
assumes the linking address (0 currently) is identity mapped.

Change-Id: I8d54ce9e8cadcde2e08990353ca7a46803731ca7
2014-02-10 23:14:25 +01:00
Amaury Pouly
c17d30f204 utils/hwstub: completely rework the protocol, drop unused features
The protocol has evolved a lot during the 2.x.y lifetime, bringing more
features which later got unused. This commit removes all the unused stuff
and simplifies everything:
- drop the feature mask: everything is mandatory or stalled on error
- remove the info request and put all static information in standard USB
  descriptors which are part of the configuration descriptor (and can be
  retrieved using the standard GetDescriptor request).
- remove the USB interface, we had only one anyway
- remove all endpoint descriptors
- remove the exit/atexit stuff, it never worked as intended anyway
- update the hwstub library and make it able to handle any device
- update the tools (mostly renaming and removing of code)

Change-Id: I1872bba7f4177fc3891180e8f944aab88f5bde31
2014-02-10 23:14:24 +01:00
Marcin Bukat
7552542288 atj213x: Simple test exploring irq handling
This test software setups timer T0 periodic interrupt.
In ISR it changes backlight level. The interrupt handler
does not support nesting and the whole ISR is run in interrupt
context. Exceptions are not handled yet.

Change-Id: Idc5d622991c7257b4577448d8be08ddd1c24c745
2014-02-09 22:29:30 +01:00
Lorenzo Miori
e876f4df6d Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.

Change-Id: If83a8e386369e413581753780c159026d9e41f04
2014-02-05 09:56:21 +01:00
Thomas Martitz
b828b9d99b samsung ypr0: Include getty service in the patched firmware for usb serial shell access.
The getty service mointors /dev/ttyGS0 (also created by the patched firmware).
When the g_serial.ko module is loaded this automatically enables shell access
via usb. It exposes a cdc-acm device to the host which is compatible to linux
(usb_serial.ko) and windows.

The g_serial.ko is not included module can be build from the YP-R0 open source
package provided by samsung. It can be loaded via rc.user on the internal memory.

Change-Id: I4903a635fd2e2f0ce6f5e91589a31d72bba2776b
2014-02-04 22:26:06 +01:00
Amaury Pouly
7272a95b9c rk27utils: improve command line parsing, allow arbitrary USB ids in rkusbtool
Change-Id: I884fe29c10dede7823721c2cac5dc627d6ab25c6
Reviewed-on: http://gerrit.rockbox.org/731
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-01-30 21:20:06 +01:00
Marcin Bukat
51d8a45057 adfuload: add atj213x timer0 test program
This simple program shows how to setup timer for periodic
operation. Interrupts are not used yet and simply pending
irq bit is polled and cleared when set. This program
supports my understanding of disassm of ADEC_N63.BIN that
P_CLK is configured for 7.5MHz and timer clock source is P_CLK
directly.

Change-Id: Idd6461bf847c763b78b8c324012ec2515f65dd41
2014-01-08 08:56:09 +01:00
Thomas Martitz
98d2121eaa bloat-o-meter.py: Now compatible to python 3.
Change-Id: Id617aa6304a5a9263ef6ceed7d9c3010b47e73a8
2014-01-07 10:35:59 +01:00
Marcin Bukat
062801e3ed atj213x: obtain PC value in more elegant way
Change-Id: I2e6ffb3b58ddda0ea62ce5d4cd71ac5475b34495
2014-01-03 09:00:11 +01:00
Amaury Pouly
8566cd7ebf regtools/qeditor: always open a register tab at init
Change-Id: I47a1413ca648c7166571e6b0ba88c7ebb5ce86a8
2013-12-24 15:25:42 +01:00
Amaury Pouly
a0fd5e8547 hwstub: update zenxfistyle code
Change-Id: I7e85101eca7dfc0f68c215936be4aa19749923ad
2013-12-24 15:25:32 +01:00
Amaury Pouly
16de558b36 hwstub: use delay in zenxfistyle code
Change-Id: Ia9576162b3b28d3778fe479cc321c879d73247c6
2013-12-24 15:25:09 +01:00
Amaury Pouly
01475e724b hwstub: fix lcdif pin setup for 18-bit bus
Change-Id: I30a2cedb1170abbee5a80c33206c147eb4207ca5
2013-12-24 15:24:50 +01:00
Amaury Pouly
5b865de73a hwstub: add delay function
Change-Id: Iab208ed59a9a2540a64b190357411d3de28f288e
2013-12-24 15:24:40 +01:00
Amaury Pouly
1dc91b4560 hwstub: add ZEN X-Fi Style code (preliminary)
Change-Id: I535d54bc3fb2263c174b7ae983ea4f5ed68e6390
2013-12-24 12:39:58 +01:00
Amaury Pouly
84f1a0af3b imxtools/scsitools: tool can now write a firmware using SCSI
Change-Id: Iac803d4b2d48319a1a32d1101f5041d20174c7a1
2013-12-24 12:39:58 +01:00
Amaury Pouly
e0636afed2 hwstub: fix lcdif code for 18-bit word length
Change-Id: I38cf0b5808443d5c19ebddb329c2a1636bcc4b28
2013-12-24 12:39:58 +01:00
Marcin Bukat
87c6df98a3 adfuload: add test program
This test program. I add it mainly to document somehow my work:
1) atj213x.h    lists registers addresses
2) crt0.S       exploits self relocation of the binary
3) test_bl.c    documents how to control backlight on e150

Change-Id: I055e0fe065d926a5c3805b73cea3f537cb64bf52
2013-12-13 22:43:52 +01:00
Amaury Pouly
8666871cb3 hwstub/stmp: disable watchdog
Some targets like Sony NWZ use a watchdog, so we must disable it to prevent
spurious reboot when we take over

Change-Id: I138a8d7f9a1b089acb2d08d7f6c4a58e8b088b3a
2013-12-13 00:20:18 +01:00
Amaury Pouly
3bbe52bb85 hwstub/stmp: cleanup
Conditional no longer needed since ctr0.S is private to target, also setup
stack just before jumping to C code only

Change-Id: I74116239be9e87bbe53e8fa814c45f04f242f1c1
2013-12-13 00:20:18 +01:00
Marcin Bukat
b5ca0cffac adfuload: utility to upload and exec binary using brom adfu mode of atj213x SoC
Change-Id: If52aa34124be2801c2ac316641ff9aa0bbd837c6
2013-12-11 15:42:25 +01:00
Amaury Pouly
99835fa38b imxtools/sbtools/sb1: fix parsing/debug bug about jump/call arguments
Change-Id: Ib406cfc03ced6c8689ed467c154d6a7447a34e5c
2013-12-06 15:22:38 +01:00
Amaury Pouly
6eefc418dc imxtools/sbtools/elf: fix debug code
Change-Id: If043eb214417a41f71e6c05fc6a725eb8f983373
2013-12-06 15:22:38 +01:00
Marcin Bukat
3440f3518e hwstub: Prepare for multi arch support
Change-Id: Id38411ff95660e60ee23f99350b275b92b3e4578
Reviewed-on: http://gerrit.rockbox.org/690
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-12-06 11:46:01 +01:00
Amaury Pouly
c5b209f2d8 elftosb: fix crash on invalid command file
Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967
2013-12-06 11:37:49 +01:00
Amaury Pouly
f365a5123f hwstub: forgot the db command file for stmp
Change-Id: I08ca6be221d3633c5b6e5e4b023afca33713e428
2013-12-06 11:37:10 +01:00
Amaury Pouly
e43bfdd5e8 regtools: update STMP3600 descriptio (fix EMI block)
Change-Id: I654e3210c1050e3bd559c9e9b29707a6341b111b
2013-12-06 02:00:40 +01:00
Amaury Pouly
58bb4b9b4c hwstub: implement i2c and i2c eeprom dump
Change-Id: Iff1b4f40affb88c104e7322e25cdbe34f8886476
2013-12-06 01:56:04 +01:00
Amaury Pouly
a15a15ba61 hstub: add Sansa Express lcd code
Change-Id: I61fc58e3c97a3666eac98d21226865181b85eef1
2013-12-03 01:35:34 +01:00
Amaury Pouly
15155ed100 regtools: update xml format documentation
Change-Id: I7e293532983f350a6f7cd9c7bc2bc6633c8fd3f2
Reviewed-on: http://gerrit.rockbox.org/671
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-12-02 20:21:58 +01:00
Amaury Pouly
f04d3c518a regtools: add shortcut notation for simple register in the desc files
Change-Id: I2745287844ad0a47dd41ba4dae5e1f7218ae5814
Reviewed-on: http://gerrit.rockbox.org/679
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-26 00:29:48 +01:00
Amaury Pouly
ef2b6db066 regtools/qeditor: fix url
Change-Id: I9783ff809c69bb5617b2048d1e11374cd8f680ab
2013-11-25 22:52:21 +00:00
Amaury Pouly
85578cdc4d utils/regtools/qeditor: fix compilation by avoiding g++ specific syntax
Change-Id: Ie3d36c6c235a5fd70ffc51552fae3392a015beb0
2013-11-25 12:50:33 +00:00
Marcin Bukat
8e63338591 hwstub rk27xx port
Change-Id: I85ac57117911544b65ccd56eb16303e30be67cab
2013-11-24 00:10:36 +01:00
Amaury Pouly
fb8faa16ea hwstub: only load stmp files on stmp targets
Change-Id: I9266ec6db457b1d649cbdcb6c9bd1d0f3223b867
2013-11-20 16:39:20 +00:00
Amaury Pouly
287be81c16 hwstub: use a more reasonable hclk frequency
The old code would set CPU to 64MHz and HCLK to 9MHz but that's too low for
many things like usb and gpmi. So change HCLK to ~32MHZ.

Change-Id: I6459f25900e42603333cebccb7b0ed26c59640ad
2013-11-18 21:44:06 +00:00
Amaury Pouly
27111d83be hwstub: fix stmp3600
The microseconds register has a different address

Change-Id: I29d2e7feea9eb34b0d539ee217babd092542b612
2013-10-26 17:34:58 +02:00
Amaury Pouly
1085d15a3e hwstub: produce sb1 image too (for STMP3600)
Change-Id: Ib7f38fba1e524ed7438cdc395441d801c5eabcaa
2013-10-26 17:34:35 +02:00
Amaury Pouly
eefab13469 utils/regtools: add a bunch of regdumps for various sources
Change-Id: I67bbd2d1b02ca4541f70d2e9c8c0e6000300dcac
2013-10-22 00:52:43 +02:00
Amaury Pouly
cec5ac7bf7 utils/hwstub: fix zen target id
Change-Id: I9199f573a050223a811a8e82e403f113fb876cca
2013-10-22 00:35:32 +02:00
Amaury Pouly
9ed9807854 hwstub: rework i2c completely
Change-Id: I1e5f87f15f0ca9586d8185316ffcaeef6d9d4d38
2013-10-22 00:34:44 +02:00
Amaury Pouly
bfb67f41a9 hwstub: don't touch mmu registers on non-STMP targets, they might not exist
Change-Id: Ib18475fd90e0d29ab6d7214116f7a0041584d621
2013-10-22 00:34:44 +02:00
Amaury Pouly
f5807141b6 imxtools/scsitools: document some of the SCSI vendor commands
Change-Id: I534fc467aad960c61b54d202096823d5c2c9a5e9
2013-10-10 00:11:47 +02:00
Amaury Pouly
468aa959c7 imxtools/sbloader: rewrite hid code
Rewrite code with proper documentation: it uses a UMS like CBW/CSW to wrap
commands and status.

Change-Id: I10476c87aaea96d4b9e54f8c1c266835c8e89721
2013-10-09 13:06:41 +02:00
Amaury Pouly
1c63993e05 imxtools/sbtools: always probe report size for HID recovery mode
Some older versions of the ROM (TA3 for example), use a 64 byte report size
instead of 1024, so hardcoding 1024 is just a bad idea.

Change-Id: I720c4465cfe2f519bffa307175614bba58766dce
2013-10-09 13:05:43 +02:00
Amaury Pouly
835d740fca hwstub: fix lcd drivers for sony NWZ
Change-Id: I8d581ec906ec2bab0d983aacfb0e8479b77d0c57
2013-09-26 16:41:30 +02:00
Amaury Pouly
46248b3df9 hwstub: add some code for the NWZ-E360/E370
Change-Id: I9fe5da773705ec4c3d014b8ac7f78ad614e20a30
2013-09-25 14:31:39 +02:00
Amaury Pouly
f46ff0f076 hwstub: add stmp i2c code
Change-Id: I6787e682a9e22cb34e6d94d25bf68d7575d784c4
2013-09-25 14:31:39 +02:00
Amaury Pouly
b8c98a86fb regtools/qeditor: improve pinctrl analyser display
Change-Id: I45850f4f0213aac5f0538c865cfa84137fcb83e3
2013-09-18 13:37:25 +02:00
Amaury Pouly
963dfc529c regtools/qeditor: enhance pinctrl analyser
Change-Id: I82c5a86ade4c804872ac7665bce583499467cae9
2013-09-18 13:18:12 +02:00
Amaury Pouly
30b20bf2e7 retools/qeditor: add pin decoder (very basic add the moment)
Change-Id: I5309794efda67fd3bf5c265b35ea7da5faf662f6
2013-09-18 13:18:00 +02:00
Amaury Pouly
8f122e0091 imxtools: add pin map and decoding tool
Also add the tool which was used to generate the map on wiki.

Change-Id: I54f3474028b5fa75348564437ec1b46ba20f071b
2013-09-18 13:17:54 +02:00
Amaury Pouly
27433076e9 tcctool: fix Makefile
The version.sh tool tries to locate the repository root if no argument is
given but it doesn't really work. Instead explicitely give it the path to
the root.

Change-Id: Ie3a35cb3d41bbd8819823358763f714ad045527e
2013-09-18 13:14:20 +02:00
Amaury Pouly
afd85634a0 tcctool: add YP-T10
The SDCFG value is the default one but it seems to work

Change-Id: Iaf990aa2e8e738f0929e49322c0a28ce461d49a7
2013-09-18 13:13:32 +02:00
Lorenzo Miori
66aa00d3e0 Samsung YP-R0/YP-R1 Safe Mode improvement
This is an improvement for the special
mode present in the samsung ypr0 target.
Apart adding new useful functionalities, it
fixes a random disconnection bug, solved by debouncing
and fully support to YP-R1 target.
This opens also the possibility to interface
this operating mode to rockbox USB functionality.

Change-Id: Id70541541fcfaa1234328485fab0696a3bd491c9
2013-09-16 12:55:48 +02:00
Lorenzo Miori
5ef1e2dcfa ypr0-ypr1 firmware tools fix
fixed a bug concerning bytes padding, since it wasn't correctly
implemented regarding original firmware structure.
This fixes ROM generation especially for ypr1.

Change-Id: I1a40fb4bb8f9d6b005d694246123e314c4d19b49
Reviewed-on: http://gerrit.rockbox.org/616
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-09-11 23:08:37 +02:00
Amaury Pouly
743a6d0a57 hwstub: add pix clock setup
Change-Id: I94f764c0fcfb47bd9ccafe23f6d6079b42f23826
2013-09-10 23:19:34 +02:00
Amaury Pouly
0ee25f62eb hwstub: various fix
Change-Id: I4dee8e115e282d1d6540013c9b9f1263e30690de
2013-09-10 23:19:34 +02:00
Amaury Pouly
8785a499f4 imxtools/efltosb: fix extern() in db files
Change-Id: I5f1acd619b2f280e709d2bd06a28a3e88cc05e27
2013-09-10 23:19:34 +02:00
Amaury Pouly
3b6d2ac28a hwstub: add delay functions, and plain binary/sb file generation
Change-Id: Idbedb9277b355edcd93975ec5a268428c7b89633
2013-09-10 23:19:34 +02:00
Lorenzo Miori
da8a6a90c3 Firmware tools for Samsung YP-R0/YP-R1 (and possibly others)
They have been rewritten for being completely free and
as fast as possible.
Successfully extracted, patched, repacked and flashed
original firmware (tested on device and it worked)

Change-Id: I74d47d13f2dc3a2832a0d6821d3c2182dfd4b33b
Reviewed-on: http://gerrit.rockbox.org/506
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
2013-09-07 15:56:07 +02:00
Amaury Pouly
f40b15d0cb hwstub: improve lcdif, digtctl, add sony nwz-e370
Change-Id: I5316cc9fd9addfca8a674628695fed1c1bf9269f
2013-09-05 23:16:27 +02:00
Amaury Pouly
3713bc4b7c imxtools/scsitools: add option to extract firmware from the device
Change-Id: Ib8cbf2f864a9375575cea0edbba48f740bf8f12e
2013-09-05 23:16:06 +02:00
Marcin Bukat
f182a11f33 rk27utils: Add nandextract utility
This quick and dirty utility allows to extract nand bootloader
from raw 1st nand block dump. I post it mainly to somewhat
document how BCH error correction engine of the rk27xx works.

Change-Id: I37ca91add7d372e3576d2722afc946d0f08971a9
2013-09-02 12:35:47 +02:00
Amaury Pouly
67a16f9ae1 regtools: various fix
Change-Id: I3a37221d1688c2f1cbc649bbd2fd27dc78d286a6
2013-08-22 23:45:14 +02:00
Amaury Pouly
142ce48771 regtools: fix several bugs in qeditor
Change-Id: I1bef76d30eb47c4ebc8a2baca356d9c135b234ae
2013-08-22 17:50:59 +02:00
Amaury Pouly
acaedfdb89 sbtools: fix elf section naming
Change-Id: I4500bf70028af26cc4b8136f111f527e1396d16e
2013-08-22 15:05:13 +02:00
Amaury Pouly
260399ee8c sbtools: more work on sbtoelf and elftosb, support more attributes
Now handle timestamp, sb minor version, component/product versions,
section flags.

Change-Id: I35313efe60c28f04ea3732b36e5e01be3213cf9e
2013-08-22 14:39:46 +02:00
Amaury Pouly
a122b52d66 sbtools: factor code in command parser
Change-Id: I790c373b8a0319cdb00650d3c59919bd4b0b96f6
2013-08-22 01:15:00 +02:00
Amaury Pouly
81f97f67e2 sbtools: now generate a db file along with with elf/rsrc files
Now always generate a "make.db" file which aims at being the exact
representation of the file, ie running sbtoelf and elftosb using
the generated command file should produce the exact same file
(except for the random paddings). We still miss the support
for some option parsing to achieve that though.

Change-Id: Ib7d6b241f7855fd35225df8ab8e0711f69d9ee5a
2013-08-22 00:58:19 +02:00
Amaury Pouly
e64008bf9a sbtools: fix buffer overflow
Change-Id: I7b1c963e58eec88da215722ec219569a0a5a9cea
2013-08-22 00:49:34 +02:00
Amaury Pouly
8dc7970bb5 sbtools: fix red
Change-Id: I28b7d4d59d8f14abbba2a70e2bdea6987b6a3a98
2013-08-21 23:02:49 +02:00
Amaury Pouly
99f3ca174e sbtools: more code refactoring
Factor all printf method with a unique one defined in misc.h

Change-Id: I58fbf8916b76e873a2e6678506d2c8aece7834ec
2013-08-21 22:20:53 +02:00
Amaury Pouly
1357e0a4f1 regtools: add a register dump of the Fuze+ OF
This dump has been obtained with hwpatcher + hwstub, the fuze+
was running OF 2.36.8 in normal mode while playing some mp3.

Change-Id: Ieecaa760fe8ccade0858db929b9d7c175a3eaddf
2013-08-21 20:29:23 +02:00
Amaury Pouly
c323381f0b regtools: add graphical register explorer + analyser
This tool allows one to explore any register map. Register dumps
(like produced by hwstub tools) can be loaded and decoded by the
tool. Finally some analysers are provided for specific soc analysis
like clock tree and emi on imx233 for example.

Change-Id: Iaf81bd52d15f3e44ab4fe9bc039153fcf60cf92a
2013-08-21 20:18:37 +02:00
Amaury Pouly
1b1692ff06 hwstub: add stmp clkctrl code and generic register dumper
Change-Id: I432853fb4171f07ed23b73dc0499814fe8ce8748
2013-08-11 19:18:58 +02:00
Amaury Pouly
d759bd3710 hwstub: add atexit and exit stub function to DEV
Change-Id: I17cfe52de3f6f546a46ace3252113024625f15d1
2013-08-11 19:18:16 +02:00
Amaury Pouly
4aae8274b3 hwstub: fix power off and reboot code on stmp
Change-Id: Ia717c5e6f78a2cecc6a0628e4c667ea39f32c44c
2013-08-11 19:17:57 +02:00
Amaury Pouly
0ec1536d64 hwstub: allow the stub to relocate itself
Change-Id: Iab60c6ec0e8eda19c76c84241f8367d53cb4f87b
2013-08-11 19:17:36 +02:00
Amaury Pouly
cb8274373b sbtools: more printf fixing
Change-Id: Id617297c196b381fd1c381da3eff4345e3157529
2013-08-10 21:37:27 +02:00
Amaury Pouly
c0aba07f1a sbtools: fix output printing
The code used printf instead of the provided printf functions,
resulting in strange output.

Change-Id: I2c7c2531d8d54ecdea97e8c189d18d351320ca7d
2013-08-06 21:24:38 +02:00
Amaury Pouly
97459def3c sbtools: fix handling of NOP instructions
Change-Id: I05ab8176f368a6e2d075dfb2059692871e0c00b3
2013-08-06 21:24:38 +02:00
Amaury Pouly
8b13d2f5f1 elf: fix handling of virtual/physical addresses
Remove the hackish elf_translate_addresses which should not have
existed in the first place, on write always compute the physical
address of a section using elf_translate_virtual_address which
makes it possible to specify any virtual to physical mapping and
fail nicely if there is none.

Change-Id: I4f436945e90280a6fd9430de6c642dbeb8e23d40
2013-08-06 21:24:38 +02:00
Amaury Pouly
8e69c37b5a sbtools: various fixes
Change-Id: I82c4642aea325cf22d66e9b49fc2d47319cd70eb
2013-08-06 21:24:38 +02:00
Amaury Pouly
e69293ecdb sbtools: standard sb print function is now standard
Change-Id: I2746bfff9a360ef4fc823853859609ffed5d2b67
2013-08-06 21:24:38 +02:00
Amaury Pouly
f72617c002 sbtools: elf library can now load global symbols
Change-Id: I4d9f38ce31e65542d6ab192158bff52b6fad8f09
2013-08-06 21:24:38 +02:00
Amaury Pouly
e4c9eaa7e8 sbtools: add helper to determine if a file is a valid ELF image
Change-Id: Ie0e9c05569ca9b02fd36f31fd7323f02b14e1b60
2013-08-06 21:24:38 +02:00
Amaury Pouly
76446dda45 sbtools: make code aware of elf section names
Change-Id: I7ab657959e38d2fcb2c7e6d9858facfb83101423
2013-08-06 21:24:38 +02:00
Amaury Pouly
1c8c24183e sbtools: refactor and cleanup
Factor common elf/sb read/write/printf routines. Factor sb zero
key, move sb version guess.

Change-Id: I5ae1885587456736e782e623610281bbee545039
2013-07-18 00:27:12 +02:00
Amaury Pouly
3c5ee9ac57 hwstub: forgot file
Change-Id: Ib79f4ef89c734d7ba2fcbf648aadc346576e1c17
2013-07-16 22:23:14 +02:00
Amaury Pouly
e5de5e09c1 hwstub: enhance exit protocol and implement on stmp
Rename STOP command to EXIT, introduce ATEXIT, this gives better
control over the exit of the stub. Add stmp implementation.

Change-Id: I45442c8b88b9330d12ef439417ca5ffa1520477a
2013-07-16 19:29:42 +02:00
Amaury Pouly
7827b7ccdb hwstub: allow to escape shell with a function call
Change-Id: I65b7b230d3b89a5014db134d3159861474fd889f
2013-07-13 17:47:01 +02:00
Amaury Pouly
f617da0552 hwstub: enhance protocol with more functions
Change-Id: I7944249c2f7ea3e180e7b79ee8ae402d1d0742d3
2013-07-13 17:47:01 +02:00
Amaury Pouly
140783ef66 hwstub: split target specific code from the common part
Completely rewrite the Mafile, properly put the usb driver in its
own file and the target specific files in a subdirectory.

Change-Id: Iaeee0128e021d5dad76b4d6035a63e33e2d946c1
2013-07-13 17:47:01 +02:00
Amaury Pouly
08e466ff92 imxtools: add device info and serial number requests to scsitool
Change-Id: I17b679062fa53c20034e7db6f4080f8762a7818c
2013-07-07 17:36:21 +02:00
Amaury Pouly
00faabef5e imx233: document some more stmp vendor scsi command
Change-Id: Ie03c0c8288b4bd9c0b4beedae363cff6caf3c5cd
2013-07-03 01:05:00 +02:00
Amaury Pouly
87b84c07d7 sbtools: fix sbloader (allow transfer size override)
Change-Id: Id6d3188b7f837726c29845f01b0b1588acf40407
2013-06-18 14:59:13 +02:00
Amaury Pouly
505f37e1b8 sbtools: various little fixes, mostly cosmetics
Change-Id: Ic53ef0283bdaee8d3272f648b71eff567b25059b
2013-06-17 13:58:59 +02:00
Amaury Pouly
c1eafa1b65 sbtools: add Sansa Express bootloader key
Change-Id: I167a6410e40478173e5ce496ace4f705c3e26a1b
2013-06-17 13:38:31 +02:00
Amaury Pouly
7c7fa36918 sbtools,mkximboot: fix whitespace
Change-Id: I8d8adb783707172d1aaef302366c240310350ed8
2013-06-15 22:27:34 +02:00
Amaury Pouly
5aab4431fb Cosmetics
Change-Id: Id7974f1a79b5d803155ccfc417277a73ffd9046a
2013-06-15 22:27:34 +02:00
Amaury Pouly
97b9ade639 regtools: improve header generator
The generator now has more options to generate or not selectors.
It can also generate a macro header containing lots of using
macros for register operations.

Change-Id: I9dd6b4bdc7daeabd1a2c9365ce082358475721b5
2013-06-15 22:27:33 +02:00
Amaury Pouly
9ad50ade17 imxtools: add Zen, Zen Mozaic and Zen X-Fi bootloader keys
Change-Id: I856e5b91c8e9a1c02b367960052c36f9b527046b
2013-06-13 02:31:19 +02:00
Amaury Pouly
07e82c163e imxtools: rewrite sbloader to handle both versions + user friendly
The tool can now load sb1 and sb files to devices. Detection has
been improved and the tool can infer the packet size for the HID
description as well. The command line interface has been vastly
improved too, this breaks the old one.

Change-Id: I01a0ff8f8a007514aa81c56f114c0f0a86e3303c
2013-06-13 02:29:36 +02:00
Amaury Pouly
1dae3a82e2 sbtools: fix encryption and cosmetics
Change-Id: Id302f236ad3ec13a5166de4e22a3fc85b2a6c64f
2013-06-13 02:27:30 +02:00
Amaury Pouly
f9cb5de580 hwstub: introduce lua code for the STMP and Creative ZEN V/Mozaic
Change-Id: Ice5f509a2e0d2114436d4760f338b9203ef96691
2013-06-13 02:25:15 +02:00
Amaury Pouly
c5357940ab hwstub: major improvement in the stub and the tools
Fix the stub in many way to correctly detect the STMP family and
act upon that. Drop some unused commands and bump version.
Rewrite the tool to allows scripting in lua and load the register
description from an XML file using the regtools. Introduce a new
tool to load and run code using the hwstub (either binary format
or Rockbox additive scramble format). Also switch to an optimise
version of the memcpy/move/set functions to correctly handle
alignement issue (like writing a full word/half-word when
possible for registers which is crucial)

Change-Id: Id1d5cfe0b1b47e8b43900d32c5cd6eafae6414f6
2013-06-13 02:25:15 +02:00
Amaury Pouly
934e1e15af regtools: add the STMP3600 register map
Change-Id: Ief34c219bbe05c9aeed665235942bb158bb0f4d4
2013-06-13 02:25:14 +02:00
Amaury Pouly
73db73dbd3 regtools: modify description format and refactor tools
Change the XML description to unify multi dev/reg in a clean
fashion. Move the description parser to its own library. Fix
the tester and headergen tools to work with the new format and
library. Move the STMP3700/3780 descriptions to the new format
(and fixes many errors as well). Drop the hwemulgen tool
in favor on the upcoming hwstub tools revamp.

Change-Id: I7119a187aab5c8b083cc5228cb1b248ee29f184d
2013-06-13 02:25:08 +02:00
Amaury Pouly
7143ea681c imxtools: move regtools to its own directory
The register tools are in no way stmp specific. The XML
description of the registers is powerful enough to describe
the STMP register which should be more than enough to describe
virtually all other SoCs. The generators follow the STMP coding
convention but others could be used as well.

Change-Id: If1a9f56e4a3594161688de34adbea698e5aaecd8
2013-06-12 19:49:26 +02:00
Amaury Pouly
11da9d23fe imxtools: move hwemul to its own directory
The hwemul is only partly imx specific: the stub is stmp specific
but could be ported to other targets, the computer side and the
protocol are mostly stmp independent (or should be).

Change-Id: If88febffe591b0de86ea11cb740455ba20ddc401
2013-06-12 19:46:04 +02:00
Dominik Riebeling
9574b30066 time-sync: allow passing an arbitrary time.
During testing it can be useful to set an arbitrary (non-current) time on the
device. Extend time-sync to accept an additional (optional) parameter with the
time to set. Only changes date / time, no timezone.

Change-Id: Ib320777cb245cff19ca00b20540db3a43a4e488f
2013-06-09 19:51:08 +02:00
Dominik Riebeling
6b3c4beba4 Rework langstat.
- Generally improve code and make it compliant to PEP8.
- Make it work with Python3 as well.

Change-Id: I9e99999c59dc501664c36dd38fcb85fb60d6d9e6
2013-06-09 16:54:59 +02:00
Marcin Bukat
b2dd1f8d46 rk27load: Fix stage1 (dram init routine)
Change-Id: I9f7bbb7e938bd5886c11533b1aa939bd27cab555
2013-04-15 21:04:21 +02:00
Amaury Pouly
d504a6b220 rknanoutils: fix boot tool
Correctly descramble the first stages (0 to 2) in continuous mode.
Also fix a disassembled (but unused) crc routine used in dfu mode.

Change-Id: I20016d1c696a9bcb6584377ee9b55493783c7159
2013-03-21 19:02:03 +01:00
Amaury Pouly
6ea48cf92b rknanoutils: add dfu tool
This tool can upload a firmware to the device in DFU mode. The
protocol is the same as the rk27xx devices except that it can
load a bigger (unlimited ?) firmware.

Change-Id: Ic9d4c5087629a9156f9d5d5cdc80767e6359c431
2013-03-21 19:02:02 +01:00
Amaury Pouly
d220940443 rknanoutils: fix stupid mistake
Change-Id: I5267533226d833b20abb3cfd27cc390aef1181e4
2013-03-16 01:24:31 +01:00
Frank Gevaerts
3e4be68f8b Make the tarball generation tool handle spaces in filenames
<insert opinion on such filenames here>

Change-Id: Ie1b5fac97eea93c9ac934ffb8bf6c0d9a0559339
2013-03-05 22:37:27 +01:00
Amaury Pouly
bc05242517 imxtools/sbtools: silence warning
Change-Id: I423e760bbc8e418bcce3afe01c5831b5a3e655f3
2013-02-18 13:43:55 +01:00
Amaury Pouly
4362a7ba33 imxtools/sbtools: add -jump command, fix help
Change-Id: I0d5d61c1dc137333bda5e403d06a43d16f2750bf
2013-02-18 13:40:25 +01:00
Amaury Pouly
ac9304299d sbtools/elftosb1: implement key file loading
Change-Id: I2273b8d6314250620611ec50d159237edc6d76c2
2013-02-18 13:40:25 +01:00
Amaury Pouly
b05b762ed4 sbtools: add brute force option for sb1 in sbtoelf
After some reverse engineering, it appears that the keys of the
sb1 format are very weak: the 128 bytes are generated from the
laserfuse words 4,5 and 6 but in a weird manner: 4 and 5 are
simply ORed and 6 is only half used (somehow), making it "only" a
48 bit word to find.

Change-Id: I40702e19d0924ef51c01894efce3cb65bd664456
2013-02-16 20:49:07 +01:00
Amaury Pouly
4db4985f21 sbtools: increase performance by compiling with O3, add zenv key
Change-Id: I2301f695e49d306d21bb9efa9c44acf1d3296a08
2013-02-16 20:49:07 +01:00
Amaury Pouly
a085c10674 imxtools/hwemul: fix Makefile linking order
Change-Id: Ie9ad10c627a86b1e6e689052fd436529d3ba6591
2013-01-30 00:02:56 +00:00
Amaury Pouly
9d2631854c imxtools/hwemul: add readline support
Change-Id: If2e86bf8b520a8d4c38a56ac969918fdeb2c6f91
2013-01-29 23:58:45 +00:00
Amaury Pouly
6d5b1b2448 imxtools/sbtoelf: add more robust version guess
Change-Id: I41ce1005d997cf35153e085b19294bb7d418e968
2013-01-29 20:46:28 +00:00
Amaury Pouly
5b00e59614 imxtools/sbtools: fix file type detection
Change-Id: I872e98f5810df3ecc975e025385f9c5ca7b47a44
2013-01-26 18:24:50 +00:00
Amaury Pouly
75df5c2684 imxtools/hwemul: allow for toolchain prefix override
Change-Id: I4f790441edac01ab2e8cb286c766ea0b272b4780
2013-01-26 18:24:50 +00:00
Amaury Pouly
8ed0d198c5 imxtools/scsitools: add support for more commands
Change-Id: Iddff64502ba357dcd36903d31015b9ae2d00ae62
2013-01-15 19:42:20 +00:00
Amaury Pouly
b9923df170 imxtools/nwztools: fix compilation for windows
There is a windows port of the sg_utils library for scsi pass-
through. This little changes make it compile under mingw. A better
fix would be to implement direct ioctl on both windows and linux
but that's already better than nothing

Change-Id: I0d77cd1bad69806a66f0590362f165f24fa240e9
2013-01-10 00:51:35 +00:00
Amaury Pouly
423755d1bd imxtools/sbtools: improve sb1 key handling
Change-Id: Ib014a102fe44a67dd256e45e804bca9b5812eb61
2012-12-26 01:17:28 +01:00
Amaury Pouly
c3a7190d78 imxtools/sbtools: add crypto code for documentation purpose
Change-Id: I4f3c659d65c1453b192cbce4bf6c85d882761929
2012-12-26 01:17:27 +01:00
Amaury Pouly
54a414b69e elftosb1: fix usage()
Change-Id: I9ce73b907fa6276b9cd1f285156623bdafa6d548
2012-12-26 01:17:27 +01:00
Amaury Pouly
b748243d4f imxtools/sbtools: implement rom/product/component version switch
Change-Id: If3ebae2e60f324c93f85a4f1a6f30257cccb735d
2012-12-16 23:35:23 +01:00
Amaury Pouly
fa1af088e9 imxtools/sbtools: fix sb1 product/component version writing
Change-Id: I0153192f41ccc5fb98e7e9f6f110d97bd76dbc47
2012-12-16 23:35:03 +01:00
Amaury Pouly
47f6d77690 imxtools/sbtools: "fix" address handling in ELF
This is a common problem that proprietary tools don't handle ELF
files correctly. ELF sections use a virtual address and the
virtual -> physical translation is done though segments. This
allows to have a load (physical) address different from the
virtual one. Here is the trick: proprietary tools usually don't
take the pain to do the translation and just grab the virtual
address. This commit implements proper translation in elftosb1
knowing that this introduce a deviation from the behaviour of the
proprietary tool.

Change-Id: I91721a3a8dead382a0603f84ae3b35c5eb9704eb
2012-12-16 21:28:41 +01:00
Amaury Pouly
1e2e79d668 imxtools/sbtools: introduce elftosb1 for stmp36xx
The tool still lacks some feature of the proprietary one but
can create files with all the basic features.

Change-Id: Ib0c91210940ca829291ce70945f88dc510a49974
2012-12-16 21:28:41 +01:00
Amaury Pouly
212cfdf771 imxtools/sbtools: fix some instruction handling & crypto
Change-Id: I6530bdf27896d8325dec4e2ba31c7e6a0131a286
2012-12-16 21:28:41 +01:00
Amaury Pouly
f4f600fc52 imxtools/sbtools: add elf function (sort by address)
Change-Id: Ib68746e11b43eadbbe0443626d4dc65d998348fa
2012-12-16 21:28:41 +01:00
Amaury Pouly
be9787f2e6 imxtools/sbtools: update misc with MIN
Change-Id: I17daaff068fcd3a8c70c52db5fa209082461173f
2012-12-16 21:28:41 +01:00
Amaury Pouly
6f47b29915 imxtools/sbtoelf: use new method to get default xor key
Change-Id: Ie00306a3c78e7490afe9964bd55ce53019e603ed
2012-12-16 01:53:20 +01:00
Amaury Pouly
4fc3397c5b imxtools/sbtools: implement sb1 write
Change-Id: Ic36d3a8fcf09350dff5988eb860d76eb11608cc2
2012-12-16 01:52:19 +01:00
Amaury Pouly
51604e8445 imxtools/elftosb: remove duplicate include
Change-Id: I34776ba3608bb5d25ce0d0fb3c6f228a4c9effc0
2012-12-16 01:51:49 +01:00
Amaury Pouly
cdaef6f382 imxtools/hwemul: remove useless code (pwm)
The PWM code was for testing only the Zen X-Fi and should be
present in general because it could touch pins by error and
without producing any result.

Change-Id: Id20e2940cd7a057941d241254d0a867f5451e2db
2012-12-14 12:06:11 +01:00
Amaury Pouly
788bf2e3b2 imxtools/sbloader: implement stmp36xx recovery support
Change-Id: I6cfb432cd474ca00d7dff77577c0aa499b78fe2d
2012-12-13 16:02:58 +01:00
Amaury Pouly
153bc0d7ec sbtools/sbload: prepare support for the stmp36xx
Change-Id: I13147009f2573d80c2c3dca2852a6d7b45174e9d
2012-12-13 00:24:19 +01:00
Amaury Pouly
2a52b937e4 imxtools/scsitool: retrieve the minimum amount of inquiry data
Some device only report the minimum (36 bytes) amount of inquiry
data so don't ask for more

Change-Id: Ie74d659f6e27b077acba160aeb87d1e7edf82e66
2012-12-13 00:23:33 +01:00
Amaury Pouly
c644f6b7f1 sbootls/rsrc: fix warnings
Change-Id: Id756cab14c9151ea74d628d002e1a203c5fbf01a
2012-12-13 00:23:07 +01:00
Amaury Pouly
b86b0a1b44 imxtools: introduce the new scsitool
It appears that all devices based on the Sigmaltel SDK support a
common vendor specific SCSI interface when in UMS mode. This
applies to the STMP36xx and the STMP37xx. This interface supports
many operations:
- get device info
- get device paritionning
- get janus/drm info
- read/write/allocate/erase any partition
- reset (chip or to updater and/or recovery)
This includes the ability to do a firmware upgrade by rewriting
the firmware partition. The tool currently does mostly nothing
but will be enhanced depending on the reverse engineering efforts
and the use of it. It has been tested on the Fuze+ and the Zen
X-Fi2/3.

Change-Id: Ibd4b2ad364c03ada4f9001573ef4cc87cfb041d1
2012-12-11 20:20:49 +01:00
Amaury Pouly
fb05b3e698 newtools/scsitool: fix typo
Change-Id: I882956c0022db846882c68f8aac7f9d8fe49dfa8
2012-12-11 20:20:49 +01:00
Amaury Pouly
fb43a137e7 samsungtool: allow firmware creation
The new tool fwcrypt can create a firmware image with a specified
model, version, region and so on.

Change-Id: I0e90e9ab905398a3e7ae3f4fb8b8bbfb2d12d703
2012-12-06 12:17:50 +01:00
Amaury Pouly
8666e83aaa rsrctool: improve debug output
Change-Id: I3a4fc048466b9e4d7290237efc1cefb07fd0a118
2012-12-06 12:17:50 +01:00
Amaury Pouly
4dd2c5277b hwemul: fix code (out of bound access)
As noticed by bertrik some code accesses an array out of its bounds

Change-Id: I891d0305213ca7081c386b306f87fe9e1ba3b6c5
2012-12-02 11:51:50 +01:00
Amaury Pouly
9f19209c77 rsrctool: produce an actually usuable entry list of the rsrc file
Change-Id: I6c8e5f3faf04741e4a13c1e705e9e869ccf8cfec
2012-12-02 11:51:50 +01:00
Amaury Pouly
d66c16749a Introduce samsungtools to decrypt samsung firmware
Samsung provides many firmware upgrade in the format of a .dat
file, at least for nearly all YP's (checked for Q2, R0, T10, Z5).
This is a simple cyclic xor which a fixed key, a md5 sum and a
header specifying the model/version/region.

Change-Id: Ib0461a74196383189fd2d8162da444a85a229c60
2012-11-29 17:30:54 +01:00
Amaury Pouly
ee36a396cd imxtools: introduce rsrctool to manipulate rsrc sections
This tool is very preliminary but could be use for whatever
purpose since the format of the rsrc sections is now known.
By the way it appears that this format is the same as the
one use by the stmp36xx for its resources.

Change-Id: Idd7057f5cdce5af9726904169bb100c8bacb0981
2012-11-29 17:30:54 +01:00
Amaury Pouly
9d77ad364d sbtoelf: add switch to prevent elf simplification
While elf simplification is a powerful tool it can be useful to
prevent it from happening for debug purposes. Also add a missing
switch description in usage() and missing static.

Change-Id: I80a1904dc4340c412bd3de1c124a2e38d6ac11a2
2012-11-28 00:17:15 +01:00
Amaury Pouly
f988f5c951 sbtoelf: also simplify elf files for sb2
This is less useful is most cases because sb2 doesn't have the
size restritions but some elf are produced with one section per
file and still yield dozens or hundreds of sections. And this free
anyway so we can do it.

Change-Id: Ia5ca83a8375063ecc7052d1ea73b2b21c00be730
2012-11-28 00:12:17 +01:00
Amaury Pouly
1c14041041 sbtoelf: implement elf simplification
Change-Id: Icfac5a2aa6a7b3582054321df003c6bb217b59d0
2012-11-28 00:06:31 +01:00
Amaury Pouly
8189732e52 sbtoelf: implement sb extraction for sb1
Load, fill and call/jump instructions are extracted as elf files
like for sb2. Because of the size limitations of the sb1
instructions, the resulting elf files can easily have hundreds of
sections. The (currently) implemented elf simplification method
will hopefully reduce this to a few sections only

Change-Id: I8fd6ed935ac3128f244bbd71c782e2a0a1c6d44a
2012-11-27 22:38:48 +01:00
Amaury Pouly
7dc3e939d2 sbtoelf: implement sb1 loading and dumping
Implement actual loading of a sb1 file to a structure in full
generality. Also implement dumping for debug purpose

Change-Id: I320035ea628719480a79aaccb05dce9a83256927
2012-11-27 22:16:56 +01:00
Amaury Pouly
9716d1f1f9 sbtools: add forgotten file
Change-Id: I701a301efa369c9e1247e10d226ba69e6064d1b2
2012-11-27 00:01:35 +01:00
Amaury Pouly
4e95b72ecb sbtools: add support for the stmp36xx format
The STMP36xx series also uses .sb files but with a different
format. The main differences are the encryption and the lack of
sections, making it basically a list of commands: fill, load,
call, jump, switch mode, set sdram settings. Currently only the
sbtoelf has support for the sb1 and can only dump the list of
commands. Actual support for elf creation will come later.

Change-Id: I1f2e0230c91ac64efd0e8430e0c5212098c599fd
2012-11-26 23:58:30 +01:00
Amaury Pouly
f44d95630c imxtools: introduce hwemul
The hwemul tool is a small binary blob running on the device
that can received commands over USB. It is mainly intended to be
loaded using the recory mode and allows to read/write registers,
memory, use the OTP device, ... The tool is split into three
parts: dev/ contains the actual blob (which handles both imx233
and stmp3700), lib/ contains the communication library and can
also use the register description produced by the regtools/
to ease register by name, tools/ contains an interactive tool
to send commands to the device when running the blob.

Change-Id: Ie8cb32e987f825d8ed750d48071e43415b4dacb3
2012-11-14 12:51:51 +01:00
Amaury Pouly
ec2153f2dd regtools: add the imx233/stmp3780 and the stmp3700 reg map
These files were produced by parsing some linux and/or sigmatel
provided headers and later tweaked by hand or by programs.
Each file describes one or more soc. A soc has a list of devices.
Each device can either be unique or have several copies at
different addresses. Each device has a list of registers which
can either be unique or indexed. Each register can further have
a list of fields. Registers with a SCT variant are also handled.

Change-Id: Ib50bb3fda268b6d5713f81bd8961de7978a5815e
2012-11-14 12:37:32 +01:00
Amaury Pouly
0c6b63479d imxtools: add regtools to work with register descriptions
These tools allow one to read a register description in a XML
file and to produce something useful out of it. Three example
programs are written:
- tester which simply prints the register tree
- headergen which produces a set of headers with the #define
- hwemulgen which produces something for the hwemul tool (to come)

Change-Id: I52573688b29d5faeaf64ce7c5ffe08ee8db3d33c
2012-11-14 12:35:21 +01:00
Amaury Pouly
214f226ca6 upgtools: allow creation of a UPG archive + improvements
Change-Id: I9c3e2eb95f7eb6d41591b006328fd720dfcf93a5
2012-11-13 18:25:00 +01:00
Amaury Pouly
02f67224f9 scsitools: add nwz firmware upgrade scsi command
Change-Id: Iaebb442611c64fe4d47a07ce3b3d12c3230cafe5
2012-11-13 18:25:00 +01:00
Amaury Pouly
12862df624 emmctools: add debug statements
Change-Id: I9a15c347cfaab821b0cfc01744c5b6b8267c40ea
2012-11-13 18:25:00 +01:00
Amaury Pouly
99f20b85f6 nwztools: various fix and enhancements
Change-Id: Iaa89df27b7a0c4eb9fc6603c431de3d1fe791fa1
2012-11-03 14:04:27 +01:00
Amaury Pouly
6d04ed343c scsi_tools: add support for nvp reading
There is a vendor specific command to read the NVP of the device,
including the KAS. The trick is that the data is randomly
scrambled using a so-called para_noise array of random values.
There seems to be a problem when retrieving large entries (>1000
bytes typically) which causes sg_pt do behave strangely.

Change-Id: Iefa6140df78ab9c7dcf7ac34cb1170979123ecd7
2012-11-03 04:25:25 +01:00
Amaury Pouly
3e1c492680 Introduce scsitool for sony nwz players
This tool can send vendor specific scsi commands to sony nwz
players such as getting serial number, model id, device info,
and others. It can potentially be used to get some private keys
stored on the device but probably not the KAS used to encrypt
firmware upgrades images(UPG).

Change-Id: Ia49c1edf8d421b20c4e9afeb1192e00e06eb6047
2012-11-03 02:29:00 +01:00
Amaury Pouly
cb09e369fb Introduce upgtools for sony nwz players
This tool can unpack UPG archives for firmware updates.

Change-Id: I32f5f1a84759198c7af4a4ecfd7aa65eaeda567a
2012-11-03 02:16:01 +01:00
Amaury Pouly
8c1a9f5082 Introduce emmctools for the sony nwz players.
This tool is specific to the em1/mp200 sony based players. In
deals with raw emmc images (which is possible but hard to get).
This tool is also useful as a documentation of the underlying
emmc format used for a future port.

Change-Id: I66c9b0e47351e5d89f6a404aa62038e00fdc1093
2012-11-03 02:14:04 +01:00
Amaury Pouly
08ca0b59c8 atjboottool: add missing copyright headers
Change-Id: Idb2f5e4b0bd6a84bc3eaff088fb4706f46ed1535
2012-10-30 13:14:52 +01:00
Amaury Pouly
89254cb612 rknanoutils: add raw encode mode, add header fields
The raw encode mode allows to use the raw encode_page routine on
any file which proved to be useful. The guessed fields of the
headers are based on some rk2918 headers which leaked. They are
mainly informative though (date, version, chip).

Change-Id: I139ea0c40f76b6dde041c448bbf3e7ecf9cab24a
2012-10-18 10:41:14 +02:00
Amaury Pouly
283277e5ab atj: provide default output prefix/filenames on unpacking
If no output prefix is specified, a default is picked:
- filename with extension replaced by .afi for FWU files
- filename with extension replaced by .fw/ for AFI files
- filename without extension and with / for FW files

Change-Id: I6497b8f4a49f1238e5db738429f687cad3ae8a5a
2012-10-04 12:27:17 +02:00
Amaury Pouly
821efc46ec Introduce atjboottool for ATJ213x firmwares
Change-Id: Ie857b82e25de235c8549defab7e75995efefb3f6
2012-10-03 14:27:19 +02:00
Amaury Pouly
2f1da04cc3 zenutils/update_extract: make sure the archive is valid
The update_extract tool works by finding the compressed size and
the compressed data in the updater. This is problematic since
without the uncompressed size, inflate can produce extra bytes
at end. This is not a problem for our tools but the device will
plain reject it if sent by MTP/sendfirm for example.
Workaround this issue by reading and rewriting the archive
after decompression so that only the meaningfull data is written.

Change-Id: I117f434b92a56d93d269af49c3e426cd8cc0c7e4
2012-06-27 14:56:20 +02:00
Amaury Pouly
7c9e7ec707 sbtools: add option to force sb dump
In the case of encrypted SB files without any key match, it is
still possible to dump the section headers. The force option
allows one to do so. It also allows to dump unencrypted sections
of encrypted files if there are some.

Change-Id: I36280230679ac5903f9c451c68c276f5c6959536
2012-06-27 14:55:58 +02:00
Amaury Pouly
f62009303a rknanoutils: fix crash with no prefix, remove debug code
Change-Id: I73e277a8dc2fbd5790b1d7173e449d883710f27a
2012-06-19 23:01:00 +02:00
Amaury Pouly
906963ae76 rknanoutils: much more sensible format guess
I finally found a sensible format for the executable files.
The tool now can output the loading entry to elf files. Some
disassembly and analysis suggest the phys/virt addresses are
correct. However the entries are somehow linked and it is
still unclear how (are there "calls" to the code ? when ?).

Change-Id: Ied38b5bb297176c5755b5ecb3309f4a259c18cd4
2012-06-19 22:54:41 +02:00
Amaury Pouly
d6bbe39dc6 rknanoutils: more reverse engineering of the BOOT format.
I found out that the file has a number of "entries", in
3 categories. The third category seem to contain bootable files.
In the RKnano firmware file I have, these entries are named
"NandBoot1" and "NandBoot2". They seem to use the same format as
the stage3 of the RKnanoFW format but we do not understand this
format precisely for now anyway.

Change-Id: I72d77e609cdeeb802af793c010d6788bf36cd7e2
2012-06-19 15:42:16 +02:00
Amaury Pouly
cbd44f4bc4 Update the rknano utils.
This is mostly based on reverse engineer of the _RKUpgrade.dll
from the SAM3xx upgrader.

Change-Id: I37f4503899c7198ce463130b2ff994da9ca7dc4b
2012-06-10 21:56:37 +02:00
Amaury Pouly
c4911de1a0 Initial commit from rknano utils. This is very preliminary work.
Change-Id: Iddc4b39a4611f12b9eefc3a96d7eeb7229777ebb
2012-06-07 14:49:14 +02:00
Amaury Pouly
cc59ea453d Fix findaddr.pl tool for codecs
Change-Id: I19dff8c9f3e8195d1e8d652e6365375a87debddf
2012-05-31 15:56:34 +02:00
Amaury Pouly
a87a9ef373 imxtools: move tools to a new sbtools/ subdirectory
Change-Id: I0d8d6831b35037725486f61fc363de87bc8ba92e
2012-05-31 13:57:25 +02:00
Thomas Martitz
9c33f93c1c ypr0: Add kernel module to required support fm radio.
To support fm radio a kernel module was written. This module is added to
the patched firmware that loads Rockbox. It's pre-compiled but its source
archive provided.

The kernel module provides raw-access to the built-in si4709 radio chip.
Our existing si 47xx drivers can be re-used this way.

The module itself was written Lorenzo Miori, I only integrated it
into the tree.

Change-Id: I6205d28a505d57791eaeb627e6856b9a1eaeaeaa
2012-05-28 19:38:09 +02:00
Amaury Pouly
391f3ea2ae Cosmetics
Change-Id: I6ad5b6c2e4f8f57db2068fe372ab4ecadf4d03a9
2012-05-20 01:35:24 +02:00
Amaury Pouly
9f89ffa71c mkimxboot: fix warnings
Change-Id: If88b61566d8c81eda7cfc482fa82213657ae41b2
2012-05-19 16:48:15 +02:00
Amaury Pouly
b62ec2ba80 imxtools: make sb api work with in-memory files
Change-Id: I517244802efb118be214437bbaea2ef811e87aea
2012-05-19 16:10:52 +02:00
Dominik Riebeling
972b8945b8 Fix a typo.
Change-Id: I358add5df8971bc3eab4c4cf71d2e792e51979d1
2012-05-14 23:02:21 +02:00
Marcin Bukat
36d7f64555 Fix rkusbtool compilation (FS#12664) by Teemu Nätkinniemi
Change-Id: Id18eca4ade80cce2ab68317af6b7b9751d04b1cd
2012-05-13 17:53:55 +02:00
Dominik Riebeling
91cf4a7768 gitscraper: Provide way to get timestamps for files.
When scraping files from the repository allow passing an additional list of
files for which the timestamp of the last change is retrieved. Since this is
slow (the log needs to be traversed, since a blob doesn't know about commits
its referenced by) only specified files get this retrieved.

Change-Id: I61a2ef812ac18ffb5898c01ce070046d4ca00a15
2012-04-29 11:48:07 +02:00
Sean Bartell
f40bfc9267 Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-25 22:13:20 +02:00
Amaury Pouly
a0009907de imxtools: fix missing '\n'
Change-Id: I93630f5c303064deb5880421202425046aa3074f
2012-04-25 13:36:38 +02:00
Amaury Pouly
b9f9d0da51 imxtools: fix missing '\n'
Change-Id: I8d6a70e644225211b35e7b160bdf06e12c611198
2012-04-25 13:36:38 +02:00
Dominik Riebeling
885db72b8b gitscraper: support Python3.
Make gitscraper and tarball script work with both Python 2 and Python 3. Tested
with 2.7 and 3.2.

Change-Id: I31b2580660d764d013bca6fe59d5663ae9f7f5aa
2012-04-22 21:34:01 +02:00
Dominik Riebeling
2aae745458 Add new tarball generation script.
The old script depended on svn. An earlier version of this script has already
been used in the 3.11. branch.

Change-Id: Id03abb8f7bd005ede343243194c4453f0b2e8943
2012-04-12 21:15:49 +02:00
Dominik Riebeling
e9d5f6cb61 gitscraper: support compressing the sources as 7z.
The Rockbox source code uses 7z for its archive for size reasons. Add support
for compressing as 7z (by calling the 7z command line utility) so it can be
used for generating Rockbox source archives.

Change-Id: I26097ff61ff183e5ddc07b2c4473f90dc0700178
2012-04-12 21:08:38 +02:00
Dominik Riebeling
06662985cb Correctly insert build ID.
Change-Id: I35a85ffd78bd0a56a31d6ba0abbd6102727155d4
2012-03-06 22:06:40 +01:00
Dominik Riebeling
7d2c7b83b5 Rockbox Utility: add "revision" information back.
Add a revision-like information and make deploy.py replace it with the git
hash.

Change-Id: Ic88ad0b2af255e76a7129a6a5cf52663b868fd32
2012-03-06 21:45:54 +01:00
Marcin Bukat
7569450d8e rk27load: fix linking with newer toolchains
Change-Id: Id8f86e9f5ca78f41ef4e6c6a9244031afe83389d
2012-03-04 00:33:10 +01:00
Dominik Riebeling
ee1f54ca01 Append "64bit" only on 64bit binary.
Don't rely on the build host having the same bitsize as the created binary.
Fixes building a 32bit binary getting a "64bit" postfix when built on a 64bit
Linux.

Change-Id: I2aa61dee82beddd60ebfc8e227551ea49d769664
2012-02-26 17:11:36 +01:00
Amaury Pouly
c483905b92 imxtools: remove most calls to bug/bugp from core library.
It should not exit() anymore on error except on malloc failure.
Resource leaks on errors (especially I/O) are quite likely though.

Change-Id: I6fcf72fb08fc683468b390d0b8745d31ca982b48
2012-02-19 18:36:57 +01:00
Dominik Riebeling
d23d164b85 imxtools: use rand() instead of /dev/random.
On Windows /dev/random does not exist, so trying to open it will fail. Replace
it with rand() which is available on all supported platforms and sufficient.

Fixes mkimxboot not working, as well as Rockbox Utility "crashing" (which is in
fact its error handler calling exit(), thus terminating Rockbox Utility) on
Windows.

Change-Id: Ia164f937f329877e8f80f473f27be8c5df2a0a68
2012-02-08 21:28:20 +01:00
Dominik Riebeling
64f71e66b2 When writing data from repository open file as binary.
Windows requires files to be explicitly opened as binaries, otherwise it will
perform line ending translations. We really don't want the OS to mess with
that.

Change-Id: Id56de354b7ad0e5b056540755f7108456f3263ed
2012-02-06 00:14:25 +01:00
Dominik Riebeling
001eb3b211 Update deployment script for git.
First and rather rough adjustment for git. There are still a lot of places
referring to svn, and various functionality might be broken which needs fixing
later.

Change-Id: Ia628f06e99f527e01f131ce674746fba77d97d23
2012-02-05 22:00:57 +01:00
Dominik Riebeling
909b96fa70 Python module to get (some) files from the repository.
With git it's not possible to simply export a set of paths from the server
directly. This module offers a similar functionality, but requires a local
clone of the repository. It calls git directly for maximum portability.

This is a prerequisite to making the deployment script used for Rockbox Utility
work again.

Change-Id: I1aca8ddd40d16b6268c1d6a2fc23ac59e964c3c6
2012-02-05 21:26:57 +01:00
Amaury Pouly
28a10ec490 sbloader: always send packets of size xfer_size (even the first). Also maintain a table of known transfer sizes. In particular stmp3770 uses 48 instead of 1024.
Change-Id: I08dddc76c251aeeaaa3b46c9466f9be54c3d4a45
2012-01-27 20:08:33 +01:00
Dominik Riebeling
1391710466 Rockbox Utility: add missing folder to deployment script.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31584 a1c6a512-1295-4272-9138-f99709370657
2012-01-05 10:51:57 +00:00
Rafaël Carré
9274cf3b6c zenutils: remove unused empty file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31574 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 07:03:28 +00:00
Thomas Martitz
bf021e3ded ypr0: Add variables to provide a argv and stdout/err redirection for running Rockbox to the loader script.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31426 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 23:13:27 +00:00
Thomas Martitz
249bba03f1 Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.

The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).

Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.

This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.

Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.

Flyspray: FS#12348
Author: Lorenzo Miori, myself

Merry christmas to ypr0 owners! :)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
Amaury Pouly
1b7455e910 imxtools: fix compilation when cross compiling for windows (tm doesn't have timezone fields)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31342 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 10:22:36 +00:00
Rafaël Carré
62e0cdca26 amsinfo: save files with .bin extension
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31219 a1c6a512-1295-4272-9138-f99709370657
2011-12-13 03:01:16 +00:00
Torne Wuff
b9592e8be3 Convert one more file from DOS to UNIX.
Missed one, oops.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30925 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 22:52:21 +00:00
Torne Wuff
569285794b Bulk convert all DOS line endings to UNIX.
For the git migration we want a nice clean repository with UNIX line
endings. git does not use svn:eol-style, we just need the file contents to be
sane.

Sorry everybody. I know this messes up blame.

Scumbag *NIX developer says migrating to git will make line ending issues go
away; commits giant change to svn which changes line endings anyway. :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30924 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 22:44:25 +00:00
Amaury Pouly
cd832bd0f5 imxtools: add function to free instruction
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30919 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 19:41:29 +00:00
Amaury Pouly
ad9e280281 imxtools: add const and set pointer to NULL on free to avoid double free
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30918 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 19:41:25 +00:00
Amaury Pouly
e5db19de48 elftosb: add static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30915 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 13:30:13 +00:00
Amaury Pouly
5827937270 sbtools: rename to imxtools, move imx_hid_recovery to imxtools/sbloader, fix tools to correctly handle/free memory, properly return error codes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30907 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 01:49:13 +00:00
Amaury Pouly
8389a02b2c Add missing copyright header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30883 a1c6a512-1295-4272-9138-f99709370657
2011-11-01 15:40:29 +00:00
Amaury Pouly
dd0fffe50f sbtoos: restore elf extraction functionality of sbtoelf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30882 a1c6a512-1295-4272-9138-f99709370657
2011-11-01 11:26:16 +00:00
Amaury Pouly
e36471df9c sbtools: move sb reading from sbtoelf.c to sb.c with a proper interface, fix sb production bug, fix ugly code, add sb dump code and sbtoelf loopback facility
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30881 a1c6a512-1295-4272-9138-f99709370657
2011-11-01 11:23:43 +00:00
Amaury Pouly
591ec0349b sbtools: rework the color hack and add switch to disable color output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30880 a1c6a512-1295-4272-9138-f99709370657
2011-11-01 11:23:24 +00:00
Robert Menes
b674751974 Fix a typo spotted from r30864.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30865 a1c6a512-1295-4272-9138-f99709370657
2011-10-30 11:58:33 +00:00
Dominik Riebeling
1e74ef639d beastpatcher: check WMP version.
The current implementation fails silently if Windows Media Player is version
10. Add a check and inform the user if the version installed is too old to work
properly with beastpatcher.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30864 a1c6a512-1295-4272-9138-f99709370657
2011-10-30 11:01:00 +00:00
Amaury Pouly
4cab9f26b6 sbtools: fix handling of raw mode, have elf_write looks like elf_read, fix uninitiliazed offset of bss sections, add real key override on decrypt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30858 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 22:27:53 +00:00
Amaury Pouly
853fd04ba4 sbtools: fix compilation when linker expects correctly ordered files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30854 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 17:09:43 +00:00
Amaury Pouly
a8cde851fb sbtools: add options to override real key and IV, fix output prefix in sbtoelf, unify command line to add keys
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30852 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 17:04:20 +00:00
Amaury Pouly
d2a58f3aad sbtools: move sb file production to its own file with a clean api, factor key reading even more
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30851 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 17:01:47 +00:00
Amaury Pouly
9fe029b12a sbtools: factor key code, introduce crypto layer, move from open/read/... to fopen/fread/..., add support for encryption/decryption using a device when the key is not known, move sbtoelf to use getopt for command line
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30849 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 14:22:17 +00:00
Amaury Pouly
4ef4830f0b sbtools: be more verbose on real key and iv; add very advanced code to craft images
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30835 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 22:31:48 +00:00
Amaury Pouly
f45fb77664 sbtoelf: don't cross check if key is not valid
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30834 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 18:19:21 +00:00
Amaury Pouly
cab5dbded9 sbtoelf: handle the case where only one valid key is known
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30833 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 18:14:38 +00:00
Amaury Pouly
b93e15c404 sbtools: fix sbtoelf to support NOP, add alignment support to elftosb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30832 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 17:43:52 +00:00
Amaury Pouly
bf831106f5 imx_hid_recovery: rewrite Makefile
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30830 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 14:20:00 +00:00
Amaury Pouly
f4a1501d4a sbtools: fix sbtoelf to handle files with more than one hundred commands
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30810 a1c6a512-1295-4272-9138-f99709370657
2011-10-20 10:14:50 +00:00
Dominik Riebeling
b458d33190 Rockbox Utility now requires voice-corrections.txt.
Add to deployment configuration to make it work again.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30809 a1c6a512-1295-4272-9138-f99709370657
2011-10-19 21:50:01 +00:00
Thomas Jarosch
eac291348d Fix off-by-one buffer error
The _GET_CPU macro will write a terminating zero at cpu[8].

Detected by cppcheck

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30749 a1c6a512-1295-4272-9138-f99709370657
2011-10-14 12:07:47 +00:00
Amaury Pouly
df448bf7a1 Add support for i.MX28 to imx_hid_recovery, thanks to Wolfram Sang.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30576 a1c6a512-1295-4272-9138-f99709370657
2011-09-20 21:25:46 +00:00
Amaury Pouly
66dce4b730 sbtools: implement more complicated integer expression in db files, implement data sections, section attributes, file options, rework command line attributes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30562 a1c6a512-1295-4272-9138-f99709370657
2011-09-16 22:27:16 +00:00
Amaury Pouly
9d7df9ae4d sbtools: move the db parse to its own file and improve error messages
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30557 a1c6a512-1295-4272-9138-f99709370657
2011-09-15 16:10:31 +00:00
Amaury Pouly
64b4672359 sbtools: implement virtual to physical address translation for elf files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30556 a1c6a512-1295-4272-9138-f99709370657
2011-09-15 14:36:58 +00:00
Amaury Pouly
da44fd6f99 sbtools: fix code to work with file larger than header indicated size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30544 a1c6a512-1295-4272-9138-f99709370657
2011-09-14 12:19:30 +00:00
Amaury Pouly
781d59ec62 sbtools: relax file size condition (easier to work with)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30543 a1c6a512-1295-4272-9138-f99709370657
2011-09-14 12:14:24 +00:00
Marcin Bukat
77a82ad56a rk27load - fix indentation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30460 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 12:39:58 +00:00
Thomas Jarosch
e0024c9a71 Fix free on wrong variable
Credit goes to "cppcheck" again ;)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30353 a1c6a512-1295-4272-9138-f99709370657
2011-08-25 20:40:28 +00:00
Thomas Jarosch
51ae2e6ffc Don't close file descriptor twice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30352 a1c6a512-1295-4272-9138-f99709370657
2011-08-25 20:38:27 +00:00
Dominik Riebeling
e79fca992c Remove use of which.py module.
Implement simple which functionality. This has less features than which.py but
is sufficient, and removing an external dependency is always good.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30315 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 18:57:49 +00:00
Amaury Pouly
de13803352 sbtools: fix version output, add support for options section and product/component versions in command files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30205 a1c6a512-1295-4272-9138-f99709370657
2011-07-24 19:12:18 +00:00
Amaury Pouly
56bc02c7a2 sbtools: add missing cariage return, implement boot mode command, add C++ style comments support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30192 a1c6a512-1295-4272-9138-f99709370657
2011-07-22 15:45:08 +00:00
Amaury Pouly
9cc0dab3ce elftosb: remove duplicate code, merge two redundant fields
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30123 a1c6a512-1295-4272-9138-f99709370657
2011-07-04 21:55:56 +00:00
Amaury Pouly
fed77808c5 elftosb: support 'strings' in section id, support load binary at address, support call/jump at address
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30110 a1c6a512-1295-4272-9138-f99709370657
2011-07-02 02:12:01 +00:00
Amaury Pouly
143d451403 elftosb: add support for jumps/calls with one argument
sbtoelf: remove sb version check and print it in the basic info
Thanks TheLemonMan !

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30106 a1c6a512-1295-4272-9138-f99709370657
2011-06-30 21:30:06 +00:00
Amaury Pouly
50be1a8c4c sbtools: add support for the mode command (rarely used) and explicit env variable to skip version check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30003 a1c6a512-1295-4272-9138-f99709370657
2011-06-13 21:46:29 +00:00
Amaury Pouly
4cfb5da35b sbtools: always check the result of getenv against NULL, use strcasecmp instead of strcmp more greater flexibility
Thanks TheLemonMan for spotting that.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29989 a1c6a512-1295-4272-9138-f99709370657
2011-06-09 09:39:21 +00:00
Amaury Pouly
2d2246ed7d sbtoelf: add environment command to ignore format version checks (some files do not match it seems)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29988 a1c6a512-1295-4272-9138-f99709370657
2011-06-09 09:21:32 +00:00
Torne Wuff
754b1572fb Remove superfluous executable bits on a bunch of files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29986 a1c6a512-1295-4272-9138-f99709370657
2011-06-08 14:22:03 +00:00
Dominik Riebeling
9b7b653f85 Move various logo files to a single location.
Introduce a new folder that will hold the original files for various variants
of the Rockbox logo. The "Rb" variant of the icon (used in the Rockbox Utility
icon on Windows) has been missing from svn.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29960 a1c6a512-1295-4272-9138-f99709370657
2011-06-04 20:31:11 +00:00
Marcin Bukat
8f4202db28 Rockchip rk27xx utils
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29936 a1c6a512-1295-4272-9138-f99709370657
2011-05-30 21:10:43 +00:00
Dominik Riebeling
2ce1dfedaa Theme Editor: add libskin_parser files to clean rule.
Since those are created below the build folder but unknown to qmake the
generated Makefile doesn't remove those. Explicitly add appropriate wildcards.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29932 a1c6a512-1295-4272-9138-f99709370657
2011-05-29 19:33:17 +00:00
Amaury Pouly
bdb8f4c15c sbtools: fix a few memcpy with overlapping src/dst, fix a parsing bug (would access one byte paste the end of the buffer)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29868 a1c6a512-1295-4272-9138-f99709370657
2011-05-13 12:20:49 +00:00
Amaury Pouly
a29ef617f3 sbtools: be more verbose on debug and fix a bug (uninitialized structure)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29867 a1c6a512-1295-4272-9138-f99709370657
2011-05-13 12:13:02 +00:00
Dominik Riebeling
7d4616ea40 Fix BUILDID getting appended even if not set.
Rename some stuff to make it clearer.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29836 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 19:34:03 +00:00