Add support for spawning processes in kaem.

This commit is contained in:
Andrius Štikonas 2022-12-08 21:22:07 +00:00
parent 378e2a5b36
commit e4443a731a
7 changed files with 60 additions and 9 deletions

@ -1 +1 @@
Subproject commit 12d40f6c82c8bd2aa194c417bfab2803643b7155
Subproject commit 4f17e046e87a42b79bcc5c73656122c2ae50143b

2
M2libc

@ -1 +1 @@
Subproject commit 25fe274ab00df45b890ead828b05016a589f8b35
Subproject commit a1db99e06ca5fbf97f41158187908d593a8b59fd

35
amd64/kaem.run Normal file
View File

@ -0,0 +1,35 @@
#! /usr/bin/env bash
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
# To run in kaem simply: kaem --verbose --strict
ARCH="amd64"
ARCH_DIR="amd64"
M2LIBC="../M2libc"
TOOLS="../${ARCH_DIR}/bin"
BLOOD_FLAG="--64"
BASE_ADDRESS="0"
ENDIAN_FLAG="--little-endian"
BINDIR="../${ARCH_DIR}/bin"
BUILDDIR="../${ARCH_DIR}/artifact"
TMPDIR="${BUILDDIR}"
################################################
# Phase 11-14 Rebuild M2-Planet from C sources #
################################################
./${ARCH_DIR}/bin/kaem.efi --verbose --strict --file ${ARCH_DIR}/mescc-tools-full-kaem.kaem
######################################################
# Phase 15-22 Build mescc-tools-extra from M2-Planet #
######################################################
cd mescc-tools-extra
${BINDIR}/kaem.efi --verbose --strict --file mescc-tools-extra.kaem
cd ..
./${ARCH_DIR}/bin/sha256sum -c ${ARCH}.answers
#########################
# Load after.kaem hook #
#########################
exec ./${ARCH_DIR}/bin/kaem.efi --verbose --strict --file ./after.kaem

View File

@ -0,0 +1,12 @@
#! /usr/bin/env bash
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2017,2019 Jeremiah Orians
# SPDX-FileCopyrightText: 2017,2019 Jan Nieuwenhuizen <janneke@gnu.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
cd ${ARCH_DIR}
###############################################
# Phase-12 Build M2-Mesoplanet from M2-Planet #
###############################################

View File

