Commit Graph

1859 Commits

Author SHA1 Message Date
vasilito f8d5f390d2 chore: track relibc submodule pointer for proc_fd leak fix 2026-07-15 06:48:47 +09:00
vasilito 2fa8b3b835 chore: track relibc submodule pointer for spawn leak fix 2026-07-15 06:48:47 +09:00
vasilito 87d5a24dbc fix(redbear-bare): enable bare target to build and boot
Multiple fixes to make redbear-bare actually build and progress
through boot:

config/redbear-bare.toml:
- filesystem_size: 96 -> 192 MiB. The bare image packages ~153 MiB
  of installed content (zsh, base, base-initfs, kernel, relibc,
  userutils, libgcc, libstdcxx, plus coreutils/extrautils/etc.),
  so 96 MiB triggers installer ENOSPC during commit.
- Override 31_debug_console.service with postinstall=true so the
  override wins over minimal.toml's version that uses
  /scheme/debug/no-preserve (which busy-loops when the debug
  scheme returns ENODEV in the bare initfs).

recipes/core/base-initfs/recipe.toml:
- bare_initfs() now only references BINS in the base workspace
  (init, logd, ramfs, randd, zerod, ptyd). getty is removed from
  BINS because it lives in userutils, not base.
- Copy getty from the sysroot into the initfs after the cargo
  build (analogous to the existing redoxfs/ion/driver-manager
  sysroot copies).
- Filter the init.d copy under REDBEAR_BARE_INITFS to keep only
  services for binaries we actually built (logd, randd, zerod,
  runtime.target, ramfs@.service, 90_initfs.target, 50_rootfs).
  The mainline 23 services reference fbcond/vesad/acpid/pcid/
  fbbootlogd/hwd/inputd which aren't in the bare BINS, so
  init would try to start them and busy-loop.
- Synthesize minimal 00_ptyd.service and 30_getty.service units
  in the initfs since they're built/copied but not in the
  mainline init.initfs.d.
- Override 00_runtime.target to add ptyd and getty as weak
  requires (the mainline target references nulld/rtcd which we
  filtered out).
2026-07-15 06:48:46 +09:00
vasilito c08379e03e chore: track base submodule pointer for waitpid fix 2026-07-15 06:48:46 +09:00
vasilito fac69f9d03 fix(kernel): ProcUptime f64 → integer in soft-float build
Kernel is built with target-feature=+soft-float (no SSE), but the
upstream ProcUptime code used f64 in format!() which requires SSE
register return. This caused a build error:

  error: src/scheme/proc.rs:2047:32: ... SSE register return with
        SSE disabled

Replace the f64 arithmetic with integer math (seconds.milliseconds)
to make the kernel buildable on the redoxer cross-toolchain.
2026-07-15 06:48:46 +09:00
vasilito f93f9e8ea8 build-system: add redbear-bare to dispatch + integrate + build-all
The redbear-bare target (added in 48a6f4c20b) was not registered in
the build dispatchers. Running build-redbear.sh redbear-bare
silently exited with 'ERROR: Unknown config redbear-bare'.

Fix:
- build-redbear.sh: extend the case statement + usage block + error
  message to include redbear-bare
- integrate-redbear.sh: add config/redbear-bare.toml to the configs
  array so source-tree integration picks up the bare target too
- build-all-isos.sh: include redbear-bare in the targets list

This closes the gap where the bare target existed as a config file
and as a recipe branch (REDBEAR_BARE_INITFS) but was invisible to
the build dispatch layer.

(NO AI attribution)
2026-07-15 00:40:23 +09:00
vasilito b447c22da1 build-redbear.sh + redbear-bare: wire REDBEAR_BARE_INITFS to make
Round-25 fix landed the bare initfs conditional in
recipes/core/base-initfs/recipe.toml but the cookbook does NOT parse
[build.env] sections in TOML configs. The REDBEAR_BARE_INITFS=1
env var I put in redbear-bare.toml was silently ignored.

Fix: propagate REDBEAR_BARE_INITFS through build-redbear.sh's make live
invocation. When CONFIG=redbear-bare and the operator has not already
exported REDBEAR_BARE_INITFS, auto-set it to 1 so the bare initfs
branch is triggered. Also propagates any pre-existing REDBEAR_BARE_INITFS
through the make call (override-only).

Also rewrote the [build.env] section in redbear-bare.toml to a
comment-only section explaining the dispatch mechanism, since the
cookbook parser ignores it.

(NO AI attribution)
2026-07-14 23:39:18 +09:00
vasilito 48a6f4c20b config + base-initfs: comprehensive redbear-bare target gaps
Address 4 gaps in the new redbear-bare target per review:

