summaryrefslogtreecommitdiff
path: root/firmware/common (follow)
Commit message (Collapse)AuthorAge
...
* Move optimized ffs to firmware/asm, using the new automatic-asm-picking ↵Thomas Martitz2012-01-22
| | | | | | infrastructure. Change-Id: I5e7bdc8be7de50ef604c16078857fff1b84650dc
* Move optimized memcpy and friends and strlen to firmware/asm,Thomas Martitz2012-01-22
| | | | using the new automatic-asm-picking infrastructure.
* android/ypr0: Merge fs-*.c to generic filesystem-unix.c.Thomas Martitz2012-01-21
| | | | Change-Id: I52e2c29346baf0d282243880477cd149311ce3d1
* rbpaths: Add new special dir HOME_DIR for RaaA.Thomas Martitz2011-12-25
| | | | | | | | | | | | | | HOME_DIR is intended for not-so-advanced files which shall be user visible, and thus not in /.rockbox. Therefore HOME_DIR is translated to $HOME on RaaA, /sdcard on android, the internal memory on ypr0 and "/" on native targets. ROCKBOX_DIR ("/.rockbox") already existed as special and is translated to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox on android), but it's not suitable for some files we generate (e.g. battery-bench.txt). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31430 a1c6a512-1295-4272-9138-f99709370657
* Initial commit of the Samsung YP-R0 port.Thomas Martitz2011-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
* disk: fix sector multiplier init, also remove a test which has became obsoleteAmaury Pouly2011-12-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31356 a1c6a512-1295-4272-9138-f99709370657
* Remove USB time sync code when there's no RTC.Boris Gjenero2011-12-16
| | | | | | | | | Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync previously did nothing but reported success. After this change, the USB time sync request won't be recognized on those targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
* Remove conditional added around set_day_of_week in r31301.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
* Add conditionals around functions that are only needed when RTC is present.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
* Really fix redAmaury Pouly2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31273 a1c6a512-1295-4272-9138-f99709370657
* Fix redAmaury Pouly2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31272 a1c6a512-1295-4272-9138-f99709370657
* Add support for for per-drive logical sector size. This allows targets to ↵Amaury Pouly2011-12-15
| | | | | | have a different logical sector size for the internal storage and the sd card, like on the fuze+ for example. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31270 a1c6a512-1295-4272-9138-f99709370657
* Try $RBROOT before $HOME when looking for the sdl apps rockbox root dirJonathan Gordon2011-12-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31151 a1c6a512-1295-4272-9138-f99709370657
* Compile fix for mingw-w64Rafaël Carré2011-12-04
| | | | | | Don't build str(n)casecmp as functions if they are already defined by preprocessor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31147 a1c6a512-1295-4272-9138-f99709370657
* Update some missed pointers when moving the dircache allocationFred Bauer2011-11-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31028 a1c6a512-1295-4272-9138-f99709370657
* Simulate usb plugging on the sim better using sim_tasks.Thomas Martitz2011-11-17
| | | | | | Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12325 - screen corruption on early usb.Thomas Martitz2011-10-28
| | | | | | | | | | When booting with USB inserted, the dircache build can get interrupted by the usb connection, in which case the dircache buffer is freed. Due to a bug the re-creation of dircache used the old freed buffer and overwrite new allocs (causing screen corruption). Set allocated_size to 0 to make it not take the code path that assumes an existing buffer, and bring that and freeing together in the code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30845 a1c6a512-1295-4272-9138-f99709370657
* fix sign errorFred Bauer2011-10-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30812 a1c6a512-1295-4272-9138-f99709370657
* revert r30566 and r30567 to fix FS#12294 (superfloppy not mounting)Robert Kukla2011-10-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30632 a1c6a512-1295-4272-9138-f99709370657
* Also remove the fat_partition_types array.Torne Wuff2011-09-17
| | | | | | | | If we aren't going to check for the partition type, we don't need the array of known FAT partition types. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30567 a1c6a512-1295-4272-9138-f99709370657
* Allow any partition type, not just known FAT types.Torne Wuff2011-09-17
| | | | | | | | | | | | Instead of only mounting partitions with a FAT partition type, try any partition that isn't type 0 (unallocated) or 5 (extended). This makes it easier to reformat SDXC cards which have the exFAT partition type, and also brings us in line with pretty much every other OS at this point. Anything with a valid-looking FAT superblock will get mounted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30566 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Allow dircache to be enabled without reboot.Thomas Martitz2011-08-30
| | | | | | | Also add two dircache function, one of which does what dircache_disable() did previously as this now also frees the dircache buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30393 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Enable compaction in buflib.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | | | This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Fix memory leak (and recently panic).Thomas Martitz2011-08-16
| | | | | | | | | | | | | If the dircache was interrupted during generation (e.g. through USB insertion), then the allocated buffer was leaked and a new one was allocated for the second cache generation. This causes a panic since r30308 since playback holds the control over the audiobuffer at that time. The fix is to simply check allocated_size instead of dircache_size which is reset to 0 upon cancellation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30321 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Fix bug introduced in r30308.Thomas Martitz2011-08-15
| | | | | | | dircache_root wasn't initialized at all and the giving allocated_size passed to buffer_release_buffer() didn't account for alignment padding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30318 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz2011-08-14
| | | | | | | | | | | | | | | | | | | | | | | Namely, introduce buffer_get_buffer() and buffer_release_buffer(). buffer_get_buffer() aquires all available and grabs a lock, attempting to call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause a panicf() (doesn't actually happen, but is for debugging purpose). buffer_release_buffer() unlocks that lock and can additionally increment the audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was used temporarily only. buffer_available() is a replacement function to query audiobuflen, i.e. what's left in the buffer. Buffer init is moved up in the init chain and handles ipodvideo64mb internally. Further changes happened to mp3data.c and talk.c as to not call the above API functions, but get the buffer from callers. The caller is the audio system which has the buffer lock while mp3data.c and talk mess with the buffer. mpeg.c now implements some buffer related functions of playback.h, especially audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit. audiobuf and audiobufend are local to buffer.c now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
* format/*printf: Add simple support for %p format specifier.Thomas Martitz2011-08-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30249 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Fix 2 nasty bugs introduced with the reworks starting with r30032.Thomas Martitz2011-07-30
| | | | | | | | | The first is an off-by-one that leads to miscalculation of the dircache size. The format string size was used but dircache size was incremented by the snprintf() result which is smaller. The other forgot to update the location of the "." and ".." strings upon compaction, so that new folders got assigned orphaned pointers for those directory entires. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30224 a1c6a512-1295-4272-9138-f99709370657
* Revert "Introduce bsearch() and use it in tagtree.c."Thomas Martitz2011-07-18
| | | | | | It was committed by accident (it's on FS still). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30157 a1c6a512-1295-4272-9138-f99709370657
* Introduce bsearch() and use it in tagtree.c.Thomas Martitz2011-07-18
| | | | | | | | | | | | bsearch() is a general purpose binary search function for arrays. It's supposedly faster than looping over arrays. The array needs to be sorted in ascending order under the provided comparison function. If the key and array element are of the same kind, then the same compare function can be used for qsort() and bsearch(). Code taken from glibc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30155 a1c6a512-1295-4272-9138-f99709370657
* Initialize the d_names_start pointer correctly in dircache. This shouldMiika Pekkarinen2011-07-04
| | | | | | | | prevent d_names data from being overwritten (likely causing garbage in file browser and other strange symptoms). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30122 a1c6a512-1295-4272-9138-f99709370657
* Fixed incorrect dircache reallocation during tagcache commit.Miika Pekkarinen2011-07-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30108 a1c6a512-1295-4272-9138-f99709370657
* Fix loading dircache stat on h100. Relocating the data was broken due to ↵Thomas Martitz2011-06-22
| | | | | | struct alignment problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30051 a1c6a512-1295-4272-9138-f99709370657
* Use ALIGN_UP() macro for alignment, in a more correct way also.Thomas Martitz2011-06-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30041 a1c6a512-1295-4272-9138-f99709370657
* Dircache: A bit of follow-up code cleanup suggested by Amaury Pouly.Thomas Martitz2011-06-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30040 a1c6a512-1295-4272-9138-f99709370657
* Optimize new dircache_copy_path so that the helper (strlcat) doesn't need to ↵Thomas Martitz2011-06-20
| | | | | | | | walk through the entire string repeatedly. Also fix a off-by-one. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30039 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz2011-06-20
| | | | | | | | | use IDs instead. Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules. This is needed for my buflib gsoc project. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Move struct maindata declaration to dircache.c and actually check ↵Thomas Martitz2011-06-20
| | | | | | for DIRCACHE_MAGIC when loading from disk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30037 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Change internal cache layout.Thomas Martitz2011-06-20
| | | | | | | | | The dircache_entry structs are now allocated subsequently from the front, allowing to treat them as an array. The d_names are allocated from the back (in reverse order, growing downwards). This allows the cache to be moved around (needed for my buflib gsoc project). It is utilized when loading the cache from disk (on the h100), now the pointer to the cache begin doesn't need to be the same across reboots anymore. This should save a bit memory usage, since there's no need for aligning padding bytes after d_names anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30036 a1c6a512-1295-4272-9138-f99709370657
* Fix dircache_size calculation bug introcuced 3 revisions ago.Thomas Martitz2011-06-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30035 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Return the size of the result string in dircache_copy_path() so ↵Thomas Martitz2011-06-20
| | | | | | that callers don't need to call strlen on it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30034 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Rework and simplify dircache_copy_path().Thomas Martitz2011-06-20
| | | | | | Use a recursive helper function with strlcat to build up the path backwards. This way the tree doesn't need to be walked twice and no extraneous size calculation is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30033 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Remove dircache_entry::name_len.Thomas Martitz2011-06-20
| | | | | | It's reduntant, and enlarges the dircache unnecessarily. Saves 4 byte per file in the whole filesystem. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30032 a1c6a512-1295-4272-9138-f99709370657
* Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.Andree Buschmann2011-05-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29841 a1c6a512-1295-4272-9138-f99709370657
* Return -1 for not implemented RTC functions.Thomas Martitz2011-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
* RaaA: Fix write locations of pluginsThomas Jarosch2011-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29506 a1c6a512-1295-4272-9138-f99709370657
* RaaA: Add initial Pandora supportThomas Jarosch2011-02-27
| | | | | | | | | | | | More information: www.openpandora.org Possible things to implement: - Special button mappings - Battery monitoring - ALSA audio backend - Automate creation of "pnd" (=binary) file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
* Fix yellowMichael Sparmann2011-02-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29449 a1c6a512-1295-4272-9138-f99709370657
* iPod Classic CE-ATA Support (Part 3 of 4: Introduce STORAGE_NEEDS_ALIGN, ↵Michael Sparmann2011-02-27
| | | | | | which ensures that no unaligned storage accesses are performed through file.c) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29447 a1c6a512-1295-4272-9138-f99709370657