2020-12-23 06:02:57 +00:00
|
|
|
#!/bin/sh
|
2021-02-08 06:23:31 +00:00
|
|
|
|
2021-06-10 18:01:47 +01:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
2022-04-24 04:59:17 +01:00
|
|
|
# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space>
|
2022-05-20 17:48:18 +01:00
|
|
|
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
2020-12-23 06:02:57 +00:00
|
|
|
#
|
2021-02-08 06:23:31 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2020-12-23 06:02:57 +00:00
|
|
|
|
2021-06-10 18:01:47 +01:00
|
|
|
set -ex
|
2020-12-23 06:02:57 +00:00
|
|
|
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
mkdir -p ${PREFIX} ${BINDIR} ${LIBDIR} ${INCDIR} ${SRCDIR} ${TMPDIR} /dev
|
2021-06-24 00:32:19 +01:00
|
|
|
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
# Temporarily change PATH
|
|
|
|
PATH=/${ARCH_DIR}/bin
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2021-06-24 00:32:19 +01:00
|
|
|
# Remove remaining dependencies on /bin (stage0-posix directory)
|
2023-11-28 02:16:09 +00:00
|
|
|
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
|
2024-02-09 01:47:07 +00:00
|
|
|
cp /${ARCH_DIR}/bin/unxz ${BINDIR}/unxz
|
2023-11-28 02:16:09 +00:00
|
|
|
cp /${ARCH_DIR}/bin/cp ${BINDIR}/cp
|
|
|
|
cp /${ARCH_DIR}/bin/replace ${BINDIR}/replace
|
|
|
|
cp /${ARCH_DIR}/bin/rm ${BINDIR}/rm
|
2022-05-20 17:13:54 +01:00
|
|
|
|
2023-11-28 02:16:09 +00:00
|
|
|
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
|
2024-02-09 01:47:07 +00:00
|
|
|
chmod 755 ${BINDIR}/unxz
|
2023-11-28 02:16:09 +00:00
|
|
|
chmod 755 ${BINDIR}/replace
|
|
|
|
chmod 755 ${BINDIR}/rm
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2023-11-28 02:16:09 +00:00
|
|
|
PATH=${BINDIR}
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
M2LIBC_PATH=/M2libc
|
2021-06-10 18:01:47 +01:00
|
|
|
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
# mes envars
|
|
|
|
NYACC_PKG=nyacc-1.00.2
|
2023-12-18 07:00:31 +00:00
|
|
|
MES_PKG=mes-0.26
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
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
|
2021-06-10 18:01:47 +01:00
|
|
|
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
M2-Mesoplanet --architecture ${ARCH} -f script-generator.c -o script-generator
|
2024-04-16 09:18:37 +01:00
|
|
|
# Checksums
|
|
|
|
if match x${UPDATE_CHECKSUMS} xTrue; then
|
|
|
|
sha256sum -o script-generator.${ARCH}.checksums script-generator
|
|
|
|
else
|
|
|
|
sha256sum -c script-generator.${ARCH}.checksums
|
|
|
|
fi
|
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.
2023-11-06 23:51:23 +00:00
|
|
|
./script-generator /steps/manifest
|
|
|
|
kaem --file /steps/0.sh
|