summaryrefslogtreecommitdiff
path: root/bootloader
AgeCommit message (Collapse)Author
2021-10-04Sansa E200v1 Bootloader ensure USB unplug is detectedWilliam Wilgus
Change-Id: Ibec5bf5e0f7a518fafc7b9fb8b95d420ef4ddfc0
2021-10-04Sansa E200v1 Bootloader add break statement to exit to load fwWilliam Wilgus
Change-Id: I2516adc28d439dcbdb56f1ac51bd12d619a5f3d8
2021-10-04Sansa E200v1 Bootloader attempt at enabling USB in boot loaderWilliam Wilgus
there is a 1MB free region that is used to load the firmware but we shouldn't need that till after a USB connection so here is my 2nd try Change-Id: I2552db3a7fba019d7e7188984432f758ddafe548
2021-08-26xduoox3: Further bootloader improvementsSolomon Peachy
* Power button is what forces entry into USB mode (can't use the other buttons due to the long SADC warmup) * Inching closer to working USB disk mode (starts then disconnects! Change-Id: I45ff1c61f39e0e0c3615b38278f5c91b6ef2ed6c
2021-08-22xduoox3: More minor bootloader tweaksSolomon Peachy
Change-Id: I16b5ada06842822e14c0e4fc262f2cb8067aff72
2021-08-22xduoox3: Allow user to gracefully exit USB disk mode by pressing powerSolomon Peachy
Change-Id: Ic0382059646b7169c275aebe88867b5c0b7dd672
2021-08-22bootloader: nuke a long-unused (and broken) code blockSolomon Peachy
Change-Id: I8177c70ef01fd8938f3683e74adc0e008034f92d
2021-08-21xduoox3: More bootloader updatesSolomon Peachy
* Rework the LCD initialization a bit * Power off after 5 seconds if we hit a fatal error * Turn on verbose output if PLAY is held down on powerup * Minor code style cleanups The goal is to not perform the LCD init unless it's needed; ie only if we run into an error or enter USB mode. Change-Id: I3f93e881ff55d104f453985ed452f35b433a7d99
2021-08-21xduoox3: Bootloader improvements:Solomon Peachy
* Explicitly clear the caches prior to launching the binary * Ensure the function that launches the binary is in iram * Re-sequenced some of the subsystem initializations * Fixes for USB mode Change-Id: Ie020b18586b2599edeb88529dd3d7337e33a5a6f
2021-08-14Remove the (very) incomplete port for the Tatung TPJ-1102Solomon Peachy
It was barely even a stub, and hasn't seen any development since 2009 Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
2021-07-18New Port: Eros Q NativeDana Conrad
What works: - LCD: 16-bit RGB565 - all buttons, including scrollwheel - SD Card - Battery level and charging/not charging status - USB - audio - sample rate switching - HP / LO detect, with "safe" fixed LO volume - LO volume will only be put to user-defined max volume if headphones are not present. - rtc - Plugins build, tried a couple and they seem OK - Bootloader, installable to nand via usbboot What doesn't work: - Dual Boot - power on/off has intermittent, low volume audio click (sometimes it's completely silent, sometimes there's a click) - Audio uses 16-bit volume scaling, so clicking/popping is pretty bad at lower volumes - need 32 bit volume scaling, 24 bit I2S data - USB HID keys not yet defined - no jztool support Unknowns: - Stereo Switch pins: Direction select, AC_DC (probably not even hooked up) - What is the actual purpose of the Stereo Swtich? - How does the bluetooth module connect? "Someday" stuff: - get LCD working at higher bit depth - Bluetooth Change-Id: I70dda8fc092c6e3f4352f2245e4164193f803c33
2021-07-13New port: Shanling Q1 nativeAidan MacDonald
- Audio playback works - Touchscreen and buttons work - Bootloader works and is capable of dual boot - Plugins are working - Cabbiev2 theme has been ported - Stable for general usage Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps. There's a few minor known issues: - Bootloader must be installed manually using 'usbboot' as there is no support in jztool yet. - Keymaps may be lacking, need further testing and feedback. - Some plugins may not be fully adapted to the screen size and could benefit from further tweaking. - LCD shows abnormal effects under some circumstances: for example, after viewing a mostly black screen an afterimage appears briefly when going back to a brightly-lit screen. Sudden power-off without proper shutdown of the backlight causes a "dissolving" effect. - CW2015 battery reporting driver is buggy, and disabled for now. Battery reporting is currently voltage-based using the AXP192. Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a
2021-07-11x1000: Unified flash bootloader installerAidan MacDonald
Change-Id: Ib1d41d4e7d663ff8a21eb08108c13568f7408533
2021-07-11x1000: Unified bootloaderAidan MacDonald
Change-Id: Ib1f2ca2a376866c61dd1bd62abd6e31210d11e5c
2021-07-08x1000: SPL refactoringAidan MacDonald
This streamlines the boot code a bit and reduces target specific boilerplate. The clock init hack used by the bootloader has been "standardized" and works for the main Rockbox binary now, so you can boot rockbox.bin over USB without special hacks. Change-Id: I7c1fac37df5a45873583ce6818eaedb9f71a782b
2021-07-05Sansa Connect: Power off LCD to save powerTomasz Moń
Prevent startup screen flash by properly using AVR LCM functions. Power off LCD when not needed to improve battery runtime. Change-Id: I76e3c5c0208774f189fbc6f7d7b3c9e22c062285
2021-06-21mi4: replace chksum_crc32 with crc_32rJames Buren
This uses an equivalent algorithm but with a different initial value than we normally use (all bits off vs all bits on). Use the new crc_32r to replace the original MI4 crc32 implementation. This frees up some extra space on mi4 targets which gives us more room on a few very space constrained targets (sansa c200/e200, etc). Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
2021-06-09Sansa Connect: Working USB Mass StorageTomasz Moń
Acknowledge SYS_USB_CONNECTED in all queues so USB task can gain exclusive access to the storage. Reduce CPPI requeue timeout to speed up disk access. Change-Id: I322aae4cac679696bb8186ccacf838a18f0715e9
2021-06-06Sansa Connect: Initial TNETV105 driver portTomasz Moń
Port USB driver from Sansa Connect Linux kernel sources. The device successfully enumerates and responds to SCSI commands but actual disk access does not work. The SCSI response sent to host mentions that both internal storage and microsd card are not present. Change-Id: Ic6c07da12382c15c0b069f23a75f7df9765b7525
2021-05-21Sansa Connect: Clear recoverzap parameterTomasz Moń
Clearing recoverzap parameter exists the Recovery Mode. This makes it possible to run Rockbox on Sansa Connect without relying on original Linux firmware. Enable write-through cache on flash memory as write-back complicates handling without any real benefits. The flash memory accepts commands as series of writes at predefined addresses, so it is important that the cache does not interfere with the writes. Change-Id: I219f962f20953d84df43012cf16bbb16d673add8
2021-05-12FiiO M3K: New bootloaderAidan MacDonald
SPL and UCL-compressed bootloader are now packed into one output, bootloader.m3k, eliminating the separate SPL build phase. The Rockbox bootloader now has a recovery menu, accessible by holding VOL+ when booting, that lets you back up, restore, and update the bootloader from the device. Change-Id: I642c6e5fb83587a013ab2fbfd1adab439561ced2
2021-04-26Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAXSolomon Peachy
They were never finished, never saw any release ever, and haven't compiled for the better part of a decade. Given their HW capabilities [1], they are not worth trying to fix. [1] 1-2MB RAM, ~256MB onboard flash, no expandability Change-Id: I7b2a5806d687114c22156bb0458d4a10a9734190
2021-04-21FiiO M3K/X1000: add USB supportAidan MacDonald
This only required a minor patch to the usb-designware driver due to DMA requiring physical addresses -- on the X1000, these differ from virtual addresses so we have to do the usual conversion. Both the mass storage and HID drivers work, but there are a few issues so this can't be considered 100% stable yet. - Mass storage might not be detected properly on insertion, and USB has to be replugged before it shows up - HID driver may occasionally panic or hang the machine Change-Id: Ia3ce7591d5928ec7cbca7953abfef01bdbd873ef
2021-04-17x1000: Redesign SPL, and allow it to flash the bootloaderAidan MacDonald
SPL is now designed so core X1000 code is in control of the boot, under the reasonable assumption that the device boots from flash. It should not be too hard to adapt to other X1000 ports. The biggest functional change is that the SPL can now read/write the flash, under the control of a host computer. The SPL relies on the boot ROM for USB communication, so the host has to execute the SPL multiple times following a protocol. Change-Id: I3ffaa00e4bf191e043c9df0e2e64d15193ff42c9
2021-04-07MIPS: make sure to fill 'jr' branch delay slot with 'nop'Aidan MacDonald
Inline assembly in RoLO and the FiiO M3K bootloader used 'jr' to jump to a newly loaded Rockbox binary, but incorrectly left the branch delay slot open. That gives GCC an opening to place illegal instrutions, etc, which might cause an unhandled exception. Change-Id: Ia7a561fe530e94a41189d25f18a767c448177960
2021-03-28New port: FiiO M3K on bare metalAidan MacDonald
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
2021-02-27Rename symbols of FiiO M3K Linux-based portAidan MacDonald
Mainly a straight replacement of FIIO_M3K -> FIIO_M3K_LINUX. Change-Id: Id07c84f8150991d1b6851540c2c3f8f67e3f12c2
2020-11-15h1x0/h300: change when the hold switch and failsafe are usedJames Buren
After reviewing the code awhile I realized that the failsafe and hold switch have no impact on the boot process when the usb or charger is connected. That makes no real sense to me. If these are connected then neither will be used at all. The boot process will never revisit it either once those other modes end and resume the boot process. It will just continue to try to boot from disk as if these emergency settings never existed. I have decided it makes more sense for them to be evaluated once the higher priority charge and disk mode have finished their roles. Given how the code was originally written it seems to be they were not intended to run prior to these at the very least since the logical conditions preclude that possibility as they include the inverse of the conditions that trigger the charge and disk modes. Change-Id: I0531c97474572c573178f480c239c3c1659f9653
2020-11-15h1x0/h300: fix h300 bootloader hold switch checkJames Buren
This fixes an early boot bug on the h300 where hold_status is read before it has a chance to properly check whether the hold switch is even active. This was accomplished by porting over the method the h1x0 uses to perform the same check. Change-Id: I04679d82f65a2edcbee4be9a146437c3988040a2
2020-11-15h1x0/h300: consolidate a few code paths to logical equivalentsJames Buren
This saves a few bytes of precious space by consolidating paths where they can be combined with no change to the underlying algorithm. Change-Id: Ie6b7ead190a87d66fcbdcf2e351010bab751d952
2020-11-14h1x0/h300: bring the two bootloaders more in syncJames Buren
The most major change here is the porting of the failsafe boot menu and eeprom settings support from the h1x0 bootloader to the h300 bootloader. This has been successfully tested already and indeed works about the same as it does on the h1x0 bootloader. The other major change is the addition of new code to both bootloaders that will retry the flash boot function after exitting disk mode. It still falls back to booting from disk if this either fails or is not configured to boot from flash. There were also various other modifications to bring the two closer in sync so there are fewer differences. Change-Id: I17a5724e03225b57e9d0071387294aa6cd025178
2020-11-14h1x0/h300: clean up the bootloader source a bitJames Buren
First this removes most of the conditionals for the CPP as they are always true for the targets that use the bootloader source. Second this moves some global variable references around to reduce some redundancy in the h1x0 bootloader source. All of this is done to make it easier to compare the two bootloaders as they are very heavily related to each other. Change-Id: I7eb4a3106fb9fce6059797310d9e053a3d3ecf63
2020-11-14h1x0/h300: remove trailing whitespace from bootloadersJames Buren
Change-Id: I8f3bfbc8287c8f520894e0cd258066d4c7a02197
2020-11-14h300: enable usb charging for charge mode and disk modeJames Buren
This enables USB charging when the bootloader is in charge mode or disk mode. As a byproduct there is a small change in behavior where charge mode is all that is available if it is triggered by the USB cable insertion. Disk mode only becomes available if the user requests to continue the boot process by pressing the power button. It had to be done this way as there's no way to tell this early whether the user wants to simply charge or trigger disk mode as well. Change-Id: I32f29398b22a76e5e754efdc9beecae39dd122d5
2020-11-13Bugfix Backlight_init should be called after lcd_initWilliam Wilgus
the rest.. Change-Id: I50585ba2191aa8134de3045b1445859b27503a68
2020-11-13h300, Others Bugfix Bootloader backlight_init()William Wilgus
backlight_init needs to be called after lcd_init when using lcd_enable() Change-Id: Id034835c903801fea49e2b972c110c1ec5106976
2020-10-26Whitespace cleanup on fb_viewport RewriteWilliam Wilgus
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-23ClipPlus BOOTLOADER DONT FIT!William Wilgus
REMOVED FROM ALL NATIVE BOOTLOADERS: finish removing the text scrolling pare down printf to a minimal subset (%c %s %l %d %u and %x(%p)) remove diacritic and rtl language support GOAL 134000 START 135305 CURRENT 133700 SUCCESS! (ASSUMING IT WORKS -- UNESTED) Change-Id: Ic3f6ac1dc260578f581ee53458b3e5bb47d313ec
2020-10-15fiiom3k: Temporarily disable filter rolloff programmingSolomon Peachy
(Hardware control isn't wired into ALSA properly) Change-Id: Iac537d2d90a6119b8c002cd38a558a4ebb3321eb
2020-10-14m3k: Fixes to the launcher/loader.Solomon Peachy
* Execute the correct OF player binary * We don't have adb, so error out Change-Id: I4fb39fcdf5e437450c059e6c1296ea6cb99298fe
2020-10-13mrobe500 bootloader fixSolomon Peachy
Change-Id: I0ab99a427df34ef6c5899a280953250660ffc156
2020-10-13bootloader: Work around linker wonkiness that broke PP bootloader builds.Solomon Peachy
Change-Id: I8e32c1605c0844c6f1980919ede61ca674b00bbb
2020-10-13Fix more warnings.Solomon Peachy
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
2020-10-11hosted: sanitize handling of HOME_DIRSolomon Peachy
* HOME_DIR is now either "/" or special "<HOME>" * target-specific "home dir path" is defined solely by PIVOT_ROOT * PIVOT_ROOT path is now defined in toplevel config files * Make Samsung YP-R0/R1 and SONY_NWZ use PIVOT_ROOT too * Do not prepend PIVOT_ROOT path if the path already has it! * Do not play these games for __PCTOOL__ builds Change-Id: I3d51ad902a5f9cafe45ba15ba654f30f1ec6113a
2020-10-11New port: AIGO EROS Q / EROS KSolomon Peachy
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
2020-10-09New port: FiiO M3KSolomon Peachy
Most credit goes to: Roman Skylarov Additional integration and refactoring by myself. *** COMPLETELY UNTESTED *** Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-09-03ondavx747: Fix bootloader buildSolomon Peachy
Change-Id: Ibdff6a3d18cc065f7edd67a9ea77b2cb6b4629d1
2020-08-19Enable boot from SD for Sansa e200Johannes Rauh
Change-Id: I0940f2cd5fc914d6d5061b5798b1a636009649b7
2020-07-24[1/4] Remove SH support and all archos targetsSolomon Peachy
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-22bootloader: Consolidate xDuoo X3ii/X20 and AGPTek Rocker bootloadersSolomon Peachy
Bonus changes: * boot mode selection stored on SD card Change-Id: I225a06d149ae71c1882f632c30d0fe4ab5308a74