mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 11:36:32 +01:00
The instability was not caused by kexec-fiwix logic itself but by oversized early-stage payload pressure in kernel-bootstrap mode. When too many distfiles are injected before the Fiwix handoff, the early memory/file-table assumptions become fragile and KVM can fail during transition. This change restores kexec-fiwix.c to the known baseline (matching commit 984b8322...) and fixes the actual failure mode by moving non-early distfiles out of the initial image. What changed: - Keep only bootstrap-required distfiles in early init image. - Generate a separate raw payload image (LBPAYLD1 format) for the remaining distfiles. - Attach payload image as an extra disk in QEMU/bare-metal kernel-bootstrap flow. - Add a dedicated C89/tcc-compatible importer (payload-import) that scans payload disks and copies files into /external/distfiles after jump: fiwix. - Insert improve: import_payload immediately after jump: fiwix so the full distfile set is restored before heavy build steps continue. - Add PAYLOAD_REQUIRED config gating so this behavior is active only in kernel-bootstrap paths that need it. Why this design: - Preserves minimal early environment assumptions (no dependency on full shell utilities for the copy operation itself). - Avoids adding filesystem-construction toolchain dependencies for the payload container by using a simple length-prefixed raw format. - Keeps bare-metal and QEMU behavior aligned: both can carry full build artifacts without overloading the early handoff stage. - Leaves kexec-fiwix behavior deterministic and auditable by reverting to a known-good baseline implementation.
19 lines
450 B
Bash
19 lines
450 B
Bash
#!/bin/sh
|
|
#
|
|
# SPDX-FileCopyrightText: 2026 live-bootstrap contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set -ex
|
|
|
|
cd src
|
|
tcc -m32 -march=i386 -std=c89 -I../../tcc/tcc-0.9.27/include -o ${BINDIR}/payload-import payload-import.c
|
|
cd ..
|
|
|
|
if match x${UPDATE_CHECKSUMS} xTrue; then
|
|
sha256sum -o ${pkg}.checksums \
|
|
/usr/bin/payload-import
|
|
|
|
cp ${pkg}.checksums ${SRCDIR}
|
|
elif test -f ${pkg}.checksums; then
|
|
sha256sum -c ${pkg}.checksums
|
|
fi
|