Commit graph

2516 commits

Author SHA1 Message Date
Solomon Peachy
a220402d51 voice: clean up a debug message
Change-Id: Iee8c68a8e943218ce53b46a7150af7df08702719
2025-01-22 13:22:25 -05:00
William Wilgus
a8f6ddc5ed [Feature] bookmark.ignore to selectively ignore or include directories
allows blacklist / whitelisting of bookmarks by directory

Change-Id: I4eb684bb5775d1bba1c97b416e7d25e4763be553
2025-01-18 00:21:42 -05:00
Solomon Peachy
5e8d3fec66 voice: Silence a runtime warning when generating talkclips
Change-Id: I9d95377654d8883315657a1eff11ff198df9a41b
2025-01-17 11:36:36 -05:00
Solomon Peachy
e4fb35f173 Revert "Toolchains: Update to GCC 9.5.0"
This reverts commit 573ba5472e.

Reason for revert: Accidentally pushed to master, Maintainer will be put in timeout.

Change-Id: Iaa5c6eb18ae40dd64c13db75c0c3f6f519922d4a
2025-01-08 09:35:18 -05:00
Solomon Peachy
ada000e8de builds: Add 'Creative Zen V' as an unusable target
Change-Id: I3da683c3d9bc41336d3c5b35415c3248ff4371ae
2025-01-08 09:33:35 -05:00
Solomon Peachy
573ba5472e Toolchains: Update to GCC 9.5.0
All toolchain dependencies are circa the GCC 9.5.0 release:

  GCC 9.5.0, binutils 2.38, gmp 6.2.1, mpfr 4.1.1, mpc 1.2.1, isl 0.18

Native:

 * arm - mini2g, nano2g seems to work
       - ipod6g boot hang on 9.5.0 (possibly leading to disk corruption)
 * mips - xduoox3 seems stable so far
 * m68k - binaries untested

Hosted:

 * arm - binaries untested
 * mips - erosq seems stable so far
 * Android NDK - unchanged at GCC 4.9.4

Change-Id: I614f1b198643bfa8c45f68e4d8e15307a4998618
2025-01-08 09:31:51 -05:00
Solomon Peachy
8b01f939d8 hitiet ma8/ma9: add in keymaps for all plugins
Largely guesswork.

Change-Id: I8ab8d36de4bbdcf25dcf7d3442266bfb0a370b6f
2025-01-07 14:22:53 -05:00
Nick Feldmann
f1b53d129f android: make installToolchains.sh work again
Google changed their site and the layout of downloaded SDK zips.
Also add a warning to configure if a r2x series NDK version is used, because those aren't supported - they no longer contain GCC, only clang.

Change-Id: I48a42c38c9b657ac6662162a39763aac73ec502a
2025-01-01 09:59:34 -05:00
Christian Soffke
a032611e3e configure: remove clang warning for darwin host
not a reason to warn (anymore)

Change-Id: Ia4e42ebb03d1aa5e4a22906acb164fb795470773
2024-12-20 10:46:22 +01:00
Christian Soffke
727c800c0d Don't force gcc as host compiler + fix clang warnings
On MacOS, gcc is a symlink for clang.

Patch gets rid of the warnings produced by clang,
when it is set as HOSTCC, and fixes voicetools
compilation on MacOS when calling make voicetools
from the simulator directory.

lua rb_defines_helper:
format specifies type 'int' but the argument has
type 'long'

codecs: opus / speex (LOGF):
format '%ld' expects argument of type 'long int',
but argument 7 has type 'off_t'

gigabeat:
variable 'size' set but not used

rdf2binary:
a function declaration without a prototype is
deprecated in all versions of C

rbspeexdec:
passing 'unsigned char *' to parameter of type
'char *' converts between pointers to integer
types where one is of the unique plain 'char'
type and the other is not

hmac-sha1.c
defining a type within 'offsetof' is a Clang
extension

Change-Id: I90539906698868f9589650585d865aee9f7e8539
2024-12-20 05:29:18 +01:00
Christian Soffke
a86b1999d0 simulator: fix missing Werror option + eliminate lib duplicate
configure:
Ensure Werror option doesn't get lost when simcc resets GCCOPTS

