Commit graph

1162 commits

Author SHA1 Message Date
Aidan MacDonald
73cee8f177 Add RegGen-NG tool and definitions for Ingenic X1000
Change-Id: Ib9ec35c068e1cff8dcf120a13cfe3f5f58908a95
2021-03-02 00:36:01 +00:00
Aidan MacDonald
13c7f482ce Add ingenic_tools/usbboot utility
This is essentially an expanded version of jz4760_tools/usbboot,
able to support both X1000 and JZ4760 CPUs and easily extended to
handle other Ingenic CPUs using the same boot protocol.

Change-Id: I70ce3acc3531d65390c6bbae4d2b3352140acf0a
2021-02-28 02:52:56 +00:00
Aidan MacDonald
b8945734f5 Make headergen_v2's output include what it uses
Change-Id: Ie9790faac44c33a170bc2dc39d706575cefa0f2f
2021-02-27 22:02:31 +00:00
Dominik Riebeling
65d0867a25 rbutil: Add option to langstat to pass git hash.
Don't always operate on the remote head, instead default to the local
HEAD, and allow passing a hash to use for calculating statistics.

Change-Id: I420308e66769689c1dfac56e19058b097a0533a2
2021-01-02 21:31:20 +01:00
Dominik Riebeling
ff7e8b4293 deploy: Update sources list for Rockbox Utility.
Change-Id: If23a2ee8056b124500e385a9d973dfbddbc32e02
2020-11-22 18:30:01 +01:00
William Wilgus
47e1f96427 Bugfix Backlight_init should be called after lcd_init
the rest..

Change-Id: I50585ba2191aa8134de3045b1445859b27503a68
2020-11-13 13:57:39 -05:00
Amaury Pouly
235cdeca73 qeditor: add better fallback mecanism for icons
Change-Id: Ib87406c95fc6c579f108b81246350d12de428ba4
2020-11-04 13:14:42 +00:00
Dominik Riebeling
1058ed5b25 tomcrypt: Set target macOS version.
Make sure the target version isn't the default one so it also runs on
older macOS version than the current one.

Change-Id: Ib3517c97eee23ce1648e644ffc9daba2d1e7b599
2020-10-31 19:20:36 +01:00
Dominik Riebeling
1801dcc999 rbutil: Fix native Windows build for tools.
- When make on Windows finds sh.exe it will try to use that. We use
  cmd.exe calls when detecting Windows, so make sure we use cmd.exe as
  shell.
- Add missing Windows compatibility to tomcrypt Makefile.

Change-Id: Iaef133ca27472a5ddf449174d540983f15c66aea
2020-10-21 21:33:39 +02:00
Amaury Pouly
08513103c6 nwzstools: add NW-A820 nvp nodes
Change-Id: Iab79eb0c9b0bbf8fb7622f5630f385d56878507a
2020-10-18 22:34:16 +02:00
Dominik Riebeling
a05d061aa3 rbutil: Pass isysroot to rbutil libs on macOS.
On macOS we pass the full path to the compiler. On recent versions this
causes the compiler to not find its SDK path, this needs to get passed
via the isysroot option.

Change-Id: Iea2820e1755cc80e12691119dfa31d70938ea511
2020-10-18 19:16:27 +02:00
Dominik Riebeling
d097742155 sbtools: Change crypto wrapper implementation to C.
There's nothing C++ left.

Change-Id: I98d8406215287c02b56029ed7c0e2b0e645bbcf1
2020-10-18 19:08:32 +02:00
Dominik Riebeling
2037b837f8 sbtools: convert crypto to libtomcrypt.
Replace the use of crypto++ with tomcrypt, which is much smaller and C.
This gets rid of various build issues for systems that don't ship
crypo++ (i.e. everything except Linux.)

Change-Id: Ic0799e17b94935c71b14765cf9a2a7ea2b0adc7a
2020-10-18 19:08:32 +02:00
Dominik Riebeling
815b289cb3 imxtools: Replace use of "byte" with its underlying uint8_t.
libtomcrypt uses a macro "byte" which conflicts with this type. Since
the underlying type is uint8_t and there's no real benefit from using a
custom type use the actual underlying type.

