Commit Graph

1893 Commits

Author SHA1 Message Date
AuxXxilium
0005cf4804 webui: recover from a stale thttpd pidfile
thttpd does not remove its pidfile when it dies, so a crash left the
file behind pointing at a dead pid. The boot guard only tested that the
file existed, concluded the server was up and skipped the restart, so
nothing was listening while the loader carried on and reported an ip.
That is the connection refused on a running system. Test the pid with
kill -0 instead and clear the file before restarting.

The shipped init script had no monitor loop to catch this later, and its
stop() bailed out with FAIL when the pidfile was missing, so restart
could not recover a thttpd that was running without one. Fall back to
killall in that case, and never signal a recorded pid that is no longer
alive since the number may have been recycled.

loaderPorts compared the new port against HTTPPORT, which arc.conf had
already been rewritten to hold, so the restart was skipped on a real
change. Capture the running port before the rewrite.
2026-08-11 20:59:22 +02:00
AuxXxilium
2c7bd64d76 boot: drop the maxcpus cmdline entry, warn instead
CONFIG_NR_CPUS is compiled into the kernel image, so it refuses any CPU
past its ceiling during SMP bring-up on its own. maxcpus only moved
where that cap happened and did not change the resulting online count,
so ccnt now just drives a warning.

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-11 20:26:02 +02:00
AuxXxilium
f8a62460fc boot: scope the 128 thread ceiling to the full kernel
The cap raised PLTCNT to 128 for every non-official kernel, but only
full is built for that many threads. legacy and upstreamed were left
effectively uncapped, so they now fall back to the platform ccnt.

Guard the ceiling against a missing or non-numeric ccnt as well; the
value went straight into -gt, which errors on anything but an integer.
2026-08-11 20:25:13 +02:00
AuxXxilium
3748a47c12 kernel: detect the full variant and describe each option
The kernel menus only probed for -legacy and -upstreamed, so a -full
image on the loader was never offered. Probe for it too, and replace the
bare option labels with what each kernel actually is.

Three gates tested for legacy or upstreamed by name to decide whether to
read from CUSTOM_PATH. Selecting full would have fallen through to the
official branch and booted the stock kernel with stock modules. Test for
official instead, as boot.sh already does, so further variants need no
change here.

Widen both menus to auto width; the descriptions do not fit in 50 cols.
2026-08-11 20:12:35 +02:00
AuxXxilium
5ba316d8c7 notify: reset buildstatus only on real changes
Opening the notification menu, pressing Test or cancelling out no longer
invalidates the build. The webhook/discord flags and the webhook url are
snapshotted on entry and compared on exit, so a rebuild is only forced
when a value that gets baked into the ramdisk actually changed.

registerAccessToken keeps forcing a rebuild, but via resetBuildstatus so
it no longer writes the build flag into CONFDONE.
2026-08-10 21:10:31 +02:00
AuxXxilium
62172ed2ef modules: respect the update folder of the modules tgz
The modules tgz of the igpu platforms ships a backported i915 stack in
an update/ folder, 11 modules for epyc7002 and geminilakenk. Five of
them (drm, ttm, drm_kms_helper, intel-gtt,
drm_panel_orientation_quirks) also exist in the root folder as an older
build, update/ overrides those the same way the kernel does.

getdepends only looked at the root folder, so "getdepends i915"
returned nothing but i915 itself: i915.ko does not exist in root, and
even a prefixed name broke the recursion because dmabuf, drm_buddy,
drm_display_helper and i915-compat are update/ only. Deps that do exist
in both were read from the stale root copy. As a result the i915
deselect menu left all dependencies selected.

Add MODULE_DIRS as the single search order plus resolveModule() and
moduleName() to resolve a module to its file and to its list name.
getdepends now follows dependencies across both folders, returns folder
prefixed names and guards against cycles. addToModules replaces a
module in place so an update/ ko keeps precedence, delToModules drops
every copy so the older root module does not come back.

Match module names as exact tokens in installModules and in the i915
deselect, "grep -w" treats the slash as a word boundary and let a
selected update/drm pull in the older root drm as well.

Also fix the packagModules typo in addToModules and delToModules, both
never repacked the tgz.
2026-08-08 21:23:15 +02:00
AuxXxilium
1b819267a1 sysinfo: detect gpus in all display subclasses
lspci -d ::300 only matches the VGA subclass (0300), so display
devices reporting 0301 (XGA), 0302 (3D controller) or 0380 (other)
were missing from sysinfo. This hid NVIDIA compute cards and the
discrete GPU of hybrid setups.

Add getPciClass() to match a PCI class prefix via
/sys/bus/pci/devices/*/class, so 03 covers every display subclass,
and getIgpuId() to find the first Intel display device regardless of
subclass. Use them for the TUI and web GPU lists as well as the
iGPU/i915 detection for the model feature matrix and default addons.
2026-08-08 21:02:53 +02:00
AuxXxilium
d018171c7b boot: reduce and fix boot cmdline entries
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-08 13:21:46 +02:00
AuxXxilium
d4c6b89bee tui: reword custom kernel prompt as an available option
The Linux 5.x / DSM 7.3+ dialog framed the custom kernel as a fix for
boot issues. Present it as an available choice instead and retitle the
dialog from "DSM 7.3+ Warning" to "Custom Kernel".
2026-08-05 21:38:19 +02:00
AuxXxilium
bf4def9f59 sysinfo: show vendor:device ids for nics and controllers
Add getPciId/getNicId helpers and append the vendor:device id to the
NIC driver line and to every controller entry (SATA, RAID, HBA, SCSI,
USB, MMC, NVME) in both the TUI and the WebUI sysinfo output.

getNicId resolves ids from sysfs, falling back to the parent node for
USB nics where idVendor/idProduct live one level up.
2026-08-05 20:43:55 +02:00
AuxXxilium
761d6cc3e2 modules: always take firmware from the modules package
The legacy/upstreamed branch extracted ${CUSTOM_PATH}/firmware.tgz, but
arc-custom only ships kernel-flavor artifacts (bzImage-*-legacy.gz,
bzImage-*-upstreamed.gz, modules-*-${KERNEL}.tgz) -- it has never
contained a firmware.tgz. That path read a nonexistent file, and because
the $? check below tested the if/else rather than tar, the failure was
silent.

Firmware blobs are kernel-flavor independent, so one package serves all
flavors. Modules stay split per flavor in unpackModules/packModules,
matching the gate in updateModules that already requires firmware.tgz
under ${MODULES_PATH}.

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-05 20:43:55 +02:00
AuxXxilium
dcc170eac8 modulelist: add missing sensors, drop unused entries
dme1737, lm95245 and w83781d ship in arc-modules on all 45 platforms
and are already modprobed by the eudev addon, but were never listed
here - so on official kernels they were loaded during install and then
lost, since installModules only copies what this file names.

Also drops acpi_cpufreq.ko (the file is built as acpi-cpufreq.ko, so
the entry never matched anything), the cpufreq governors, dca and
rfkill, and adds button.ko.

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-05 20:43:55 +02:00
AuxXxilium
f38a3aaae2 workflow: point release notes link at view.php renderer
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-05 20:43:55 +02:00
AuxXxilium
90ea97c564 webui: rewrite auth.cgi in bash to fix thttpd crash on login
auth.cgi was the only Python CGI in the image and failed at import
time on cgi, cgitb and crypt, all removed from the stdlib in Python
3.13 by PEP 594. The import sits at the top of the file, so the script
died before emitting any headers and thttpd received a zero-byte CGI
response, killing the connection. A wrong password was simply the
path that made this visible; the verify path hit the same wall but was
swallowed by a catch in app.js.

Rewrite in bash to match the other seven CGIs. The JSON contract
consumed by app.js is unchanged, so no frontend changes are needed.

- Verify passwords with openssl passwd using the id and salt parsed
  from the stored hash, the same primitive loaderPassword uses to
  write it, so the two cannot drift.
- Always emit a valid header block via an ERR trap, so the webserver
  never sees an empty response.
- Generate tokens with openssl rand -hex 32.

Also fixes a path traversal: the previous version joined the
attacker-controlled token straight into a filesystem path, so
action=logout&token=../../../etc/shadow reached os.remove() as root.
Tokens are now rejected unless they are pure lowercase hex before any
rm. Locked accounts of the form !$6$... are now detected too; the old
membership test against ['*', '!', '!!'] missed them.
2026-08-05 20:43:55 +02:00
AuxXxilium
d1abecf01a boot/netfix: cap CPU threads per kernel, add netfix "force" mode
- boot.sh: cap kernel-visible CPU threads via maxcpus= cmdline when the
  detected thread count exceeds what the platform (or custom/legacy/
  upstreamed kernel, capped at 128) supports.
- netfix now cycles true -> force -> false; static IP network.* cmdline
  values are only injected when netfix is set to "force", while the MAC
  remap and driver unload fixes apply for both true and force.

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-05 20:43:55 +02:00
AuxXxilium
d4c301f56a boot: add sanity check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-08-05 20:43:55 +02:00
AuxXxilium
b1d909b001 kernel/fancontrol/netfix/automated: fix marker path, live-patch PAT lookup, and menu toggles
- automated boot marker: write/clean on p1 (grub reads /automated from p1) instead of p3
- livepatch: rebuild PAT url/hash lookup from stored config instead of unset $resp, fall back to existing values when no match
- arcVersion: offer custom kernel selection on DSM 7.3+ warning for 5.x platforms (now includes r1000nk/v1000nk), reset kernel to official on version change
- fancontrol: gate on physical MEV first, require detected sensor before offering/enabling
- ledcontrol: skip UGREEN *GT* models
- netfix: convert submenu to a direct toggle, matching other arc.sh options
2026-08-05 20:43:55 +02:00
AuxXxilium
ac9213a0c3 kernel: only offer legacy/upstreamed if their bzImage exists
The Kernel dialog in arc.sh now checks CUSTOM_PATH for a matching
bzImage-<platform>-<kpre->-<kver>-<variant>.gz before listing
legacy/upstreamed, so users can't pick a variant that has no build
for the current platform/DSM version. official/legacy labels show
the platform's real kver instead of a hardcoded version.
2026-08-05 20:43:55 +02:00
AuxXxilium
4ba76ae525 init: migrate legacy "custom" kernel config value to "legacy"
Pre-existing configs from before the official/legacy/upstreamed
kernel selector may still have kernel: custom on disk, which no
downstream script recognizes anymore. Rewrite it to legacy on every
boot, before the already-initialized fast path to arc.sh.
2026-08-05 20:43:55 +02:00
AuxXxilium
4d439c78f5 kernel: wire up legacy/upstreamed kernel variants
Kernel menu in arc.sh is now a 3-way dialog (official/legacy/
upstreamed) writing distinct config values instead of toggling
official/custom. zimage-patch.sh and include/modules.sh select
bzImage/modules filenames with a -legacy/-upstreamed suffix
accordingly. Removed the now-dead customKernel() helper (only used
by the just-removed evo.sh Easy UI) and simplified the matching
recoverDSM() branch in arc-functions.sh.
2026-08-05 20:43:55 +02:00
AuxXxilium
e94063bc99 kernel: add legacy/upstreamed variants, drop Easy UI (evo.sh)
Kernel selection is now a 3-way dialog (official/legacy/upstreamed)
writing distinct config values, with bzImage/modules filenames
suffixed accordingly. Removed the unused Easy UI (evo.sh) and its
dead customKernel() helper, which had drifted out of sync with the
Advanced UI's kernel handling.
2026-08-05 20:43:55 +02:00
AuxXxilium
c1abf9a190 modules: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-26 13:01:41 +02:00
AuxXxilium
87341fe308 grub: add fallback resolution for bios boot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-26 13:01:32 +02:00
AuxXxilium
6b15cfeead ramdisk: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-24 21:03:25 +02:00
AuxXxilium
8d22af090a boot: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-24 19:24:36 +02:00
AuxXxilium
9879f40334 boot: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-23 16:59:46 +02:00
AuxXxilium
41103be98c init: fix loader update/upgrade issue
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-22 17:53:01 +02:00
AuxXxilium
e4262d0328 boot: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-22 17:42:03 +02:00
AuxXxilium
cab78702f4 addons: optimize logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-21 18:02:35 +02:00
AuxXxilium
f79c8f4b80 grub: fix cmdline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-20 21:01:26 +02:00
AuxXxilium
97d487c013 tree: update to match system
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-19 19:21:15 +02:00
AuxXxilium
26aec40132 boot: fix issue
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-19 15:31:43 +02:00
AuxXxilium
99a182c1e5 boot: add gpu workaround for vm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-19 14:41:03 +02:00
AuxXxilium
a1af05d5c4 grub: change intel_iommu=sm_off for testing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-19 14:36:28 +02:00
AuxXxilium
2b318c432a grub: add intel_iommu=off for testing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-19 12:05:54 +02:00
AuxXxilium
878c9df3f1 grub: fix stale default entry id
set default="boot" pointed to a menuentry id that no longer exists
(renamed to --id dsm in 370d4850). GRUB silently fell back to the
first defined entry instead, which is Arc Config Mode when DSM
images aren't present yet, causing boot to land on Config Mode
instead of DSM Mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 10:34:34 +02:00
AuxXxilium
894b52d1e6 tree: add docker support for testing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-18 00:48:03 +02:00
AuxXxilium
a87b43cf25 zImage: add epyc7003ntb support
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-17 17:38:14 +02:00
AuxXxilium
0ddbd907bc boot: re-enable some functions for stabilization
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-17 17:32:46 +02:00
AuxXxilium
fae5df0c96 arc-functions: add hdddb alongside diskcompat as default
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-14 20:49:16 +02:00
AuxXxilium
fd5b342375 Revert "zImage: update patching"
This reverts commit 15fbf3e545.
2026-07-14 01:07:56 +02:00
AuxXxilium
7cbade9340 arc-functions: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-10 21:26:16 +02:00
AuxXxilium
7c7a21728d arc-functions: remove hdddb from selection and add diskcompat
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-10 21:17:29 +02:00
AuxXxilium
c8ab5867fb arc-functions: update version selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-10 20:21:42 +02:00
AuxXxilium
f663ac0a4e tree: add 7.4 support
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-10 20:10:49 +02:00
AuxXxilium
15fbf3e545 zImage: update patching
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-09 19:49:41 +02:00
AuxXxilium
da1d2eb295 tree: rework to match the new eudev/sensors addons
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-09 19:29:26 +02:00
AuxXxilium
9a59d33c08 tree: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-09 19:06:29 +02:00
AuxXxilium
ea14e88901 tree: add sanity check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-07 21:08:56 +02:00
AuxXxilium
aecc5c9df2 tree: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2026-07-07 19:47:22 +02:00