Files
RedBear-OS/config/redbear-bare.toml
T
vasilito 5b49b36724 fix(boot): base submodule ptr (bare/mini warning cleanup) + bare serial console
Track base 1769b083 (condition_path_exists for optional daemons, ahcid no-media,
netstack no-NIC idle, dhcpd fast-fail). Re-enable the serial debug console on
the bare target so it has a headless-visible login prompt (matching mini up to
login).
2026-07-18 00:30:00 +09:00

159 lines
4.2 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]
# 192 MiB leaves ~30% headroom over the 153 MiB of installed content
# (zsh, base, base-initfs, kernel, relibc, userutils, libgcc, libstdcxx,
# coreutils, extrautils, ca-certificates, kibi, netdb, netutils, pkgutils,
# uutils). Anything below 160 MiB triggers ENOSPC during installer commit.
filesystem_size = 192
# 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)
brush = {} # login shell (bare matches mini up to login)
# 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 = ""
# NOTE: the serial debug console (31_debug_console.service, getty on
# /scheme/debug/no-preserve) is intentionally LEFT ENABLED (inherited from
# minimal.toml) on the bare target. It is the only login prompt visible on a
# headless serial console, which is exactly how a "bare" boot-test image is
# driven (QEMU -serial stdio, real serial header on bare metal). The earlier
# concern about a ~45s getty retry hang applied to the minimal 6-daemon initfs
# that did not run ptyd; the bare target now switchroots into the full rootfs
# where ptyd is running, so the debug console comes up immediately.
# 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/brush"
[users.user]
password = ""
shell = "/usr/bin/brush"
[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