Commit graph

36162 commits

Author SHA1 Message Date
Aidan MacDonald
98f762316f system: update MEM_ALIGN_ATTR for targets with CPU caches
MEM_ALIGN_ATTR should take advantage of cache line alignment on
all native CPUs which define it, not just ARM CPUs. (This could
arguably be done for hosted targets too, but we don't necessarily
know the size of a cache line there.)

Change-Id: Ife9302105ea57388afd55ce31da848b00b5b1b25
2022-04-01 12:08:41 -04:00
Dana Conrad
de285741bf ErosQ Native: Make power delay bootloader-only
gotta go fast

Change-Id: Ic01e4aa70a2bec4c48ae7cf8f32f8dfd366decad
2022-04-01 12:04:46 -04:00
Dana Conrad
7aa2a23b95 Eros Q Native: Add Original Firmware Boot option
Hold "Play" to boot the OF, or boot it from the recovery menu
by holding "Vol. Up". If you had the hosted port installed on your
player before installing the native port, you'll still have to go
through the hosted bootloader.

A couple notes:

- When booting from the menu, the recovery menu disappears, then
  reappears before going into the OF.

- You need to hold the play button for like a half second after the
  blue light comes on in order to get into the OF.

The recovery appears to be there, but it doesn't seem to be intended
for end users - it just says "Updater V1.1 - Insert TF Pls". I haven't
tested it beyond seeing that it boots, so I'm going to comment it out
for now.

Change-Id: Ie271ee479bb628cc74141b7fe07273b3f193f358
2022-04-01 12:04:30 -04:00
Aidan MacDonald
5ffe520de4 playlist: use path_strip_last_volume, clarify path conventions
The comment regarding Windows paths was fairly confusing as to
its intent. What the code is trying to do is replace the drive
letter with the volume containing the playlist, which appears
reasonable. The middle of the comment was devoted to explaining
why the code below was potentially incorrect which only served
to add to the confusion.

AFAICT the last volume specifier in a path will cause search to
start from the root of that volume, so any incorrect result can
be avoided by using the new function path_strip_last_volume().

Finally, add a comment at the top of the function that explains
what it does.

Change-Id: If4e4938801f2f81eb52f5d32b5461872995e5e83
2022-04-01 11:40:02 -04:00
Aidan MacDonald
4f05a9d066 Add path_strip_last_volume
This gets the volume that the path eventually refers to by parsing
the last volume specifier and returning the part of the path after
it (which does not contain any volume specifiers). The initial part
of the path therefore contains everything up to and including the
last volume specifier.

Change-Id: I9a935543256f8f22e0b8b1e3c88d4e47bd9dae8a
2022-04-01 11:40:02 -04:00
Christian Soffke
ca0c3dee0a ImageViewer: M3K keymap allow scrolling up/down
Change-Id: I385354688b1d8f8df4d44e7e177e23bdb6ed3df4
2022-04-01 11:01:52 -04:00
James D. Smith
6e3937e836 lastfm Scrobbler: Substitute album artist for empty artist.
Change-Id: I66dda13ec2cbb592ebe0d269f0c7eff749bc737a
2022-04-01 06:11:42 -04:00
Aidan MacDonald
412dbaeffe hosted: call 'sync' before poweroff
Might be needed to avoid filesystem corruption with buggy OF kernels.

Change-Id: I589eec6c1536beccf849716f11204b4b83a942a1
2022-03-31 21:40:04 -04:00
Solomon Peachy
a9e02b4850 FS13338: Updated Slovak translation (Matej Golian)
Change-Id: I41f794a457435f0d02da180673e272438e3879b2
2022-03-31 21:33:53 -04:00
Solomon Peachy
f08d083ed0 FS13441: Updated Italian translation (Alessio Lenzi)
Change-Id: I442d79842ca1d58d122058171175a6fee844a353
2022-03-31 21:32:42 -04:00
Solomon Peachy
cbb5efd525 FS13340: Updated Polish Translation (Adam Rak)
Change-Id: I5b10231277c6c546400b3d74e3c0339f6026b729
2022-03-31 21:31:33 -04:00
William Wilgus
43830d0128 alarm_menu share setter with settime
share the time picker with the alarm

block the date portion, seconds are ignored

Change-Id: Idc6974466772c33248ff532c8f3c62c744ee06d9
2022-03-30 09:05:28 -04:00
Dominik Riebeling
4c1fe3a899 rbutil: Bump to 1.5.0.
Change-Id: I074da5a2ce33b65d554a7de22a993e536e93f48d
2022-03-27 20:46:54 +02:00
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