uisimulator.make:
Remove ignored duplicate SIMLIB on Darwin

codecs.make:
Eliminate some redundancy

Change-Id: Ieee6f677fd22666cb58aa6fe53eabdc0b0f8c190
2024-12-19 15:04:46 -05:00
Christian Soffke
aeb4b6c34a mkboot500: fix compilation on MacOS
code changes limited to L-31-37,
rest is trailing whitespace cleanup

Change-Id: Iaec8f1daec5112715085f1a59b0347044fcbbc09
2024-12-17 13:33:35 +01:00
Vencislav Atanasov
1468649258 Convert non-ASCII characters to UTF-8 or C-string literals
Comments are converted to UTF-8.

Strings which are part of executable code are converted using C-string hex literals. A comment with the intended UTF-8 character is appended to such lines.

The "c"-looking character in mpa.c was actually a small cyrillic "s" (i.e. "с").

Change-Id: If3a889080ef60b8bf756ad9ada38baede93ce35b
2024-12-15 21:16:12 -05:00
Solomon Peachy
d6e57e6e8e Update simulator build release script
Change-Id: I4ff2f21da93534d8434304c4a61db3eb6ad62e0c
2024-12-10 23:11:48 -05:00
Solomon Peachy
29e909c25d SDL: Log the version detected
* At build time (in configure script)
 * At runtime (but only for simulator builds)

Change-Id: I01c6f0f39d4c68e3a5a037212b65baf693bb84a9
2024-12-10 09:01:32 -05:00
Solomon Peachy
0c8b71b00d checkwps: Update the cleanall script and documentation
Change-Id: I170875f2b199ec5395a8b66976a8bc17d9eb85f8
2024-12-07 18:09:17 -05:00
Solomon Peachy
93baf94dc3 configure: Disallow 'sdlapp' to be build as a simulator target.
Change-Id: I52cf549aa8a24080832413ca5afb197047b42bd7
2024-12-07 16:57:50 -05:00
Christian Soffke
c754bc5870 configure: minor ux improvements when compiling macos sim
- Show a warning when Apple's clang is detected,
  because compilation would fail with it. Then
  check for a (e.g.) Homebrew-installed version
  of GCC (14) and use it instead.

- Don't display multiple meaningless numbers when
  (incorrectly) parsing Apple's current LD version
  info. Set to 0 on Darwin, unless cross-compiling,
  since it only matters in the latter case.

Change-Id: I52236e1d1c349e30850c7786736d820c25b6d2d8
2024-12-07 17:16:31 +01:00
neofright
f895167345 Update Dockerfile for Debian 12
Change-Id: Iefbcb6f0c6869826b9ceec479eeb2c86b5d0bdcf
2024-12-06 07:55:21 -05:00
Solomon Peachy
61d70de7f4 tools: Fix up a bunch of compilation warnings
Plenty more to go.

Change-Id: I3f6e6686d3e581bb97493d40dcb7df74650ba96c
2024-12-03 20:37:55 -05:00
Christian Soffke
1745b74576 Make simulator compile on MacOS
Tested on MacOS Sequoia (Apple Silicon) with the
latest Xcode command line tools, gcc 14
(Homebrew GCC 14.2.0_1) and sdl2 (Homebrew 2.30.9)

Make sure 'gcc' (and 'gcc-ar') is in your PATH
ahead of the Xcode-provided "gcc"(clang). E.g.
by setting up symlinks in /usr/local/bin that
point to gcc-14 and gcc-ar-14.

Notes:
- The appropriate bmp from uisimulator/bitmaps
  has to be manually copied to your build folder
  and renamed to UI256.bmp, if you want the sim
  background to be displayed

Change-Id: I559f33d2165065f913f30c016b85906af380fb81
2024-11-30 22:19:02 -05:00
Solomon Peachy
f9ae6d6524 toolchain: Make it easier to build toolchains on modern MacOS
When building on MacOS:

 * greadlink instead of readlink
 * gsed instead of sed
 * $TMPDIR instead of a hardcoded /tmp
 * apply a macos-specific patch
 * additional option to GCC

