Commit graph

1052 commits

Author SHA1 Message Date
Dominik Riebeling
5f5d7f608a Fix path creation for zip file names in current folder.
When building in the current tree (i.e. buildfolder ending up as '.') creating
the filename to use in the zip file stripped all '.' characters. Use a
different way to create the filename to avoid this.

Change-Id: I139c404d5e83a8bcb028a9a22b125f238911e405
2015-05-30 18:21:32 +02:00
Dominik Riebeling
2af2a1253c Update findversion for change version.h format.
version.h doesn't store the version number as string anymore. Update
findversion to use the individual values instead.

Change-Id: I6bf0fdd4420d41279b44cffd22b42febbfc778ce
2015-05-30 17:59:50 +02:00
Amaury Pouly
b130b50734 Add jz4760 tool
This tool can pack/unpack a jz4760 archive (like the one used for the fiio
x1/x3/x5), and can descramble/scramble (it's the same operation) a firmware
file (the sys.bin file in the archive). I did my best to keep the compatibility
with the leaked Fiio/Ingenic tool which has the same name.

I wrote the tools from scratch, but here are some remarks:
- the format used is a slightly modified IHFS used in the older JZ4640 series,
  I used the information on the wiki about the IHFS format
- the CRC computation done was already reversed engineered by someone on the
  forums but I realised this later
- There are a few unknown fields in the headers, see comments in the source code
- The firmware scrambling was discovered by pure guess, I realised there were
  some repetitve sequences, some I guessed it was a rotative XOR and ran some
  analysis to find the most probable sequence

Change-Id: Ib83735b3db8475be5de9c94231714e88668a0340
2015-03-29 14:08:28 +02:00
Marcin Bukat
0d9124fc79 qeditor: Add external static libraries to build dependecies
The solution is a bit hacky as it simply call make in libs
directory as pre-dependency. Clean doesn't touch libs.

Change-Id: Ib447a48fd87cc41228944f17444474a55d393543
2015-03-04 22:46:03 +01:00
Amaury Pouly
f5f9784ab7 Introduce a new analysis tool to detect which macros are defined in each build.
See the usage() for more information.

Change-Id: I712ef4d6bd21eccefa18cec144e35b8161ca5b3a
2015-02-16 11:31:05 +01:00
Marcin Bukat
f65baf9b0f atj213x: Fix DMAC block in description file
Change-Id: I4afc17b06f85d552248c0248e6b4b921ffc1e7a7
2015-01-23 11:03:49 +01:00
Marcin Bukat
15d4be5e9f atj213x: fix desc file errors
Catched by swiss_knife check there are some overlaping fields
and invalid characters in some names.

Change-Id: Ia26ffd2e29452f4ddd9f8229f78bb2a2cc325ab4
2015-01-22 13:38:13 +01:00
Amaury Pouly
2cdfc43f10 hwstub: implement read/write data abort recovery
Change-Id: I1625873b6864584c40984723d82548ad242ee08e
2015-01-13 23:35:33 +01:00
Thomas Jarosch
2ee2a9697a Fix crash on uninitialized variable
The WRITE() macro checks if the "fw" pointer
is open upon fwrite() error. Since fw was
not initialized before use, it might crash for non-zero fw.

cppcheck reported.
[utils/jz4740_tools/HXFreplace.c:187]: (error) Uninitialized variable: fw

Change-Id: I558170f9f17828c9fd515a5da36ad8b5cb30a9ad
2015-01-13 21:57:24 +01:00
Thomas Jarosch
a71603b4d1 Clean up bogus 'make compiler happy' code
Less code makes the compiler even happier.

Change-Id: I24cf586ba44f432b541fd17079f93dbd52314828
2015-01-12 21:13:00 +01:00
Marcin Bukat
bbd7d1dba3 regtools/headergen: Make generator more flexible
Change-Id: I2328ec021ed990a40257d4ce6f4fc5b3db2ba998
2015-01-12 11:28:52 +01:00
Thomas Jarosch
c907e127f8 jz4740 usbtool: Fix undefined behavior in set_reg()
The variable 'i' should actually be 'size'.
See the read_reg() function above it.

Confirmed via private email from Maurus Cuelenaere. Thanks!
(who also remembered having trouble reading/setting
 registers over USB back then ;))

cppcheck reported:
[rockbox/utils/jz4740_tools/jz4740_usbtool.c:281]: (error) Uninitialized variable: i

Change-Id: I0f34834335e89d2504e7597e8db22cf69b5ca7e7
2015-01-04 18:16:44 +01:00
Thomas Jarosch
89ab3c2761 Fix uninitialized variable (should fix libusb retry handling)
Reported by cppcheck

Change-Id: I5ac7b73f2e3eaee3d5427d118944613e572f684d
2015-01-04 13:35:47 +01:00
Thomas Jarosch
8f1fbd1dc8 Remove unneeded std::string .c_str() call
cppcheck reported:
[utils/zenutils/source/update_patch/main.cpp:105]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

