Commit graph

36121 commits

Author SHA1 Message Date
Aidan MacDonald
ee68d9df8e x1000: bootloader: display uimage load error code
Change-Id: I08361aa85406303c10bb487636a6a61a93d2b127
2022-03-24 23:40:07 +00:00
Aidan MacDonald
fbe9e4ac10 x1000: bootloader: refactor splash/splash2
Allow the use of printf formatting and multiple lines of text
using newlines in the string.

Change-Id: I65919bf29c16c34c38cf3995e02d2ddbbaa4bdf3
2022-03-24 23:40:07 +00:00
Aidan MacDonald
41a8b874d2 linuxboot: add meaningful error codes
Change-Id: Ied964e99c389902bb1786c414c5d0fa20056040d
2022-03-24 23:40:07 +00:00
Aidan MacDonald
f7a341555d fiiom3k: trim OF kernel arguments to fix boot hangs
The M3K's kernel has an incredibly stupid function that mangles the
kernel args and copies them to a 100-byte buffer without any kind of
bounds checking. So, if the kernel arguments are more than 99 chars
the stack may be corrupted, sometimes crashing the kernel.

Fortunately, most of the arguments the OF uses are useless, and the
truly necessary arguments fit within the absurd 99-char limit.

Change-Id: I01ef4513298f79d3c08538239802c21e88509631
2022-03-24 23:40:07 +00:00
Aidan MacDonald
6a6c6083fa x1000: bootloader: fix Linux self-extracting kernel boot
Basically, there's longstanding bug in Linux with self-extracting
kernels on MIPS which just happened to manifest now on the M3K as
a hang on boot. The fix is applied to the M3K and Q1 since they
both use this type of kernel image.

Change-Id: I17d2bad6eebd677cd6d2e0bf146450c71fcf1229
2022-03-24 23:40:07 +00:00
Aidan MacDonald
44fbb1a593 x1000: bootloader: add LCD dualboot cleanup for the M3K
Disable LCD interrupts before booting the OF - the OF kernel
hangs at boot if they are enabled.

Change-Id: I4f119818d0243953cdd620e17d9509b4fb16cc28
2022-03-24 23:40:07 +00:00
Aidan MacDonald
90cb0b0ae5 x1000: bootloader: add mainline Linux boot option
This adds a *very basic* Linux loader to the Rockbox bootloader,
which allows running a mainline Linux kernel using the following
file layout on the SD card:

- /uImage
- /linux_cmdline.txt

The command line arguments are listed in linux_cmdline.txt, all
lines are concatenated together and whitespace is converted into
spaces. Comments aren't supported however.

The loader doesn't support the modern devicetree boot protocol,
so it can only pass command line arguments. It would be easy to
support an appended dtb though.

Change-Id: I373f465dbbdafe94738f619748cbb0278fc2c25f
2022-03-24 23:40:07 +00:00
Aidan MacDonald
53a92f0ecc x1000: bootloader: add original firmware boot capability
Adds the ability to boot the OF's player or recovery kernels
from the bootloader. Works on Shanling Q1 but broken on the
FiiO M3K (kernel hang) so leave it disabled for the M3K.

Change-Id: I26b973fba1c22afb906a78865963a96dd2107932
2022-03-24 23:40:07 +00:00
Aidan MacDonald
9bde653410 firmware: allow screendump in bootloader
Enabled if target defines HAVE_BOOTLOADER_SCREENDUMP

Change-Id: Idc135ef81e55d0f3eb8e7d2763d455c6455cf8fd
2022-03-24 18:59:50 -04:00
Aidan MacDonald
e956f7dc83 firmware: minor screendump related cleanups
- Remove unused redefinitions of screen_dump() from bootloaders
- Use empty do-while when screendump is compiled out

Change-Id: I3ccdb0390ddaa28d8f561ff744d0db6aaef17f5d
2022-03-24 18:59:50 -04:00
Dominik Riebeling
238cd13469 rbutil: Fix build info list handling with Qt6.
With Qt6 we need to check the type differently or we'd convert a
stringlist to a string.

Change-Id: I00a7a73535503b97f40edb51099a332902e881e0
2022-03-23 20:11:31 +01:00
Dominik Riebeling
f3b19de594 rbutil: Disable TTS test on Qt6.
Qt6 has QMultimedia, but QSound has been removed. It's only use for
playing a TTS test sample. Disable that for now.

Change-Id: Id3b5c834f9579a43e390c0c00a4c1a35b59182bd
2022-03-23 19:34:30 +01:00
Dominik Riebeling
00ec195c26 rbutil: Qt6 fixes.
Change-Id: Ied6bdf1c5269b53ccfedc1d80f3f3f0d6b4011da
2022-03-23 19:34:30 +01:00
Dominik Riebeling
948637c42c rbutil: Fix TalkGenerator string correction.
- Fix regexp case insensitive option being inverted.
- Pass more objects by reference.
- Some const-ness.

Change-Id: I1c77ad22ab1e505c8dce8c083d9c52e76a6860be
2022-03-23 19:34:30 +01:00
Dominik Riebeling
215ba4abf7 rbutil: Remove unnecessary Q_OBJECT.
PlayerBuildInfo uses no signals/slots, so we don't need Q_OBJECT.

Change-Id: If4e264b733d912ecda3659ea0e1abb9d2b56950e
2022-03-23 19:34:30 +01:00
Dominik Riebeling
1aea2d5b7e rbutil: Test for talkgenerator string correction.
Change-Id: I4c21dbbdae492938061883f1694f9c0f7b6b0fd9
2022-03-23 19:34:30 +01:00
William Wilgus
822b16b1c6 debug_menu dbg_buffering_thread show more on tiny screens
I think the clipzip has the smallest screen at 96
might need to be enabled for LCD_WIDTH <=128 too

remove scrolling thread info for larger screens

Change-Id: Ic98c9fc0b53f79e90776c13429194f9c37c1d48b
2022-03-22 17:55:23 -04:00
William Wilgus
7910f4a7aa debug_menu cleanup/optimize some common format strings
Change-Id: I84b070f8ea264ea64bddd82f9849ec20c72a4863
2022-03-22 16:16:11 -04:00
William Wilgus
61bc7b91bc tagcache.c remove 16-bit compression for add_uniqbuf
apparently there are tags such as year or genre that are indexed 1 byte
apart, as much as I like the idea of this I cannot come up with a way
to reliably denote 2 16 bit entries from a single 32 bit entry without
losing data or adding bookkeeping which would likely make it pointless

Change-Id: I8a9908575700cab9506c36f5422222145557fa6b
2022-03-22 00:22:42 -04:00
William Wilgus
cfeeb7889d Lcd save function pointer to frame buffer get_address_fn before loops
Calling multiple levels of indirection in a loop slows things down

Really these need to be rewritten to take a start and end address
like most of the rest of the codebase

But this is safer without having test hardware in hand

Change-Id: Idae7b92ee779d020ed7fcc9334e2d5a9c710e64d
2022-03-21 23:53:48 -04:00
William Wilgus
60e5786b48 lcd-bitmap-common optimize a few viewport functions
Change-Id: I71cd61f66e875280d07f17a9e828fbecc305bad2
2022-03-21 10:00:04 -04:00
William Wilgus
64c577a0c5 filetree.c cleanup
just a little cleanup of ft file filtering code

store result of filter mask to a local var

put skin apply code in its own function

Change-Id: Ib899608f64e36346b9bde07caa5d5ac29de05af9
2022-03-21 08:14:30 -04:00
Dominik Riebeling
c7c9a0f069 rbutil: Minor code cleanup.
Change-Id: Ia1b05747e64b2122cfe17ee0c2f7bf5477f3ba09
2022-03-20 20:14:21 +01:00
Dominik Riebeling
04e22d8719 rbutil: Replace use of QRegExp with QRegularExpression.
Change-Id: Ie89057a9857bc66612cb15fef81d3ca6c3e71b4c
2022-03-20 20:12:20 +01:00
William Wilgus
01d2979bce [COV] metadata module, fix uninit warnings #2
decrease size hit of initializing asf by using a union
remove init from bytes LE conversion in metadata common
-- bad idea for performance

Change-Id: I4514adc125e5da2b99d9f913ba74afd5f1345822
2022-03-20 09:56:44 -04:00
William Wilgus
2a88ec50cd [COV] metadata module, fix uninit warnings
Change-Id: Ifeb22642d7fb683542ff9dcfca0bc58c91ab5f38
2022-03-20 09:10:57 -04:00
Dominik Riebeling
ccdd9e6784 rbutil: Fix TTS "waiting for engine" appearing randomly.
QProgressDialog shows / hides itself automatically based on the progress
value set, so calling hide() directly doesn't prevent the dialog from
showing itself.

Change the logic to set a value instead. Fixes the progress dialog
sometimes appearing in situations where it wasn't used at all.

Change-Id: Ifef063f31b7f888bb74f180dea0679e81cc5c8fe
2022-03-20 10:00:25 +01:00
Dominik Riebeling
c21d10cb33 rbutil: Rework Festival TTS integration.
When communicating with Festival via socket don't assume readAll() would
read all data we expect. We can only read the data that has been sent by
the server so far, and this is not necessarily complete.

This notably improves the configuration dialog response and reliably.

Change-Id: I9a812f03df785fb3ad32783a8573a2c86dc317ed
2022-03-20 09:59:17 +01:00
Dominik Riebeling
e21f80f397 rbutil: Remove use of deprecated QSignalMapper.
With Qt5 we can now use lambdas instead.

Change-Id: I00fe9c355d72ef9987c61c7a36a810d6eca311bc
2022-03-19 22:04:09 +01:00
Dominik Riebeling
fcffe5fb81 rbutil: Change all download links to https.
Change-Id: I682c8e7cf4eb5d525aa64a4bbf864aa9eb7e73dc
2022-03-19 16:58:19 +01:00
Dominik Riebeling
7a2fdf3fd6 rbutil: Handle SSL certificate errors on first request.
Qt uses the systems certificate store. On old(er) systems the root
certificate might not be present, so checking the certificate from the
rockbox.org server might fail.

On startup we try to download the build-info file. If this fails with a
certificate error allow the user to temporarily accept the rockbox.org
certificate for all successive requests.

Change-Id: I459e12d53286aaedea4db659d90a5e057c56801f
2022-03-19 16:57:41 +01:00
Dominik Riebeling
a0459de4d5 rbutil: HttpGet: Return NetworkError in done signal.
Return the status value instead of simply a bool.

Change-Id: I2bffaac0087418656e80c74dc352011a4ea32ab1
2022-03-19 09:19:11 +01:00
William Wilgus
08b42791ff tag_cache.c optimize str_begins_ends_oneof
the function is shared

Change-Id: I362a75ea5a39690647df4f421d9429ef2114ef02
2022-03-19 03:30:54 -04:00
William Wilgus
ddbca125a6 tagtree/tagcache add new clause operators begins/ends _oneof
new operators @^, @$
begins_oneof and ends_oneof

albumartist @^ "L|The L"
Led Zeppelin, The look

albumartist @$ "girls|Boys"
spice girls, beasty boys

Change-Id: I26ce3d8155d970a55e003f74e2f9478db76204f1
2022-03-19 02:24:14 -04:00
William Wilgus
0f2d623216 tagcache add logging option for clause matching #2
Change-Id: Ideaa89a6fb227ecc8a4a107dced98f85b6b40a4f
2022-03-19 02:11:57 -04:00
William Wilgus
a56975af6c tagcache add logging option for clause mtching
Change-Id: I5099287398b448d2f44283419395ab8919d6019c
2022-03-19 01:59:07 -04:00
William Wilgus
b65763bc10 [COV] fix uninitialized warning
Change-Id: Ib526aeac51d626d02b073b26efd3020115641caa
2022-03-18 20:19:18 -04:00
William Wilgus
a5e684c894 BUGFIX root_menu.c
Change-Id: Ie6268c63f5ed5197d2da678851b4bfdf7764252c
2022-03-18 19:45:01 -04:00
William Wilgus
b31444261e [COV] cuesheet.c var line could be uninitialized
Change-Id: Id753ecc28f4029e05032be0c0ac6ecd27e9e370f
2022-03-18 18:57:55 -04:00
William Wilgus
99f8457279 cuesheet, fix dumb typo
Change-Id: I17aefb0b507898819f9f6d369d986205c6a59c9d
2022-03-18 17:34:11 -04:00
William Wilgus
a13ae2afd5 [COV] folder_select buffer overrun
Change-Id: I441e1fa13d3832b3b12e3f46f35ef63fb3c1de02
2022-03-18 08:59:32 -04:00
Aidan MacDonald
b309fae2bc touchscreen: fix quickscreen
Looks like I made a mistake testing this originally because there's
no way this would've worked.

Change-Id: I89dc0d831e381eb957cf6e1a801236b5cd829efa
2022-03-16 19:57:28 -04:00
Aidan MacDonald
67f7d399e5 x1000: restore crt0.S cache flush
I-cache must be flushed after copying code to IRAM... duh.

Change-Id: I6eacc4b7c4385175724c947f6c53f7bbddcb6295
2022-03-16 23:21:29 +00:00
Aidan MacDonald
c676736792 x1000: optimize crt0.S, improve correctness
Replace inline section copy/fill loops with subroutines, which
reduces code size a bit and and handle zero size copies properly.

Remove the cache initialization loop as well. There's no actual
reason for this because the SPL initializes the caches and just
dropping the cache can even be harmful (in this case it wasn't,
because the SPL flushes the whole cache right before calling in).

Change-Id: I7cddc9ed6d060b1f1bdd75544297883d014cad2d
2022-03-16 12:02:24 -04:00
Wolfram Sang
0df71c952c rds: make newly added function static
It won't be called outside the RDS core.

Change-Id: I22f9d7984213f32ad1db49368327243ba2aa917b
2022-03-16 11:54:26 -04:00
William Wilgus
b3e0d18f7d skin_engine.c settings_apply_skins cleanup
just some cleanup and removal of ifdefs in favor of dummy functions

Change-Id: I03a1d351344afcc428dedb67aab915184f99bd23
2022-03-15 20:17:11 -04:00
William Wilgus
a5c16d2990 rb_namespace add logf
add logging to the namespace file to allow debug of root redirect

Change-Id: I6032aea880998c05dacf3d0d2e0d222205b9376e
2022-03-15 00:45:00 -04:00
William Wilgus
20b9ce5497 debug_menu make scrolling manual for OS Threads item
the automatic scrolling is not very nice to try and read instead use
OK button to advance and long press std ok to reset to beginning
(or scroll up and down)

Change-Id: I964ccefcd3c16836cc92f52247d7b8e65c6d627b
2022-03-14 20:53:45 -04:00
William Wilgus
542609bb31 metadata.c fix red
comma, helpful

Change-Id: Iaa352cf1b542f1b805278af8560a6927684dc8d2
2022-03-14 17:38:55 -04:00
William Wilgus
9b4e784560 BUGFIX string_option parsers
fix bugs introduced in the switch over to using string_option
instead of if else strcmp trees,
embedded album art should work again
skin parser had an error for 'noborder' and 'nobar'

Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca
2022-03-14 17:23:18 -04:00