Additionally, don't rely on the system 'isl' stuff; always have binutils
build its own.

The forum post also says that bumping mpfr 3.1.x to 4.1.x, and mpc
from 1.0.x to 1.2.x is needed, but I do not want to do that due to the
possibility of unknown codegen changes.

Change-Id: I18084d392fa927318cc2a1183da7eb2ffa0d5884
2024-11-30 22:06:35 -05:00
Solomon Peachy
fdc17096b5 build: add 'lto' to features.txt if built with it
This makes it easy to tell at a glance if a build was with LTO or not.

Change-Id: I7ba9b412f7b74d300a0c55e36ea4cf522d46e6f2
2024-11-30 13:49:42 -05:00
Solomon Peachy
bdf1690cb2 build: Allow LTO to work globally, not just codecs/plugins
IMPORTANT: There is no guarantee this will compile cleanly much less
_work_ on any given target.  This is purely to enable future hackery.

Change-Id: Ib58f21b717719fd4325622b446a60779406ae035
2024-11-24 08:23:38 -05:00
Solomon Peachy
200529532b configure: Allow bootloader to be specified under advanced options
This required renaming the LTO build option.

Change-Id: Ibd93e55d37b5226e7b3270d56cf07bf96a780f28
2024-11-24 08:16:07 -05:00
Dana Conrad
253eb79db3 erosqnative: hw4 support
Support hw4 units with AXP2101 PMU

Bootloader successfully compiles and loads onto device.
The LCD appears to be identical to hw3 units.
Scroll wheel and buttons work
Audio output works, including volume.
HP/LO detect works
Rockbox build is generic
GPIO gating logic seems to be working as intended now.

 - Added new GPIO definitions - some significant overlaps with pins
    from previous hardware revisions...
 - Added some GPIO definitions for older players we didn't know about
 - Add register definitions for AXP2101 from datasheet
    (these are very different from AXP192!)
 - Add AXP2101 regulator definitions, need to support multiple step
    sizes per regulator.
 - Verify AXP2101 voltage set multi-range logic
 - Verify AXP2101 voltage get multi-range logic
 - Make AXP2101 its own driver
 - AXP2101 driver should be "minimally viable", though I think
    there is some extra functionality that could be implemented.
 - Disabling the coulomb counter stuff - we could maybe make
   the E-Gauge work for the same purpose, but it only appears to
   be used on the debug screen at the moment so it doesn't seem
   like it's worth the effort.
 - Found new button GPIOs
 - Found error in my GPIO setting logic, blue light works now!
 - Set LDO/DCDC output voltages to OF's settings, as far as
   I can tell.
 - Determined we probably want TCS1421_CFG1:0 to be 0x00,
   for UFP behavior
 - Tested this rb build with both old and new bootloaders on hw1.5,
   hw2, hw4 in as many configurations as I can think of, works across
   the board.
 - Bootloader can install itself on hw4, so nand chip isn't novel
 - Uninstallation file can be made by patcher script, works on hw4
 - Installation file can be made by patcher script, works on hw4
 - Added HW4 to rbutil, manual

Change-Id: I5b75782273e81c2c6f2b9c79501c8b7cbf88391f
2024-11-22 17:01:39 -05:00
Solomon Peachy
505bbcaff5 voice: Correct piper voice name for es_MX
Change-Id: I39c78e5067c049b8b269138d7d26273a141deae2
2024-11-21 07:43:09 -05:00
Solomon Peachy
9b725a9fad voice: Add Spanish (Mexican) to the nightly voice sets.
This uses the piper engine.

Peninsular Spanish sounds markedly different from Central/South American
Spanish, so it seems prudent to offer both.

...We'll see how the masses feel.

Change-Id: Idfd3edd92c2dde7f9288afd99f474e59984689c9
2024-11-20 20:46:09 -05:00
Solomon Peachy
64d94889a2 voice: Enable nightly generation of a Spanish voice.
This uses Piper with a Peninsular Spanish voice.

