-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the user to use wrap as part of the bootstrap process #479
base: master
Are you sure you want to change the base?
Changes from all commits
f3828e4
4e2434b
cdd1114
fc2c576
dc5a00c
fa7a7ea
edcaf06
1ae0a31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# SPDX-FileCopyrightText: 2024 Max Hearnden maxoscarhearnden@gmail.com | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
set -ex | ||
|
||
# detect wether we are in a rootfs.py environment | ||
if ./${ARCH_DIR}/bin/catm steps/env-saved steps/env; then | ||
./${ARCH_DIR}/bin/wrap /${ARCH_DIR}/bin/kaem --file after-wrapped.kaem | ||
else | ||
# leave seed/stage0-posix | ||
cd ../.. | ||
|
||
ARCH_DIR=seed/stage0-posix/${ARCH_DIR} | ||
|
||
./${ARCH_DIR}/bin/wrap /${ARCH_DIR}/bin/kaem --file seed/after.kaem | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,18 @@ set -ex | |
|
||
PATH=/${ARCH_DIR}/bin | ||
|
||
catm seed-full.kaem /steps/bootstrap.cfg /steps/env seed.kaem | ||
if catm seed-full.kaem /steps/bootstrap.cfg /steps/env seed.kaem; then | ||
else | ||
replace --file /steps/env --output /steps/env --match-on /external/distfiles --replace-with /distfiles | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is |
||
cp /seed/wrap-bootstrap.cfg /steps/bootstrap.cfg | ||
catm seed-full.kaem /steps/bootstrap.cfg /steps/env /seed/seed.kaem | ||
cp /seed/configurator.c configurator.c | ||
cp /seed/configurator.${ARCH}.checksums configurator.${ARCH}.checksums | ||
|
||
cp /seed/script-generator.c script-generator.c | ||
cp /seed/script-generator.${ARCH}.checksums script-generator.${ARCH}.checksums | ||
# placeholder value | ||
FINAL_JOBS=1 | ||
fi | ||
|
||
kaem --file seed-full.kaem |
fosslinux marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CHROOT=True | ||
DISK=sda1 | ||
KERNEL_BOOTSTRAP=False | ||
BUILD_KERNELS=False | ||
JOBS=${FINAL_JOBS} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,9 @@ | |
# Add the rest of the FHS that we will use and is not created pre-boot | ||
ln -s bin /usr/sbin | ||
for d in bin lib sbin; do | ||
if [ -d "/${d}" ] && ! [ -L "/${d}" ]; then | ||
# Move the non symlink directory out of the way | ||
mv "/${d}" "/${d}-saved" | ||
fi | ||
Comment on lines
+9
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm reading the commit description where this was introduced but still cannot figure out why this was added. If I'm understanding the commit, my best guess is because the entire git repository is being copied into |
||
ln -s "usr/${d}" "/${d}" || true # these might exist if rerunning | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to try to avoid having conditional logic in
generator.py
. Is there some reason this needs to be here, and can't occur within the live-bootstrap environment?Ie, there would be conditional logic in after.kaem for wrap mode, by adding in some kind of
WRAP=True
intobootstrap.cfg
, rather than replacing the kaem files like this.