Commit graph

830 commits

Author SHA1 Message Date
Amaury Pouly
6d13d9b718 hwstub: fix missing \n
Change-Id: I077a38d8a8905b7ad686d0d00b2a8a48bd206ade
2014-09-07 17:45:43 +02:00
Amaury Pouly
d3df564486 hwstub: fix horrible bug
Change-Id: I8042f692045a23dbb545d840e5169ce4b99fe5d2
2014-09-07 17:45:35 +02:00
Amaury Pouly
dd05dc76a4 hwstub: don't put revision in the protocol, it's specific to the implementation
Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c
2014-09-07 17:45:28 +02:00
Amaury Pouly
43ca127ebf hwstub: fix library to actually work and compile, still miss some functions
Change-Id: I968dafb4dca7d674165a43e3a435762fe38ed37f
2014-09-07 17:45:21 +02:00
Amaury Pouly
12ce7fc2cc hwstub: remove protocol to make it use its own interface
This way, hwstub can be implemented along with other usb features/interfaces.

Change-Id: I7148cab845049cc0a8b8e740fa0d52d3a385eaed
2014-09-07 17:45:10 +02:00
Amaury Pouly
1dc1a9310e sbtools: use default transfer size if it cannot be probed
A older commit removed this ability but it tends to be a problem since the HID
driver can prevent probing of transfer size which then needs to be entered
by hand on the command line.

Change-Id: Ie5a556ffdcc2adec0e1c984810983e19136b6473
2014-09-07 17:44:53 +02:00
Marcin Bukat
21373e9043 hwpatcher: add generic RKW file patching script
This script is handy hacking tool to patch RKW file with
arbitrary binary and put jump into implanted code.
It also shows how to use hwstub crc routine.

Change-Id: I89b5086dc1ddaca3dbc03df26a85472d8a20d51e
2014-09-02 22:35:26 +02:00
Amaury Pouly
69df56504e hwpatcher: add framework for CRC computation
Change-Id: Ib78f0fe58db5cec86f043d3e9e1ca14e69297ba0
Reviewed-on: http://gerrit.rockbox.org/911
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-08-26 07:21:19 +02:00
Amaury Pouly
278e8664a7 hwpatcher: fix horrible typo in the makefile
Change-Id: I6e8d8ae3a5f6e1111a6b7d910a1a6b94e2733ca6
2014-08-13 12:44:26 +02:00
Marcin Bukat
53d9f2e6a7 rkwtool: The tool to inspect and extract update RKW files
Change-Id: Ie32d0a597b93d23a7d5946a3d9409572b41b45bc
2014-08-07 19:09:35 +02:00
Marcin Bukat
345841aa56 rk27load: stage1 dram config fix #2
Change-Id: I5c4cf3dedab26e4cae05496bcae3a2d235d12e2f
2014-07-23 22:11:10 +02:00
Marcin Bukat
dcd8172f4f rk27load: fix stage1 dram config bug
Change-Id: I03d44dbd05fcd5dfc0e508020fae7006d8a97505
2014-07-23 12:32:16 +02:00
Amaury Pouly
8bf1f044a0 Remove empty files
Change-Id: I44a4a90cddba7d0aed4d5f06934848690d0d32f4
2014-06-25 09:56:50 +02:00
Amaury Pouly
c9a028cc18 Introduce hwpatcher, a tool to patch binaries
This tool is a scriptable (lua) tool to patch binaries, it supports:
- raw binary
- ELF
- SB(v1/v2)
It also contains some basic routines to parse and generate useful arm/thumb code
like jump or register load/store. This is very useful to take a firmware and
patch an interrupt vector or some code to jump to an extra payload added to
the binary. Examples are provided for several STMP based target which the payload
is expected to be hwstub, and also for the Sansa View. A typical patcher usually
requires three elements:
- the lua patcher itself
- the payload (hwstub for example)
- (optional) a small stub either to jump properly to the payload or determine
  under which circumstance to do the jump (hold a key for example)

Change-Id: I6d36020a3bc9e636615ac8221b7591ade5f251e3
2014-06-24 18:07:56 +02:00
Marcin Bukat
f8785c8f6d hwstub: load rk27xx specific bits
Change-Id: Ie0c68925f933aebeb9b3497800a29de2d69fead2
2014-06-15 12:53:57 +02:00
Marcin Bukat
4f950e0af9 hwstub: Add support for rk27xx lradc block
Change-Id: I8fe15ad8207ac7098944bb85d6b66b91b9858e8f
2014-06-15 12:53:28 +02:00
Marcin Bukat
6c106a79c6 Rework reg description file for rk27xx
Change-Id: I3fc1c6c70c828dca285479eaa168328a2a8fdf2c
2014-06-15 12:49:56 +02:00
Marcin Bukat
e20256d6ae Add RKW build target in rk27xx hwstub
Change-Id: I5ad44916bc1ac5e8a9384db2369f07b137a1a715
2014-06-15 12:49:56 +02:00
Marcin Bukat
72d1d19ae7 hwstub: fix usb driver for rk27xx
Change-Id: I299e76837715c320987177eaea8459f8f199cb96
2014-06-15 12:49:56 +02:00
Amaury Pouly
eb7e70950e regtools: add new reg dumps from various targets
Change-Id: I289f03a8404c6aa8ec2ff94a8a0a3118fd3c7456
2014-05-25 16:38:09 +02:00
Dmitry Gamza
440ff9500b qeditor: on Windows it’s not impossible to create a file with AUX
Change-Id: Ic7ef01328eccbed4afddb0a09d2afbb6c1f6a28f
Reviewed-on: http://gerrit.rockbox.org/811
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-05-12 19:05:19 +02:00
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