I'd like to add Mexican Spanish as well, but then we'd have to use a
different TTS engine.  Espeak is relatively crappy, and gtts relies on a
remote service.

Change-Id: I5099f5cc4db5cc037efb5a77c023d4da4c73e813
2024-11-20 08:54:00 -05:00
Vencislav Atanasov
38df1ff311 Fix target order and formatting in case block
Added Creative Zen V (95) to the list, since it was missing.

Change-Id: I2f0115835db82d1bedba3ccc97bcb405af3d1dd9
2024-11-16 22:12:22 -05:00
Vencislav Atanasov
1451fa2cbb Reorder targets by number
Change-Id: I9c437fbb0949c18251b2b9cfea04e9e82ebecdb4
2024-11-16 21:48:15 -05:00
Solomon Peachy
d1ffaa8949 convbdf: Properly support a compiled sysfont of over 64K.
The 'struct font' definition says:

    const void *offset;           /* offsets into bitmap data,
                                     uint16_t if bits_size < 0xFFDB else uint32_t*/

However convbdf was unconditionally using 'unsigned short' without
checking bits_size. This generated a bogus table if used with an
uncapped SYSFONT due to offeset overflows.  And a pile of complier
warnings.

That said, we're still capping SYSFONT at 255 chars due to space
constraints -- 14-Rockbox-mix jumps from 2.6K to 1022K if left
uncapped.  Yowza.

Change-Id: I4577da08ab1633ab7abbc167523196f38c8a348a
2024-11-06 09:40:06 -05:00
Solomon Peachy
ca4529e4e3 voice: Correct "no." -> "number" voice correction
Change-Id: I71bafce327b8297767705f3132ae65288a08d439
2024-11-01 11:55:42 -04:00
Solomon Peachy
825e406965 configure: Parameterize the neame of the "sdl config" executable
We moved to SDL2 but still had the SDL1 'sdl-config' executable
used in one place.  Additionally, all comments and the help text
referenced the wrong executable name.

Change-Id: Ie2efa80d27be5f6391fc84e49e207aa2aac26e72
2024-10-31 08:35:12 -04:00
Solomon Peachy
eb2d596d72 updatelang: Normalize all strings in our lang files to NFC form.
Now no matter how [de]normalized the input strings are, we will
normalize them to the best of our ability in what we use.

This adds a dependencey for Perl's Unicode::Normalize.

Change-Id: I13e275692ea33a463b19f3a499ea06ce1acbb44a
2024-10-22 07:25:41 -04:00
Dana Conrad
aa1a74b2a1 erosqnative: bigger system font
Change-Id: I371bc644db3694404e8013959a7e412e6814f8e7
2024-10-17 20:34:23 -04:00
Solomon Peachy
542eeae11c configure: Document the '--with-ubsan' argument
Change-Id: Ib159cec30f6396b7bf02463b8833a062a38b8841
2024-10-14 08:56:12 -04:00
Solomon Peachy
d96b222a32 Fix previous commit. don't know how it "worked" for my test build.
Change-Id: I2137e3a7036be8378b70cc7462edad33c28b5a39
2024-10-13 19:22:00 -04:00
Solomon Peachy
66ed5232cb erosq: Change default sysfont to 14-Rockfont-Mix
Former default of 08-Rockbont was borderline illegible on the screen.

Change-Id: I200d6f692b145927f0579652f4ed1ce4c6ede118
2024-10-13 18:52:20 -04:00
Solomon Peachy
9420650c87 voice: Normalize all voiced strings NFC form before passing them to TTS engine
This should be a no-op for .lang files, but it can matter when
generating talk clips, as those are based on the raw filename.

Change-Id: Ia449ae7668818e4bf093347fd0fb15fa5b67fa69
2024-10-13 09:33:39 -04:00
Solomon Peachy
05194ec6eb voice-corrections: Add " no." -> "number " (English)
This is particularly useful for classical music, where track names like
"symphony no.5" are common -- We want to voice this as "symphony number
5" instead.

