Commit graph

832 commits

Author SHA1 Message Date
Solomon Peachy
8bc7ba5d22 dbtool: More fixes to dbtool operation
Now properly treats current directory as "/"

Change-Id: I54357a65f2fda7d2cfb56ff18a044ae10b87bbce
2023-05-25 16:05:59 -04:00
Solomon Peachy
e803daae0a dbtool: Fix it up so that it runs from the CURRENT working directory
This makes it far more useful, as before it insisted on scanning from
the root directory and putting the generated db files in /.rockbox

Change-Id: I0d0e3c6c6c7ee1fc5473185482fbfb9a2a2be29f
2023-05-25 15:43:15 -04:00
Solomon Peachy
56fe1129da configure: Deal with more variations of the 'ld' version output
eg, our current toolchian generates this:

   GNU ld (GNU Binutils) 2.26.1

But the system toolchain on the buildserver generates this:

   GNU ld version 2.37-37.fc36

Change-Id: I0166f12d660654c1456289954fb256db98213618
2023-05-22 15:58:29 -04:00
Aidan MacDonald
e7cc77e5b8 configure: Detect linker's NO_CROSSREFS_TO() support
NO_CROSSREFS_TO() was first introduced in binutils 2.27.
It is used to have the linker report errors when symbols
from a list of sections refer to a specified section,
which is useful for verifying that normal code does not
refer to INIT_ATTR code.

Note this doesn't actually start using NO_CROSSREFS_TO()
for builds -- that will have to wait until the toolchain
upgrade when we'll have a new enough binutils -- it just
detects support for the feature so it can be conditionally
enabled in linker scripts.

Change-Id: If1553eaa671fcbbdfe6af357a6331931e7c4f997
2023-05-22 14:48:07 -04:00
Solomon Peachy
8ff0fb6075 toolchain: Globally use '-fno-strict-overflow'
This turns on -fwrapv and -fwrapv-pointers.

As per GCC docs:

  "This option instructs the compiler to assume that signed arithmetic
   overflow of addition, subtraction and multiplication wraps around
   using twos-complement representation. This flag enables some
   optimizations and disables others."

All of our targets fall under this category.

For some time now we've been using -Wall which implies
-Wstrict-overflow=2, which only warns when the compiler actually
implements a possibly questionable optimization, so I'd expect this to
not affect our code size at all.

Change-Id: I8e1c10183e390c6d0897e81f84a5df4590b02d84
2023-04-18 10:51:24 -04:00
Aidan MacDonald
c6df8cc4f7 configure: Add support for compiling the simulator with UBSan
By passing --with-ubsan to tools/configure, you can now build the
simulator with UBSan to catch undefined behavior at runtime.

Change-Id: I054cd46ca59587dd544efbd7bdf6d27a040a4891
2022-04-17 11:37:34 -04:00
William Wilgus
a62d36d9e7 Warble builds define WARBLE fix metadata_common in warble builds
Change-Id: Ie5115162da5a06d917de09f75b90254bb30b7513
2022-03-13 11:41:30 -04:00
Aidan MacDonald
701d4ba77e x1000: Merge makefiles used for the bootloader
All three X1000 native targets turned out to have a very
similar boot configuration and used a nearly identical
makefile. Eliminate this duplication by moving the logic
into the main makefile.

Change-Id: I13044b9675c0abd605b8accdb2fee4f54549b020
2021-11-18 14:14:54 -05:00
Solomon Peachy
412e76b487 configure: --no-ccache must disable CCACHE for $HOSTCC too!
Accomplish this by setting CCACHE_DISABLE=true

Change-Id: Ie930fc4e828ebb7a29234c1a8f371980489d5668
2021-09-20 20:14:37 -04:00
Aidan MacDonald
de578bde1f Add advanced build option to omit building plugins
Compiling the plugins takes quite a long time and is unnecessary
if you're only working on the core code. Having an option is nicer
than having to edit the configure script by hand.