Gap 1: add REDBEAR_BARE_INITFS env var to base-initfs recipe. When
  set, BINS=init logd ramfs randd zerod ptyd getty instead of 22+
  daemons/drivers. The bare target can now opt into the truly-minimal
  initfs via the env var.

Gap 2: add ptyd and getty to the cp case-list so they go to /initfs/bin
  not /initfs/lib/drivers. Without this, the getty 2 service cannot
  start because ptyd (which it requires) isn't in the initfs.

Gap 3: add /etc/issue (pre-login banner) and /etc/motd (post-login
  message) to the bare config. Standard Unix login surface polish.

Gap 4: trim packages in the bare config. Override ca-certificates,
  pkgutils, kibi (from minimal.toml) to empty. Bare only needs:
  zsh, coreutils, base, base-initfs, kernel, relibc, userutils,
  libgcc, libstdcxx.

Build invocation:
  REDBEAR_BARE_INITFS=1 make live CONFIG_NAME=redbear-bare

(NO AI attribution)
2026-07-14 23:32:53 +09:00
vasilito 1256a43a5b config: add redbear-bare target
Strips to bare minimum: kernel boots, base-initfs 90_initfs.target
brings up init daemons (logd, randd, zerod, ptyd, inputd), console
getty 2 hands off to zsh as default shell. No networking, no
display/audio, no driver-manager, no extra services.

filesystem_size=96 MiB. Includes only minimal.toml. Overrides
base.toml's /etc/net/* and /etc/pkg.d/50_redox (empty) and
/etc/login_schemes.toml (display/audio removed).

Build: make live CONFIG_NAME=redbear-bare

(NO AI attribution)
2026-07-14 23:09:01 +09:00
vasilito ff1aa97ca7 Revert "chore: track relibc submodule pointer update"
This reverts commit 4f102d1e2b.
2026-07-14 23:08:57 +09:00
vasilito 4f102d1e2b chore: track relibc submodule pointer update
Submodule local/sources/relibc moved from 7dee5480 to 7a8c7564
(operator-side work). Local + origin now in sync.

(NO AI attribution)

# Conflicts:
#	local/sources/relibc
2026-07-14 18:30:18 +09:00
vasilito 05ae87bd61 merge: combine local Round-22 build system commit with origin/0.3.1 SUBMODULE-NORMALIZATION doc
Local had the SUBMODULE-NORMALIZATION doc + Round-22 build system commit
uncommitted; origin had the same doc pre-Round-22. This merge combines
both into a single linear history.

(NO AI attribution)

# Conflicts:
#	local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md
2026-07-14 13:36:00 +09:00
vasilito e462d576f4 build-redbear.sh: enforce submodule/<name> branch on every fork worktree
Per local/AGENTS.md § "BRANCH AND SUBMODULE POLICY (ABSOLUTE)":\neach Red Bear fork worktree must be on the canonical\n"submodule/<name>" branch. Until now, the build system had NO\ncode enforcing this — drift was caught only by operator discipline\n(Round-21 hand-normalized 6 of 9 forks).\n\nAdd a new redbear_check_fork_branches() function called as a peer of\nthe existing dirty-source gate. It iterates REDBEAR_FORK_SOURCES,\nreads each fork worktree's current branch via 'git branch\n--show-current', and compares to 'submodule/<label>'. On mismatch\nthe build aborts with a clear error message and a documented fix\nrecipe. Escape hatch: REDBEAR_ALLOW_WRONG_BRANCH=1.
2026-07-14 13:00:52 +09:00
vasilito 441aba3d32 local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md: operator handoff for fork branch normalization
6 of 9 local fork working-trees are on branches that violate local/AGENTS.md § "BRANCH AND SUBMODULE POLICY":
  - 4 forks on master (bootloader, libredox, redoxfs, userutils)
  - 2 forks on version-suffixed branches (installer, syscall)

Captures the exact 6-command fix, verification, and AGENTS.md policy citations. NO fallbacks, NO code changes — operator-only per "agents MUST NOT create new git branches" rule.

(NO AI attribution)
2026-07-14 12:41:17 +09:00
vasilito b135dfdcd9 local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md: operator handoff for fork branch normalization
6 of 9 local fork working-trees are on branches that violate local/AGENTS.md § "BRANCH AND SUBMODULE POLICY":
  - 4 forks on master (bootloader, libredox, redoxfs, userutils)
  - 2 forks on version-suffixed branches (installer, syscall)

Captures the exact 6-command fix, verification, and AGENTS.md policy citations. NO fallbacks, NO code changes — operator-only per "agents MUST NOT create new git branches" rule.