Change-Id: I982c9b8bdcb657b99fa645a5235303af7afda25b
2020-10-18 19:08:32 +02:00
Dominik Riebeling
387a45923c utils: Add Makefile for our copy of libtomcrypt.
Change-Id: I6b9ffe86b9e78b494a3a9211d6e79bb81c9fb6d4
2020-10-18 19:08:32 +02:00
Dominik Riebeling
caa9d9c1c5 utils: Add (partial) libtomcrypt.
Add the parts of libtomcrypt that we're about to use.

Change-Id: I0adc1d7d1f4833e7bb3ed53b9a4d9a85977cfb8b
2020-10-18 19:08:32 +02:00
Amaury Pouly
df8b817c96 nwztools/scsitool: fix incorrect declaration in header file
Change-Id: I10727311db4747a66b3ae7f72a92a64cc99dfc82
2020-10-15 23:03:15 +02:00
Amaury Pouly
4e89e0e0ea nwztools: fix wrongly generate MD5 files
When generating the MD5 using -z index,name the tool would add the entry but
forgot to increase the file size, hence truncating the file.

Change-Id: Ibd3c594722ab46350cda60d158666fe34a96e922
2020-10-11 16:20:45 +02:00
Amaury Pouly
fcdfeb2a45 nwztools: re-implement MD5 on Windows
I forgot to fixup the windows up and missed it because of conditional
compilation

Change-Id: I526c765b9d56508815941ecb9b9dbac7ea407cf0
2020-10-11 14:10:12 +02:00
Amaury Pouly
e371dee4a3 nwztool: fix computation
It turns out the calculation gives the right result for the wrong reason, this
fixes it.

Change-Id: I36053c8993b5ae1e85380da59546ffade265fb3f
2020-10-11 13:08:03 +02:00
Amaury Pouly
8ce60c54f7 nwztools/upgtool: add support for MD5
When compressing, it is possible to tell the tool to add an entry to the MD5
file (index 1), it is still necessary to give an empty file for that index.
To do so, pass the option "-z idx,name" insteas of "-z idx". This will create
an entry of the form "size md5 name". For instance "-z 6,system.img".
When decompressing, if one passes "-z idx,name" instead of "-z idx", the tool
will decompress and check against the value in the MD5 file.

Change-Id: Ifb945f6121644ae9105265d2d83ce6067301c5b2
2020-10-11 13:08:03 +02:00
Amaury Pouly
7cba599106 nwztool/upgtools: add NW-A55 and DMP-Z1 KAS, reorganize list
Change-Id: I24bc6b15c954540cfa9b4f176ecbf817b1b641e7
2020-10-11 13:08:03 +02:00
Amaury Pouly
1b5e824405 nwztool/upgtool: add support for compression
To decompress some output file(s), simply pass -z <idx> where idx is the index
of the file to decompress, starting from 0. For example
  upgtool -e NW_WM_FW.UPG -o tmp/ -m nw-wm1a -z 6 -z 7
to decompress files 6 and 7. To compress file, use the same options:
  upgtool -c NW_WM_FW.UPG -m nw-wm1a -z 2 script.sh md5sum.txt system.img

Change-Id: I1ef0b3e02c98e58154f1a959fb1ad70ad2ce6500
2020-10-11 13:08:03 +02:00
Amaury Pouly
1f338f7078 nwztools/upgtools: add support for windows
In order to avoid the crypto++ mess, the code uses the Windows Cryptography API,
which is standard. There is also some makefile magic to cross-compile:
  make PREFIX=i686-w64-mingw32- EXE_EXT=.exe
I selected the option so that it should statically link supports libraries used
by gcc (slsj and libwinpthread).

Change-Id: Iaf07da23afe81ed217fb3921ce13367c5441514d
2020-10-11 13:08:03 +02:00
Amaury Pouly
05fa8fc343 scsitools: typo
Change-Id: I0f4e5b6c5e88a1ae49102e6f6fc6f8c86cb63959
2020-10-11 13:08:03 +02:00
Amaury Pouly
53d2742a48 nwztools: add support for new UPG format on post-WM1/A30 devices
The new code supports reading and writing UPG files. I kept the old keysig
search code but it only supports the old format (the new format has too long
keys anyway). Since we now have to support two types of encryption(DES and AES),
I reorganized the crypto routines and clean-up some code.

Change-Id: Ie9be220ec2431ec6d0bd11699fa0493b62e1cec2
2020-10-11 13:08:03 +02:00
Amaury Pouly
cda16f9439 scsitools: const correctness and add "get_dnk_nvp all" subcommand.
Change-Id: Ic5cb3dfa3be684f31a2c55a3cb7d45cfe8c65b25
2020-10-11 13:08:03 +02:00
Amaury Pouly
76fbb33adf nwztools: fix MW-WM1/A30 KAS, fix KAS length
Split WM1A/WM1Z because they don't have the same KAS. On newer devices, the KAS
is actually 64 bytes, not 60. The strange thing is that "get_dnk_nvp kas" returns
60 bytes whereas "get_dnk_prop kas" returns 64, not sure why.

Change-Id: I944d3d838209ba58388439af0cdf5d7c74f1f7fc
2020-10-11 13:08:03 +02:00
Solomon Peachy
ec413f7692 jz4760: Heavily rework USB driver to add working DMA support
* DMA Bulk IN (ie our TX) results in sequential transfers 33-68% faster.
 * DMA Bulk OUT (ie RX) is mostly stripped out due to complete brokenness.
 * Interrupt and control endpoints remain PIO-driven.

Other improvements:

1) Use consistent endpoint references (no magic numbers)
2) Greatly enhanced logging
3) DMA support can be compiled out completely
4) Setting lockswitch will disable all DMA operations at runtime
5) Much more robust error checking and recovery

Change-Id: I57b82e655e55ced0dfe289e379b0b61d8fe443b4
2020-09-17 11:26:04 -04:00
Dominik Riebeling
db350ac3e2 themeeditor: Get revision info from git.
We're not using svn anymore. This isn't used, but at least try to get
the right value.

Change-Id: I66e726d28b504a0f15d5b6497a02963243ba466a
2020-09-04 19:08:54 +02:00
Dominik Riebeling
6810d83686 themeeditor: Update targetdb.
Change-Id: Iec78635b46e08a508a20048a14687f3be830ad63
2020-09-03 19:14:11 +02:00
Dominik Riebeling
93bb14c877 themeeditor: Make NSIS script work with mxe.
Change-Id: I592a28f64f88c4ec0d1c4f45aeb8148ac2bc7d9b
2020-09-03 19:09:43 +02:00
Dominik Riebeling
fa330c109d themeeditor: Make it compile with current Qt5.
- Replace use of obsolete members with their replacements.
- Fix type issue that requires explicitly creating the right object now.
- Update project file to work with Qt5.

Change-Id: I3af2b1520796e977e58c0a01e165c77c469a23b9
2020-09-03 18:45:48 +02:00
Dominik Riebeling
ff38666a19 themeeditor: Fix download URL for targetdb.
We're not using svn anymore since long.

Change-Id: I408b1c59dfaafe1e403b0fa49b912862b68c72f8
2020-09-03 18:45:48 +02:00
Dominik Riebeling
3ff7dc75a1 themeeditor: Fix menu Quit entry not working.
Change-Id: Ib527b4b4a7b450dee713dea93eaf93d85c0d4bfd
2020-09-03 18:45:48 +02:00
Dominik Riebeling
6f92c498c4 beastpatcher: don't hardcode lib paths.
Let the linker find libmtp / libusb. Also don't insist on linking them
statically -- current Debian doesn't have a static libmtp.
Set STATIC to force linking statically.

Change-Id: I3ce9cea832705c87f08054435eadf9f169afedb2
2020-08-05 23:48:43 +02:00
Dominik Riebeling
a9c7bc7c9a deploy: Simplify retrieving CPU count.
The multiprocessing module is part of Python since 2.6, so no need to do
an extra check here.

Change-Id: If1c223edf9f04b6de8fdf757ba00f79897783a53
2020-07-26 09:56:20 +02:00
Solomon Peachy
dcdf2713f6 Python3-related fixes in some of our scripts
Change-Id: I8acbe43e3f27e51159a7a78fcc361476d7406cbb
2020-07-09 14:39:27 +00:00
Lorenzo Miori
92a529b4d1 Samsung YP-R1: fix OF boot shortcut
ypr1 target should switch back to OF by pressing volume down,
since volume up is already mapped to the early/safe mode.

