Commit graph

2637 commits

Author SHA1 Message Date
Solomon Peachy
c0ae6c7cd1 FS#14019: Detect and reject outdated binary language files (WIP)
Accomplish this by checksumming the english language input
and (1) including that in binary files and (2) checking the
value matches what was compiled into the firmware image

Not sure if this is the best approach but it works.

Change-Id: I8f79ad1b9d1cdf69e6a085d7b3dd1b5e078af04b
2026-10-02 09:14:52 -04:00
Solomon Peachy
5dc5c4a06c checkwps: Fix red on monchrome devices
Change-Id: Ib9064fea51eaf9ce4a2095c1f1d599fc193d2a6d
2026-10-02 08:04:24 -04:00
Solomon Peachy
152c348537 FS#14025 Checkwps now validates theme cfg files
This allows fonts, backdrops, and wps/fms/sbs to be checked.

Note that while settings _names_ are validated, the _values_
can not always be checked.  Detectable settings errors
are flagged, but are not considered fatal.

Change-Id: I2a2b7ad94462e983345a1e692eccd6bd57e90eb9
2026-10-02 07:50:19 -04:00
Marcin Bukat
6350d3f7a0 YP-CP3: build plugins
The YP-CP3 shares the YP-R0's keypad and so its plugin keymaps; with
the 400x240 screen handled every plugin builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I516ab057c081e710cbc1cf6eca2b24ee87231244
2026-10-02 10:30:58 +02:00
Vencislav Atanasov
23f1f294b5 Fix case of "iPod" in docs and CLI tools help
Change-Id: I50a6a8f9cac361eee1c36f66570b20b5521b3283
2026-10-01 17:32:24 -04:00
Solomon Peachy
67ba9c3121 imx233: re-enable utf8proc and associated functionality.
Will require updated bootloaders!

Change-Id: Id9a3da0b05fe27f7a3d27443a2f15742455d86c2
2026-09-29 22:39:49 -04:00
Solomon Peachy
0b2caf7338 configure: Clean up 'appextra' definitions.
The contents of appextra are added to the INCLUDES list, eg:

   appextra="recorder:hosted"

will result in this at compile time:

   INCLUDES += -I$(APPDIR)/recorder -I$(APPDIR)/hosted

With that in mind,

 * 'gui' and 'recorder' have been set for all targets other than
   the original charcell Archos. Globally set these instead of
   using them everywhere.
 * 'hosted' was effectively a no-op and removed entirely.
 * 'radio' was specified on a lot of targets that didn't have a radio,
   just make it global as well.

The net result is that only the android targets now define 'appextra' in
their configure entry.  A future patch will remove the need to specify
the ones that are now global.

Change-Id: I751284cde4785077c54405a8a10be819021e4255
2026-09-29 09:12:59 -04:00
Solomon Peachy
e1a18fa15c builds: Relegate Samsung YP-CP3 to "unusable" status for now
It's not part of the build farm, doesn't have a manual, and isn't
even listed on the www site or wiki yet.

Change-Id: I5fc79d0316717898f16ff794cba114a46472ae8f
2026-09-29 08:29:13 -04:00
Marcin Bukat
c922ef98c3 YP-CP3: Si4703 FM radio
The YP-CP3's tuner is a Silicon Labs Si470x at I2C address 0x20, an
Si4703 by the RDS the original firmware enables. The firmware drives it
the Si470x way - writes from register 2, reads from 0x0A - starts its
oscillator with TEST1 = 0x8100 and a 500 ms wait before ENABLE, and has
no power or reset line for it.

- config: CONFIG_TUNER SI4700 with RDS, polled (no interrupt line
  needed), and FM radio as an input source
- si4700.c: the YP-CP3 starts the oscillator as the Sansas do
- power-ypcp3.c: tuner power stubs - there is nothing to switch
- the rk27xx tuner I2C glue, and "radio" in the target's configure entry
- wm8751.c: audiohw_set_monitor() for a WM8750 target that plays the
  radio but cannot record (rk27xx has no recording yet). The tuner, on
  LINPUT1/RINPUT1, goes through the input PGA at +12 dB - as in the
  original firmware - into the output mixers, the DAC staying in the mix.
  The existing monitor routing lives in the recording code and switches
  OUT2 off, which is the YP-CP3's headphone output.

