bootstrap: add stage0 image reuse for guix and simplify guix handoff flow

- add --stage0-image in rootfs.py for qemu to boot an existing kernel-bootstrap image
- when --stage0-image is combined with --build-guix-also, update BUILD_GUIX_ALSO in image config and sync /steps-guix into the image
- require stage0 /init to contain guix handoff marker instead of patching /init implicitly
- add run_steps_guix_if_requested() to make_bootable-generated /init so rebooted stage0 images can enter steps-guix directly
- run /steps-guix/0.sh with bash in after.sh
- make script-generator start mode convention-based: /steps stays kaem-first, alternate roots (e.g. /steps-guix) start in bash
- remove redundant explicit /steps config-root argument from seed/preseeded/reconfigure script-generator calls
This commit is contained in:
vxtls 2026-02-18 14:35:17 -05:00
parent 21ddab36c3
commit 6fcb8f4d4a
15 changed files with 1010 additions and 22 deletions

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2023 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
In new gettext external is required for AM_GNU_GETTEXT.
--- binutils-2.41/intl/configure.ac 2023-02-07 18:57:56.350832016 +1100
+++ binutils-2.41/intl/configure.ac 2023-02-07 18:58:07.310054484 +1100
@@ -4,7 +4,7 @@
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR(../config)
AM_GNU_GETTEXT_VERSION(0.12.1)
-AM_GNU_GETTEXT([], [need-ngettext])
+AM_GNU_GETTEXT([external], [need-ngettext])
# This replaces the extensive use of DEFS in the original Makefile.in.
AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])

View file

@ -0,0 +1,26 @@
SPDX-FileCopyrightText: 2023 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Ensure functions.texi dependencies are satisfied.
--- binutils-2.41/libiberty/Makefile.in 2023-12-08 15:18:57.985791235 +1100
+++ binutils-2.41/libiberty/Makefile.in 2023-12-08 15:19:15.391252344 +1100
@@ -368,12 +368,12 @@
libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) --no-split --html -I$(srcdir) -o $@ $<
-@MAINT@$(srcdir)/functions.texi : stamp-functions
-@MAINT@ @true
+$(srcdir)/functions.texi : stamp-functions
+ @true
-@MAINT@stamp-functions : $(CFILES:%=$(srcdir)/%) $(TEXIFILES:%=$(srcdir)/%) $(srcdir)/gather-docs Makefile
-@MAINT@@HAVE_PERL@ $(PERL) $(srcdir)/gather-docs $(srcdir) $(srcdir)/functions.texi $(CFILES) $(TEXIFILES)
-@MAINT@ echo stamp > stamp-functions
+stamp-functions : $(CFILES:%=$(srcdir)/%) $(TEXIFILES:%=$(srcdir)/%) $(srcdir)/gather-docs Makefile
+@HAVE_PERL@ $(PERL) $(srcdir)/gather-docs $(srcdir) $(srcdir)/functions.texi $(CFILES) $(TEXIFILES)
+ echo stamp > stamp-functions
INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST) install-subdir

View file

@ -0,0 +1,18 @@
SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
SPDX-FileCopyrightText: 2023 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Ensure i386-tbl.h dependencies are satisfied.
--- binutils-2.41/opcodes/Makefile.am 2023-12-08 17:13:05.669136957 +1100
+++ binutils-2.41/opcodes/Makefile.am 2023-12-08 17:13:18.410480026 +1100
@@ -540,7 +540,7 @@
# i386-gen will generate all headers in one go. Use a pattern rule to properly
# express this, with the inner dash ('-') arbitrarily chosen to be the stem.
$(srcdir)/i386%tbl.h $(srcdir)/i386%init.h $(srcdir)/i386%mnem.h: \
- @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
+ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - \
< $(srcdir)/i386-opc.tbl \
| ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)