Conversation
…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
Drop the manual make -C opcodes i386-gen call from pass1.sh and rely on default_src_compile instead. This avoids failures when opcodes/ is not yet available in the current build context (make: *** opcodes: No such file or directory) and matches the stable top-level recursive build flow used elsewhere in the project.
- add gcc-15.2.0 to steps-guix manifest after binutils-2.41 - keep full gcc-15.2.0 pass1 src_prepare cleanup/regeneration flow - switch configure/build/install to kernel toolchain bootstrap mode: --without-headers, --enable-multilib, all-gcc, all-target-libgcc - install into /kernel-toolchain and prioritize /kernel-toolchain/bin in PATH - add missing gcc distfiles entry for SARIF spec - include decDPD helper files used during src_prepare
The stage1 gcc build runs with --without-headers, but all-target-libgcc was still pulling in gthr-default.h and failing on missing pthread.h. Adjust steps-guix/gcc-15.2.0/pass1.sh configure flags to match a headers-free bootstrap profile: - add --disable-threads - add --disable-shared - add --disable-libssp - add --disable-libsanitizer - add --disable-libquadmath - add --disable-libatomic - add --disable-libgomp Keep the existing multilib bootstrap flow: - make all-gcc - make all-target-libgcc - make install-gcc - make install-target-libgcc
- add steps-guix/argp-standalone-1.4.1/pass1.sh - run autoreconf before configure - build/install with standard flow into /kernel-toolchain - wire argp-standalone-1.4.1 into steps-guix manifest after gcc - prepare argp for later kernel-side elfutils dependency
When booting with --stage0-image, mirror ports can change between runs (e.g. file:// -> transient SimpleMirror port), but the reused image kept stale MIRRORS/MIRRORS_LEN values in /steps/bootstrap.cfg. Update stage0-work image preparation to patch bootstrap.cfg on each run: - rewrite MIRRORS and MIRRORS_LEN from current CLI mirrors - keep existing --build-guix-also handoff checks/sync behavior This fixes guest downloads trying old 10.0.2.2:<stale-port> endpoints during steps-guix builds.
…stsuite argp-standalone pass1 builds in a separate build directory. Its testsuite compiles sources that include <argp.h>, but without an explicit include path the header in the source root is not found and build fails. Set: - CPPFLAGS=-I/Users/luoyanpan/CLionProjects/guix/live-bootstrap/.. in src_configure so testsuite objects can resolve argp.h during the normal phase.
…olchain instead of relying on make install
…generation and fts/argp env wiring
…al LIBS and setting host/build + kernel-toolchain env
…ied sha256 and wire it before elfutils
…hs, and disable unused-but-set-variable as error
…compress, and debuginfod client
…mpile via rpath-link and explicit LIBS
So, should we build a separate musl to achieve this? |
|
Oops... I accidentally edited your comment instead of mine. Anyway, a shell is indeed present at this stage - it just needs to be found via $PATH, rather than hardcoded. I'm currently testing a possible fix: bootstrap-system.patch |
|
Seems like the fix worked, but bootar fails now with a new error: |
use-execvp-sh-in-scm-system.patch |
…ndependent bootstrap-guile
…-status semantics
yes, i have this problem also, This may cause by |
|
This patch is needed to avoid errors due to WAIT_ANY and glibc-specific LC_* macros not being defined in musl. |
… for bootstrap compatibility
i mean won't removing this cause any problems? Have you checked what this variable is for? |
;; Dump the environment variables as a shell script,
;; for handy debugging.This comment doesn't sound like it's actually used as part of the bootstrap, it's just for debugging purposes. |
|
fixnums-remove-new-asserts.patch Yet another patch, this time to remove some new assertions that were added to the RNRS fixnums module between Guile 2.0 and 2.2. The version of bootar used in guix runs afoul of these with some BZ2 archives (notably tcc 0.9.27). |
fosslinux
left a comment
There was a problem hiding this comment.
A lot of this looks quite good. Please don't be put off by the number of comments.
I must say, I am reasonably impressed that you managed to pull this off. This is a fairly significant set of work.
There are some things that I have intentionally not reviewed because I will be replacing what they do anyways before this is merged.
- the location of
KERNEL_SYSROOTshould be changed. It shouldn't be defined in every build script, and shouldn't be at/kernel-toolchain(it should live somewhere else, like/usr/x86_64-guix-linux-musl, or possibly it should install everything to/usr/bindirectory, and libs to/usr/lib/x86_64-guix-linux-musland includes to/usr/include/i686-guix-linux-musl. - Any miscellaneous inputs that need to be packaged, like the bootstrap-seeds, could be installed to a more sensible place on the system, perhaps
/opt/guix? Then we could have a subdirectory like/opt/guix/bootstrap-seeds. KERNEL_TARGETalso shouldn't be set in every script.- for the bootstrap seeds for guix, it would be good to identify that in the package name, for example instead of
coreutils-8.30,coreutils-guix-seed-8.30. - in many places, you have something like
src_prepare() {
default
}
this is totally redundant, default is, literally, the default :)
- similarly, in many places also, you have a pattern like
local var
var=something
X=$var ...
this doesn't really help for clarity, unless it is a particularly complex expression, and in most of the places used is unnecessary
- in many places
PATH/LD_LIBRARY_PATH/PKG_CONFIGis redefined for a configure script, this is almost certainly unnecessary. same withCC,AR,RANLIB, which I also doubt are necessary PKG_CONFIG_LIBDIRappears here and there -- I've never heard of this variable before, what's up with that?- It is conventional for shared patches and files copied from other packages to be symlinked.
- Every new file needs SPDX lines with author and license information. Please be careful with this, it is important to us that everything has proper copyright attribution.
- Of course, eventually we will need to audit this for pregenerated files (but that can be later.)
- (This is not something you need to fix.) There are a number of variables that are reused here that should be pulled up to global, like
GUILE_LOAD_PATH,GUILE_SYSTEM_PATH,PKG_CONFIG_PATH,PKG_CONFIG_PATH - I'm a bit confused about this pattern
--host="${host_triplet}"etc, is the default not sufficient? - I don't understand all the
NETWORK_READYstuff. Could you briefly explain what it's doing?
| src_configure() { | ||
| local host_triplet pkg_config_path | ||
| host_triplet="$(gcc -dumpmachine)" | ||
| pkg_config_path="${LIBDIR}/pkgconfig:${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig" |
There was a problem hiding this comment.
Note to self: I should make PKG_CONFIG_PATH be set globally. (This is my fault.)
| src_unpack() { | ||
| mkdir -p mescc-tools-static-stripped-0.5.2-i686-linux | ||
| } | ||
| src_prepare() { :; } |
There was a problem hiding this comment.
this should almost certainly be unnecessary
There was a problem hiding this comment.
same as above, if don't have this stub, it will fail because it missing sources and distfiles
| src_unpack() { | ||
| local url fname | ||
|
|
||
| url="$(awk 'NR==1 { print $2 }' ../sources)" | ||
| fname="$(awk 'NR==1 { print $4 }' ../sources)" | ||
|
|
||
| if [ -z "${fname}" ]; then | ||
| fname="$(basename "${url}")" | ||
| fi | ||
|
|
||
| cp "${DISTFILES}/${fname}" . | ||
| unzip -q "${fname}" | ||
|
|
||
| dirname="${fname%.zip}" | ||
| } |
There was a problem hiding this comment.
Hmm, let's add proper zip processing support in helpers.sh instead.
There was a problem hiding this comment.
I think we can get by without unzip. We have bsdtar from libarchive, which is able to deal with DEFLATE (.zip) files.
| if [ "${BARE_METAL}" = True ]; then | ||
| kexec -l "/boot/vmlinuz" \ | ||
| --append="root=/dev/sda1 rootfstype=ext3 init=/init rw rootwait" | ||
| --append="root=/dev/sda1 init=/init rw rootwait" |
There was a problem hiding this comment.
let kernel to decide the filesystem itself
There was a problem hiding this comment.
AFAIK this was needed so the kernel doesn't try to look for ext4 extensions, because ext4 created by a newer kernel tends to crash older kernels.
There was a problem hiding this comment.
but, why we need to switch to old kernel?
btw, Has guix pull --bootstrap run successfully yet?
|
I'm going to make a list of things that I'd like to see in separate PRs, whether made by you, me or someone else;
|
… arithmetic module
…r and make rootfs resume dispatch direct
…nd move build script to pass2
No description provided.