Change-Id: I401867355d897ce3fd899d9daf25ea9afcc380f0
2021-08-15 19:36:14 +00:00
Solomon Peachy
04fe77a465 Remove the (very) incomplete port for the Tatung TPJ-1102
It was barely even a stub, and hasn't seen any development since 2009

Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
2021-08-14 16:29:39 -04:00
Aidan MacDonald
786d06742a Remove Samsung YP-Z5 port
It has only a couple GB of onboard flash storage with no storage
driver in Rockbox. It hasn't seen any meaningful development since
its initial commit, it's not on the build farm, and the bootloader
build is broken by other refactoring.

Change-Id: Idd9e3c46fac9b96f416ce444182f97a50770e747
2021-08-14 14:13:54 +01:00
Dana Conrad
3e7a09cb0d New Port: Eros Q Native
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-18 12:14:35 +00:00
Aidan MacDonald
4c60bc9e68 New port: Shanling Q1 native
- 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-13 22:01:33 +01:00
Solomon Peachy
663539619c configure: fix a typo that could break voice builds
(If you don't have espeak, festival, or flite installed)

Change-Id: I5820535c55cc02e32bf31f3e30070b2c1e68ff87
2021-07-09 15:10:50 +00:00
Solomon Peachy
2c984f3714 build: use gcc-ar / gcc-ranlib in preparation for link-time-optimization
Change-Id: If5fd9a8f15200fca9a89999605394f7527387a2b
2021-07-08 19:53:05 -04:00
Solomon Peachy
2ff3425ab1 build: Rename SHARED_LDFLAG to SHARED_LDFLAGS
Change-Id: Icb81c72fbcfcdad624112a386ba38a40a830d18f
2021-07-08 19:53:05 -04:00
Aidan MacDonald
3f26fcf340 FiiO M3K: New bootloader
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-05-12 10:35:20 +00:00
Solomon Peachy
7d0d32dbc6 Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.

Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
2021-04-26 07:42:58 -04:00
Solomon Peachy
3ba2f6e5c7 Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAX
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-26 07:41:51 -04:00
Aidan MacDonald
a544c8467d FiiO M3K: increase bootloader font size
The default font was very small and hard to read.

Change-Id: Id6d8ec49a700dcad65903b92c09ec42840c1f6e5
2021-04-21 18:32:10 +00:00
Solomon Peachy
27b44bca73 configure: Get rid of the unused NOISEFLOOR option in voicefile generation
Change-Id: Id3b281e62487858120aae97cd5ee0ef888cf89a0
2021-04-20 08:50:06 -04:00
Solomon Peachy
d2f694696f configure: Enable easy use of AddressSanitizer with sim builds
Change-Id: I6df7e63b1820296a280faa0925ad4781637b879b
2021-04-07 21:48:58 -04:00
Aidan MacDonald
3ec66893e3 New port: FiiO M3K on bare metal
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
2021-03-28 00:01:37 +00:00
Solomon Peachy
a53864ed4a build: Don't overwrite autoconf.h unless it has actually changed
This way we only rebuild the world if something relevant changed.

Change-Id: Ia7d104cadec185a3227acbf330bb3b359296f0fb
2021-03-24 18:50:58 +00:00
Aidan MacDonald
aacb0811d9 Rename symbols of FiiO M3K Linux-based port
Mainly a straight replacement of FIIO_M3K -> FIIO_M3K_LINUX.

Change-Id: Id07c84f8150991d1b6851540c2c3f8f67e3f12c2
2021-02-27 23:53:28 +00:00
Aidan MacDonald
6224efb238 Fix build system not respecting TOOLSET
It seems that 'toolset=' in tools/configure was set but not used, with
the build system only generating a hardcoded set of tools. This change
fixes the issue by exporting the required tools in the TOOLSET variable,
and having root.make append those to the TOOLS list.

Change-Id: I07024bdf1dd2260c32cfeecaba0d3bb5bf00346d
2021-02-27 22:51:52 +00:00
Solomon Peachy
7c87467ba4 configure: Add prompt for USB Serial into the advanced mode
And explicitly disable USB_ENABLE_SERIAL when HAVE_USBSTACK is not define

Change-Id: Ieb4176b02a60eb1b9db81f0b8c69403898a76ca1
2020-11-18 08:50:05 -05:00
Solomon Peachy
090bd9592d Remove the firmware decompressor and a few more other SH-stragglers.
Change-Id: Ic568755afcccc6db1b6e791b1ed0d2588b90356f
2020-11-03 23:43:32 +00:00
Solomon Peachy
41a6da6043 builds: Enable -fno-delete-null-pointer-checks globally
* arm failures in lua, wolf3d, quake, flac
 * m68k failures in lua, wmapro
 * mips ???

I still think that most of these are actually due to latent bugs or
ambiguous code.

Change-Id: I4c9751d2b5c7a66253b313bfbc75fcd721b118d6
2020-10-28 04:10:29 +00:00
Solomon Peachy
804a49886a statusbar: Make statusbar height equal SYSFONT_HEIGHT
And size elements horizaontally based on SYSFONT_WIDTH

Unfortunately we need 16px icons to make 16px statusbar look right
but at least it _works_ properly now.

Also: all targets currently use 8-px SYSFONT, except some hosted bootloaders

Change-Id: I0cdf97e6ef47ec49693ef79667b200595b4fe075
2020-10-26 19:52:40 +00:00
James Buren
c5d7cd5f9f h300: add support for ROM image generation
Change-Id: I6e0985de370609bae98ba6eab487bf43eb4191b6
2020-10-26 01:37:42 +00:00
Solomon Peachy
cd721754d0 Fix configure target name for the erosq/k series.
Change-Id: Ic114d8d26209d37133ffa48d232ab278a0309dcd
2020-10-16 21:16:13 -04:00
Solomon Peachy
1a76bc403e erosq: Fix up builds.pm to match what we actually call the target
Change-Id: I2cedc68ca408a805815954a205ba43c3c9e970cb
2020-10-15 17:34:04 -04:00
Solomon Peachy
b4865b05b0 Build: Bump all toolchains to GCC 4.9.4 + Binutils 2.26.1
GCC 4.9.4 was already used for MIPS and all hosted targets; this enables
it across the board for everything (ie m68k and arm native)

Other changes:

 * Use '-Os' as the default optiomization for all targets
   (was only disabled for arm native)
 * Enable -funit-at-a-time and -Wextra
 * Drop all obsolete toolchain patches
 * Update ARM multilib/exception patch
 * Bump toolchain libs (gmp, mpfr, mpc) to recommended versions, and
   add 'isl' to enable better optimization & vectorization opportunities.

   (Will revisit optimization for the codecs and plugins at a later date)

Confirmed working:

 * armv4t     (ipodmini2g and many other PP502x targets)
 * arm >= v5  (sansaclipplus, ipod6g, ipodnano2g, sansafuzeplus)
 * m68k (ihp100)

Change-Id: If9ed405ae0f289d9adea46d4cf46bfefc2f4250d
2020-10-13 16:27:07 +00:00
Solomon Peachy
2a471e288c New port: AIGO EROS Q / EROS K
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-11 16:37:17 -04:00
Solomon Peachy
aabc8aca47 New port: FiiO M3K
Most credit goes to:  Roman Skylarov
Additional integration and refactoring by myself.

 *** COMPLETELY UNTESTED ***

Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-10-09 12:41:18 -04:00
Solomon Peachy
4231c2c83f codecs: Add support for the 'VTX' ZX Spectrum chiptunes format.
This codec requires floating point.

Original author:  Peter Sovietov
Ported to Rockbox:  Roman Skylarov
Further integration and bugfixes:  Solomon Peachy

Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
2020-10-09 11:39:25 -04:00
Solomon Peachy
a511917f18 configure: Compact the target selection a bit
Change-Id: Ic20f4085d2a135f6596d3e80be8ff1017c6b7480
2020-09-29 09:25:00 -04:00
Solomon Peachy
56b49b3074 fonts: Use '08-Rockfont' as FONT_SYSFIXED on targets with 128x64 screens
..It's already the default UI font on those targets

Change-Id: If8cb44da650d19882e4bd4b641af2f4fa59c1cd1
2020-08-31 13:32:24 -04:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Solomon Peachy
a5df94beb5 build: Tweaks to better support non-English as primary language
* get rid of $(LANGUAGE) in top-level makefile (and configure script)
 * un-hardcode English-as-primary-language in a couple more places
 * allow DEFAULT_VOICE_LANG to be overriden

To actually change the primary from English, one must change:

 * $english in voice.pl
 * hardcoded 'english' in rbutil
 * $ENGLISH in apps/lang/lang.make
 * DEFAULT_VOICE_LANG in apps/talk.c
 * configure script (default prompt)

Of course, if one wants to change the default UI language, it's simpler
to change the default language setting variable at compile time, or
perhaps by adding a configuration file with the desired value into the
.rockbox directory when the .zip is assembled.

Change-Id: If5cf76019d416e838628a2eccd4ec7d6cbaeeb74
2020-07-21 17:22:45 +00:00
Solomon Peachy
aad57ea1cc voice: Further enhancements for multi-lingual voice generation
* configure: allow use of full tts engine names when making selection
 * voice.pl:  fixes for espeak-ng
 * build.pm:  Add a list of "standard" voices for tooling use

The latter will be used by the nightly builder infrastructure to
determine what voices to generate.

Change-Id: Iff55288f94a30fbe08d8345b730969b7264b5e0f
2020-07-11 15:01:33 +00:00
Solomon Peachy
185d2bbb6a voice: More voice generation fixes:
* espeak vs espeak-ng  (prefer the latter!)
 * voicepool was busted for most non-english strings

Change-Id: Iae6df0f5426155b7b1f444160814ff9ef4581f21
2020-07-11 01:33:04 +00:00
Solomon Peachy
938d820355 voices: Add tts language mappings for the top 19 languages
festival: english and spanish only
gtts:  all but nederlands
espeak: all (need espeak-ng for czech, greek, and japanese)

Change-Id: I7df1b3235b48f352b0af3c13e3742e85432bc692
2020-07-11 00:09:49 +00:00
Solomon Peachy
2c3399537c voice: Add support for Google Translate's speech synthesizer
Uses the 'gtts-cli' command line client.  Supports a wide variety of
languages, including all "Complete" and "Good" Rockbox translations.

Additional changes:

 * voice synth script can accept pre-encoded mp3 files
 * Move language->synth options mapping into the voice script
 * Additional cleanups

Change-Id: I9523e2bca87cbcee2d8c4111f9892e8e458c7419
2020-07-08 23:16:57 +00:00
Sebastian Leonhardt
0769b34a23 fix configure script failing on gcc version numbers
There were two problems on my system:
* MinGW-gcc returns version "7.3-win32" => the "-win32"-part must be
  stripped off
* gcc -dumpversion returns only the major version number => use
  both -dumpfullversion and -dumpversion (in this order) as described here:
  https://stackoverflow.com/questions/45168516/gcc-7-1-1-on-fedora-26-dumpversion-now-only-includes-major-version-by-default

Change-Id: I74fa1c572426aab2525a00a80170d859c166e31c
2020-05-24 13:45:46 +02:00
Solomon Peachy
e0d7c7c632 voice: Add support for Mimic TTS engine.
...It generates decent voice files in 1/10th the time of festival.

Change-Id: I1bf9271633a8a0e9c483761b8685f296d2f303b8
2020-04-16 21:28:09 +02:00
Solomon Peachy
d37ea94f2a Android: Compile native android bits with armv7-a CPU flags
DX50/DX90 has a Cortex-A9 with NEON, use those specific flags
for speed.

Generic Android targets is for v4.4 (API 19) which doesn't support
pre-v7 ARM CPUs, so target generic armv7-a with hardfp support.

(This patch includes a rearrangement of the android toolchain helpers to
 allow target-specific GCCOPTS.  Huzzah)

Change-Id: I696051ef3fae25e1569c7b904decb7a3a0c6b674
2020-04-15 00:39:45 +02:00