Tested on a YP-CP3: stations tune and play at a sane level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ic097fc85dbd7fb71fcc28c97a9d378fa09599e79
2026-09-29 09:47:51 +02:00
Marcin Bukat
98f162b212 New target: Samsung YP-CP3 (rk27xx)
Scaffolding for a port, starting from the rk27xx generic target: configure
entry 146 (target id 117, model number 132), config/samsungypcp3.h, and
firmware/target/arm/rk27xx/ypcp3/.

- LCD: the rk27xx LCD interface (lcdif-rk27xx.c) with this panel's init
  sequence, from RE. See g#1050. Looks like SPFD5420A 18-bit bus,
  400x240 landscape. It differs from the generic panel's sequence in the
  gamma curve and in not writing VCOM_HV1.

- Backlight: PD4 / PWM0 with the generic board's timing, which the hwstub
  work found to be the same.

- Storage: the microSD slot. Card detect is PC7, active low,
  as on the generic board.

- Keys: the YP-R0's key set - five-way yog, Back, Menu, Rec/User, Power -
  so the target uses SAMSUNG_YPR0_PAD and its keymaps. Eight keys sit on
  two resistor ladders on the LSADC, found in the original firmware and
  measured on a unit:
      channel 1   up 158, down 295, select 435, left 561, right 687
      channel 2   menu 155, back 292, user 431
  each key owning half a step either side of its reading;
  power is GPIO C1, active high.

Builds as firmware and as bootloader. Status 3 (unusable) in builds.pm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Iff4984023415f341ca7507af6b5b2b551201e953
2026-09-29 08:53:27 +02:00
Solomon Peachy
e9a6b58870 toolchain: Fix hosted arm/mips toolchain build with texinfo 7.0/7.1
A crash bug in those versions of texinfo (fixed in 7.20) caused the
glibc manual to fail to build.  There is no build-time argument to
disable the manual, but there is a version check that gracefully
accomplishes the same thing.

So, add 7.0/7.1 in the glibc configure script blacklist.

Change-Id: If841aceeb7986db8274d145a5ea317278890eb30
2026-09-28 15:17:14 -04:00
Solomon Peachy
af9b65485b build: move '-mthumb-interwork' into the configure script
When we request a thumb build on a non-thumb-only target, we hand
compilation to a script that tries to build everything as thumb, falling
back to non-thumb arm mode if the thumb build fails.  In order for
this to work, the compiler flag -mthumb-interwork is required.

Move this definition out of the thumb-cc script, and into the configure
script (ie along with the other target-specific definitions)

Change-Id: Idc1f8caa088dbbf710b169b272de61cc0b7c9ca6
2026-09-19 21:18:30 -04:00
Mauricio Garrido
94d422f1c4 3ds: small fix.
Rename missing ctru variable to 3ds and remove 3ds specific headers from
common ones.

Change-Id: Ib99cf2d31671dec0f6ca1de68ca2e33693991dc3
2026-09-02 05:41:40 -04:00
Michael McAllister
f349e85154 ingenic: move the drivers the X1000 shares with other SoCs
Pure file move, in preparation for a second Ingenic SoC.

  dma, gpio, i2c, installer, kernel, nand and the SPL NAND backend
  move from target/mips/ingenic_x1000/ to target/mips/ingenic/

Drivers that cannot move as whole files, because part of each is
genuinely X1000-specific, are left alone for now: msc, uart, sfc, the
debug menu and the OST helpers in system-x1000.c.

Verified as a no-op: built at target 246 --type=b before and after from
the same source path, bootloader.bin is byte-identical, and every moved
file's object has the same instruction stream under its new name.
Builds clean with no warnings for targets 246, 260 and 247, both
--type=n and --type=b.

Change-Id: I9f67c23384df49b8c4554d695b772bcd54a4e32f
Co-Authored-By: Claude Opus 5
2026-09-01 11:37:21 -04:00
Mauricio Garrido
e498c0171a 3ds: Port refactor.
This commit does the following changes to the 3ds port:

- Rename the target from ctru to 3ds.
- Rename all files and functions with the ctru naming convention to 3ds.
- Created a new file and folder structure that will better integrate future console ports that share the same codebase.
- Fixed a buffer overflow bug in pcm code.

