Left shifts are not defined in C if they would cause signed overflow,
so these expressions get instrumented, which makes them unusable as
switch values and triggers compile errors when compiling with UBSan.
Change-Id: I0588d4be1e00ba1cfde0eac119ead368b20d10c9
flags were getting un-initialized memory
it really didn't matter with the flags getting initialized
anyway
But once I added a new flag that didn't explicitly
set or clear the flag at init well here we are
set flags to VP_DEFAULT_FLAGS in viewport_set_defaults()
add the flags variable to the default vp's set to 0
(it was already initialized to 0 by bss, make it explicit)
Change-Id: I3a9a062455b4cf66d2b8c70fdf05402a5c0c091c
Allow a clean shutdown to end in either power off or reboot. Add a
new event SYS_REBOOT to signal it and sys_reboot() to trigger the
event. SYS_REBOOT signals a reboot request and should be listened
for alongside SYS_POWEROFF events.
Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
when drwing multiple areas of the screen with other gui elements
you might want to combine updates into a single screen redraw
Change-Id: Ie4130366fa13e25d3d14e937257d11547dd61134
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
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
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
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
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
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
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
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
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
- Remove unused redefinitions of screen_dump() from bootloaders
- Use empty do-while when screendump is compiled out
Change-Id: I3ccdb0390ddaa28d8f561ff744d0db6aaef17f5d
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
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
This is intended for debugging OF kernel boot problems and has
to be enabled manually at compile time to make it usable.
Change-Id: Ie5ce9f0a7639be0acf5e3879cfc3a7b8b89caa5c
Two helpers (_init_clocktree and _init_uart2) already existed in
the SPL and are copied verbatim from there. The SPL versions are
still present and will be removed when dual boot works from the
main bootloader.
The other two helpers (_cleanup and _load_pdma_fw) are new.
Change-Id: I4661667966e26f52e6c5142f1947d2a34b7008ef
On the bootloader there's no point reserving memory for these,
the only users of codecbuf/pluginbuf are in the apps/ tree.
Change-Id: Ib57b4d59aff8f4dcc753d7993956ed15e61cdc52
Using the audio buffer directly is a bad idea because this will
render core_alloc non-functional if load_firmware() writes into
the buffer but then fails, for example on a checksum mismatch.
Change-Id: Ib2d17bcea53bdea1c4c5496cec0c4eee5dd66069
Document what the symbols are supposed to mean, fixup SPL's
usage of DRAM_END which should really be SDRAM_END instead.
No functional changes.
Change-Id: Ie85b0ee35fea8b7858891e5b9d6634eaae42c9f8
The implementation of write_bootdata() and get_redirect_dir() was
copied verbatim in two different places, obviously a bad thing for
maintainability. This moves them to a new file multiboot.c as they
are only used for multiboot.
Change-Id: Id0279216e4dd019f8bf612a81d3835eff010e506
This looks like it was copy-pasted blindly from elsewhere and it
wouldn't even compile, since hosted RoLo is completely different
from native RoLo.
Change-Id: I4074f5323dcbdae85db8a04f222c858e9a228432
The header format is basic, a variable length list of values
tagged by 4-byte strings. The main application to to allow a
loader to determine the load address of the binary at runtime
instead of using a hardcoded address. But the header contents
aren't fixed and it could be extended for other purposes too.
Change-Id: If51d85b4c2eb53c919a91b54985b157e8e5c20ef
filename buffer was too small to retrieve redirect path
if redirected to sd root remove <SD1> as it is redundant
Change-Id: I1326601f1ba4a18d6bc173798759eb762b55528c
Adds a loader for the legacy uImage format that is commonly used on
embedded Linux systems. It verifies checksums and supports uncompressed
and gzipped images. Supports arbitrary reader functions to allow the
images to be streamed off any storage device, for optimal RAM use.
Change-Id: I93c35f9a6f323999a22a07300e05627fabfcbd2c
This didn't account for partial page reads properly which resulted
in corrupted data. Fortunately, current released bootloaders do not
perform such reads so they don't trigger this bug.
Change-Id: I426a95ef8d0f20f4567498530e216d80e1aceef2
Helper for another semi-typical operation: find out how big of a
buffer should be allocated before decompressing. This can be useful
when the stream container doesn't specify the decompressed size.
Change-Id: I5f1536f809bb6f9bc6023120c024c3de7cea4269
Using an in-memory buffer for the input or output data for 'inflate'
is likely to be extremely common and there's really only one way to
do it, so predefined helpers should be provided.
Change-Id: Ifd22e7b140a08e0e7dc05aec6b340dff5e2d9d0a