39862 Commits

Author SHA1 Message Date
Douglas Teles 4c0e295db2 es-menu: wire up AUTO FRAME DELAY and ship wg-quick for WIREGUARD VPN
Two ES menu items that wrote settings nothing consumed / called a missing
binary, found in the menu audit:

- AUTO FRAME DELAY (Latency menu) persisted `<config>.video_frame_delay_auto`
  to system.cfg, but setsettings.sh never translated it into retroarch.cfg,
  so the toggle did nothing. Add set_frame_delay(): ON/OFF -> RetroArch
  `video_frame_delay_auto = true/false`, AUTO leaves the cfg default.

- WIREGUARD VPN toggle runs `wg-quick up/down`, but the wireguard-tools
  package only installed `wg`, so every toggle silently failed. wg-quick is
  the upstream bash helper (src/wg-quick/linux.bash); install it. Runtime
  deps (bash, ip, wg, iptables) are all present.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 23:06:48 -03:00
Douglas Teles e8fd3a6c43 perf: corrigir gaps detectados via SSH no R36S
5 ganhos mensuráveis identificados rodando o sistema vivo:

1. /etc/sysctl.d → /storage/.config/sysctl.d, e systemd-sysctl roda
   Before=sysinit.target — /storage só monta em local-fs.target. O
   symlink ficava dangling quando systemd-sysctl lia, então archr.conf
   (BBR/fq_codel, vm.dirty_writeback_centisecs=1500, ip_forward, etc.)
   nunca era aplicado no boot. Verificado: rodando sysctl -p manual
   depois do boot, dirty_writeback_centisecs vai de 500 → 1500.
   Replicar os defaults da distro em /usr/lib/sysctl.d (rootfs, sempre
   disponível) garante aplicação antes de /storage subir; o /etc/
   sysctl.d permanece como ponto de override do usuário.

2. enable.turbo-mode=1 em system.cfg padrão. A baseline validada do
   R36S inclui CPU turbo @ 1512 MHz via cpufreq/boost (vdd_arm
   regulator-max=1.45V), mas o default era 0 — clamp em 1416 MHz
   sem opt-in. O nó scaling_max_freq sobe para 1512000 assim que
   boost=1, comprovado live no device. Quem precisar do clamp
   térmico de 1416 desliga via Settings > Advanced.

3. rpcbind.service rodando idle custava ~11 MB de RAM em um device
   com 1 GB total, sem nada usando NFS. O upstream já fornece
   rpcbind.socket (Listen :111 + /run/rpcbind.sock) e systemd faz
   activation on-demand — mount.nfs dispara o daemon quando o user
   realmente monta um share. Trocado enable_service rpcbind.service
   por rpcbind.socket.

4. archr-touchscreen-keyboard ficava acordando a cada 5s mesmo em
   devices sem touchscreen (R36S, R33S, etc), e com Restart=always
   um exit do helper provocava restart infinito. Adicionado bail-out
   precoce quando DEVICE_HAS_TOUCHSCREEN != true, e Restart trocado
   para on-failure para honrar o exit limpo. Em devices sem
   touchscreen o serviço passa a ficar inativo após o primeiro boot.

5. setrootpass cryptpw sha512 + smbpasswd + syncthing generate
   custavam ~6s a cada boot — chamado pelo autostart 007-rootpw com a
   senha já configurada. Adicionado short-circuit que compara o hash
   sha256 da senha contra o cache em /storage/.cache/.archr-rootpass.
   sha256: se nada mudou, sai em 20ms.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-24 11:37:36 -03:00
Douglas Teles e90a0708c8 units + scripts: corrigir bugs herdados de JELOS no boot
Sweep encontrou 5 categorias de bugs sutis em arquivos herdados:

1. StartLimitInterval/StartLimitBurst em [Service] em 13 unidades
   (avahi, bluez, connman, samba/nmbd/smbd, sshd, tz-data, ledfix,
   xorg, fluxbox/windowmanager, samba-config). systemd silenciosamente
   ignora StartLimit* fora de [Unit], então a proteção contra
   restart-flood nunca foi aplicada. Movidas para [Unit] e renomeadas
   para o canônico StartLimitIntervalSec (StartLimitInterval é alias
   antigo).