(NO AI attribution)
2026-07-14 12:02:44 +09:00
vasilito 137da99644 scripts/bump-fork.sh: derive BRANCH_VERSION from git branch
The script uses '${BRANCH_VERSION:-0.0.0}' as the +rb suffix when
bumping a fork to a new upstream version. BRANCH_VERSION was never
set, so any fork bump would have produced 'X.Y.Z+rb0.0.0' instead
of the correct 'X.Y.Z+rb0.3.2' (or whichever branch is current).

Derive BRANCH_VERSION from 'git branch --show-current' using the same
pattern as local/scripts/build-redbear.sh:158-165. Falls back to
'0.0.0' if the branch name doesn't match semver (e.g., on 'master').

(NO AI attribution)
2026-07-14 11:53:39 +09:00
vasilito 314f655f37 chore: update base and kernel submodule pointers for fd-transfer diagnostics 2026-07-14 11:19:31 +09:00
vasilito e38b1bac27 chore: update base and relibc submodule pointers for FILETABLE fixes
- base: pipe2 FILETABLE desync fix (1e341ff7)

- relibc: open() FILETABLE-aware allocation fix (aeabac73)
2026-07-14 08:52:08 +09:00
vasilito adbea07ec8 track forked-component pointer updates + qt6-wayland-smoke gitlink
Submodule pointers for base and relibc moved (operator-side work).
recipes/wip/wayland/qt6-wayland-smoke remains a broken gitlink
(known; see local/docs/SESSION-2026-07-13-DOC-CLEANUP.md for carry-over).

(NO AI attribution)
2026-07-14 01:18:38 +03:00
vasilito 33cd92a655 docs/README.md: replace PROFILE-MATRIX.md ref with consolidation target
D7 validation: PROFILE-MATRIX.md was deleted during cleanup but still
linked from docs/README.md bullet list. Replaced with
local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md (consolidation target).

(NO AI attribution)
2026-07-14 01:18:24 +03:00
vasilito aec5a71096 local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md: fix deleted + wrong-path cross-refs
D7 validation: INPUT-SCHEME-ENHANCEMENT.md + PROFILE-MATRIX.md deleted
during cleanup but still referenced. Replaced with local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md (consolidation target).

(NO AI attribution)
2026-07-14 01:18:22 +03:00
vasilito ec9697f5d9 local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md: fix deleted + wrong-path cross-refs
D7 validation: 3 stale refs remained after cleanup.
- Removed DESKTOP-STACK-CURRENT-STATUS.md ref (file deleted)
- Removed docs/QUIRKS-IMPROVEMENT-PLAN.md ref (correct path is local/docs/)
- Verified all remaining refs resolve.

(NO AI attribution)
2026-07-14 01:18:21 +03:00
vasilito 757f5cfa53 local/docs/NETWORKING-IMPROVEMENT-PLAN.md: refresh fork SHAs to current HEADs
D7 validation found fork SHAs in this doc were stale vs the actual
local fork HEADs. Refreshed kernel/relibc rows to current; added
missing base row.

(NO AI attribution)
2026-07-14 01:18:10 +03:00
vasilito 88654e62c7 local/docs/SESSION-2026-07-13-DOC-CLEANUP.md: session-end state summary
Captures what was done this session (doc cleanup) and what carry-over issues remain (kernel fork at detached HEAD 2086faec with fix 22f5f622 in master; boot still fails at unit loading).

For handoff to next agent or operator.
2026-07-14 00:46:43 +03:00
vasilito 724923f6cc local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md: D6 follow-up cleanups
D6 verification flagged 3 stale remnants missed by the Round-12 cleanup pass. Per ground-truth:

- Line 155: relibc "active patches" is stale. Core recipes use PATCHED-VIA-PATH-FORK; 26 patch files in local/patches/relibc/ are reference/archived only.
- Lines 1832, 1902: qtbase 6.11.0 bumped to 6.11.1 to match README and actual fork state.

