Commit graph

682 commits

Author SHA1 Message Date
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