2. Refs dangling para kodi.service em 5 units (entware, locale, sway,
   xorg, xwayland-xorg, windowmanager-fluxbox). ArchR não embarca
   Kodi; o ordering Before=kodi.service ficava como "not-found" no
   systemctl list-units. Trocado por Before=archr.target (alvo real
   de boot da UI em ArchR).

3. usercache.service e userconfig.service referenciavam
   automount.service e autostart.service sem prefixo archr-. Em ArchR
   as unidades reais chamam-se archr-automount.service /
   archr-autostart.service, então o Before= era ignorado e o setup
   corria paralelo aos mounts.

4. archr-autostart.service tinha Before=weston.service. ArchR roda
   sway, não weston. Removido (After=graphical.target já cobre).

5. nmbd.service do override ArchR queria samba-config.service que só
   existe no pacote global packages/network/samba (não no override).
   O daemons/002-samba já cria /run/samba/smb.conf manualmente, então
   Wants/After=samba-config.service eram supérfluos.

Bugs adicionais corrigidos no caminho:

- archr/autostart/050-audio: `if [ -n "/usr/sbin/quantum" ]` testa se
  uma string literal é não-vazia (sempre true) em vez de checar se o
  binário existe. Trocado para [ -x ].
- avahi: post_makeinstall_target removia /usr/sbin/avahi-dnsconfd mas
  deixava a unit avahi-dnsconfd.service órfã. Remove a unit junto.
- system-utils: video.service só faz sentido em devices que embarcam
  /usr/bin/video_sense (RK3399/RK3566/S922X). Remove a unit em
  devices que não têm o helper.
- xwayland: scripts/xorg-configure não era instalado, deixando
  xorg-configure@.service com ExecStart para um path inexistente.
  Agora copiado pra /usr/lib/xorg/xorg-configure.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-24 11:09:58 -03:00
Douglas Teles d06e18a2ad gaps: ampla varredura de bugs herdados + pré-pacman repo-stable
A varredura via SSH no R36S rodando a 20260624 expôs várias
divergências entre rootfs estagiado e tmpfs/runtime. Cada arquivo
deste commit resolve um gap encontrado na investigação.

