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:
fosslinux 2023-11-07 10:51:23 +11:00
parent 0907cfd073
commit 6ed2e09f3a
546 changed files with 700 additions and 1299 deletions

View file

@ -1,72 +0,0 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
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)
cp /${ARCH_DIR}/bin/blood-elf ${BINDIR}/blood-elf
cp /${ARCH_DIR}/bin/catm ${BINDIR}/catm
cp /${ARCH_DIR}/bin/chmod ${BINDIR}/chmod
cp /${ARCH_DIR}/bin/get_machine ${BINDIR}/get_machine
cp /${ARCH_DIR}/bin/hex2 ${BINDIR}/hex2
cp /${ARCH_DIR}/bin/kaem ${BINDIR}/kaem
cp /${ARCH_DIR}/bin/match ${BINDIR}/match
cp /${ARCH_DIR}/bin/M1 ${BINDIR}/M1
cp /${ARCH_DIR}/bin/M2-Mesoplanet ${BINDIR}/M2-Mesoplanet
cp /${ARCH_DIR}/bin/M2-Planet ${BINDIR}/M2-Planet
cp /${ARCH_DIR}/bin/mkdir ${BINDIR}/mkdir
cp /${ARCH_DIR}/bin/sha256sum ${BINDIR}/sha256sum
cp /${ARCH_DIR}/bin/unbz2 ${BINDIR}/unbz2
cp /${ARCH_DIR}/bin/ungz ${BINDIR}/ungz
cp /${ARCH_DIR}/bin/untar ${BINDIR}/untar
cp /${ARCH_DIR}/bin/cp ${BINDIR}/cp
cp /${ARCH_DIR}/bin/replace ${BINDIR}/replace
cp /${ARCH_DIR}/bin/rm ${BINDIR}/rm
chmod 755 ${BINDIR}/blood-elf
chmod 755 ${BINDIR}/catm
chmod 755 ${BINDIR}/chmod
chmod 755 ${BINDIR}/cp
chmod 755 ${BINDIR}/get_machine
chmod 755 ${BINDIR}/hex2
chmod 755 ${BINDIR}/kaem
chmod 755 ${BINDIR}/match
chmod 755 ${BINDIR}/M1
chmod 755 ${BINDIR}/M2-Mesoplanet
chmod 755 ${BINDIR}/M2-Planet
chmod 755 ${BINDIR}/mkdir
chmod 755 ${BINDIR}/sha256sum
chmod 755 ${BINDIR}/unbz2
chmod 755 ${BINDIR}/ungz
chmod 755 ${BINDIR}/untar
chmod 755 ${BINDIR}/replace
chmod 755 ${BINDIR}/rm
PATH=${BINDIR}
cd ${sysa}
catm run2.kaem bootstrap.cfg run.kaem
chmod 755 run2.kaem
kaem --file run2.kaem