Change-Id: Ied9de135e693af22e1fdc3aa3b67d14b7d2c21e6
2015-01-04 12:33:09 +01:00
Thomas Jarosch
29ffa832fe Remove useless assignment of 'len'
The variable 'len' is not used after this statement.
Probably a copy'n'paste leftover from the similar
looking block above.

cppcheck reported:
[rockbox/utils/zenutils/source/shared/cenc.cpp:212]: (style) Same expression on both sides of '-'.

Change-Id: Ia8357187ed39d3fab10d97df75a1146c4f733790
2014-12-20 15:52:35 +01:00
Amaury Pouly
515a07e51d sb1: fix buggy comparison
cppcheck reported:
[rockbox/utils/imxtools/sbtools/sb1.c:440]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.

Thanks to Thomas Jarosch

Change-Id: I0078232706d4014a1f2acea310a7a0d0edf7788b
2014-12-20 15:31:18 +01:00
Amaury Pouly
5dab768838 regtools/qeditor: use the new model, drop unused code
Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8
Reviewed-on: http://gerrit.rockbox.org/1023
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:57:20 +01:00
Amaury Pouly
abed208efb regtools/qeditor: introduce custom table model for reg fields
This one is much more efficient than using a generic table widget.

Change-Id: I3578964eead746e656f6b0a8dcec0f8442deb13d
Reviewed-on: http://gerrit.rockbox.org/1022
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:54:28 +01:00
Amaury Pouly
edaeee168d regtoosl/qeditor: remove unused code
Change-Id: I79ad3151d6a500903786b3467c271b43741f8fee
Reviewed-on: http://gerrit.rockbox.org/1021
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:54:20 +01:00
Amaury Pouly
88053b8832 regtools/qeditor: fix field editor not updating the validator on change
Change-Id: Ib8df47c8b7cfe0beb486e45542e3fcc9187bcc54
Reviewed-on: http://gerrit.rockbox.org/1020
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:54:13 +01:00
Amaury Pouly
04e798eddf regtools/qeditor: fix backend dump bug, be more correct on read
Change-Id: I581c033435f553f092b61144c4b68b05ab931dd8
Reviewed-on: http://gerrit.rockbox.org/1019
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:54:05 +01:00
Amaury Pouly
6cb861137d regtools/socdesc: update library with a field useful functions
Change-Id: Ib2891fe36b0594e8554bb354a29bc8b3485de20d
Reviewed-on: http://gerrit.rockbox.org/1018
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:57 +01:00
Amaury Pouly
7749c4d0e9 qeditor: message widget now supports IDs, useful to clear messages
Change-Id: Ibe0a8909128469a71a25415761860e06fc9f1e67
Reviewed-on: http://gerrit.rockbox.org/1006
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:49 +01:00
Amaury Pouly
cef5e1018e qeditor: change setting names, they were inconsistent
Change-Id: I47c94520749d0cef1e602c7c62c685a8a3703258
Reviewed-on: http://gerrit.rockbox.org/1000
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:41 +01:00
Amaury Pouly
dc3ae2aeb9 qeditor: rework register dump to be more general and flexible
Change-Id: I2fb7a2813c93f0804ed1ca6223625706d0dff9a5
Reviewed-on: http://gerrit.rockbox.org/998
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:33 +01:00
Amaury Pouly
1bcc4fc67b qeditor: introduce a new "RAM" backend, and refactor file backend
Change-Id: Icfbbc01b83d3592041803387e35f5aa6fb0fa813
Reviewed-on: http://gerrit.rockbox.org/997
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:15 +01:00
Amaury Pouly
4a711fee42 qeditor: display message on "Nothing" backend selection
Change-Id: I071c79500f55afe0b6342cbb5a26a9fddba35d94
Reviewed-on: http://gerrit.rockbox.org/996
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:03 +01:00
Amaury Pouly
99ed6d2bea qeditor: backends can now report validity status
Change-Id: Iefedc9cee10a8c7457d972e5a60d151a6cb38aa8
Reviewed-on: http://gerrit.rockbox.org/995
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:52:54 +01:00
Amaury Pouly
b08620dd30 qeditor: introduce a message widget to display non-interactive messages
Change-Id: Iad43efa1f09428389fbd09403c1ae20d2805f1c5
Reviewed-on: http://gerrit.rockbox.org/987
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:52:45 +01:00
Amaury Pouly
3b4e63173d qeditor: rework mainwindow tab names handling
With the previous code, tab names would be ignored if tab is detached
which can happen early on.

