Commit graph

36099 commits

Author SHA1 Message Date
Aidan MacDonald
7243f6b343 x1000: Add multiboot support
Enables multiboot for the FiiO M3K, Shanling Q1, and Eros Q native port.
Note this requires an up-to-date Rockbox _and_ bootloader.

Usage instructions will (eventually) be found on the wiki:
https://www.rockbox.org/wiki/MultibootBootloader

Change-Id: Ia2da1ad6ef611e499d2fbafa93838387bc1023ba
2022-03-27 10:35:02 -04:00
Aidan MacDonald
bcbb5a8b00 multiboot: Allow searching in volume 0 for redirect file
Searching in volume 0 is necessary for multiboot targets with only
one drive, like the M3K/Q1/ErosQ. Without this the search code will
never look at the redirect file on these targets.

The search bound is configured with a setting MULTIBOOT_MIN_VOLUME,
which defaults to 0, but is defined to 1 for Sansa players so they
keep their old behavior.

Change-Id: I6dc5cf98db4258731de2c68c3ab1182b4a4a655b
2022-03-27 09:50:33 -04:00
Christian Soffke
df3afcfa3b PictureFlow: Configurable album sorting
Now offers sorting by:

- Album artist, then album name
- Album artist, then album year
- Album year
- Album name

Years are determined by the most recently
released track appearing on an album, if the
value differs between tracks.

On the M3K,  instead of by going into Settings,
volume buttons can also be used for quickly
adjusting the current sorting

Change-Id: I2c50059617114fb418336c466fdd37415473ac7d
2022-03-27 08:51:58 -04:00
Christian Soffke
aec8b36348 PictureFlow: Prevent queue overflow & simplify locking
Change-Id: I41f620a4fdaf155913a944e7caf4c015990a53d4
2022-03-27 08:51:58 -04:00
Christian Soffke
ae121de149 PictureFlow: Write bitmaps in one go
Analogous to an earlier change w.r.t. reading bitmaps

Change-Id: I68e71160b51eb893f18071cc77d9c9a3ef84de0f
2022-03-27 08:51:58 -04:00
Dominik Riebeling
a490ff896f rbutil: Update german translation.
Change-Id: I5c5cd8a0496dced977c4ed1e7189d43c1b0314f1
2022-03-27 12:57:48 +02:00
Dominik Riebeling
493dce212d rbutil: Fix langstat script.
Change-Id: I323b0e8dbf87f1d53881f5b89f26c5906796fde4
2022-03-27 12:56:34 +02:00
Dominik Riebeling
aaf0f1c371 rbutil: Fix Qt6 Windows build.
It seems Qt6 doesn't require explicit linking to QSvgIconPlugin anymore,
and cmake has trouble finding it. On native Windows builds it isn't
required, so remove it.

Change-Id: I87651f51ab212511947ab9fca3297b0dff276577
2022-03-26 20:29:14 +01:00
Dominik Riebeling
6bc19c98ca rbutil: Fix implicit type conversion on Windows.
Change-Id: I30c5edd5ce0344c47c0f9514eda830a2be8992c4
2022-03-26 20:29:14 +01:00
William Wilgus
593d9f623d lastfm_scrobbler fix yellow for targets w/o storage callback
Change-Id: I0a3dbcf8c8c0c72efa2506d1998fd24d228ed91d
2022-03-26 11:12:19 -04:00
William Wilgus
053c1596d8 Last FM scrobbler remove manual entry
Change-Id: Ib49ceac9858c28813c596a38dd5376928330598f
2022-03-26 09:58:02 -04:00
William Wilgus
f105ad7b23 lastfm_scrobbler fix red for devices w/o storage callback
Change-Id: I2062534b6e2a82171b856cc76efe8b78dbf9b13c
2022-03-26 03:20:49 -04:00
William Wilgus
fd15ea25d3 LastFm remove scrobbler from core make a TSR plugin WIP
remove scrobbler from core make it a plugin

Change-Id: I606810eba7d570dfb332789aed913c6f8adc7fb7
2022-03-26 02:50:11 -04:00
William Wilgus
8eb4689ab1 add way to lock portion of plugin buffer for TSR plugins
Some things in core that should probably be plugins steal the plugin buffer
for their own use, TSR plugins have no way to detect or prevent this
lock buffer reserves buffer_size bytes directly after the plugin itself
returns the unreserved bytes still available from the plugin buffer