archr/tmpfiles.d/z_02_archr-fhs-bridges.conf (NEW):
  /var é tmpfs (busybox/system.d/var.mount), então todos os bridges
  FHS instalados como symlinks no rootfs eram apagados pelo mount.
  Republicar a estrutura via systemd-tmpfiles após var.mount. Resolve
  /var/lib/pacman, /var/cache/archr/*, /var/lib/archr/{config,data,
  games,backup}, /var/lib/{samba/private,tailscale,bluetooth},
  /var/spool/cron, /var/cache/pacman/pkg. Inclui também os targets em
  /storage (cron, locpath, tailscale, samba, .local/share, fstrim.run,
  journald.conf.d, request-key.d) que estavam ausentes.

ui/emulationstation/package.mk:
  ln -sf usava \${INSTALL}/usr/config/... como alvo, vazando o caminho
  absoluto do builder para o symlink /etc/emulationstation/es_systems.cfg
  no SO final. Trocar pelo path do target.

archr/system.d/timers.target.wants/{rocknix→archr}-report-stats.timer:
  Symlink apontava para um arquivo inexistente (rocknix-report-stats);
  o timer real chama-se archr-report-stats. Renome.

misc/modules/sources/images/install-{rocknix→archr}.svg:
  gamelist.xml já referenciava install-archr.svg; o arquivo se chamava
  install-rocknix.svg, quebrando o asset.

emulators/.../gamepads/ROCKNIX→ArchR Gamepad.cfg:
  Conteúdo já estava com input_device="ArchR Gamepad"; rename casa o
  nome de arquivo com a string de matching.

archr/package.mk + profile.d/005-locale:
  LANG="" no SO rodando, todas LC_*=POSIX. glibc gera en_US.UTF-8.
  Criar /etc/locale.conf e profile.d que source-a para shells de login
  e SSH (que não herdam LANG via systemd env).

sysutils/systemd/scripts/userconfig-setup + freej2me-lr/freej2me.sh:
  /storage/jdk caiu como arquivo vazio em algumas builds antigas e
  transforma o symlink /opt/jdk em "Not a directory". Saneamento
  duplo: a cada boot e antes do download do JDK.

devel/crossguid/package.mk + standalone/hypseus-singe/package.mk:
  cmake_install.cmake / crossguid-config.cmake embutiam o BUILD path
  do host. Remover dos pacotes target (não rodam em runtime).

tools/pyFDT/package.mk + network/samba/package.mk:
  setuptools e waf escrevem o python3 do TOOLCHAIN no shebang dos
  entry-points (pydtc, samba-gpupdate). Reescrever pra /usr/bin/python3.

sysutils/systemd/package.mk:
  systemd-sysroot-fstab-check é um symlink para
  systemd-fstab-generator, que removemos para fora dos generators.
  Apagar o link junto. Strip também a regra do legacy.conf que cria
  /var/log/README apontando para /usr/share/doc (não embarcamos docs).

sysutils/udevil/package.mk:
  /etc/udevil/udevil-user-root.conf é symlink para
  /storage/.config/udevil.conf que nunca era populado. Copiar a conf
  também para /usr/config/udevil.conf, daí o rsync do userconfig-setup
  o semeia no primeiro boot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-24 02:44:45 -03:00
Douglas Teles 71d8968a1a FHS F3: logs and update over Arch paths
Class F (logs) and Class G (temp/update) reshuffled.

Logs:
- /var/log was already a mount from /storage/.cache/log via
  packages/sysutils/busybox/system.d/var-log.mount, so journald already
  writes to /var/log/journal in FHS terms. runemu.sh debug log moves
  from /storage/.cache/log/runemu-debug.log to /var/log/runemu-debug.log
  (same physical bytes, FHS surface).
- createlog (top-level busybox script) packs archive zips into
  /var/log/archr/archive instead of /storage/logfiles. ArchR tmpfiles
  z_01_archr.conf creates the backing dir under the storage overlay so
  the path is writable on first boot.

Update:
- /var/cache/archr/update is a bridge symlink to /storage/.update added
  by the archr meta-package. archr-update, automount and the [update]
  samba share all flipped to the FHS path.
- factoryreset still preserves /storage/.update by its real name in
  the find regex; that path is also what the pre-boot bootloader
  scripts read, so the backing path is the canonical one and the
  bridge is just the userland surface. Comment added so this is
  obvious to future readers.
- busybox/scripts/init keeps UPDATE_ROOT=/storage/.update because it
  runs in the initramfs before /var is even available.

Overlayfs workdirs (/storage/.tmp/*-workdir) and /storage/.boot.hint
documented as no-op in fhs-mapping.md: the overlayfs kernel layer
requires upperdir and workdir to share a filesystem, and the boot
hint is part of the U-Boot handshake.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 16:02:59 -03:00
Douglas Teles 61cbea372e FHS F2.3: kernel-overlays + locpath under /var/cache/archr
Two more Class C bridges, same pattern as F2.1/F2.2:
- /var/cache/archr/kernel-overlays -> /storage/.cache/kernel-overlays
- /var/cache/archr/locpath -> /storage/.cache/locpath

Consumers flipped to the Arch-friendly path:
- busybox/scripts/kernel-overlays-setup: OVERLAY_CONFIG_DIR
- busybox/profile.d/10-locale.conf: LOCPATH
- wayland/util/foot/scripts/foot.sh: LOCPATH (ArchR override only)

Service files (locale.service, kernel-overlays tmpfiles.d) keep
addressing the /storage backing path because they are the layer that
creates the actual rw overlay dir; the bridge symlink points at it.

Top-level packages/wayland/util/foot/scripts/foot.sh is upstream
LibreELEC heritage and stays untouched; the ArchR override is the
file the runtime actually executes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 15:54:46 -03:00
Douglas Teles c370b0ca48 FHS F2.2: fontconfig cache -> /var/cache/fontconfig
Fontconfig's cache directory is baked into the binary at configure
time. Flip --with-cache-dir from /storage/.cache/fontconfig to the
Arch-standard /var/cache/fontconfig and install a bridge symlink
pointing back to the storage overlay so the cache survives reboots.

Same bridge pattern as the systemd /etc redirects and the F2.1 mesa
shader cache: surface looks FHS, substrate stays on /storage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 15:52:38 -03:00
Douglas Teles b56fd7cce6 Sync sysutils fixes from ROCKNIX
systemd: re-enable timedated (was -Dtimedated=false). Drop the
post-install safe_remove that nuked /usr/bin/timedatectl so users
can finally run timedatectl set-timezone from the shell. Two
upstream-equivalent patches accompany the build: 0600 redirects
the timedated write target to /var/run/localtime (writable on our
read-only rootfs), 0601 makes the timezone reader follow indirect
symlinks (matches the /etc -> /storage layout).

udevil: pull the cleaned udevil.conf (UFS gate moved from
allowed_devices to forbidden_devices, /dev/sd* whitelisted as
removable). The udev rule now bails on anything that is not
usb-storage. Internal mmc devices were never matched by the prior
KERNEL=="sd*|sr*" filter anyway, but this makes the intent
explicit and stops misclassified eSATA-like devices.

input_sense: grep -line-buffered before the parse loop so only
EV_KEY / EV_SW / error-reading lines reach the case statement.
evtest output is mostly EV_ABS noise we threw away anyway; this
cuts the CPU spent on the dispatch hot path on every controller.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 14:22:51 -03:00
Douglas Teles a495eb10a9 Sync graphics + compat package bumps from ROCKNIX
Aligns ArchR with the ROCKNIX 20260601 batch of dependency bumps:
- Mesa 26.0.5 / 26.1.1 -> 26.1.3 (latest stable)
- libdrm 2.4.125 -> 2.4.134
- vulkan-headers 1.4.321 / 1.4.347 -> 1.4.354
- vulkan-loader 1.4.321 / 1.4.347 -> 1.4.354
- wayland 1.23.1 / 1.24.0 -> 1.25.0
- wayland-protocols 1.44 / 1.45 -> 1.49
- box64 -> v0.4.2 (commit 7eeb5016)

Both top-level packages/ and projects/ArchR/packages/ overrides
updated where applicable so the ArchR build resolves the new
versions consistently. Mesa keeps the upstream freedesktop tarball
at packages/ and the gitlab archive at projects/ArchR/ (no change
to delivery URL strategy).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 14:14:43 -03:00
Douglas Teles 272217362d Update Mesa to version 26.0.5 and adjust related dependencies
- Bump Mesa version from 26.0.3 to 26.0.5 with updated SHA256 checksum.
- Modify RK3326 device tree to increase regulator max voltage for ARM.
- Update OPP settings in RK3326 DTS patch for improved performance.
- Add Python3 and xz to PortMaster dependencies.
- Enhance PortMaster startup script for better directory handling and cleanup.
- Implement HDMI resolution check with timeout in autostart script.
- Add turbo mode configuration to system settings.
- Refactor CPU frequency functions to utilize available frequencies more effectively.
- Update Dolphin emulator scripts to improve gptokeyb process handling.
- Introduce new systemd configuration for timesyncd to optimize polling intervals.
- Set uinput permissions in udev rules for better controller input handling.
- Adjust emulator package.mk to optimize performance for RK3326.
- Modify mkimage script to ensure proper FAT32 formatting and filesystem checks.
- Enhance benchmark script to auto-detect device-specific paths and improve logging.
2026-04-28 23:07:44 -03:00
Douglas Teles 918471e03d Refactor and optimize emulator configurations and GPU driver handling
- Enhanced `runemu.sh` to conditionally enable debug logging based on system log level, improving performance and debugging capabilities.
- Introduced functions to pause and resume background services during gameplay to optimize resource usage.
- Updated `retroarch.cfg` to disable frame delay and set video context driver to default, improving compatibility.
- Changed DuckStation's GPU renderer from OpenGL to Software for better performance on RK3326.
- Adjusted Flycast settings to lower resolution and optimize rendering settings for smoother gameplay.
- Modified MelonDS script to correctly handle internal resolution and screen orientation settings.
- Updated PPSSPP configuration to improve frame skipping behavior and adjusted CPU speed settings for better performance.
- Refined GPU driver scripts to handle panfrost availability and ensure proper driver binding, preventing graphical issues.
- Removed obsolete panfrost quirk file and migrated relevant settings to a new profile.d script for better management.
- Added service condition checks for various network daemons to ensure they only start if their configuration files exist.
- Adjusted systemd service configurations for network daemons to improve reliability and resource management.
- Updated sysctl settings to optimize memory management and reduce unnecessary RAM usage.
- Disabled debug shell service by default to enhance security and resource efficiency.
- Created necessary directories for mesa shader cache to ensure persistent shader caching across reboots.
- Added a new squashfs package for weston to support graphical environments.
2026-04-28 16:02:27 -03:00
rocknix 85ab5db97a Fix vkmark build error 2026-04-17 16:45:52 -03:00
Douglas Teles 433244480f Update package.mk files to enable shared libraries for libmodplug, libsamplerate, libffi, and pcre2; modify DISTRO_DISKLABEL in options; add CMake options for libwebp; enhance mkimage script to hide root partition from file managers. 2026-04-03 13:04:56 -03:00
Douglas Teles c8b4b57fe3 PortMaster 100% covered 2026-04-02 15:00:29 -03:00
Douglas Teles 5e074f3e0c PortMaster critical reqs 2026-04-02 14:46:07 -03:00
Douglas Teles c7017775b1 Update RK3326 Game Console Device Tree and related configurations
- Modify joypad compatibility to include "archr-joypad" in the device tree source.
- Adjust internal display settings to use the same reset GPIO and add enable GPIO.
- Remove SDIO card detect GPIO and mark it as non-removable.
- Update the joypad driver in the MIPI generator to use "archr-joypad".
- Fix Vulkan custom dispatchers to restrict header version checks.
- Add system manager timeout overrides for improved shutdown performance.
- Update kernel configuration to version 6.12.79 and enable BFQ I/O scheduler.
- Clean up GPU governor settings in post-update scripts.
- Update PPSSPP emulator to version 1.20.2 and apply necessary patches.
- Adjust SDL2 and Mesa package dependencies and versions.
- Update Vulkan headers and loader to version 1.4.347.
- Add udev rules for BFQ scheduler and systemd configuration for shutdown timeout.
- Implement input sense adjustments for better button mapping.
- Add clock speed settings to EmulationStation configuration.
- Disable rumble motor on boot to prevent unwanted vibrations.
2026-04-02 12:23:19 -03:00
Douglas Teles 8c997f3dd9 Add new packages for various VDR plugins and dependencies
- Introduced tntnet package for web application server in C++.
- Added libuv, a multi-platform support library for asynchronous I/O.
- Included libwebsockets for implementing network protocols.
- Added multiple VDR plugins:
  - vdr-plugin-ddci2 for CI support
  - vdr-plugin-dummydevice for recording server without output devices
  - vdr-plugin-dvbapi for OSCam integration
  - vdr-plugin-eepg for parsing Extended EPG data
  - vdr-plugin-epgfixer for modifying EPG data
  - vdr-plugin-epgsearch for searching EPG data
  - vdr-plugin-iptv for IPTV support
  - vdr-plugin-live for web interface operation
  - vdr-plugin-restfulapi for RESTful API access
  - vdr-plugin-robotv for Android TV frontend
  - vdr-plugin-satip for SAT>IP support
  - vdr-plugin-streamdev for video transfer and HTTP streaming
  - vdr-plugin-vnsiserver for Kodi client handling
  - vdr-plugin-wirbelscan for channel scanning
  - vdr-plugin-wirbelscancontrol for menu entry in VDR
  - vdr-plugin-xmltv2vdr for importing XMLTV data
- Added main VDR package for DVB TV server application.
2026-03-25 15:30:17 -03:00
Douglas Teles 63e95ff979 Update package.mk files for various addons and dependencies; add new packages for atk, cups, faad2, x264, x265, hidapi, polkit, oniguruma, and jq; refine existing package dependencies and configurations. 2026-03-25 14:50:27 -03:00
Douglas Teles 1a65e2992e OS perf: mitigations=off, -O3 for emulation stack, volatile journald, audit disabled 2026-03-24 21:00:47 -03:00
Douglas Teles 33b9a09b68 OS performance: full preempt kernel, disable debug, lazy DMA, sysctl tuning, service restart limits 2026-03-24 20:45:19 -03:00
Douglas Teles 91a07fa741 Mesa update and AIC8800 fix 2026-03-19 01:04:05 -03:00
Douglas Teles baac185c56 Cleaning 2026-03-18 17:46:49 -03:00
Douglas Teles c542304146 New architecture release 2026-03-18 17:32:41 -03:00
tiopex f8c92feac2 revert change in upstream 2026-03-04 13:40:10 +01:00
tiopex 913fe3c303 Always install the update script 2026-03-04 11:44:51 +01:00