Implement kernel bootstrap up to building Linux.

This commit is contained in:
rick-masters 2023-03-31 18:08:50 +00:00
parent 5ea8dd3136
commit ecf99ab08b
52 changed files with 4898 additions and 139 deletions

View file

@ -73,11 +73,16 @@ build ed-1.4
build bc-1.07.1
if [ "${CHROOT}" = False ]; then
# Save because linux deletes all distfiles to save space
cp "${DISTFILES}"/musl-1.2.3.tar.gz "${SOURCES}"/musl-1.2.3
fi
mkdir -p /sysc/distfiles
cp "${DISTFILES}"/curl-7.88.1.tar.bz2 /sysc/distfiles
# Clear up some RAM space
grep --no-filename '^build' "${SOURCES}"/run*.sh | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
grep --no-filename '^build' "${SOURCES}"/run*.sh | grep -v musl-1.2.3 | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
rm -rf "${SOURCES:?}/${p:?}"
done
@ -86,13 +91,22 @@ if [ "${CHROOT}" = False ]; then
build linux-4.9.10
create_sysb
go_sysb
fi
build musl-1.2.3 '' no-patches
# In chroot mode transition directly into System C.
SYSC=/sysc_image
sys_transfer "${SYSC}" /sysc gzip patch
if [ "${CHROOT_ONLY_SYSA}" != True ]; then
exec chroot "${SYSC}" /init
create_sysb
if [ "${KERNEL_BOOTSTRAP}" = True ]; then
echo "Kernel bootstrapping successful."
echo "NOTE: Transition to Linux and building remaining packages is under development."
else
go_sysb
fi
else
build musl-1.2.3 '' no-patches
# In chroot mode transition directly into System C.
SYSC=/sysc_image
sys_transfer "${SYSC}" /sysc gzip patch
if [ "${CHROOT_ONLY_SYSA}" != True ]; then
exec chroot "${SYSC}" /init
fi
fi