Change-Id: I5a7849e209129b09400036a594569ef396b1b85f
2022-03-25 18:16:11 -04:00
Aidan MacDonald
5d0f697e87 x1000: remove the last vestiges of boot option support
There should be no need for any compatibility hacks since this
value was mostly used internally between the SPL and bootloader.
clk_init() was the only user in the main Rockbox binary which
accessed it, but when loaded by the Rockbox bootloader that code
will not be reached since BOOT_FLAG_CLK_INIT is already set.

Change-Id: Idd68b9834172e652b47432bfb1e00c923ea35407
2022-03-25 21:36:51 +00:00
Aidan MacDonald
3ae4a98e3b x1000: spl: remove selectable boot option support
Now the SPL boots the Rockbox bootloader unconditionally, which
allows for some simplification.

Change-Id: Id75c82db25a87e0e9043bb0771f622b1fc9482fb
2022-03-25 21:36:51 +00:00
Aidan MacDonald
2810c549a6 x1000: spl: remove dual boot support code
Removes the SPL's dual boot support code, and removes the dual
boot selection code on the M3K and Q1 since they can now do it
from the main bootloader.

Change-Id: Ie1b27e98c6ed4b3e37db86cfb485d6f3a6c5b25e
2022-03-25 21:36:51 +00:00
Aidan MacDonald
7cb49cfb33 x1000: spl: split off NAND storage to separate file
Just tidying. No functional changes.

Change-Id: I8aa85c789d1a6bd357797c6c95e38a7325eba809
2022-03-25 21:36:51 +00:00
Aidan MacDonald
bd8cd58568 x1000: bootloader: Add button handlers for OF boot
The SPL soon won't be paying attention to buttons, so the bootloader
should check them.

Change-Id: I2048ca9fd19193f329bebecfefd986760c33fd68
2022-03-25 21:36:51 +00:00
Aidan MacDonald
cda8bd5437 x1000: bootloader: set touchscreen to button mode
The touchscreen "buttons" are used for screenshots on the Q1.

Change-Id: I6bff00976c614d203986e810e51f859e78e372ab
2022-03-25 21:36:51 +00:00
Aidan MacDonald
6bc69c797c x1000: bootloader: accept button input during splash
This allows screenshots to be taken while a splash is displayed.

Change-Id: Id494189283db1b6877416f5a1ef1a13c8b654507
2022-03-25 21:36:51 +00:00
Dana Conrad
3d88f455cf Fix double define of BL_SCREENSHOT_NAME on fiiom3k
Change-Id: Iaee40887de19ac2d78ec9bdea08cee678b7e50ef
2022-03-25 21:36:51 +00:00
Aidan MacDonald
5160c90690 x1000: bootloader: add screenshot function
Screenshots of the recovery menu will be useful for documentation.

This can be disabled by turning off HAVE_BOOTLOADER_SCREENDUMP in
the target config file if the bootloader should ever run up against
max size limits.

Change-Id: I62ec1e465df2ca7a8a0e78625d88b31f6c4ef078
2022-03-25 21:36:51 +00:00
Aidan MacDonald
4cf36dfbf3 x1000: bootloader: skip bad blocks when loading flashed kernels
Bad blocks in a kernel flash partition seem to be handled by skipping
ahead to the next block; this is a common bad block management scheme
for simple software like bootloaders (and is the default method for
reading NAND partitions in u-boot).

Extend the uImage flash reader to skip bad blocks while reading.

Change-Id: I815875e83a2418e2642f736e04a3437c31b354ba
2022-03-25 17:31:39 -04:00
Aidan MacDonald
5b011c8dca x1000: add bad block marker position to nand_chip info
Change-Id: I6f466d87f6f11bc3e23463c469f318ecb7049ba7
2022-03-24 23:40:07 +00:00
Aidan MacDonald
9bbe08f3ec x1000: bootloader: add whole-chip flash dump option
I don't expect this will be all that useful, but why not...

Change-Id: Ieb486bb719c5cc61e0f3e95f9fb603a1c30c6528
2022-03-24 23:40:07 +00:00
Aidan MacDonald
c3562b6df6 x1000: bootloader: add debug tools menu
Add a debug menu to invoke two new actions, dumping the OF kernel
and recovery images from flash to the SD card.

Change-Id: I3ca943fac22e725a2d56b84d62f4a04821042fed
2022-03-24 23:40:07 +00:00
Aidan MacDonald
0d21d80ca8 x1000: bootloader: add basic flash dump utility
Change-Id: Id4ce0f00a78ef27399bdef6a7b32c23f89b9cb05
2022-03-24 23:40:07 +00:00
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