summaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2020-10-21rbutil: Fix native Windows build for tools.Dominik Riebeling1-2/+11
- 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-18nwzstools: add NW-A820 nvp nodesAmaury Pouly1-0/+68
Change-Id: Iab79eb0c9b0bbf8fb7622f5630f385d56878507a
2020-10-18rbutil: Pass isysroot to rbutil libs on macOS.Dominik Riebeling1-0/+4
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-18sbtools: Change crypto wrapper implementation to C.Dominik Riebeling2-3/+0
There's nothing C++ left. Change-Id: I98d8406215287c02b56029ed7c0e2b0e645bbcf1
2020-10-18sbtools: convert crypto to libtomcrypt.Dominik Riebeling3-44/+27
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-18imxtools: Replace use of "byte" with its underlying uint8_t.Dominik Riebeling7-69/+68
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-18utils: Add Makefile for our copy of libtomcrypt.Dominik Riebeling1-0/+41
Change-Id: I6b9ffe86b9e78b494a3a9211d6e79bb81c9fb6d4
2020-10-18utils: Add (partial) libtomcrypt.Dominik Riebeling28-0/+8416
Add the parts of libtomcrypt that we're about to use. Change-Id: I0adc1d7d1f4833e7bb3ed53b9a4d9a85977cfb8b
2020-10-15nwztools/scsitool: fix incorrect declaration in header fileAmaury Pouly1-1/+1
Change-Id: I10727311db4747a66b3ae7f72a92a64cc99dfc82
2020-10-11nwztools: fix wrongly generate MD5 filesAmaury Pouly1-0/+1
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-11nwztools: re-implement MD5 on WindowsAmaury Pouly2-2/+27
I forgot to fixup the windows up and missed it because of conditional compilation Change-Id: I526c765b9d56508815941ecb9b9dbac7ea407cf0
2020-10-11nwztool: fix computationAmaury Pouly1-1/+1
It turns out the calculation gives the right result for the wrong reason, this fixes it. Change-Id: I36053c8993b5ae1e85380da59546ffade265fb3f
2020-10-11nwztools/upgtool: add support for MD5Amaury Pouly3-4/+159
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-11nwztool/upgtools: add NW-A55 and DMP-Z1 KAS, reorganize listAmaury Pouly1-7/+8
Change-Id: I24bc6b15c954540cfa9b4f176ecbf817b1b641e7
2020-10-11nwztool/upgtool: add support for compressionAmaury Pouly4-31/+134
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-11nwztools/upgtools: add support for windowsAmaury Pouly9-91/+240
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-11scsitools: typoAmaury Pouly1-1/+1
Change-Id: I0f4e5b6c5e88a1ae49102e6f6fc6f8c86cb63959
2020-10-11nwztools: add support for new UPG format on post-WM1/A30 devicesAmaury Pouly10-258/+446
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-11scsitools: const correctness and add "get_dnk_nvp all" subcommand.Amaury Pouly2-19/+49
Change-Id: Ic5cb3dfa3be684f31a2c55a3cb7d45cfe8c65b25
2020-10-11nwztools: fix MW-WM1/A30 KAS, fix KAS lengthAmaury Pouly5-4/+98
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-09-17jz4760: Heavily rework USB driver to add working DMA supportSolomon Peachy1-0/+5
* 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-04themeeditor: Get revision info from git.Dominik Riebeling1-6/+6
We're not using svn anymore. This isn't used, but at least try to get the right value. Change-Id: I66e726d28b504a0f15d5b6497a02963243ba466a
2020-09-03themeeditor: Update targetdb.Dominik Riebeling1-94/+400
Change-Id: Iec78635b46e08a508a20048a14687f3be830ad63
2020-09-03themeeditor: Make NSIS script work with mxe.Dominik Riebeling1-1/+1
Change-Id: I592a28f64f88c4ec0d1c4f45aeb8148ac2bc7d9b
2020-09-03themeeditor: Make it compile with current Qt5.Dominik Riebeling10-35/+35
- 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-03themeeditor: Fix download URL for targetdb.Dominik Riebeling1-2/+3
We're not using svn anymore since long. Change-Id: I408b1c59dfaafe1e403b0fa49b912862b68c72f8
2020-09-03themeeditor: Fix menu Quit entry not working.Dominik Riebeling1-1/+1
Change-Id: Ib527b4b4a7b450dee713dea93eaf93d85c0d4bfd
2020-08-05beastpatcher: don't hardcode lib paths.Dominik Riebeling1-1/+4
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-07-26deploy: Simplify retrieving CPU count.Dominik Riebeling1-10/+5
The multiprocessing module is part of Python since 2.6, so no need to do an extra check here. Change-Id: If1c223edf9f04b6de8fdf757ba00f79897783a53
2020-07-09Python3-related fixes in some of our scriptsSolomon Peachy2-13/+13
Change-Id: I8acbe43e3f27e51159a7a78fcc361476d7406cbb
2020-07-07Samsung YP-R1: fix OF boot shortcutLorenzo Miori1-1/+1
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-07ypr0 - ypr1: dynamically move rockbox executableLorenzo Miori1-0/+7
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-07Samsung YP-R0: remove deprecated kernel moduleLorenzo Miori3-7/+0
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-06-21sbtools: Avoid calling pkg-config on each compiler invocation.Dominik Riebeling1-7/+9
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-13deploy: Support Python3.Dominik Riebeling3-23/+29
Change-Id: Iff92a1f6a918f7da80f26f1a9ca02a6f6f082b7d
2020-06-13deploy: Fix various style issues.Dominik Riebeling5-130/+139
Fix various pylint issues and some python3 compatibility. Change-Id: I2c35ccc5ad2d0902c229f9de57912cf6d5a83ece
2020-06-13deploy: Add missing Windows system libraries to known list.Dominik Riebeling1-3/+18
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-07misc: Remove all 'twiki' references in favor of up-to-date 'wiki' links.Solomon Peachy2-32/+10
(This migration happened over a decade ago!) Change-Id: Ib396414a16f2d763e549af49e3f3b03047dab49c
2020-05-27nwztools/scsitool: add command to write NVPAmaury Pouly1-12/+190
Change-Id: I4a7a9688af1abb14de82013703f3a02b4644d5ed
2020-05-17nwztool/scsitool: add brute-forced kasAmaury Pouly1-0/+1
Change-Id: I692b06c7c456bfa4395aa2aa848fdc664bd203d4
2020-05-17nwztools/scsitool: add preliminary code to decode SCSI requestsAmaury Pouly1-2/+138
This can be useful to quickly device usb traces Change-Id: I843fbd5280f11686ea810b44ffb1414e844ebcf9
2020-05-17nwztools/scsitool: fix compile issue with some version of cryptoppAmaury Pouly1-1/+1
Change-Id: Ia20f0142a2b08bddd61a0056f49c8e4c9ed49caa
2020-05-17nwztools/scsitool: add more NVP propertiesAmaury Pouly1-1/+4
At least newer devices support more NVP properties in a device-independent numbering. Many are supported but I just added two useful ones Change-Id: I57926de7f0dd364b46a57ca8d48a5c4d4f20402b
2020-05-17nwztools/scsitool: add alternative firmware upgrade commandAmaury Pouly1-3/+11
Newer devices seem to require flags 0x00 where older devices wanted 0x80, now try both variants Change-Id: Ifeee641052857c66c1b64860d7309a235021a168
2020-05-17nwztools/scsitool: tweak outputAmaury Pouly1-1/+2
Change-Id: I43c5101502f3d2c34296b510b738276fd74f9b3d
2020-03-29FS13192: rbutil: Fix linking error on Fedora 32 betaSolomon Peachy1-2/+2
Change-Id: I350553db037ad9f65aced3f974afeaeee3fe822a
2020-01-29scsi: add support for listing devices on WindowsAmaury Pouly2-2/+58
Change-Id: I963028c6017796152a201791c078f672bf84a40a
2020-01-29sonynwz/scsitools: fix string buffer sizeAmaury Pouly1-1/+1
Change-Id: I8997e7c3791b805a70a30cd1209a69b7afbec1e7
2020-01-29sonynwz/scsitools: add NWZ-S610 seriesAmaury Pouly1-0/+35
Change-Id: I8977e1bcc805df463f7b08f11be889368db4eab2
2020-01-12nwztool/scsitool: rewrite device detection on linux to make it simplerAmaury Pouly1-103/+27
Change-Id: I8f393a53ea64c82f05e437923bcba05aa8a7a75c