Commit graph

2582 commits

Author SHA1 Message Date
Aidan MacDonald
7bf1c79cb5 make: have preprocess2file fail on error
The preprocess2file helper is mainly used to preprocess
linker scripts, but piping the preprocessor output to
'grep' masks the exit code of gcc, so if it fails (eg.
due to an #error directive) then it does not cause the
build to fail like it should.

In this particular case the grep commands don't seem to
be doing anything, since the "-P" option suppresses line
markers, which "grep -v ^$(_hash)" is probably meant to
filter out. The intent behind "grep -v ^$$" is unclear
since the preprocessor doesn't seem to output any line
beginning with '$', but in any event it seems unnecessary.

Change-Id: Ie23f5de1fe1bfb5890c7b2f3c7fa05401931d89f
2026-03-06 13:28:24 +00:00
Aidan MacDonald
5a236963e4 misc: get rid of unused LOADADDRESS define in makefiles
Change-Id: I990aaca9b0b8230efba09c87ace2430fbfa29b74
2026-03-05 20:11:07 +00:00
Solomon Peachy
3a99ef21cd build-info: Add a newline before the [status] section
Marginal improvement in readability

Change-Id: Ic962ec2bb9ad09e5151cd4f712a9f5768da282bc
2026-03-04 08:17:12 -05:00
Solomon Peachy
b93f3d0589 updatelang: Update validation check for LANG_VOICED_DATE_FORMAT
Missed this in the previous commit

Change-Id: Ia85a8017abfeca369b0e12723468cbe8018def8f
2026-03-01 16:42:32 -05:00
Roman Artiukhin
aea9e1b63f configure: add ability to select plugins to build in --plugins flag
Use ":" as the separator. Useful for plugin development and debugging.

Example:
../tools/configure --target=hibyr1 --type=ADS --plugins="properties.c:imageviewer"

This creates a debug simulator build for Hiby R1 with the properties.c file and the imageviewer directory plugins enabled.

Change-Id: If974cfb0c54bd2c1a53ae11cc3f942c698ef2fe4
2026-02-16 13:42:58 +02:00
Solomon Peachy
f5be6cd10c rbutil: Add support for Vietnamese to the SAPI TTS glue code
Change-Id: I2cd7f8540717a95b3d05e836c5502313a9db6b50
2026-02-08 20:27:00 -05:00
Solomon Peachy
b722e3c83a mrobe500: define HAVE_BOOTLOADER_USB_MODE
Fixes red, and will restore USB functionality that was effectively
broken from earlier commits.

Change-Id: I98150a81e3f73131bfedccdaf3de740a091debf9
2026-02-07 09:32:16 -05:00
Aidan MacDonald
58b186d6de Remove Creative Zen Vision and Vision:M ports
They haven't seen development activity for the better part
of two decades and apparently were never able to even boot
to Rockbox, although the Rockbox bootloader could load the
original firmware.

Change-Id: I5cfa5909c21feaf2825aa685a05e78044b893a13
2026-02-06 07:31:54 -05:00
Aidan MacDonald
653bca7ff4 make: allow building flat binary plugins on USE_ELF targets (attempt 2)
Looks like I forgot to test the hosted builds and for some
reason thought that make would expand objcopy recursively...

Change-Id: I61264eadcb1235660566f6a9f19f8718ebe14583
2026-02-04 16:45:25 +00:00
Aidan MacDonald
ebd273832d Remove Mini2440 and Lyre prototype 1 ports
Both targets were part of the (presumably dead) Lyre project
and no longer build. The Mini2440 was much more complete than
the Lyre and doesn't seem terribly difficult to fix up to the
point where it at least builds, if someone still cares -- but
given it is a dev board in a box, it's unlikely it ever saw
much use.

Change-Id: I09745379d28db69ea9aaf77f0a62b049884260e1
2026-02-04 08:56:04 -05:00
Solomon Peachy
1e2950cc6c Revert "make: allow building flat binary plugins on USE_ELF targets"
This reverts commit 91ec6f1e1e.

Reason for revert: Massive sea of red, looks like hosted + sim builds.

Change-Id: I98a3954d68ad2cc521e13c3683bf4a6f45f88b36
2026-02-04 08:49:19 -05:00
Aidan MacDonald
91ec6f1e1e make: allow building flat binary plugins on USE_ELF targets
From what I can see the Creative Zen Vision ports, which
were the only ones to set USE_ELF prior to the Echo R1 port,
do not work except for a bootloader and never even got to
the point of booting Rockbox. This explains why they build
codecs and plugins as ELF binaries, yet there is no code to
load ELF format codecs or plugins.

Anyhow, add a new setting, PLUGIN_USE_ELF, which controls
whether plugins & codecs are left as ELF or converted to
flat binaries. This makes it possible for the Echo R1 to
use the flat binary .rock format, and makes it possible to
have ELF plugins/codecs on targets with non-ELF main binaries.

Seeing as nothing needs ELF plugins/codecs right now, the
new default is to generate them as flat binaries unless
the target requests otherwise.

Change-Id: I9ffae669978de5cc7ad214cd50d97ad6e8938394
2026-02-04 07:32:43 -05:00
Aidan MacDonald
53862c7eed Remove Sansa View port
It doesn't seem to have been functional ever and currently
doesn't build; eg. the last commit to the LCD driver added
a syntax error, and there's some duplicate functions between
mmu-armv6.S and system-pp502x.c. Doesn't seem worth the
effort to fix.

Change-Id: I82b5bec3ed9686f28aedbe283818af792b96daf4
2026-02-03 22:04:41 +00:00
Aidan MacDonald
1a33d7990a Remove Meizu M3/M6SL/M6SP and Samsung YP-S3 ports
These targets haven't seen any changes since 2008-09
have bitrotted to the point they don't compile anymore.
With only internal NAND flash for storage which doesn't
seem to have ever been accessible from Rockbox, they've
never been usable and there's probably not much point
keeping them around any more.

Change-Id: I2fc63da20682b439126672065ae013044cb2d1c4
2026-02-03 16:32:56 +00:00
Roman Artiukhin
98b25f146b rockboxdev: glib: drop tests and docs from autreconf
Removes dependency on distuitls (ModuleNotFoundError: No module named 'distutils');
gtk-doc-tools still required;

Change-Id: I50f69411d146b5b9b9c496b3507bcef5bb1638bc
2026-01-31 15:48:23 +02:00
Roman Artiukhin
3bfce366ac hiby: r1_patcher: stop script execution on any error
Change-Id: Ic683b8ed155a5e9d2779d40a3b7673579056d9b1
2026-01-31 13:26:35 +02:00
Solomon Peachy
83420e0a95 voice: Switch default en_GB TTS voice to Piper's 'alba' #2
The previous commit just switched the voice used for the nightlies; this
changes the default used when using the cmdline voice.pl tool without
the user overriding it with something else.

Change-Id: I5144fe66e355f3c41677ca37226a743667d291bf
2026-01-27 17:45:19 -05:00
Solomon Peachy
30ff611529 voice: Switch default en_GB TTS voice to Piper's 'alba'.
Does better for short phrases/words than 'semaine'. "No/Yes" and
numbers in were pretty bad in particular.

Change-Id: I795ad57b7ca8c5b8a3fe0c2b721ef167d0dd9f6d
2026-01-27 17:27:20 -05:00
Aidan MacDonald
77f30202d0 tools: detect Git revision correctly in non-default worktrees
In a non-default Git worktree, the .git directory is replaced
by a file containing the path to the real .git directory. This
breaks the version detection logic because it expects .git to
be a directory.

Passing the root of the source tree via "git -C", letting Git
figure out if we're in a repo or not, solves this problem.

Change-Id: I595f1a694258cad490b1a4964f8ae9d51ae76de1
2026-01-27 09:22:31 -05:00
Aidan MacDonald
d5506dfa22 echoplayer: implement boot from debugger
Add a 'make start' target which starts Rockbox using a
debugger. This only works to load the main binary, but
makes it much faster to test changes that don't affect
plugins/codecs.

Because SDRAM isn't accessible at reset and the main
binary is usually too big to fit in SRAM, the bootloader
must be flashed first before Rockbox can be loaded in
this way.

The boot protocol involves GDB writing a check pattern
to SRAM while the CPU is held in reset. The bootloader
detects the pattern and takes a breakpoint, by which
time SDRAM is accessible; GDB can then upload a binary
ELF image (copied as a raw file, since the ELF will be
loaded using RB's ELF loader) and leave the breakpoint
to continue booting.

From there the bootloader can load the ELF binary from
memory, exactly like a normal SD card boot.

Change-Id: I4eb971b4162ea422e38660455cfa0958cefaa18d
2026-01-26 08:55:01 -05:00
Roman Artiukhin
58ace97a4e hiby: r1_patcher: embed hiby_player.sh
Make it a single-file, self-contained script.

Change-Id: Idb3e375f1f9774c9328288765c7d1c7c1e01e2d3
2026-01-24 20:20:01 -05:00
Roman Artiukhin
db8494d4e0 hiby: r1_patcher: quote path variables
Change-Id: I5d03b4ecec1847c404a2f2400b648469023942e2
2026-01-24 20:20:01 -05:00
Roman Artiukhin
86f35f1b53 hiby: r1_patcher: use generic bootloader name
Rename bootloader.r1 to bootloader.rb for use across multiple devices (Hiby R1, HiBy R3 Pro II and others).

Change-Id: Ib509d37d605391012a792a69b11a557b0319d2ce
2026-01-21 08:41:08 +02:00
Roman Artiukhin
da5d6f8bf3 hiby: r1_patcher: add hotplug support
Change-Id: I8b82842f26ac6444b32e166308b7c5deb17fab7a
2026-01-20 09:27:03 +02:00
Roman Artiukhin
b25f59a98a hiby: r1_patcher: fix possible boot hang and flash failures
- Sort image parts for deterministic results.
- Ensure bootloader.r1 is correctly named and has +x permissions.

Change-Id: I391c935d75e5079010fc91d3614d9221d34e4c6b
2026-01-20 09:27:02 +02:00
Solomon Peachy
fcb2289274 voice: when building from vstrings targetid needs to come from within
Change-Id: I2a1c6a249523ec7a1d339e7b08f1686dad1d0270
2026-01-15 09:20:06 -05:00
Solomon Peachy
0777add596 voice: Support generating voice files from contents of voicestrings.zip
Every build includes .rockbox/lang/voicestrings.zip, which contains
everything needed to build a voice file for that build.

This is already used by the rockbox utility, but now it is possible to
achieve the same using purely cmdline tools.

If the new voice-enum.txt file is present in the voicestrings.zip file,
this new flow produces bit-for-bit identical voice as the existing 'make
voice' flow.

Change-Id: Ieb24bc261a75b0e531c1889c49402217f7d14302
2026-01-09 20:50:09 -05:00
Solomon Peachy
98a182a19f genlang: More fixes
* "english.list" started the VOICE_* enumeration at the wrong number
 * vstrings file had the wrong string count

There is still one remaining issue; Currently the vstrings header is
generated with a section size that is consistently 6 bytes shorter than
the actual data. However, the non-voice .lng file has correct size.

Change-Id: I01f9622399cf3f3ac4c62ddea1deeb19a7b028ba
2026-01-08 09:35:12 -05:00
Solomon Peachy
24220d13e5 genlang: Correct the 'size' in the binary vstrings sub-header
It was only taking into account LANG_* strings, and ignoring VOICE_*

Fortunately rbutil currently ignores this field as it's not needed.

Change-Id: If58230cd047abe7a80ebab7eca9147e510b034ea
2026-01-06 23:09:49 -05:00
Solomon Peachy
2c30a6e243 voice: Switch default Turkish Piper TTS voice from fettah to dfki
The former was removed from the upstream repositories "at the request of
contributors", leaving only the latter.

Change-Id: I4afe827be9037915d6d13b4d7ec0713509b88da3
2026-01-04 17:24:53 -05:00
Solomon Peachy
8aec8ee686 configure: Filter out "-Wl,-z,noexecstack" for winsim builds
Change-Id: I0222627729fbd475dfa7f4955b534f76ca780ccf
2026-01-02 07:51:44 -05:00
Mauricio Garrido
09a31fff91 3ds: Enable plugins for the 3ds platform.
This commit enables plugins for the 3ds platform.
And adds 3ds specific pad configurations for each plugin.

Change-Id: Ie28fef4da32ed4cd2caa6c9fa3b2fe312ee009ef
2025-12-31 21:13:34 -05:00
Aidan MacDonald
7418e65138 echoplayer: add 'debug' and 'flash' targets to makefile
This replaces the gdb & openocd config in utils/stm32tools
and is easier to use. Remove the srst workaround; it seems
this was caused by the D1/D3 domains not being powered up
while the CPU was in sleep mode.

Change-Id: I28cc0273b3004c6e3146bb2447f0655cad8bb1c2
2025-12-31 08:10:40 -05:00
Aidan MacDonald
fcf67a2ea9 echoplayer: enable reggen
Change-Id: Iab8ffd231f226d2772201ad92f3920065b7b0736
2025-12-30 13:53:48 -05:00
Aidan MacDonald
44afcc8cbe firmware: add build rules for RegGen-generated headers
Change-Id: I86ff1a39aec1ee428abd6464483ae3732fdf9196
2025-12-30 13:53:48 -05:00
Marc Aarts
a3d16e34ec Update rockboxdev.sh:
- Change alsa-lib and libffi source to use https instead of ftp
- Change glib source to current path (avoids redirect)
- Change mpc source to GNU mirror because www.multiprecision.org seems down
- Change remaining http to https

Original reason for the change is that on WSL2 (Windows 11) for some reason ftp links do not appear to work.

Change-Id: Ib20470e39f625df790895452b6d6b4003cebae07
2025-12-30 07:11:11 -05:00
Aidan MacDonald
969a2b65c7 tools: add RegGen utility
This is a tool written in C which does basically the same job
as regtools' headergen_v2, but using a new input format which
is less verbose than XML. In the interests of simplicity it
omits some features that regtools does support, like variant
registers or the SoC selector stuff so it cannot completely
replace regtools on the i.MX platforms that use these features.

RegGen doesn't generate API macros like regtools does; instead
these are expected to be maintained by hand, since it's arguably
easier to do that way.

Since RegGen has no dependencies beyond a C compiler it can
be integrated with the build system without adding any new
build time dependencies. This will allow generating headers
automatically, which is a substantial improvement over running
headergen_v2 by hand and committing the generated output.

The RegGen tool itself is licensed as GPLv3+, but generated
headers can be licensed as the user chooses.

Change-Id: If18f9577f8f4df6e2c97c1665b725773dd5466f0
2025-12-29 18:51:56 -05:00
Solomon Peachy
9c15ef82ee builds: Add Hiby R1 and R3ProII as Unstable targets
Change-Id: If901cacb295668ca661cf5450e88db509aabf409
2025-12-27 17:07:42 -05:00
Marc Aarts
1183b1ab1b Rockbox for the HiBy R3 Pro II/R1
Original author Melissa Autumn (https://codeberg.org/oopsallnaps/rockbox-hibyos) with contributions from Marc Aarts.

Adaptation to Rockbox standards by Marc Aarts

Change-Id: I09e5af7ba0a75c648e4b9fd424badc2d3665c943
2025-12-27 15:44:54 -05:00
Aidan MacDonald
d24a127f63 echoplayer: enable USE_ELF to generate ELF binaries
Make the final .echo binary an ELF file. Most STM32s have
their SRAM divided in multiple non-contiguous regions and
putting an ELF loader in the bootloader is basically the
only reasonable way to load Rockbox on such a system.

Change-Id: I818ef9fefe0d53b44cf64402ee1794ad261343eb
2025-12-23 17:57:59 +00:00
Aidan MacDonald
2e85027ae7 configure: set USE_ELF to no by default
Otherwise, toggling USE_ELF in the target's configure section
and running 'make reconf' has no effect, because the previous
value of USE_ELF is inherited from the makefile.

Change-Id: I72d605ef6987fc590871566d73b24acf37e8fbe6
2025-12-23 17:57:59 +00:00
Aidan MacDonald
6078b2a6b4 echoplayer: enable debug symbols by default
This adds debug symbols to rockbox.elf & bootloader.elf to
make debugging with GDB easier. This won't affect code that
runs on the target because debug symbols are stripped from
the final binary.

Change-Id: I9efe207c63e8bd96404213aad96405be27030ae9
2025-12-23 17:57:59 +00:00
neofright
8cc372c4e4 Add line break to fprintf in database.c
Before:
Scanning files (may take some time)...Read metadata for /Music/foo/bar/baz.ogg

  After:
Scanning files (may take some time)...
Read metadata for /Music/foo/bar/baz.ogg

Change-Id: Id3816104779fd80930cd213bab29765bdd3db451
2025-12-20 02:47:08 -05:00
Solomon Peachy
ecb3e9936f build: Explicitly disable all arch-specific optimizations for sdlapp or sim
Change-Id: I76d1097cea58018cb1e96dbbce8d5feaeacd8a96
2025-12-07 13:22:28 -05:00
Christian Soffke
95ab3e8b0e configure: Fix compatibility with BSD sed used in MacOS
Change-Id: I72f26eed4cbb3996d0a92c4334fa2c63b973bc9b
2025-12-07 13:22:17 -05:00
Solomon Peachy
dada036b10 configure: Partial revert of 6c6bdbf60e
Turns out I compile-tested stale trees instead of the broken change

Net result is just the simpler MIPS revision (32/64/"classic") lookup rather than
the sub-revision (eg mips32r2 etc).

Change-Id: Ideebe522d29132f00f3769222f3846000b3a89fd
2025-12-06 15:54:43 -05:00
Solomon Peachy
6c6bdbf60e configure: Revamp MIPS architecture version+revision detection
This allows us to easily distinguish between mips32 and mips32r2

(Works at least as far back as gcc 4.9)

Change-Id: I2bcba194fd9cbeedf76cea739252271908bf73d0
2025-12-06 14:58:40 -05:00
Solomon Peachy
5e5b434ce8 configure: Simplify the arm architecture version lookup
Going back to at least gcc 4.9, we can key off of __ARM_ARCH
which is all we care about here.

Change-Id: Ic2659db5ff55ccefe2c3f71957b967f36025f7e3
2025-12-06 14:43:03 -05:00
Solomon Peachy
1203b8657e configure: -masm-syntax-unified does not apply to aarch64
Change-Id: Ida12a60b629ccdea3980bcabc79812e3b97181e8
2025-12-06 14:24:32 -05:00
Solomon Peachy
afe128f4cc arm: Profile/variation detection improvements
* Detection of 64-bit Arm v8-a
 * Proper detection of integer division support
   * always on v7-m, v8-a, v9-a, v8-m.main
   * sometimes on v7-a, v7-r, v8-r
   * never on v8-m.base v6-m, v6 and older "classic"
   * tl;dr: Rely on toolchain preprocessor definition

For the most part these additional variations won't acutally work
for native target builds, but sane -A detection is needed for
"local" builds now. -R detection is left out as it's not likely
to matter.

Change-Id: I8f6a52edc4d14490fc00e2f487406eca701eef02
2025-12-04 20:43:30 -05:00