Commit graph

854 commits

Author SHA1 Message Date
Marcin Bukat
f9be1ef021 regtools: reg-rk27xx.xml description file rework and cleanup
Change-Id: I0a2e45eb1b4aa03122382cc93bbc0c292b3249be
2014-09-19 12:38:19 +02:00
Marcin Bukat
b888743cac qeditor: Implement clock analyzer for rk27xx
Change-Id: Ib8f53d32120893b6c1054299ed434a6650a0d7c2
Reviewed-on: http://gerrit.rockbox.org/971
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-09-19 11:00:31 +02:00
Amaury Pouly
970c2482dd qeditor: rework modified indicator, register tab names depend on content
Because Qt doesn't support QObject multiple inherance, it is a bit tricky
to have a base class which interact with the UI. The register tab name
now display:
- file dump name (for dumps)
- hwstub device path (for hwstub)
And the register editor display the filename
Change-Id: If2579992098c02627c67d560c824f1668e73bc45
Reviewed-on: http://gerrit.rockbox.org/979
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:58:33 +02:00
Amaury Pouly
dbb59291e7 qeditor: implement usb device list refresh (if supported)
Change-Id: Iaf05cad0e057f767dcde963d194027b2e290dbea
Reviewed-on: http://gerrit.rockbox.org/978
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:58:23 +02:00
Amaury Pouly
57d6db6ff5 qeditor: fix UI to update register/analyser view on each tree/list click
Change-Id: Idaceb7ffaf33c2184a43353dd9d7dee20ac807a9
Reviewed-on: http://gerrit.rockbox.org/972
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:58:16 +02:00
Amaury Pouly
79c5a07b4d qeditor: fix horrible out of bound bug
Change-Id: I1b34b1cd7be83d90e38559e386d0c6c64797b707
Reviewed-on: http://gerrit.rockbox.org/977
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:58:07 +02:00
Amaury Pouly
0c633db980 qeditor: when switching type tab, automagically switch view, implement reload
Change-Id: I7360af3b5dd7380151732687d6d8de3dbd503f20
Reviewed-on: http://gerrit.rockbox.org/976
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:57:59 +02:00
Amaury Pouly
e1f1f22b66 qeditor: avoid memory leak in RegTab
Change-Id: Ib7cd87b66c0ceb3d3ff93714709a43e2a97ce79a
Reviewed-on: http://gerrit.rockbox.org/975
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:57:47 +02:00
Amaury Pouly
a01bf8d93c qeditor: move backend selector to its own class, that's cleaner
Change-Id: I7f3fa66a8f67639b4b64cf9f6acc5fb10e227653
Reviewed-on: http://gerrit.rockbox.org/974
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:57:32 +02:00
Amaury Pouly
b2ef4a806b qeditor: initialise libusb once in a static ctor
Change-Id: Ic93def2b3633c498c9863b0dada3281853be8c6c
Reviewed-on: http://gerrit.rockbox.org/973
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-19 10:56:53 +02:00
Marcin Bukat
1f0fa05466 regtoools: Enhance rk27xx description file
Change-Id: If37551757188d98bcb27f7f469c11cf89bf64f62
2014-09-18 10:04:41 +02:00
Amaury Pouly
8855ce5a79 regtools/soc_desc: fix libxml2 misinit
The code did not call xmlInitParser() and would call xmlCleanupParser() each
time which is doubly wrong because 1) it's not init 2) all init/cleanup
must be done from the main thread. To ensure 2), call it from a static ctor.

Change-Id: I3d191bf3b8c0cfc51da78157e88c786636fd3ebf
Reviewed-on: http://gerrit.rockbox.org/966
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-16 12:16:55 +02:00
Marcin Bukat
77bfff58ec rk27xx: Fill UDC block description in regs-rk27xx.xml
Change-Id: Ia44169bda8f1558c1cbd4c8c0d2d3aaee262c991
2014-09-15 14:10:12 +02:00
Marcin Bukat
b7e3515a62 hwstub: small fixup in rk27xx usb driver
Change-Id: Ibf3b91af11041834ce650f663b213bac0113f721
2014-09-11 12:31:52 +02:00
Amaury Pouly
847106cdb2 hwstub: add support for jump/call in library
Change-Id: Ia57ca613609a5e89e41ff927d7fc137c6841046a
2014-09-08 11:12:54 +02:00
Amaury Pouly
d815c26e8f hwstub: implement jump/call in stub
Change-Id: I876fa012c5ae1509e57f5816a8ed31dc69d62ca0
2014-09-08 11:07:42 +02:00
Amaury Pouly
6cc057f180 hwstub: trivial changes
Change-Id: Iacb1721db1ae59d5f359d244fd68234915e611cf
2014-09-08 10:50:48 +02:00
Amaury Pouly
3c558127b8 sbtools: add option to ignore sha1 errors
Change-Id: I6bf9e4671e57f8ff3f436660e8ecb561027a036c
2014-09-07 17:47:00 +02:00
Amaury Pouly
6957966c86 hwstub: fix compile issue
Change-Id: I939c05d3c1319b122fe64bff0f0ea300ecbd1180
2014-09-07 17:46:53 +02:00
Amaury Pouly
ef0299c62e qeditor: add soc panel, to display soc information
Change-Id: Ie442b82d96fb150c7466f1a274240f9b111fd91e
2014-09-07 17:46:42 +02:00
Amaury Pouly
3daa6d64f6 qeditor: use hwstub library function to identify devices
The new protocol is interface based, so matching PID:VID is not sufficient

Change-Id: I27983a9c3b7db01b8e63b41e885f86d09c362f60
2014-09-07 17:46:36 +02:00
Amaury Pouly
ac5ba893d7 hwstub: library now check version on open
Change-Id: I672a882ad06780da93c1d811af2b28ff60d07469
2014-09-07 17:46:27 +02:00
Amaury Pouly
29de342134 hwstub: add string version
Change-Id: I919c27eb7ea69fdac7b3a65785a5a6eb3723a80e
2014-09-07 17:46:13 +02:00
Amaury Pouly
0c7c54e185 hwstub_shell: add support for set/clr/tog without SCT using read and write
Change-Id: Ib0a5123e5cc51ee193ef761c36af63467740c670
2014-09-07 17:45:56 +02:00
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