Replace QLabel with QSvgWidget so the widget draws the svg directly
instead of first creating a pixmap from it.
This also avoids an issue when building with mxe which causes the image
to not show due to a missing svg plugin (which doesn't happen for svg
icons.)
Change-Id: Ic4e265f0567984d1ffe7a3e1cc641df27755e90b
The old deployment script doesn't work anymore due to the change to
cmake, and since we build the distribution packages (zip / dmg /
AppImage) with cmake directly there's not much need left for the old
deployment.
Change-Id: Ide20887c5bc2e22aabbfb47374d70529609fbc3c
Instead of checking for certain hardcoded strings, fetch
the actual capability bitmask by instantiating an installer
and querying it.
Change-Id: I7883d9c1e90da37ee7c0189732ac626685adbfa1
- Fix binary name in Info.plist.
- Run dmgbuild as Python module, in some cases it isn't available directly.
- Add missing dmgbuild configuration for themeeditor.
Change-Id: I2db50959b88283f43e2203cf71b130cdb33103dd
Make tests implemented as data driven tests show a sensible test data
tag value, so test can get identified more easily.
Change-Id: Ifeb42ed11ce9a8efc6491b2c3b9fe31802a67d33
We're not dealing with binary plist files, to biplist is not the one we
want. Also, plistlib is part of Python.
Change-Id: I529516da0d6b04809a7c0d38b20c6f40900560f8
Since we're using signals to connect to the Logger we don't need an
interface class, and the only thing still used was the log level enum.
Put those values in a dedicated header instead.
Change-Id: Ic3aee14ba13b81e283b477d11b1c15a5c26ffeab
We don't need this file, and the implementations are stubs, causing a
compile warning. Remove it from the build.
Change-Id: I4ee2594c8fbc3ecf4661cc4144f8d9072bd6d983
Getting the values from a QMultiMap() returns a list, but not the same
on consecutive calls. Thus calling it twice to get the iterators will
yield different lists, causing the iterator to fail.
Fixes a segfault when destructing the logger.
Change-Id: Ie8ea8d3a9acf6fbd3969fbb49cbc50a1c1fa2854
Add a "deploy" target that will create a distributable file.
- Linux: AppImage.
- Windows: zip file.
- MacOS: dmg.
Change-Id: Id8ae9c021bc5bbb1abf066205b57d943c3f3b327
The test timeout is used to abort the tests if something goes wrong and
should not occur during normal test run. On some systems the current
value is too small, causing a timeout and thus test failure before
HttpGet responds. Increasing the timeout fixes this.
Change-Id: Ib61dd97d9f866c03cca9d2f0d7cb151f7076410d
Simplify, and replace use of QRegExp with QRegularExpression for Qt6
compatibility.
Also fix the test running on Windows. RockboxInfo constructs the
filename from path and filename, so we cannot pass an empty path, since
that results in an invalid path. On Linux / MacOS this works only
because we use an absolute path.
Change-Id: Ieaf30a2df005291d3e997aabf42d64ee832381c2
Rewrite in cmake, and include all necessary libs. This removes calling
separate Makefiles which is rather error-prone on non-Linux systems.
Change-Id: Ic2af4a3810e4b000e3ad33304229e2349a930e16
The former is not part of Qt6 anymore, while the latter has been
introduced with Qt5. We don't support Qt4 anymore, so move to
QRegularExpression.
Change-Id: Icc15ef422790f3740660c5581294aa0536f46b1f
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
It turns out the prescaler fields in OST_CTRL are 2 bits wide,
not 3. The programming manual (as usual) is ambiguous and its
diagram shows 2-bit wide fields, but the bit positions in the
text give a 3-bit wide field. Ingenic's Linux code and my own
testing shows that they are, in fact, 2 bits wide.
This caused the OST2 divisor to be 16 instead of 4; the OST1
divisor was correct. This means that all udelay/mdelay calls
took 4x longer than they should've. After this change the OST2
prescaler will be 4, as intended, and udelay/mdelay calls will
wait for the intended duration.
Change-Id: I2ac0a9190f49b59a840c649bf586131f5f9fde82
This imports the MD5 code used by other utilities and creates
a function for checking the provided NK.bin against known original
firmware checksums. Integration into mknkboot and beastpatcher is
also added.
For the sake of consistency with beastpatcher, mknkboot had its
printf statements rewrote to print to stderr like beastpatcher
does.
Change-Id: I0e52271d8d627a5b02302ab5cd1da2815b7cec1e
- Drop obsolete NAND patch script (it's simpler to use 'dd' directly)
- Remove an outdated comment
- Fix missing 'void' in a function definition
- Reset the poweroff timer when we poke the backlight
Change-Id: I752624386f30ac95f41a731d2b6be837e12275a9
I think this covers everything now, although some fields are missing
enum values. Those can be added in if and when they are needed.
Change-Id: Ib1a94ba9c9a5949b6a038f8c1a49786823fae58f
This only required a minor patch to the usb-designware driver due
to DMA requiring physical addresses -- on the X1000, these differ
from virtual addresses so we have to do the usual conversion.
Both the mass storage and HID drivers work, but there are a few
issues so this can't be considered 100% stable yet.
- Mass storage might not be detected properly on insertion,
and USB has to be replugged before it shows up
- HID driver may occasionally panic or hang the machine
Change-Id: Ia3ce7591d5928ec7cbca7953abfef01bdbd873ef
This uses the new unicode string literal feature that is available
now to greatly simplify the initialization of these special string
types. This makes them much more readable at a quick glance.
Change-Id: Iad8b49aa763486608e3bb7e83fb8abfb48ce0a7b
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
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
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
- 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
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
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
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
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
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
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
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
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
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
* 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
- 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
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
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