@ -1,7 +1,7 @@
#! /usr/bin/env bash
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2017 Jeremiah Orians
# SPDX-FileCopyrightText: 2017 2017 Jan Nieuwenhuizen <janneke@gnu.org>
# SPDX-FileCopyrightText: 2017 Jan Nieuwenhuizen <janneke@gnu.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@ -71,7 +71,7 @@ amd64\artifact\hex2-0.efi amd64\artifact\M1-macro-0-0.hex2 amd64\artifact\M1-0.e
#######################################
# Phase-7 Build hex2-1 from C sources #
#######################################
amd64\artifact\M2.efi --architecture amd64 -f M2libc\sys\types.h -f M2libc\stddef.h -f M2libc\amd64\uefi\uefi.c -f M2libc\string.c -f M2libc\amd64\uefi\fcntl.c -f M2libc\fcntl.c -f M2libc\amd64\uefi\unistd.c -f M2libc\amd64\uefi\sys\stat.c -f M2libc\stdlib.c -f M2libc\stdio.c -f M2libc\ctype.c -f M2libc\bootstrappable.c -f mescc-tools\hex2.h -f mescc-tools\hex2_linker.c -f mescc-tools\hex2_word.c -f mescc-tools\hex2.c -o amd64\artifact\hex2_linker-1.M1
amd64\artifact\M2.efi --architecture amd64 -f M2libc\sys\types.h -f M2libc\stddef.h -f M2libc\amd64\uefi\uefi.c -f M2libc\string.c -f M2libc\amd64\uefi\fcntl.c -f M2libc\fcntl.c -f M2libc\stdio.c -f M2libc\amd64\uefi\unistd.c -f M2libc\amd64\uefi\sys\stat.c -f M2libc\stdlib.c -f M2libc\ctype.c -f M2libc\bootstrappable.c -f mescc-tools\hex2.h -f mescc-tools\hex2_linker.c -f mescc-tools\hex2_word.c -f mescc-tools\hex2.c -o amd64\artifact\hex2_linker-1.M1
amd64\artifact\M1-0.efi --architecture amd64 --little-endian -f M2libc\amd64\amd64_defs.M1 -f M2libc\amd64\uefi\libc-full.M1 -f amd64\artifact\hex2_linker-1.M1 -o amd64\artifact\hex2_linker-1.hex2
@ -85,7 +85,7 @@ amd64\artifact\hex2-0.efi amd64\artifact\hex2_linker-1-0.hex2 amd64\artifact\hex
###################################
# Phase-8 Build M1 from C sources #
###################################
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/stdio.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/stringify.c -f mescc-tools/M1-macro.c -o amd64/artifact/M1-macro-1.M1
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/stdio.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/stringify.c -f mescc-tools/M1-macro.c -o amd64/artifact/M1-macro-1.M1
amd64\artifact\M1-0.efi --architecture amd64 --little-endian -f M2libc/amd64/amd64_defs.M1 -f M2libc/amd64/uefi/libc-full.M1 -f amd64/artifact/M1-macro-1.M1 -o amd64/artifact/M1-macro-1.hex2
@ -94,7 +94,7 @@ amd64\artifact\hex2-1.efi --architecture amd64 --little-endian -f M2libc/amd64/u
#####################################
# Phase-9 Build hex2 from C sources #
#####################################
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/stdio.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/hex2.h -f mescc-tools/hex2_linker.c -f mescc-tools/hex2_word.c -f mescc-tools/hex2.c -o amd64/artifact/hex2_linker-2.M1
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/stdio.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/hex2.h -f mescc-tools/hex2_linker.c -f mescc-tools/hex2_word.c -f mescc-tools/hex2.c -o amd64/artifact/hex2_linker-2.M1
amd64\bin\M1.efi --architecture amd64 --little-endian -f M2libc/amd64/amd64_defs.M1 -f M2libc/amd64/uefi/libc-full.M1 -f amd64/artifact/hex2_linker-2.M1 -o amd64/artifact/hex2_linker-2.hex2
@ -103,8 +103,7 @@ amd64\artifact\hex2-1.efi --architecture amd64 --little-endian -f M2libc/amd64/u
######################################
# Phase-10 Build kaem from C sources #
######################################
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/stdio.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/Kaem/kaem.h -f mescc-tools/Kaem/variable.c -f mescc-tools/Kaem/kaem_globals.c -f mescc-tools/Kaem/kaem.c -o amd64/artifact/kaem.M1
amd64\artifact\M2.efi --architecture amd64 -f M2libc/sys/types.h -f M2libc/stddef.h -f M2libc/amd64/uefi/uefi.c -f M2libc/string.c -f M2libc/amd64/uefi/fcntl.c -f M2libc/fcntl.c -f M2libc/stdio.c -f M2libc/amd64/uefi/unistd.c -f M2libc/amd64/uefi/sys/stat.c -f M2libc/stdlib.c -f M2libc/ctype.c -f M2libc/bootstrappable.c -f mescc-tools/Kaem/kaem.h -f mescc-tools/Kaem/variable.c -f mescc-tools/Kaem/kaem_globals.c -f mescc-tools/Kaem/kaem.c -o amd64/artifact/kaem.M1
amd64\bin\M1.efi --architecture amd64 --little-endian -f M2libc/amd64/amd64_defs.M1 -f M2libc/amd64/uefi/libc-full.M1 -f amd64/artifact/kaem.M1 -o amd64/artifact/kaem.hex2

View File

@ -8,3 +8,8 @@
EFI\BOOT\BOOTX64.efi amd64\mescc-tools-seed-kaem.kaem
amd64\artifact\kaem-0.efi amd64\mescc-tools-mini-kaem.kaem
#######################################
# Run remaining phases with full kaem #
#######################################
amd64\bin\kaem.efi --verbose --strict --file amd64/kaem.run

@ -1 +1 @@
Subproject commit 0aeb341af469e124607c3cc44dab04943efc41ac
Subproject commit 3cc384b5d75853e33d27ed02539029044b6ba112