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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
* 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
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
Most credit goes to: Roman Skylarov
Additional integration and refactoring by myself.
*** COMPLETELY UNTESTED ***
Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
Provided by Roman Stolyarov
Integration, Refactoring, and Upstreaming by Solomon Peachy
X3II confirmed working by forum tester, X20 is nearly identical.
This includes bootloader, main firmware, and the flash image patcher.
Eventual Todo:
* Further refactor AGPTek Rocker & xduoo hiby bootloaders
* Further refactor AGPTek Rocker & xduoo hosted platform code
Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
Cleaned up, rebased, and forward-ported from the xvortex fork.
(original credit to vsoftster@gmail.com)
Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
SUPPORTED SERIES:
- NWZ-E450
- NWZ-E460
- NWZ-E470
- NWZ-E580
- NWZ-A10
NOTES:
- bootloader makefile convert an extra font to be installed alongside the bootloader
since sysfont is way too small
- the toolsicon bitmap comes from the Oxygen iconset
- touchscreen driver is untested
TODO:
- implement audio routing driver (pcm is handled by pcm-alsa)
- fix playback: it crashes on illegal instruction in DEBUG builds
- find out why the browser starts at / instead of /contents
- implement radio support
- implement return to OF for usb handling
- calibrate battery curve (NB: of can report a battery level on a 0-5 scale but
probabl don't want to use that ?)
- implement simulator build (we need a nice image of the player)
- figure out if we can detect jack removal
POTENTIAL TODOS:
- try to build a usb serial gadget and gdbserver
Change-Id: Ic77d71e0651355d47cc4e423a40fb64a60c69a80
Many includes of fat.h are pointless. Some includes are just for
SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that
and to define tuneable values that were scattered amongst various
headers.
Remove some local definitions of SECTOR_SIZE since they have to be
in agreement with the rest of the fs code anyway.
(We'll see what's in fact pointless in a moment ;)
Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
seems more logical to me, and is more consistent, since
"SAMSUNG_YH92X_PAD" is already used in the tex files.
Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837