Commit graph

1217 commits

Author SHA1 Message Date
Aidan MacDonald
cbb57fe714 rbutil: allow checking bootloader installer capabilities
Instead of checking for certain hardcoded strings, fetch
the actual capability bitmask by instantiating an installer
and querying it.

Change-Id: I7883d9c1e90da37ee7c0189732ac626685adbfa1
2022-01-02 15:50:17 -05:00
Dominik Riebeling
bbd1056afb themeeditor: Fix dmg deploy steps.
- 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
2021-12-28 19:53:54 +01:00
Dominik Riebeling
3d983ad3a1 themeeditor: Create MacOS AppBundle / Win32 GUI application.
cmake needs to know about this, otherwise we'll only get an executable.

Change-Id: If40a2a5d021ca49df4afe6bb5bce538d2b466426
2021-12-28 18:34:08 +01:00
Dominik Riebeling
875fcc7daf themeeditor: Fix cmake Qt major version.
Use the correct variable.

Change-Id: I5c59664cb86b0e4d3731e7c9ad13a276a1720cbc
2021-12-28 18:16:28 +01:00
Dominik Riebeling
c055b5e933 rbutil: Add data tags to data driven unit tests.
Make tests implemented as data driven tests show a sensible test data
tag value, so test can get identified more easily.

Change-Id: Ifeb42ed11ce9a8efc6491b2c3b9fe31802a67d33
2021-12-28 17:57:04 +01:00
Dominik Riebeling
0c8f539182 rbutil: Auto-discover tests with cmake.
Change-Id: I2f6511ddc306ba1caecaa917667074cf51b61262
2021-12-28 17:57:04 +01:00
Dominik Riebeling
f37a917e9a cmake: Disable QtTest discovery when cross compiling.
Change-Id: I46e2ad16f592f3adc9f01347e9fcda451c0b3a26
2021-12-28 17:57:04 +01:00
Dominik Riebeling
c1ad915055 cmake: Add QtTest test discovery module.
Allow discivery of the QtTest based unit test.
Taken from https://github.com/ocroquette/cmake-qtest-discovery

Change-Id: I79a54568b2dbc216d35a463b6be36c197203c5b5
2021-12-28 17:57:04 +01:00
Dominik Riebeling
f53f1fbafa rbutil: Fix some more issues found by clazy.
Change-Id: I0a1a849ecea4b4666b08ccb050eb17918e90a258
2021-12-28 17:57:04 +01:00
Dominik Riebeling
b774699560 themeeditor: Remove qmake project files.
It is now part of building with cmake.

Change-Id: I6e6317f3070311c7921f93a3ec44eefdd4f55baf
2021-12-28 10:37:50 +01:00
Dominik Riebeling
3e2a7a56c0 rbutil: Remove qmake project files.
To build it configure with cmake from utils/ folder.

Change-Id: I43fab2df1768e1a055e46ec5712e3a45fefef5a9
2021-12-28 10:35:39 +01:00
Dominik Riebeling
1ddc5a202d themeeditor: Convert to cmake.
Change-Id: Ib46842c157121c64cd0091118aa9b7e43d83b8b3
2021-12-27 16:18:17 +01:00
Dominik Riebeling
36cb0d4050 themeeditor: Add svg application icon and desktop file.
Change-Id: I3213e60679330b5312bddd37669da2b18e7f9627
2021-12-27 16:17:30 +01:00
Dominik Riebeling
2ecbc18535 rbutil: cmake: Make linuxdeploy download a global target.
That way we won't get duplicated targets when the deploy function is
used for multiple targets.

Change-Id: Ie14fdd74fcc496647c3c041ae2fcf902a3cb15fa
2021-12-27 16:14:46 +01:00
Dominik Riebeling
67942629cf rbutil: Explicitly enable AppImage qt deploy plugin.
Change-Id: Id2cb21882b06f60541ecfe22b101d13c4f631131
2021-12-27 12:29:52 +01:00
Dominik Riebeling
88a50ab104 rbutil: Change MacOS dmgbuild to use plistlib.
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
2021-12-26 21:59:19 +01:00
Dominik Riebeling
5999b4f791 rbutil: Fix cmake deploy function paths.
Update scripts paths with the split-up setup.

Change-Id: I62cd66b7440faa27daead92d04f3cdae67748d60
2021-12-26 21:31:49 +01:00
Dominik Riebeling
241d478ce9 rbutil: Replace QRegExp with QRegularExpression.
More updating for Qt6 compatibility.

Change-Id: I2f5bb943acc1f6bdd7bdab0e90e3c0ede596f43a
2021-12-26 20:13:05 +01:00
Dominik Riebeling
1ad4faa334 rbutil: Modernize connect() calls.
Auto fixed by clazy.

Change-Id: Iea16d892fd81c151f0081f7476acc5eda62afc25
2021-12-26 19:50:19 +01:00
Dominik Riebeling
9f3d6e47e7 rbutil: Remove generated header from giversion interface target.
cmake on Windows doesn't like this, and it's not necessary.

Change-Id: I65b9eb989e51df388cabcb36a246068dba80630c
2021-12-26 11:14:22 +01:00
Dominik Riebeling
80c0268c7a rbutil: Make test compile with Qt6.
Change-Id: I2e6520588c7a82482b2c605d0b295f8fc7e0a03b
2021-12-26 11:06:57 +01:00
Dominik Riebeling
35bc4590ae rbutil: Remove ProgressLogger interface class.
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
2021-12-26 11:05:25 +01:00
Dominik Riebeling
01e245417e rbutil: Fix various issues found by clazy.
Change-Id: I91ca2baed34f0f3b561602f95f66bbd4e17e74ab
2021-12-25 19:59:57 +01:00
Dominik Riebeling
0768705545 rbutil: Fix invalid access on error in test.
Change-Id: Ie9c65041bb4a1ba4215a2d0786bf984cfa6d023b
2021-12-25 17:47:14 +01:00
Dominik Riebeling
c753d31549 rbutil: Remove unused variable from test.
Change-Id: Iea57ffa319f50df8836c0c7c608ff37a394eb68d
2021-12-25 17:47:14 +01:00
Dominik Riebeling
6ff75b475c rbutil: Modernize connect() calls.
Auto fixed by clazy.