(NO AI attribution)
2026-07-13 19:47:44 +03:00
vasilito d367a86083 docs: sync archived inventory with current files
Round-7 audit found stale entries for files deleted by c04da4f031 and ecf1f19d55, plus missing entries for files still present in the archive. Rewrote the inventory to match the filesystem and added the 2026-07-13 sync note.
2026-07-13 19:43:56 +03:00
vasilito e8f35c9869 local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md: remove AMD-FIRST-INTEGRATION.md reference
Per ground-truth: AMD-FIRST-INTEGRATION.md was deleted. Replaced the cross-ref at line 91.
2026-07-13 19:42:01 +03:00
vasilito 338892d3ec local/docs/ACPI-IMPROVEMENT-PLAN.md: remove references to deleted plans
Per ground-truth: BOOT-PROCESS-ASSESSMENT.md, IOMMU-SPEC-REFERENCE.md, and LINUX-BORROWING-RUST-IMPLEMENTATION-PLAN.md are gone. Replaced with "(deleted)" markers. Lines 73-74 (duplicate BOOT-PROCESS-ASSESSMENT.md refs) collapsed to a single marker.
2026-07-13 19:41:55 +03:00
vasilito 67507071c0 local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md: remove references to deleted plans
Per ground-truth: AMD-FIRST-INTEGRATION.md, HARDWARE-3D-ASSESSMENT.md, DMA-BUF-IMPROVEMENT-PLAN.md were deleted during the P0 archive cleanup. Replaced each occurrence with "(deleted)" markers.
2026-07-13 19:41:47 +03:00
vasilito 041bdb9e72 local/docs/ECOSYSTEM-ADAPTION-POLICY.md: refresh version table
Per fork-upstream-map.toml + ground-truth section A:
  syscall       -> upstream 0.9.0     (was claimed 0.7.5)
  libredox      -> upstream 0.1.18    (was claimed 0.1.13)
  redoxfs       -> upstream 0.9.1
  redox-scheme  -> upstream 0.11.2    (was claimed 0.11.0)
  relibc        -> upstream 0.2.5
  kernel        -> upstream 0.6.0
  bootloader    -> upstream 1.0.0
  installer     -> upstream 0.2.42
  userutils     -> upstream 0.1.0

Updated lines 14-42 with current upstream versions. Line 32 claim about "no upstream consumer has migrated to 0.8.x" updated to reflect syscall fork is now on upstream 0.9.0.

(NO AI attribution)
2026-07-13 19:40:42 +03:00
vasilito c22569b28a docs: advance 0.3.0 to 0.3.1 2026-07-13 19:39:05 +03:00
vasilito 5805b18e9b docs: refresh fork state table
Lines 298-311 had 8 fork HEAD SHAs from 2026-07-07 (+rb0.3.0 era) that have since advanced. Per ground-truth section A:\n  base        4d09ab7f\n  bootloader  c78c3a6\n  installer   1e9dcde\n  kernel      22f5f622\n  libredox    b99b204\n  redoxfs     b78a791\n  relibc      11a1f8bc\n  syscall     6e4e5bd   (+rb0.3.1)\n  userutils   0dc0cb7\n\nAll forks now use +rb0.3.1 suffix. Line 311 "intentionally kept at +rb0.3.0" updated to "kept at +rb0.3.1".
2026-07-13 19:38:24 +03:00
vasilito 442d24a33d docs: clarify build setup defaults
Recipe example now notes that core components use path-fork recipes, while the CONFIG_NAME table entry is aligned to the actual default behavior exposed by mk/config.mk and build-redbear.sh.
2026-07-13 19:36:14 +03:00
vasilito aa83faa7d5 docs/05-KDE-PLASMA-ON-REDOX.md: bump Qt 6.11.0→6.11.1, fix KF6 build claims
Qt version: 6.11.0→6.11.1 globally (lines 56-57, 66-69, 105) per ground-truth — matches README.md and fork state.\n\nkirigami: was reported as "Build blocked at the QML gate" but local/patches/kirigami/ has patches indicating it builds. Updated to "Builds; runtime QML validation incomplete".\n\nkf6-kio: same — local/patches/kf6-kio/01-no-testlib.patch shows builds are now succeeding with tests disabled. Updated to "Builds; runtime QML validation incomplete".
2026-07-13 19:35:15 +03:00
vasilito d463f8147f CONTRIBUTING.md: redirect to gitea.redbearos.org + use build-redbear.sh 2026-07-13 19:35:01 +03:00
vasilito ca0274497f docs: add Red Bear build flow and config chains 2026-07-13 19:34:19 +03:00
vasilito 0b34232cc0 docs/README.md: remove duplicate refs, fix Qt/KF6 versions, redirect to gitea 2026-07-13 19:33:24 +03:00
vasilito 9f48e378c4 AGENTS.md: update overlay-patch references to match path-fork model
Ground-truth staleness fix for AGENTS.md, aligned to section A of /tmp/rb-ground-truth.txt (core forks use PATCHED-VIA-PATH-FORK; e.g. base 4d09ab7f, kernel 22f5f622).
2026-07-13 19:32:04 +03:00
vasilito 5703793d9f README.md: add missing forks; clarify relibc patch model; split KDE/KWin row
Per ground-truth: 9 forks exist (the 7 listed + syscall + libredox). Added syscall and libredox to the fork list with a note about how they're wired (Cargo path deps via redox-rt consumers, not via recipes/<comp>/recipe.toml path = ).

