b447c22da1
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)
145 lines
3.3 KiB
TOML
145 lines
3.3 KiB
TOML
# Red Bear OS Bare Configuration
|
|
#
|
|
# Target contract:
|
|
# - Boots kernel
|
|
# - Starts init daemons via a minimal base-initfs
|
|
# (logd, randd, zerod, ptyd, getty — see recipes/core/base-initfs)
|
|
# - Console getty → zsh login prompt (from minimal.toml's 30_console.service)
|
|
# - No networking, no driver-manager, no display, no audio, no extra daemons
|
|
# - Stripped to bare minimum
|
|
#
|
|
# To trigger the bare initfs (BINS=init logd ramfs randd zerod ptyd getty):
|
|
# REDBEAR_BARE_INITFS=1 make live CONFIG_NAME=redbear-bare
|
|
#
|
|
# Or via the build script with the env var set:
|
|
# REDBEAR_BARE_INITFS=1 ./local/scripts/build-redbear.sh redbear-bare
|
|
|
|
include = ["minimal.toml"]
|
|
|
|
[general]
|
|
filesystem_size = 96
|
|
|
|
# Trim down packages beyond what minimal.toml includes.
|
|
# minimal.toml includes ca-certificates, coreutils, extrautils, zsh, pkgutils, kibi.
|
|
# For "bare" we only need: zsh, coreutils, base, base-initfs, kernel, relibc,
|
|
# userutils, libgcc, libstdcxx. Drop ca-certificates, pkgutils, kibi.
|
|
[packages]
|
|
ca-certificates = {} # explicitly empty (overrides minimal)
|
|
pkgutils = {} # explicitly empty (overrides minimal)
|
|
kibi = {} # explicitly empty (overrides minimal)
|
|
|
|
# Override base.toml's network config — no DNS, no IP, no router
|
|
[[files]]
|
|
path = "/etc/net/dns"
|
|
data = ""
|
|
|
|
[[files]]
|
|
path = "/etc/net/ip"
|
|
data = ""
|
|
|
|
[[files]]
|
|
path = "/etc/net/ip_router"
|
|
data = ""
|
|
|
|
[[files]]
|
|
path = "/etc/net/ip_subnet"
|
|
data = ""
|
|
|
|
# Override base.toml's package manager config — no remote repo
|
|
[[files]]
|
|
path = "/etc/pkg.d/50_redox"
|
|
data = ""
|
|
|
|
# Override base.toml's login_schemes — no display/audio schemes in bare
|
|
[[files]]
|
|
path = "/etc/login_schemes.toml"
|
|
data = """
|
|
[user_schemes.root]
|
|
schemes = [
|
|
"debug",
|
|
"event",
|
|
"memory",
|
|
"pipe",
|
|
"serio",
|
|
"irq",
|
|
"time",
|
|
"sys",
|
|
"rand",
|
|
"null",
|
|
"zero",
|
|
"log",
|
|
"shm",
|
|
"chan",
|
|
"uds_stream",
|
|
"uds_dgram",
|
|
"file",
|
|
"pty",
|
|
"sudo",
|
|
]
|
|
[user_schemes.user]
|
|
schemes = [
|
|
"debug",
|
|
"event",
|
|
"memory",
|
|
"pipe",
|
|
"serio",
|
|
"irq",
|
|
"time",
|
|
"sys",
|
|
"rand",
|
|
"null",
|
|
"zero",
|
|
"log",
|
|
"shm",
|
|
"chan",
|
|
"uds_stream",
|
|
"uds_dgram",
|
|
"file",
|
|
"pty",
|
|
"sudo",
|
|
]
|
|
"""
|
|
|
|
# Pre-login banner (printed by getty before the login prompt)
|
|
[[files]]
|
|
path = "/etc/issue"
|
|
data = """
|
|
Red Bear OS 0.3.1 - bare target
|
|
Kernel \\r on an \\m (\\s)
|
|
|
|
Login as 'root' (password: password) or 'user' (no password).
|
|
"""
|
|
|
|
# Post-login message (printed by zsh at shell startup)
|
|
[[files]]
|
|
path = "/etc/motd"
|
|
data = """
|
|
Welcome to Red Bear OS bare target.
|
|
|
|
This is a stripped-down initfs+rootfs build with only:
|
|
init, logd, ramfs, randd, zerod, ptyd, getty
|
|
No networking, no display, no audio, no driver-manager.
|
|
"""
|
|
|
|
[users.root]
|
|
password = "password"
|
|
uid = 0
|
|
gid = 0
|
|
shell = "/usr/bin/zsh"
|
|
|
|
[users.user]
|
|
password = ""
|
|
shell = "/usr/bin/zsh"
|
|
|
|
[groups.sudo]
|
|
gid = 1
|
|
members = ["user"]
|
|
|
|
# Build override note: the cookbook's [build.env] section is not parsed
|
|
# by the current config parser, so the REDBEAR_BARE_INITFS=1 env var is
|
|
# set automatically by local/scripts/build-redbear.sh when CONFIG_NAME
|
|
# is redbear-bare. See that script's per-target hook block.
|
|
#
|
|
# If you need to override or test the bare initfs directly:
|
|
# REDBEAR_BARE_INITFS=1 ./local/scripts/build-redbear.sh redbear-bare
|