Change-Id: I18c4deed2c8982dbee18b081ecc59b970c654473
2020-07-07 17:52:17 +00:00
Lorenzo Miori
2dd6633d71 ypr0 - ypr1: dynamically move rockbox executable
This trivial patch wants to exploit /tmp filesystem to place
Rockbox executable. Why that? It will be then possible to
easily unlock & umount the storage partition, in order to provide
Rockbox itself a mean for RAW storage access. In turn, this will
allow a Rockbox-handled USB Mass Storage support, as well as other
goodies (storage info is one I can think of).

It takes way less than a second so it doesn't hurt boot time.
Moreover, YPR0/YPR1 targets have plenty (64MB) of RAM, so
the humble half meg executable won't hurt at all.

Change-Id: Ibc9d9a40712e924c8e19cfd7c62189b182f0401a
2020-07-07 17:51:41 +00:00
Lorenzo Miori
3016d74c5a Samsung YP-R0: remove deprecated kernel module
This patch removes the deprecated kernel module to manage
the fm-radio chip on the ypr0 target.
http://gerrit.rockbox.org/r/#/c/1594/ implements the interface to
the i2c bus by using the i2c-dev kernel driver, no need for
additional complexity.

Change-Id: I0d09e2e9d1714b3cb8a72b3d79a91602a627cc90
2020-07-07 16:51:05 +00:00
Dominik Riebeling
a686dbfaa4 sbtools: Avoid calling pkg-config on each compiler invocation.
Only expand pkg-config calls once by making the compiler flags simply
expanded variables. Makes things more predicable and slightly faster.

Change-Id: Ie2ed066f205a95ec8a7708cefeb29e9989815db6
2020-06-21 09:07:17 +02:00
Dominik Riebeling
9b4e6ef7b3 deploy: Support Python3.
Change-Id: Iff92a1f6a918f7da80f26f1a9ca02a6f6f082b7d
2020-06-13 20:11:53 +02:00
Dominik Riebeling
440791105a deploy: Fix various style issues.
Fix various pylint issues and some python3 compatibility.

Change-Id: I2c35ccc5ad2d0902c229f9de57912cf6d5a83ece
2020-06-13 20:11:48 +02:00
Dominik Riebeling
aefbc13e19 deploy: Add missing Windows system libraries to known list.
Building with mxe failed due to the toolchain (and Qt5) introducing
dependencies to system libraries we don't know about. Commit 3083abeb95
thus ignored the actual problem. Revert that and instead add the missing
system libraries to the list of known libraries.

Change-Id: I29ac296765e580b751d3d906d58ab563d05efde2
2020-06-13 20:11:43 +02:00
Solomon Peachy
2434b6ca25 misc: Remove all 'twiki' references in favor of up-to-date 'wiki' links.
(This migration happened over a decade ago!)

Change-Id: Ib396414a16f2d763e549af49e3f3b03047dab49c
2020-06-07 01:38:55 +00:00
Amaury Pouly
fba4df5d6d nwztools/scsitool: add command to write NVP
Change-Id: I4a7a9688af1abb14de82013703f3a02b4644d5ed
2020-05-27 23:39:06 +02:00
Amaury Pouly
c75dbaae25 nwztool/scsitool: add brute-forced kas
Change-Id: I692b06c7c456bfa4395aa2aa848fdc664bd203d4
2020-05-17 20:21:13 +02:00
Amaury Pouly
47104e9e51 nwztools/scsitool: add preliminary code to decode SCSI requests
This can be useful to quickly device usb traces

Change-Id: I843fbd5280f11686ea810b44ffb1414e844ebcf9
2020-05-17 20:21:13 +02:00
Amaury Pouly
e3532b1667 nwztools/scsitool: fix compile issue with some version of cryptopp
Change-Id: Ia20f0142a2b08bddd61a0056f49c8e4c9ed49caa
2020-05-17 20:21:12 +02:00