POSIX gaps row: "~38 active patches" is stale — relibc now uses PATCHED-VIA-PATH-FORK; the local/patches/relibc/ directory holds reference and archived patches, not active build-time patches.

KDE Plasma / KWin row was conflating two distinct statuses. KWin BUILDS successfully (the redox-drm + Qt6 Wayland patches exist); only the RUNTIME is blocked by the Qt6 Wayland crash. Split into two rows so readers know exactly what works vs what's blocked.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-13 19:30:50 +03:00
vasilito c97a8c759c docs: remove dangling archived doc refs
Updated the live USB and threading plans to reference the restored live copies instead of deleted archived paths.
2026-07-13 19:28:13 +03:00
vasilito e784cbc988 docs: restore archived validation and quirks plans
Moved the two docs back under local/docs because live documentation still treats them as active references.
2026-07-13 19:27:51 +03:00
vasilito 6f8dd561e2 scripts: extend check-prefix-freshness.sh with dead-symlink scan
The verify-overlay-integrity.sh script has two blind spots for stale
symlink detection:
  1. find recipes -maxdepth 3 misses paths at depth 4+
  2. only checks targets under /local/recipes/, misses /local/patches/

This adds a parallel scan that finds all dangling symlinks under recipes/
without maxdepth, classifies them by target path, and reports each with a
suggested action. Pure diagnostic — does not modify any files.

Enables preventive detection of the recipes/wip/x11/mesa-x11/source
orphan and recipes/core/base/redox.patch pointer-rot that triggered the
build integrity warnings on this session's rebuilds.

(NO AI attribution in commit message.)
2026-07-13 19:25:14 +03:00
vasilito 43f53a65be fix: add boot to login test 2026-07-13 17:38:38 +03:00
vasilito bf8f012eff fix: add pipe2 init invariant check 2026-07-13 17:38:12 +03:00
vasilito 829e1b87f5 fix: add prefix freshness diagnostic 2026-07-13 17:37:49 +03:00
vasilito 2c769b0000 fix: openssl3 — add no-dgram (in6_pktinfo missing from relibc)
bss_dgram.c uses 'struct in6_pktinfo' from <netinet/in.h> which is
not fully defined in relibc headers (sizeof on incomplete type).
Added no-dgram to disable datagram BIO (DTLS/QUIC) for now.
Red Bear OS doesn't need DTLS yet — standard TLS via stream sockets
is sufficient.
2026-07-13 00:08:46 +03:00
vasilito 8e39d0e267 fix: openssl3 cross-compilation — add PATH for cross-compiler
OpenSSL's Configure detects x86_64-unknown-redox-gcc as the compiler
but Make can't find it because the cross-compiler prefix/bin is not
in PATH. Added COOKBOOK_HOST_SYSROOT/bin to PATH before Configure call.

Also added no-sctp flag since relibc lacks <netinet/sctp.h>.
2026-07-12 23:59:27 +03:00
vasilito bebb5a8ef9 fix: overlay integrity — remove stale patch symlinks and expectations
Archived mega-patches (kernel/redox.patch, base/redox.patch, relibc/redox.patch,
installer/redox.patch, bootloader/redox.patch, P2-boot-runtime-fixes) were
consolidated into modular P0-...P9- patches during Phase 2/3 cleanup but the
integrity checker still expected them. Removed from EXPECTED_PATCH_SYMLINKS
and CRITICAL_PATCHES arrays. Fixed qt6-wayland-smoke symlink.

Overlay integrity check now PASSES (0 errors).
2026-07-12 23:49:04 +03:00
vasilito 1354b8d81f fix: base fork — remove FEXEC_STEP reference (removed from relibc) 2026-07-12 23:46:30 +03:00
vasilito cbb1d7ec37 fix: ncurses/ncursesw need -fPIC for static linking into PIE
--with-pic alone doesn't generate PIC code in newer ncurses (6.6+).
The static archive produced non-PIC objects using R_X86_64_PC32
relocations, which can't be linked into PIE executables.

Forced PIC via:
- Switched DYNAMIC_INIT → DYNAMIC_STATIC_INIT (builds both shared AND static)
- Added CFLAGS+=+=-fPIC CXXFLAGS+=+=-fPIC export (forces PIC at compile)

redbear-netctl-console now links successfully against libncursesw.a.
2026-07-12 22:46:27 +03:00