Change-Id: I9eac4202850f3e79a04590a4ba1444850ec6a583
Reviewed-on: http://gerrit.rockbox.org/986
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:52:35 +01:00
Amaury Pouly
fe1fed8873 qeditor: add copyright
Change-Id: I7834bc09b21f2a2d84b1c9edbbe1188372809c63
Reviewed-on: http://gerrit.rockbox.org/983
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:52:26 +01:00
Amaury Pouly
94c4834bbb Revert "regtools/qeditor: use the new model, drop unused code"
This reverts commit 3b3d9bf725.
Gerrit did crap on this one.
2014-12-15 22:44:17 +01:00
Amaury Pouly
3b3d9bf725 regtools/qeditor: use the new model, drop unused code
Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8
Reviewed-on: http://gerrit.rockbox.org/1023
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:42:43 +01:00
Amaury Pouly
0389fd0982 MTP: put libs after files in the Makefile, to please old gcc versions
Change-Id: I6de6771bd8888e40fb9dafa3c84653c8c680bbef
2014-12-13 12:58:08 +01:00
Marcin Bukat
0cd9e4e6bc hwstub/atj213x: add clock setup to crt0.S
Change-Id: I3b6e1b8ee1fa76396f7abe7df69af26e9599cfe9
Reviewed-on: http://gerrit.rockbox.org/1055
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested: Marcin Bukat <marcin.bukat@gmail.com>
2014-11-28 19:39:38 +01:00
Marcin Bukat
5e1381be87 qeditor: add clock analyser for ATJ213x
Change-Id: I5f5a3537d1ddf6b02684dd4c1dd13be862d3a918
Reviewed-on: http://gerrit.rockbox.org/1054
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-11-28 19:39:15 +01:00
Marcin Bukat
e99c036ed1 hwstub_shell: add support for call and jump
Change-Id: Ie09d0db21831b79255da858bada7382a08ff4eef
Reviewed-on: http://gerrit.rockbox.org/1052
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested: Marcin Bukat <marcin.bukat@gmail.com>
2014-11-28 19:38:02 +01:00
Marcin Bukat
9439635aa2 hwstub: lua functions for atj213x/irivere150
Change-Id: I3ab32996b4b6603fd7d66eee5b3bfd795b79eee1
Reviewed-on: http://gerrit.rockbox.org/1049
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested: Marcin Bukat <marcin.bukat@gmail.com>
2014-11-28 19:37:14 +01:00
Marcin Bukat
19f4e396fd regs-atj213x.xml upadte
Change-Id: Ia34dcf651e68ea66baebdeb8c056db86799ea33c
2014-11-18 23:30:44 +01:00
Marcin Bukat
cd04a5f1aa hwstub/qeditor: add support for atomic read/writes
The current code assumed that READ/WRITE would produce atomic read/writes for
8/16/32-bit words, which in turned put assumption on the memcpy function.
Since some memcpy implementation do not always guarantee such strong assumption,
introduce two new operation READ/WRITE_ATOMIC which provide the necessary
tools to do correct read and write to register in a single memory access.

Change-Id: I37451bd5057bb0dcaf5a800d8aef8791c792a090
2014-11-18 23:30:44 +01:00
Amaury Pouly
229a02a4ee adfuload: fix argument parsing
Change-Id: Ibde77a2f7cb7a73c26235be5b2afed9f0aec3e97
Reviewed-on: http://gerrit.rockbox.org/1039
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-11-15 13:01:47 +01:00
Amaury Pouly
16dcde4012 hwstub_shell: add atj target
Change-Id: I566694f19dfb110dbf245be7b7f139a4c616e16b
Reviewed-on: http://gerrit.rockbox.org/1041
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-11-15 13:01:24 +01:00
Marcin Bukat
bb5341c4be regtools: ATJ213x description file
Change-Id: I5b4d29e0808c57e252f5b6c3b9ba26a52c1bd112
2014-11-06 10:31:11 +01:00
Marcin Bukat
df2ac7428f adfuload: Improve arguments parsing
Change-Id: If18975f13d20bb7f7232cafdb4ea87fa516b5750
2014-11-06 07:56:02 +01:00
Marcin Bukat
d11704fed5 hwstub: Add atj213x support
Change-Id: Ic32200f9ab2c6977e503307a9cbe43a1328d0341
2014-11-05 08:18:59 +01:00
Amaury Pouly
791be56cff atjbootool: fix date printing
Change-Id: If5cd0d79e4afb12224932b24c63b016636c7a56e
2014-10-31 18:02:41 +01:00
Marcin Bukat
c626fe7004 atj213x: e100/150 lcd test binary
Change-Id: I3f9fa21dcb33d1cd3081d0c995adfb44e085dd7a
2014-10-18 20:18:01 +02:00
Amaury Pouly
40a2ac4b5f regtools/socdesc: fix red
Change-Id: If40c52168eb5cd2d194c90c3f65263d2b9da0451
2014-10-08 16:28:14 +02:00
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
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