Change-Id: I3607dfccbafee2174519760b30636e0db0aad819
2024-10-12 16:41:46 -04:00
Solomon Peachy
1694101b23 voice: Also apply voice corrections to talkclips
Change-Id: I8846610933dd286d39f930f004787d9a5345a9ce
2024-10-12 16:41:46 -04:00
Solomon Peachy
e1bed147a3 build: Add advanced option to treat all warnings as errors.
Change-Id: I235f93d72bfc33243454edd04e45805b5c795f17
2024-10-12 10:34:45 -04:00
Solomon Peachy
49b6853c19 rockboxdev.sh: bump required version of GMP and MPFR
GMP 4.3.2 was quite old even at the time of the GCC 4.9.4 release, and
it refuses to compile out of the box on modern toolchains (eg GCC 14)
due to issues in the configure script.  Instead of trying to backport
fixes, just bump it up to 6.1.2, the final release in the 6.1.x series
that was current when GCC 4.9.4 was released.

Meanwhile, with the update to GMP, the also-quite-old MPFR 3.1.0 fails
to compile; instead bump it up to 3.1.6, which is the final release in
the 3.1.x series.

Change-Id: I356c07282b20629c90fb0de1b8be40d2c55bbefc
2024-10-11 13:01:26 -04:00
Solomon Peachy
7927423e34 SDL: Migrate to SDL2
Incorporates large portions of g#5879 g#5282 g#5285 g#5286 g#5287

Differences from the above patches:

 * Removed all MacOS-specific stuff
 * Removed support for SDL1 entirely
 * Properly implement mousewheel support
 * Bumped up minimum stack size for sigalstack threading
 * Check for overflow before enqueing scrollwheel events

Tested on:

 * sdl application (Linux)
 * Simulator (x86_64, Linux) -- xduoox3/ipod4g/sansafuze
 * Simulator (i686, Windows) -- xduoox3
 * Simulator (arm64, Linux)

Change-Id: Ia3012dd1be123feb2888798a42d5b7cc149f382b
2024-10-06 12:05:53 -04:00
Solomon Peachy
a056150d52 updatelang: Flag '|' in voice strings too
Change-Id: Id82bf7bd19741e7275d188ceeea872ebeb30e1eb
2024-09-18 10:43:34 -04:00
Solomon Peachy
24ae4aee33 updatelang: Expand suspicius character tests.
* dest:  < >
 * voice: [ ] < > { }

Change-Id: I97701e52807db996037b7542fb0b01f9db0dbc0f
2024-09-17 10:18:29 -04:00
Solomon Peachy
84375e5524 builds: Promote erosqnative, m3k, and q1 to stable
Change-Id: I6dde4a0d980544df2872f10cac9c0d085af688d0
2024-09-15 09:08:12 -04:00
Solomon Peachy
563137b480 builds: Mark the 'erosqnative' manual as okay, so it gets built nightly
Change-Id: I83ed24961e708b722b4c988577aeafa466c43943
2024-09-13 10:19:20 -04:00
Dana Conrad
2a0f3c8276 hibyos_nativepatcher: rewrite for either fresh install or uninstall
Since we can easily create our own install files for erosqnative,
modify script to create fresh install image from bootloader.erosq
or add bootloader to installation manifest of stock update file
to uninstall rockbox.

USAGE:

    hibyos_nativepatcher.sh <mkrbinstall/mkstockuboot> [arguments depend on mode, see below]

    hibyos_nativepatcher.sh mkrbinstall <OFVERNAME (erosq or eros_h2)>
        <path/to/output> <path/to/bootloader.erosq> <HWVER (hw1hw2 or hw3)>
        Output file will be path/to/output/erosqnative_RBVER-HWVER-OFVERNAME.upt.
        Only the Hifiwalker H2 v1.3 uses "eros_h2", everything else uses "erosq".

    hibyos_nativepatcher.sh mkstockuboot <path/to/OFupdatefile.upt>
        Output file will be path/to/OFupdatefile-rbuninstall.upt.

Change-Id: I16bc6e43c42f99475ebdd5ec1ac1bae047129745
2024-09-12 17:09:52 -04:00