Change-Id: I17c6f86df64eb99dd2b653485d70832ff46b2ba8
2026-09-01 08:39:07 -04:00
Christian Soffke
28e5a125ab configure: macos: fix checkwps error messages
Change-Id: Ic42c20bf011861413245b671a79de6df1b6f43fb
2026-08-28 16:51:55 -04:00
Christian Soffke
8536d981a8 checkwps: print file name extension instead of "WPS"
Change-Id: I5b0a90993dcda293400ac0d805451a5f18bca322
2026-08-28 13:42:38 +02:00
Solomon Peachy
fd2b070bb1 FS#13984 - Rockbox Utility: Add SAPI5 voice volume control (Alessio Lenzi)
Rockbox Utility currently exposes SAPI5 voice speed but not the SAPI
voice volume. The encoder volume setting is applied after synthesis, so
it cannot prevent clipping or distortion already present in the
generated wave file.

This patch adds a Volume control to the SAPI5 TTS configuration. The
value is passed to the standard SpVoice.Volume property before
synthesis.

Change-Id: Ifa43e55f716f98150e94c86e5e6a6c8bce0ca852
2026-08-25 11:11:42 -04:00
Solomon Peachy
aeaee5da45 voice.pl: Extract PERFORMER and TITLE from cuesheets
Change-Id: Ib83b0c7bc74777ce6d78a6c9507c3d0732552334
2026-08-25 07:54:03 -04:00
Christian Soffke
50b13493d2 skin_engine: make skin file type available to parser
Keep track of the type of skin file being parsed,
in case a tag needs this info.

E.g. %Lt should be ignored in any skin other than
SBS files.

Change-Id: Ib7e52c3e6810196cb566adb65619a1b847cf20ef
2026-08-22 19:52:43 +02:00
Solomon Peachy
459c5e7937 Move Hidizs AP80MAX to the 'unstable' list
This means it will end up in nightlies, get voice builds, etc.

Next up is to add it to the themesite..

Change-Id: I78dc77addebceb49773adaa3b70e9a457585fe62
2026-08-15 07:36:10 -04:00
Jerry Shen
51d7d56803 ap80max: New hosted port
HibyOS-based target: keymaps, LED, powermgmt, bootloader and sim support,
plus cabbiev2 for the new 360x640x16 screen. Opus 5 helped w/ debugging
and the initial scaffolding.

Updated name to FB_STRIDE_MISMATCH, added simulator bmp and specs.

Change-Id: If797ac6581cf75d9d1fcf36e615ee03cf6f905d6
2026-08-13 17:55:06 -07:00
Roman Artiukhin
842492d77b hiby: r1_patcher: add macOS support
Change-Id: If9f11fc7fbac87275325f0f892c2546184714d0b
2026-08-12 11:21:10 +03:00
Skye
85c1ff8667 change build scripts to make reproducible builds possible
- makes SOURCE_DATE_EPOCH affect BUILDDATE and version string
- makes wpsbuild.pl output deterministic
- omits unnecessary extended metadata from zip files
- runs strip-nondeterminism on zip files if REPRODUCIBLE_ZIP is set

Change-Id: I1617e3f5233b2bc356fcfa6457be1a7785c303f9
2026-08-09 10:29:48 -04:00
Roman Artiukhin
eecd4ec98b hiby: r1_patcher: fix sd hotplug on newer firmwares
flush mount option is no longer available.

Change-Id: I2380c1adcd2c2ba914db492eff1ed49bb45cb30c
2026-08-08 22:12:31 +03:00
Roman Artiukhin
4f65dfa649 hiby: r1_patcher: add separate pack/unpack/inject-app options
Change-Id: I87f513b55b1cb58b6c1c3f307fcb734e36bda8e3
2026-08-08 22:12:31 +03:00
Solomon Peachy
2d2b03d314 build: Bundle the main .map files into the zip file
This covers the rockbox binary (or bootloader), which increases the zip
file by 60-80k depending on the target.

It currently *excludes* codecs and plugins, which can add over 1MB to
the zip file.  We can revisit this when/if we move to distributing 7zip
files instead.

Change-Id: Iec72dd3aa634ceca716975c13b7fa8707a485d30
2026-08-06 09:46:10 -04:00
Solomon Peachy
a467bfc55f FS#13972 - Improve rbutil SAPI5 stability (Alessio Lenzi)
The existing code treated any ready-read notification from cscript as
proof that synthesis had completed. The SAPI script can emit other
output, so the Utility could check for the wave file before the explicit
SYNC reply and report that the output file did not exist.

The script also used global "On Error Resume Next" without reporting
errors from SpFileStream.Open(), SpVoice.Speak(), or
SpFileStream.Close(). Several waits had no timeout, allowing the GUI
thread to remain blocked indefinitely.

The changes:

 * reports SAPI COM errors to Rockbox Utility;
 * verifies that SAPI actually created the requested wave file;
 * waits for the explicit SYNC reply instead of any process output;
 * applies finite timeouts to vendor queries, synthesis, and shutdown;
 * terminates a stuck private cscript process safely;
 * restarts cscript and retries the current string up to three times when a
   third-party SAPI engine stops responding during a long generation run.

Change-Id: I2cf2aefb704353c648bef0c4312f35282ac4e25d
2026-08-04 17:03:50 -04:00
Solomon Peachy
5f129ef299 tools: Update mkinfo to handle the echor1 target's symbols
With this change, RAM size is computed (and reported) properly.

Change-Id: I4ead8f677c69b78141b137e05d9da942dd4d8138
2026-07-27 20:27:30 -04:00
Aidan MacDonald
7e6ae1e0d8 echoplayer: enable plugins
First pass at enabling plugins and setting up keymaps.

Change-Id: I3140160bcc3044850416904840b35065f86ac32d
2026-07-12 08:56:44 -04:00
Solomon Peachy
4e770b4b87 rbutil: Add missing SAPI5 LANGID for Moldavian (ro_MD)
Change-Id: Ica67356d9bf71784543e17ea98abc8a8716d6fba
2026-07-10 22:12:11 -04:00
Solomon Peachy
2b6a8ffba2 rbutil: Get rid of all remnants of SAPI4 TTS support
Change-Id: I89cc53e2ebea273752c119e8c63f7eb36b1f22e0
2026-07-10 22:12:11 -04:00
Solomon Peachy
8e89f8a5d6 voicefont: Detect when the encoded filename overflows the buffer
...And handle it gracefully.

This shuts up 2 of the 3 remaining rbutil build warnings.

Change-Id: I03b057e566ba663a72cbae159e78070b9934fa0d
2026-07-05 10:07:36 -04:00
Solomon Peachy
04a7a60f8b lubucl: Update from upstream v1.01 to v1.03
Should hopefully address the small pile of windows build warnings

Change-Id: I0bc493ce5c76591eb2e663894702d003933fe14b
2026-07-05 08:06:53 -04:00
Solomon Peachy
202243a1ab tools: fix up build warnings
Change-Id: Ib1b11f2361d4a20a8cd3c4107f8e546f8ece3f49
2026-06-26 21:38:57 -04:00
Solomon Peachy
b6db69e7ef build: Move utf8proc build decision into configure script.
It is always enabled, except in the following situations:

 * bootloaders
 * warble or checkwps applications
 * devices with less than 4MB of RAM
 * imx233-based devices

imx233 is a special case; that will be backed out we figure out why
it fails to boot if the binary size exceeds 1MB.

Change-Id: If4a89e389f562bb5791a565fba99c830213473d3
2026-06-22 17:31:15 -04:00
Christian Soffke
cd699e5448 configure: darwin: update GCC, use SDL threads
The simulator on macOS has been broken since macOS 26.4
was introduced. On macOS 26.4, 26.5, and the 27 beta,
thread setup fails in make_context (firmware/asm/thread-
unix.c), because sigaltstack returns an "Operation not
permitted" error. Fall back to SDL threads until this
can be fixed.

