commit: 620e10d4be33d7c7cde5bdbb4680885333da70e5
parent 6e3fab4da2e9c4b7ccc0625b83d70f7ccb19f6f4
Author: Andrius Štikonas <andrius@stikonas.eu>
Date: Tue, 28 Dec 2021 11:51:15 +0000
Update stage0-posix.
Diffstat:
5 files changed, 139 insertions(+), 160 deletions(-)
diff --git a/sysa.py b/sysa.py
@@ -78,12 +78,9 @@ class SysA(SysGeneral):
shutil.copy2(kaem_optional_seed, os.path.join(self.tmp_dir, 'init'))
# stage0-posix hook to continue running live-bootstrap
- shutil.copy2(os.path.join(self.sys_dir, f"after.kaem.{self.arch}"),
+ shutil.copy2(os.path.join(self.sys_dir, 'after.kaem'),
os.path.join(self.tmp_dir, 'after.kaem'))
- shutil.copy2(os.path.join(self.sys_dir, 'run.kaem'),
- os.path.join(self.tmp_dir, 'run.kaem'))
-
def after(self):
"""
Prepare sources in /after directory.
diff --git a/sysa/after.kaem b/sysa/after.kaem
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
+# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
+# SPDX-FileCopyrightText: 2020-2021 fosslinux <fosslinux@aussies.space>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+set -ex
+
+PATH=/${ARCH_DIR}/bin
+
+# Set commonly used variables
+sources=/after
+prefix=/usr
+bindir=${prefix}/bin
+libdir=${prefix}/lib
+incdir=${prefix}/include
+tmpdir=/tmp # tmpdir is needed for patch to work
+
+# Environmental variables needed for mes
+NYACC_PKG=nyacc-1.00.2
+MES_PKG=mes
+MES_PREFIX=${sources}/${MES_PKG}/src/mes-m2-75a50911d89a84b7aa5ebabab52eb09795c0d61b
+GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sources}/${MES_PKG}/src/${NYACC_PKG}/module
+mkdir ${prefix} ${bindir} ${libdir} ${incdir} ${tmpdir}
+cd ${prefix}
+
+# Remove remaining dependencies on /bin (stage0-posix directory)
+cp /${ARCH_DIR}/bin/blood-elf bin/blood-elf
+cp /${ARCH_DIR}/bin/catm bin/catm
+cp /${ARCH_DIR}/bin/chmod bin/chmod
+cp /${ARCH_DIR}/bin/get_machine bin/get_machine
+cp /${ARCH_DIR}/bin/hex2 bin/hex2
+cp /${ARCH_DIR}/bin/kaem bin/kaem
+cp /${ARCH_DIR}/bin/match bin/match
+cp /${ARCH_DIR}/bin/M1 bin/M1
+cp /${ARCH_DIR}/bin/M2-Planet bin/M2-Planet
+cp /${ARCH_DIR}/bin/mkdir bin/mkdir
+cp /${ARCH_DIR}/bin/sha256sum bin/sha256sum
+cp /${ARCH_DIR}/bin/ungz bin/ungz
+cp /${ARCH_DIR}/bin/untar bin/untar
+cp /${ARCH_DIR}/bin/cp bin/cp
+
+chmod 755 bin/blood-elf
+chmod 755 bin/catm
+chmod 755 bin/chmod
+chmod 755 bin/cp
+chmod 755 bin/get_machine
+chmod 755 bin/hex2
+chmod 755 bin/kaem
+chmod 755 bin/match
+chmod 755 bin/M1
+chmod 755 bin/M2-Planet
+chmod 755 bin/mkdir
+chmod 755 bin/sha256sum
+chmod 755 bin/ungz
+chmod 755 bin/untar
+
+PATH=${bindir}
+
+cd ${sources}
+
+# mes
+pkg=${MES_PKG}
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ${sources}
+
+# tcc 0.9.26
+pkg="tcc-0.9.26"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+libdir=${libdir}/mes
+
+# gzip
+pkg="gzip-1.2.4"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# tar
+pkg="tar-1.12"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# sed
+pkg="sed-4.0.9"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# patch
+pkg="patch-2.5.9"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# make
+pkg="make-3.80"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# bzip2
+pkg="bzip2-1.0.8"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# tcc 0.9.27
+pkg="tcc-0.9.27"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# coreutils
+pkg="coreutils-5.0"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# heirloom-devtools
+pkg="heirloom-devtools-070527"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+# bash
+pkg="bash-2.05b"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
+exec bash run.sh
diff --git a/sysa/after.kaem.amd64 b/sysa/after.kaem.amd64
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-ARCH=amd64
-STAGE0_ARCH=AMD64
-exec /${STAGE0_ARCH}/bin/kaem --verbose --file run.kaem
diff --git a/sysa/after.kaem.x86 b/sysa/after.kaem.x86
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-ARCH=x86
-STAGE0_ARCH=x86
-exec /${ARCH}/bin/kaem --verbose --file run.kaem
diff --git a/sysa/run.kaem b/sysa/run.kaem
@@ -1,138 +0,0 @@
-#!/bin/sh
-
-# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
-# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
-# SPDX-FileCopyrightText: 2020-2021 fosslinux <fosslinux@aussies.space>
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-set -ex
-
-PATH=/${STAGE0_ARCH}/bin
-
-# Set commonly used variables
-sources=/after
-prefix=/usr
-bindir=${prefix}/bin
-libdir=${prefix}/lib
-incdir=${prefix}/include
-tmpdir=/tmp # tmpdir is needed for patch to work
-
-# Environmental variables needed for mes
-NYACC_PKG=nyacc-1.00.2
-MES_PKG=mes
-MES_PREFIX=${sources}/${MES_PKG}/src/mes-m2-75a50911d89a84b7aa5ebabab52eb09795c0d61b
-GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sources}/${MES_PKG}/src/${NYACC_PKG}/module
-mkdir ${prefix} ${bindir} ${libdir} ${incdir} ${tmpdir}
-cd ${prefix}
-
-# Remove remaining dependencies on /bin (stage0-posix directory)
-cp /${STAGE0_ARCH}/bin/blood-elf bin/blood-elf
-cp /${STAGE0_ARCH}/bin/catm bin/catm
-cp /${STAGE0_ARCH}/bin/chmod bin/chmod
-cp /${STAGE0_ARCH}/bin/get_machine bin/get_machine
-cp /${STAGE0_ARCH}/bin/hex2 bin/hex2
-cp /${STAGE0_ARCH}/bin/kaem bin/kaem
-cp /${STAGE0_ARCH}/bin/match bin/match
-cp /${STAGE0_ARCH}/bin/M1 bin/M1
-cp /${STAGE0_ARCH}/bin/M2-Planet bin/M2-Planet
-cp /${STAGE0_ARCH}/bin/mkdir bin/mkdir
-cp /${STAGE0_ARCH}/bin/sha256sum bin/sha256sum
-cp /${STAGE0_ARCH}/bin/ungz bin/ungz
-cp /${STAGE0_ARCH}/bin/untar bin/untar
-cp /${STAGE0_ARCH}/bin/cp bin/cp
-
-chmod 755 bin/blood-elf
-chmod 755 bin/catm
-chmod 755 bin/chmod
-chmod 755 bin/cp
-chmod 755 bin/get_machine
-chmod 755 bin/hex2
-chmod 755 bin/kaem
-chmod 755 bin/match
-chmod 755 bin/M1
-chmod 755 bin/M2-Planet
-chmod 755 bin/mkdir
-chmod 755 bin/sha256sum
-chmod 755 bin/ungz
-chmod 755 bin/untar
-
-PATH=${bindir}
-
-cd ${sources}
-
-# mes
-pkg=${MES_PKG}
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ${sources}
-
-# tcc 0.9.26
-pkg="tcc-0.9.26"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-libdir=${libdir}/mes
-
-# gzip
-pkg="gzip-1.2.4"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# tar
-pkg="tar-1.12"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# sed
-pkg="sed-4.0.9"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# patch
-pkg="patch-2.5.9"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# make
-pkg="make-3.80"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# bzip2
-pkg="bzip2-1.0.8"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# tcc 0.9.27
-pkg="tcc-0.9.27"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# coreutils
-pkg="coreutils-5.0"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# heirloom-devtools
-pkg="heirloom-devtools-070527"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-# bash
-pkg="bash-2.05b"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
-exec bash run.sh