Remove the notion of "sys*"
- This idea originates from very early in the project and was, at the time, a very easy way to categorise things. - Now, it doesn't really make much sense - it is fairly arbitary, often occuring when there is a change in kernel, but not from builder-hex0 to fiwix, and sysb is in reality completely unnecessary. - In short, the sys* stuff is a bit of a mess that makes the project more difficult to understand. - This puts everything down into one folder and has a manifest file that is used to generate the build scripts on the fly rather than using coded scripts. - This is created in the "seed" stage. stage0-posix -- (calls) --> seed -- (generates) --> main steps Alongside this change there are a variety of other smaller fixups to the general structure of the live-bootstrap rootfs. - Creating a rootfs has become much simpler and is defined as code in go.sh. The new structure, for an about-to-be booted system, is / -- /steps (direct copy of steps/) -- /distfiles (direct copy of distfiles/) -- all files from seed/* -- all files from seed/stage0-posix/* - There is no longer such a thing as /usr/include/musl, this didn't really make any sense, as musl is the final libc used. Rather, to separate musl and mes, we have /usr/include/mes, which is much easier to work with. - This also makes mes easier to blow away later. - A few things that weren't properly in packages have been changed; checksum-transcriber, simple-patch, kexec-fiwix have all been given fully qualified package names. - Highly breaking change, scripts now exist in their package directory but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh, etc. This avoids manual definition of passes. - Ditto with patches; default directory is patches, but then any patch series specific to a pass are named patches-passX.
This commit is contained in:
parent
0907cfd073
commit
6ed2e09f3a
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
tmp/
|
tmp/
|
||||||
kernel
|
kernel
|
||||||
sysa/distfiles/
|
distfiles/
|
||||||
sysc/distfiles/
|
|
||||||
__pycache__
|
__pycache__
|
||||||
sysa/bootstrap.cfg
|
steps/bootstrap.cfg
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
[submodule "seed/stage0-posix"]
|
||||||
[submodule "sysa/stage0-posix/src"]
|
path = seed/stage0-posix
|
||||||
path = sysa/stage0-posix/src
|
url = https://github.com/oriansj/stage0-posix
|
||||||
url = https://github.com/oriansj/stage0-posix/
|
|
||||||
|
|
|
@ -20,27 +20,18 @@ download_source() {
|
||||||
echo "${checksum} ${dest_path}" | sha256sum -c
|
echo "${checksum} ${dest_path}" | sha256sum -c
|
||||||
}
|
}
|
||||||
|
|
||||||
download_for_sys() {
|
|
||||||
local sysdir="${1}"
|
|
||||||
local distfiles="${sysdir}/distfiles"
|
|
||||||
|
|
||||||
mkdir -p "${distfiles}"
|
|
||||||
|
|
||||||
local entry
|
|
||||||
for entry in "${sysdir}"/*; do
|
|
||||||
[ -e "${entry}/sources" ] || continue
|
|
||||||
|
|
||||||
local line
|
|
||||||
# shellcheck disable=SC2162
|
|
||||||
while read line; do
|
|
||||||
# This is intentional - we want to split out ${line} into separate arguments.
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
download_source "${distfiles}" ${line}
|
|
||||||
done < "${entry}/sources"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$(readlink -f "$0")")"
|
cd "$(dirname "$(readlink -f "$0")")"
|
||||||
download_for_sys sysa
|
mkdir -p distfiles
|
||||||
download_for_sys sysc
|
|
||||||
|
for entry in steps/*; do
|
||||||
|
[ -e "${entry}/sources" ] || continue
|
||||||
|
|
||||||
|
# shellcheck disable=SC2162
|
||||||
|
while read line; do
|
||||||
|
# This is intentional - we want to split out ${line} into separate arguments.
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
download_source distfiles ${line}
|
||||||
|
done < "${entry}/sources"
|
||||||
|
done
|
||||||
|
|
|
@ -9,17 +9,7 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Set commonly used variables
|
PATH=/${ARCH_DIR}/bin
|
||||||
sysa=/sysa
|
|
||||||
DISTFILES=/sysa/distfiles
|
|
||||||
PREFIX=/usr
|
|
||||||
BINDIR=${PREFIX}/bin
|
|
||||||
LIBDIR=${PREFIX}/lib/mes
|
|
||||||
INCDIR=${PREFIX}/include/mes
|
|
||||||
SRCDIR=${PREFIX}/src
|
|
||||||
TMPDIR=/tmp # tmpdir is needed for patch to work
|
|
||||||
PATH=${BINDIR}
|
|
||||||
|
|
||||||
cd ${sysa}
|
catm seed-full.kaem /steps/env seed.kaem
|
||||||
|
kaem --file seed-full.kaem
|
||||||
exec bash run.sh
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/script-generator /steps/manifest
|
||||||
|
/usr/bin/kaem --file /preseed-jump.kaem
|
|
@ -9,20 +9,11 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
mkdir -p ${PREFIX} ${BINDIR} ${LIBDIR} ${INCDIR} ${SRCDIR} ${TMPDIR} /dev
|
||||||
|
|
||||||
|
# Temporarily change PATH
|
||||||
PATH=/${ARCH_DIR}/bin
|
PATH=/${ARCH_DIR}/bin
|
||||||
|
|
||||||
# Set commonly used variables
|
|
||||||
sysa=/sysa
|
|
||||||
DISTFILES=/sysa/distfiles
|
|
||||||
PREFIX=/usr
|
|
||||||
BINDIR=${PREFIX}/bin
|
|
||||||
LIBDIR=${PREFIX}/lib
|
|
||||||
INCDIR=${PREFIX}/include/mes
|
|
||||||
SRCDIR=${PREFIX}/src
|
|
||||||
TMPDIR=/tmp # tmpdir is needed for patch to work
|
|
||||||
|
|
||||||
mkdir -p ${PREFIX} ${BINDIR} ${LIBDIR} ${INCDIR} ${SRCDIR} ${TMPDIR}
|
|
||||||
|
|
||||||
# Remove remaining dependencies on /bin (stage0-posix directory)
|
# Remove remaining dependencies on /bin (stage0-posix directory)
|
||||||
cp /${ARCH_DIR}/bin/blood-elf ${BINDIR}/blood-elf
|
cp /${ARCH_DIR}/bin/blood-elf ${BINDIR}/blood-elf
|
||||||
cp /${ARCH_DIR}/bin/catm ${BINDIR}/catm
|
cp /${ARCH_DIR}/bin/catm ${BINDIR}/catm
|
||||||
|
@ -63,10 +54,14 @@ chmod 755 ${BINDIR}/replace
|
||||||
chmod 755 ${BINDIR}/rm
|
chmod 755 ${BINDIR}/rm
|
||||||
|
|
||||||
PATH=${BINDIR}
|
PATH=${BINDIR}
|
||||||
|
M2LIBC_PATH=/M2libc
|
||||||
|
|
||||||
cd ${sysa}
|
# mes envars
|
||||||
|
NYACC_PKG=nyacc-1.00.2
|
||||||
|
MES_PKG=mes-0.25
|
||||||
|
MES_PREFIX=${SRCDIR}/${MES_PKG}/build/${MES_PKG}
|
||||||
|
GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${SRCDIR}/${MES_PKG}/build/${NYACC_PKG}/module
|
||||||
|
|
||||||
catm run2.kaem bootstrap.cfg run.kaem
|
M2-Mesoplanet --architecture ${ARCH} -f script-generator.c -o script-generator
|
||||||
chmod 755 run2.kaem
|
./script-generator /steps/manifest
|
||||||
|
kaem --file /steps/0.sh
|
||||||
kaem --file run2.kaem
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue