Commit graph

872 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
e1bed147a3 build: Add advanced option to treat all warnings as errors.
Change-Id: I235f93d72bfc33243454edd04e45805b5c795f17
2024-10-12 10:34:45 -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
Dana Conrad
a5462d6192 erosqnative: Give erosqnative_v3 its own target ID and modelname
This is needed so "make clean; make reconf" will work correctly.

Change-Id: Ife13e59ac6054f04f7095aa2263ec64595eeb3a2
2024-09-08 12:29:03 -04:00
Dana Conrad
878e29396c ErosQNative: Add v3 LCD support, conditional on bootloader
bootloader passes the player version to rockbox for LCD init changes

Credit ZappBranigan2972 on forums for original changes
Credit Bilgus for devicedata additions

Change-Id: Ia2ca493edef49b7457e84dc19b05397dc915fa5a
2024-09-02 13:29:43 -04:00
Solomon Peachy
334def8431 configure: Fix android x86 build
Change-Id: Iea1d92bcf83f016e724496ebf037c8402ede170c
2024-07-24 09:01:04 -04:00
Solomon Peachy
3e9ca6ec8e configure: Stray unquoted space in a sed expression
Should fix SDL builds where --static-libs are not present

Change-Id: I96056f3e4d9a4ae971ad2d9e792ba542478f331b
2024-07-04 10:38:49 -04:00
Solomon Peachy
30ef953393 configure: Fix 'make reconf' when win64 sim builds are enabled
Change-Id: I9d3c23dee58cb3b4edce7bfcc0429500ffe23e58
2024-07-04 09:48:02 -04:00
Solomon Peachy
961f8a0f56 configure: if we can't link SDL statically, drop -static from the cmdline
Fixes building windows simulator builds on Fedora systems

Change-Id: I1e17e8f2f395a0298fc9d3d7e03c621d23208221
2024-07-04 09:48:02 -04:00
Solomon Peachy
1c3f77eccd Revert "Toolchains: Update to GCC 8.5.0"
Accidental push instead of going to gerrit.   #!$!#!

This reverts commit 67dc833e46.

Change-Id: I42a7c9dfd0f1a3dd676b1a5d3eee0a900f2561f7
2024-06-30 15:06:44 -04:00
Solomon Peachy
67dc833e46 Toolchains: Update to GCC 8.5.0
All toolchain dependencies are circa the GCC 8.5.0 release:

  GCC 8.5.0, binutils 2.37, gmp 6.2.1, mpfr 4.1.0, mpc 1.2.1, isl 0.18

Native:

 * arm  (smoke tested on ipodvideo+mini2g)
 * mips (seems to be stable on xDuoo X3)
 * m68k (binaries untested)

Hosted:

 * arm (binaries untested)
 * mips (smoke tested on xDuoo X3ii)

Unchanged:

 * Android NDK (unchanged at GCC 4.9.4)

Change-Id: I1c2fca5d87d4a11e50aa495fad75f4f9c938c766
2024-06-30 15:05:08 -04:00
Solomon Peachy
8e280bdda8 configure: Hopefully resolve windows simulator builds issues for hosted targets
Change-Id: If4ded4cb3a19603ea0e5e0b7d3f4c281492dbc8b
2024-06-26 09:43:42 -04:00
Solomon Peachy
80cd799925 voice: If $POOL is not set, use <build-dir>/voice-pool by default
It will _vastly_ speed up repeated voice builds.

The voice pool directory will not be erased by a 'make clean'

Change-Id: Ice58d5c5355abfa5a385dfca749f8063e2ee8622
2024-06-20 21:00:48 -04:00
Solomon Peachy
2ef10ec734 Fix typo in the previous commit
Change-Id: I9e8de11ba86e147abc9bb5b3dfcc550655fe360d
2024-06-19 09:22:44 -04:00
Solomon Peachy
9beca004b9 simulator: Hopefully fix red introduced in 5b61c79cf
This problem only happened with GCC7 (and older?) simulator builds, and
was introduced by an incorrect test that always stripped our default
optimization (-Os) in simulator builds.

The fix is to correct the test to only strip -Os if the user explicitly
enables a debug build.

Also, use -Og instead of (implicit) -O0, as per GCC recommendations.

Change-Id: I61091b3cdf5323504961c0bb2d80aa65049eb8fb
2024-06-19 08:49:02 -04:00
Roman Artiukhin
5b61c79cf8 simulator: debugging: Disable -Os compiler optimizations when DEBUG is defined
Otherwise, breakpoints may not correspond with the source code

Change-Id: I0f8d4f578bde52c0219923d8be28e01c66c8dfbc
2024-06-18 20:42:59 -04:00
Solomon Peachy
73f40d8a23 build: Experimental LTO support, phase one
* Only codecs and plugins are enabled
 * Only native builds (so far)
 * Only tested on xDuoo X3 (MIPS, monochrome)
 * opus & speex generate some warnings
 * Significant compile time impact

Change-Id: I519b0d179631a54b2103cd67225bd5ec6ad3bd2f
2024-06-18 08:15:47 -04:00
Solomon Peachy
810e337a87 xduoox3: It doesn't have a radio, so don't put that in APPEXTRA
Change-Id: I4521598af49f91ab89d19bb6c2bf8bebf60bad51
2024-06-08 19:03:35 -04:00
Solomon Peachy
8b8c0c7c2a checkwps: Validate translated strings (%Sx)
In verbose mode it will log valid the strings found, otherwise it will
only complain when we encounter a missing string.

Unfortunately a missing string is not inherently a problem, due to
conditional expressions.  So all we can do is complain in checkwps
or if wps debugging is turned on.

Meanwhile, this is the first step in actually enumerating the translated
strings used by themes.

Change-Id: Ia93b333085e825d5b085c4d372ad8e13aa3e3ba1
2024-05-24 21:37:54 -04:00
Solomon Peachy
54389dcf2f configure: fix test for LD version on non-macos systems
Change-Id: I6296a013def3e55b44cbba781f3a397a94d2c561
2024-05-08 22:40:18 -04:00
Solomon Peachy
8c86fb6da0 arm: Use -masm-syntax-unified when compiling with gcc8 or newer
Annoyingly, this makes all of the '.S' files we compile get treated as
divided syntax, so we need to make the syntax in them explicit.

Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
2024-05-08 21:45:42 -04:00
Solomon Peachy
4a52147122 configure: strip '--voice' from the 'make reconf' option list to avoid dupes
Change-Id: I09ade245023d51a7553ca6149c9c3effd2b6b9d2
2024-04-23 22:12:25 -04:00
Solomon Peachy
e8a51569ad voice: Add support for the Piper TTS engine
https://github.com/rhasspy/piper

High quality, offline, neural-network-based, with good language coverage

Note that you have to manually download the piper voice models, and set
PIPER_MODEL_DIR appropriately.  The configure script will let you choose
from the available models and remember your choices.

Change-Id: I8eba9fcf78b51b01b89491539aac3e423cc42f16
2024-04-21 18:08:47 -04:00
Aidan MacDonald
8bdf08cd2d Sansa e200v2: Enable thumb for bootloader by default
Thumb bootloaders were confirmed to work in this post:

https://forums.rockbox.org/index.php/topic,54768.msg253473.html#msg253473

Change-Id: Id52769b9b6a2acc167503fa61aec665f4090fdc1
2024-03-30 11:58:40 -04:00
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