Also update GCC to keep it in sync with the latest
Homebrew formula
(https://formulae.brew.sh/formula/gcc).

Change-Id: Ib08ac81ede00c577f28a85c7886f716e7504bbe9
2026-06-19 21:40:11 +02:00
Solomon Peachy
3152beee32 chore: Don't embed $Revision$ tags in auto-generated files
I was going to convert them to a git hash instead, but that would
break builds from tarballs.

Change-Id: I76213b8b65df2c6cfb73cba299a4975a22725f36
2026-06-03 08:31:05 -04:00
Solomon Peachy
addcc159c2 tools: Update mp3info perl module to final upstream version
1.20 -> 1.26

  https://github.com/dsully/perl-mp3-info/commits/master/Info.pm

Change-Id: I0d58f56265a463784f45673764b9fdc054887c2a
2026-06-01 16:08:00 -04:00
Solomon Peachy
d54b9e6f8d chore: Get rid of *all* vestigal CVS '$Id:$' tags
Change-Id: I35c13a9768c582e4851aa252dd3ea5c89f760c8c
2026-06-01 16:01:18 -04:00
Solomon Peachy
8af98332ab convttf: Add sanity checking to specified defaultchar
It now matches the logic in convbdf

Change-Id: Ic17fdd4dbed41fad4d3353b9dd314cd24a8ded58
2026-05-29 07:33:36 -04:00
Solomon Peachy
8e5efb6850 convbdf: Make explicit when the "default" glyph is used
When a font doesn't have a glpyh for a given codepoint, the convertor
points it at the "default glyph".   The plan is to replace this pointer
with a canary value so that rockbox genuinely knows this glpyh
does not exist, allowing a fallback path to be implemented.

(The plan is for the fallback path to attempt to compose a glpyh from
 its decomposed codepoints, but this would make it be possible to
 implement a true fallback/subsitute font mechanism)

Change-Id: If6fea29f5393a6d4b9d5747c911a36fdc8dda5ae
2026-05-28 20:56:23 -04:00
Solomon Peachy
e1534d8065 convttf: Allow default glyph to be specified
Formerly fixed at the first glpyh in the converted font; now it can be
explicitly set.  This mirrors the functionality available from using the
DEFAULT_CHAR property of BDF fonts

Change-Id: Ibd754faff3fd4d393c4781e8faa685612e3301f0
2026-05-28 20:56:23 -04:00
mojyack
e62ac0d2c6 ovl_offset: use elf symbols instead of refmap
add a plugin_ram_end symbol to plugin.lds and rewrite ovl_offset.pl
to read plugin_ram_end and plugin_load_end_addr from the elf via nm.
this removes all dependence on the linker map file format, which
differs between gnu ld and lld.

Change-Id: I66e623d9a2b44eb84ae7035155c84d8afe46df23
2026-05-27 17:55:33 -04:00
Solomon Peachy
9a142ee02d checkwps: Fix warning uncovered with GCC16
/home/rbbuild/rockbox/tools/checkwps/checkwps.c: In function 'main':
/home/rbbuild/rockbox/tools/checkwps/checkwps.c:329:21: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
329 | char *ext = strrchr(name, '.');
| ^~~~~~~

Change-Id: I0c62600f269456cb81d0e3eaf77839c9103f2e41
2026-05-25 09:10:08 -04:00
mojyack
44e8d8226a configure: switch from -std=gnu99 to -std=gnu11
which is required for u"" unicode string literals used in the USB stack.
gcc allows this even in gnu99, but clang does not.

Change-Id: I1700fe503f20f31ba4704f8bef1ccca45f822620
2026-05-25 08:47:51 -04:00
mojyack
d8a4730159 tools: fix reggen is not cleaned
Change-Id: Iacb3f7b2c3104435a3188c9b24eb8f4374ef8b59
2026-05-04 20:33:52 -04:00
Solomon Peachy
81fcb10f8f metadata: Normalize all metadata to Unicode NFC form
* Standalone database tool
 * Simulator builds
 * Target firmware (Hosted and Native, for all >2MB targets)

Change-Id: Ia7361affc2fc6a08e73c31ecc9ef3a4008c2415d
2026-05-03 07:07:07 -04:00
Solomon Peachy
89dd08a3b4 configure: Explicitly disallow erosqnative_v3/v4 for "normal" builds
They are only intended for bootloaders.

Change-Id: I4da3e7acd55b803e016bc9c42526860dfdc6fa9a
2026-05-02 07:47:36 -04:00
Aidan MacDonald
d815053360 Add support for -fstack-protector in native builds
-fstack-protector only needs a small amount of runtime
support to work on native builds. It increases code size
by ~1.5% on ARM/MIPS; -fstack-protector-strong adds 3-4%.
This is disabled by default and must be enabled by passing
'--with-stack-protector' to configure.

Change-Id: If952e711d3673c9b469895f08c7bff70b3d95df6
2026-04-21 21:16:28 -04:00