mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-17 00:35:25 +01:00
Add option to build kernels and related tools during chroot and bwrap builds
The main motivations to have this are: * Detect checksum changes with chroot/bwrap builds * Avoid removing checksums from `SHA256SUMS.pkgs` when unsing `--update-checksums` * Find crashes that would otherwise be missed in `builder-hex0`
This commit is contained in:
parent
d3477570b8
commit
dd8ce0e516
3 changed files with 24 additions and 8 deletions
|
|
@ -39,6 +39,7 @@ def create_configuration_file(args):
|
||||||
config.write("KERNEL_BOOTSTRAP=True\n")
|
config.write("KERNEL_BOOTSTRAP=True\n")
|
||||||
else:
|
else:
|
||||||
config.write("KERNEL_BOOTSTRAP=False\n")
|
config.write("KERNEL_BOOTSTRAP=False\n")
|
||||||
|
config.write(f"BUILD_KERNELS={args.build_kernels}\n")
|
||||||
|
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
def main():
|
def main():
|
||||||
|
|
@ -73,6 +74,9 @@ def main():
|
||||||
parser.add_argument("--external-sources",
|
parser.add_argument("--external-sources",
|
||||||
help="Download sources externally from live-bootstrap.",
|
help="Download sources externally from live-bootstrap.",
|
||||||
action="store_true")
|
action="store_true")
|
||||||
|
parser.add_argument("--build-kernels",
|
||||||
|
help="Also build kernels in chroot and bwrap builds.",
|
||||||
|
action="store_true")
|
||||||
parser.add_argument("--no-create-config",
|
parser.add_argument("--no-create-config",
|
||||||
help="Do not automatically create config file",
|
help="Do not automatically create config file",
|
||||||
action="store_true")
|
action="store_true")
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,17 @@ cd ${pkg}
|
||||||
kaem --file ${pkg}.kaem
|
kaem --file ${pkg}.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
BUILD_FIWIX=False
|
||||||
|
|
||||||
if match x${KERNEL_BOOTSTRAP} xTrue; then
|
if match x${KERNEL_BOOTSTRAP} xTrue; then
|
||||||
|
BUILD_FIWIX=True
|
||||||
|
fi
|
||||||
|
|
||||||
|
if match x${BUILD_KERNELS} xTrue; then
|
||||||
|
BUILD_FIWIX=True
|
||||||
|
fi
|
||||||
|
|
||||||
|
if match x${BUILD_FIWIX} xTrue; then
|
||||||
# The Fiwix kernel
|
# The Fiwix kernel
|
||||||
pkg="fiwix-1.4.0-lb1"
|
pkg="fiwix-1.4.0-lb1"
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
@ -58,14 +68,16 @@ if match x${KERNEL_BOOTSTRAP} xTrue; then
|
||||||
kaem --verbose --file ${pkg}.kaem
|
kaem --verbose --file ${pkg}.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Build the ext2 image
|
|
||||||
make_fiwix_initrd
|
|
||||||
|
|
||||||
# Live boot loader for Fiwix
|
# Live boot loader for Fiwix
|
||||||
pkg="kexec-fiwix"
|
pkg="kexec-fiwix"
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
kaem --verbose --file ${pkg}.kaem
|
kaem --verbose --file ${pkg}.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
if match x${KERNEL_BOOTSTRAP} xTrue; then
|
||||||
|
# Build the ext2 image
|
||||||
|
make_fiwix_initrd
|
||||||
|
|
||||||
# Boot Fiwix
|
# Boot Fiwix
|
||||||
kexec-fiwix
|
kexec-fiwix
|
||||||
|
|
|
||||||
10
sysa/run2.sh
10
sysa/run2.sh
|
|
@ -73,7 +73,7 @@ build ed-1.4
|
||||||
|
|
||||||
build bc-1.07.1
|
build bc-1.07.1
|
||||||
|
|
||||||
if [ "${CHROOT}" = False ]; then
|
if [ "${CHROOT}" = False ] || [ "${BUILD_KERNELS}" = True ]; then
|
||||||
# Save because linux deletes all distfiles to save space
|
# Save because linux deletes all distfiles to save space
|
||||||
cp "${DISTFILES}"/musl-1.2.3.tar.gz "${SOURCES}"/musl-1.2.3
|
cp "${DISTFILES}"/musl-1.2.3.tar.gz "${SOURCES}"/musl-1.2.3
|
||||||
fi
|
fi
|
||||||
|
|
@ -86,13 +86,15 @@ grep --no-filename '^build' "${SOURCES}"/run*.sh | grep -v musl-1.2.3 | sed "s/b
|
||||||
rm -rf "${SOURCES:?}/${p:?}"
|
rm -rf "${SOURCES:?}/${p:?}"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "${CHROOT}" = False ]; then
|
if [ "${CHROOT}" = False ] || [ "${BUILD_KERNELS}" = True ]; then
|
||||||
build kexec-tools-2.0.22
|
build kexec-tools-2.0.22
|
||||||
|
|
||||||
build linux-4.9.10
|
build linux-4.9.10
|
||||||
|
fi
|
||||||
|
|
||||||
build musl-1.2.3 '' no-patches
|
build musl-1.2.3 '' no-patches
|
||||||
|
|
||||||
|
if [ "${CHROOT}" = False ]; then
|
||||||
create_sysb
|
create_sysb
|
||||||
if [ "${KERNEL_BOOTSTRAP}" = True ]; then
|
if [ "${KERNEL_BOOTSTRAP}" = True ]; then
|
||||||
echo "Kernel bootstrapping successful."
|
echo "Kernel bootstrapping successful."
|
||||||
|
|
@ -101,8 +103,6 @@ if [ "${CHROOT}" = False ]; then
|
||||||
go_sysb
|
go_sysb
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
build musl-1.2.3 '' no-patches
|
|
||||||
|
|
||||||
# In chroot mode transition directly into System C.
|
# In chroot mode transition directly into System C.
|
||||||
SYSC=/sysc_image
|
SYSC=/sysc_image
|
||||||
sys_transfer "${SYSC}" /sysc gzip patch
|
sys_transfer "${SYSC}" /sysc gzip patch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue