b9874d0941
Add redbear-usb-storage-check in-guest binary that validates USB mass storage read and write I/O: discovers /scheme/disk/ devices, writes a test pattern to sector 2048, reads it back, verifies match, restores original content. Updates test-usb-storage-qemu.sh with write-proof verification step. Includes all accumulated Red Bear OS work: kernel patches, relibc patches, driver infrastructure, DRM/GPU, KDE recipes, firmware, validation tooling, build system hardening, and documentation.
57 lines
1.3 KiB
TOML
57 lines
1.3 KiB
TOML
#TODO Promote
|
|
[source]
|
|
git = "https://github.com/willnode/htop"
|
|
branch = "redox"
|
|
script = """
|
|
autotools_recursive_regenerate
|
|
"""
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"ncursesw",
|
|
]
|
|
script = """
|
|
python3 - <<'PY'
|
|
import os
|
|
from pathlib import Path
|
|
|
|
source = Path(os.environ["COOKBOOK_SOURCE"])
|
|
|
|
rich = source / "RichString.c"
|
|
text = rich.read_text()
|
|
text = text.replace('mbstate_t ps = { 0 };', 'mbstate_t ps;\\n memset(&ps, 0, sizeof(ps));')
|
|
rich.write_text(text)
|
|
|
|
process = source / "Process.c"
|
|
text = process.read_text()
|
|
text = text.replace('#else\\n return true;', '#else\\n (void)this;\\n (void)priority;\\n return true;')
|
|
process.write_text(text)
|
|
|
|
redox = source / "redox/RedoxProcessTable.c"
|
|
text = redox.read_text()
|
|
text = text.replace('char state = map_redox_state(stat);', 'ProcessState state = (ProcessState) map_redox_state(stat);')
|
|
redox.write_text(text)
|
|
PY
|
|
|
|
export CFLAGS="${CFLAGS} -fno-finite-math-only"
|
|
export CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fno-finite-math-only"
|
|
sed -i 's/flag_finite_math_only=yes/flag_finite_math_only=no/g' "${COOKBOOK_SOURCE}/configure"
|
|
COOKBOOK_CONFIGURE_FLAGS=(
|
|
--host="${GNU_TARGET}"
|
|
--prefix="/usr"
|
|
)
|
|
COOKBOOK_CONFIGURE_FLAGS+=(
|
|
--enable-unicode
|
|
--disable-hwloc
|
|
--disable-sensors
|
|
--disable-capabilities
|
|
)
|
|
cookbook_configure
|
|
"""
|
|
|
|
[package]
|
|
dependencies = [
|
|
"terminfo"
|
|
]
|