path: root/firmware
AgeCommit message (Collapse)AuthorFilesLines
46 hourskernel: remove unused function mutex_test()Aidan MacDonald1-5/+0
No longer needed since the only user was in the Archos code. Change-Id: I763f58050c70f2bb1d8cc0a044c63698f3157a8d
46 hourskernel: remove unused kernel/pthread/*.c filesAidan MacDonald3-243/+0
These don't seem usable and it looks like the files were added by accident by d66346789c "buflib: Check the validity of of handles passed to buflib_get_data() in DEBUG builds." Change-Id: I4d4601f1fef7901c08ae86448853d008f48d5f43
12 daysadd const to const * stringsWilliam Wilgus6-11/+11
I don't think this will amke any difference except maybe for hosted ports Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
2022-04-18Fix sim build for glibc >=2.34Aidan MacDonald1-0/+10
Change-Id: If63787514b6bffc0afb71f9d651f8c6f0c328a2d
2022-04-17Fix undefined behavior that blocks compiling with UBSanAidan MacDonald1-1/+1
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
2022-04-17viewports, set flags to VP_DEFAULT_FLAGSWilliam Wilgus6-0/+7
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
2022-04-16apps: Add ability to do a clean rebootAidan MacDonald4-7/+42
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
2022-04-15viewport FIX RED remote screensWilliam Wilgus1-2/+6
Change-Id: I894a5c3e9053f44dee4803e9cdbbcb8f651ee318
2022-04-15viewports add flag to disable updatesWilliam Wilgus2-3/+14
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
2022-04-01system: update MEM_ALIGN_ATTR for targets with CPU cachesAidan MacDonald1-2/+2
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-01ErosQ Native: Make power delay bootloader-onlyDana Conrad1-0/+2
gotta go fast Change-Id: Ic01e4aa70a2bec4c48ae7cf8f32f8dfd366decad
2022-04-01Eros Q Native: Add Original Firmware Boot optionDana Conrad2-0/+30
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-01Add path_strip_last_volumeAidan MacDonald2-2/+38
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-03-31hosted: call 'sync' before poweroffAidan MacDonald1-0/+1
Might be needed to avoid filesystem corruption with buggy OF kernels. Change-Id: I589eec6c1536beccf849716f11204b4b83a942a1
2022-03-27x1000: Add multiboot supportAidan MacDonald4-0/+21
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: Change-Id: Ia2da1ad6ef611e499d2fbafa93838387bc1023ba
2022-03-27multiboot: Allow searching in volume 0 for redirect fileAidan MacDonald8-1/+13
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-25x1000: remove the last vestiges of boot option supportAidan MacDonald4-57/+28
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-25x1000: spl: remove selectable boot option supportAidan MacDonald6-241/+65
Now the SPL boots the Rockbox bootloader unconditionally, which allows for some simplification. Change-Id: Id75c82db25a87e0e9043bb0771f622b1fc9482fb
2022-03-25x1000: spl: remove dual boot support codeAidan MacDonald4-220/+0
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-25x1000: spl: split off NAND storage to separate fileAidan MacDonald3-25/+53
Just tidying. No functional changes. Change-Id: I8aa85c789d1a6bd357797c6c95e38a7325eba809
2022-03-25x1000: bootloader: add screenshot functionAidan MacDonald3-0/+3
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-24x1000: add bad block marker position to nand_chip infoAidan MacDonald2-0/+4
Change-Id: I6f466d87f6f11bc3e23463c469f318ecb7049ba7
2022-03-24linuxboot: add meaningful error codesAidan MacDonald1-19/+41
Change-Id: Ied964e99c389902bb1786c414c5d0fa20056040d
2022-03-24x1000: bootloader: fix Linux self-extracting kernel bootAidan MacDonald2-0/+99
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-24x1000: bootloader: add LCD dualboot cleanup for the M3KAidan MacDonald1-7/+5
Disable LCD interrupts before booting the OF - the OF kernel hangs at boot if they are enabled. Change-Id: I4f119818d0243953cdd620e17d9509b4fb16cc28
2022-03-24firmware: allow screendump in bootloaderAidan MacDonald3-8/+12
Enabled if target defines HAVE_BOOTLOADER_SCREENDUMP Change-Id: Idc135ef81e55d0f3eb8e7d2763d455c6455cf8fd
2022-03-24firmware: minor screendump related cleanupsAidan MacDonald1-2/+2
- Remove unused redefinitions of screen_dump() from bootloaders - Use empty do-while when screendump is compiled out Change-Id: I3ccdb0390ddaa28d8f561ff744d0db6aaef17f5d
2022-03-21Lcd save function pointer to frame buffer get_address_fn before loopsWilliam Wilgus23-40/+78
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-21lcd-bitmap-common optimize a few viewport functionsWilliam Wilgus1-5/+13
Change-Id: I71cd61f66e875280d07f17a9e828fbecc305bad2
2022-03-18[COV] fix uninitialized warningWilliam Wilgus1-1/+1
Change-Id: Ib526aeac51d626d02b073b26efd3020115641caa
2022-03-16x1000: restore crt0.S cache flushAidan MacDonald1-1/+19
I-cache must be flushed after copying code to IRAM... duh. Change-Id: I6eacc4b7c4385175724c947f6c53f7bbddcb6295
2022-03-16x1000: optimize crt0.S, improve correctnessAidan MacDonald1-58/+43
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-16rds: make newly added function staticWolfram Sang1-1/+1
It won't be called outside the RDS core. Change-Id: I22f9d7984213f32ad1db49368327243ba2aa917b
2022-03-15rb_namespace add logfWilliam Wilgus3-5/+76
add logging to the namespace file to allow debug of root redirect Change-Id: I6032aea880998c05dacf3d0d2e0d222205b9376e
2022-03-13dircache_redirect.h, hide root volume when only one mountedWilliam Wilgus1-0/+3
there is no need to show the root of the drive when only the internal is mounted Change-Id: I310c48befa51742d05b6d5ce501d0b7c2c7c7ab7
2022-03-12x1000: add TCSM section to linker scriptAidan MacDonald2-0/+22
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
2022-03-12x1000: add dual boot helpers for the main bootloaderAidan MacDonald2-1/+151
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
2022-03-12x1000: add function for booting linux kernelsAidan MacDonald2-0/+32
Change-Id: I0750b084fe88d21a8686daf0681b32b1dcba8fec
2022-03-12x1000: remove plugin and codec buffers on bootloaderAidan MacDonald1-0/+7
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
2022-03-12x1000: use core_alloc in bootloader for loading rockboxAidan MacDonald1-2/+0
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
2022-03-11Root redirect un-hide root volumeWilliam Wilgus1-1/+2
this appears to be problematic for now Change-Id: Ieb789f5ec10a0d25c559e9bfc2497cbc4f59c0ad
2022-03-11x1000: Clarify definition & usage of RAM areasAidan MacDonald3-9/+51
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
2022-03-11x1000: support new binary header in roloAidan MacDonald5-1/+120
Change-Id: I192c3d69616c39534ff329174c4d8d4a357d014d
2022-03-11multiboot: Refactor duplicated functions to a separate fileAidan MacDonald9-220/+164
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
2022-03-11multiboot: Remove bad multiboot code from hosted RoLoAidan MacDonald1-16/+0
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
2022-03-11erosqnative: Fix missing END marker in LCD enable sequenceAidan MacDonald1-0/+1
Change-Id: I75b3a396174e84d72e70c6f177bc1702021805f1
2022-03-11BUGFIX file.c open failure leaves open file handleWilliam Wilgus1-0/+2
Change-Id: Iad8eef2f65af0549da4dbec654c85adb2f325711
2022-03-06x1000: add simple binary header to declare the load addressAidan MacDonald1-0/+14
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
2022-03-06Sansa Multiboot Root Redirect Enhance + bug fixWilliam Wilgus1-27/+27
filename buffer was too small to retrieve redirect path if redirected to sd root remove <SD1> as it is redundant Change-Id: I1326601f1ba4a18d6bc173798759eb762b55528c
2022-03-04Add support code for dealing with U-Boot uImagesAidan MacDonald3-1/+408
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