Change-Id: Ib7cce8c0a85f8f915263980bf5d2508a4b19bbe3
2021-12-25 17:47:14 +01:00
Dominik Riebeling
dce2ccdd96 rbutil: Remove unused mspack source to fix warning.
We don't need this file, and the implementations are stubs, causing a
compile warning. Remove it from the build.

Change-Id: I4ee2594c8fbc3ecf4661cc4144f8d9072bd6d983
2021-12-25 17:47:14 +01:00
Dominik Riebeling
afe0e18113 mkamsboot: Fix a warning.
Change-Id: Ie16176226bf23a19e51abd6e9ae94244701872db
2021-12-25 17:47:14 +01:00
Dominik Riebeling
eb8dc75d38 rbutil: Create git version information at build time.
Change-Id: Iaf701f4d64d6852423f6a28a753b27abc43477e2
2021-12-25 17:47:14 +01:00
Dominik Riebeling
e9ef7f0dd3 rbutil: Split out rbutilqt parts into separate cmake list.
Change-Id: I84ada20765b98620e1f06bc7116bbdaaae296fe9
2021-12-25 17:47:14 +01:00
Dominik Riebeling
c979717b80 rbutil: Fix logger segfault on application exit.
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
2021-12-25 17:47:14 +01:00
Dominik Riebeling
774b35cccf rbutil: Deploy support in cmake.
Add a "deploy" target that will create a distributable file.

- Linux: AppImage.
- Windows: zip file.
- MacOS: dmg.

Change-Id: Id8ae9c021bc5bbb1abf066205b57d943c3f3b327
2021-12-25 17:47:14 +01:00
Dominik Riebeling
4eb3f05042 rbutil: Increase test timeout value for HttpGet tests.
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
2021-12-25 17:47:14 +01:00
Dominik Riebeling
f2798c225a rbutil: Simplify reading rockbox-info.txt.
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
2021-12-25 17:47:14 +01:00
Dominik Riebeling
dc677208d0 rbutil: Fix unit tests on Windows.
Change-Id: I124882eb26b01e1acfadfba55bc718ab330ab52a
2021-12-25 17:47:14 +01:00
Dominik Riebeling
3d6d186d2e rbutil: Initial cmake support.
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
2021-12-25 17:47:14 +01:00
Dominik Riebeling
f3a54a7c22 rbutil: Put translation qrc next to translations.
That way we don't need to put paths in the file, and will help with
cmake support later.

Change-Id: I0835674e0ea2e5ec5a1596798e26cfbfde29468d
2021-12-24 18:05:53 +01:00
Dominik Riebeling
2fdc056fee rbutil: Use https URLs in Changelog links.
Change-Id: I9a40163c9025550185104dc00356932bda16f782
2021-12-24 18:05:53 +01:00
Dominik Riebeling
9e28474e47 rbutil: Replace QRegExp with QRegularExpression.
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
2021-12-24 18:05:53 +01:00
Dominik Riebeling
72071d108c rbutil: Remove unnecessary include from logger.
Change-Id: I860331880a45912ad73f02f049f869dd155eeb2d
2021-12-24 18:05:53 +01:00
Dominik Riebeling
c876d3bbef rbutil: Merge rbutil with utils folder.
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
2021-12-24 18:05:53 +01:00
Aidan MacDonald
7a5130a277 x1000: fix broken OST2 timer prescaler
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
2021-10-16 16:58:19 -04:00
Solomon Peachy
04fe77a465 Remove the (very) incomplete port for the Tatung TPJ-1102
It was barely even a stub, and hasn't seen any development since 2009

Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
2021-08-14 16:29:39 -04:00
Aidan MacDonald
65aa9ce570 x1000: more CPM register definitions
Change-Id: Ie6fa343a65a6bd19e578664b10bac771289ed0b3
2021-07-08 16:01:38 +00:00
James Buren
3831051c47 mknkboot: optimize verifyfirm
The checksum only needs to be calculated once. A small oversight on
my initial implementation.

Change-Id: Ie23faf36f5add7ed7f146769b604dbd8204c2605
2021-06-17 15:30:51 +00:00
Aidan MacDonald
89f4064743 x1000: Extend CPM registers for dual boot
Change-Id: I283834a653506fd95ff8b56897e5f3afaf375cf5
2021-06-14 20:45:14 +01:00
James Buren
a90ef8195b mknkboot/beastpatcher: implement basic firmware validation
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
2021-06-12 06:32:08 +00:00
James Buren
fe9bcd0468 beastpatcher: fix some minor issues
This mainly fixes some compiler warnings and makes it
work with mingw64.

Change-Id: Iabd13b5bed3427869ae78ceeb7e2255e68a6f7bd
2021-06-11 19:32:55 +00:00
James Buren
ab0f23c4b1 sendfirm: fix some minor issues
This patches some compile warnings and also makes it work correctly
with modern mingw64.

Change-Id: I8cd292bc989ae04bbaa1d7149d58d6d833a51c0a
2021-06-11 19:32:35 +00:00
Aidan MacDonald
2066465b78 FiiO M3K: minor fixes
- 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
2021-06-01 00:26:20 +01:00