diff --git a/M2-Planet b/M2-Planet index 12d40f6..4f17e04 160000 --- a/M2-Planet +++ b/M2-Planet @@ -1 +1 @@ -Subproject commit 12d40f6c82c8bd2aa194c417bfab2803643b7155 +Subproject commit 4f17e046e87a42b79bcc5c73656122c2ae50143b diff --git a/M2libc b/M2libc index 25fe274..a1db99e 160000 --- a/M2libc +++ b/M2libc @@ -1 +1 @@ -Subproject commit 25fe274ab00df45b890ead828b05016a589f8b35 +Subproject commit a1db99e06ca5fbf97f41158187908d593a8b59fd diff --git a/amd64/kaem.run b/amd64/kaem.run new file mode 100644 index 0000000..6f26dc9 --- /dev/null +++ b/amd64/kaem.run @@ -0,0 +1,35 @@ +#! /usr/bin/env bash +# SPDX-FileCopyrightText: 2022 Andrius Štikonas +# +# 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 diff --git a/amd64/mescc-tools-full-kaem.kaem b/amd64/mescc-tools-full-kaem.kaem new file mode 100644 index 0000000..19e8c40 --- /dev/null +++ b/amd64/mescc-tools-full-kaem.kaem @@ -0,0 +1,12 @@ +#! /usr/bin/env bash +# SPDX-FileCopyrightText: 2022 Andrius Štikonas +# SPDX-FileCopyrightText: 2017,2019 Jeremiah Orians +# SPDX-FileCopyrightText: 2017,2019 Jan Nieuwenhuizen +# +# SPDX-License-Identifier: GPL-3.0-or-later + +cd ${ARCH_DIR} + +############################################### +# Phase-12 Build M2-Mesoplanet from M2-Planet # +############################################### diff --git a/amd64/mescc-tools-mini-kaem.kaem b/amd64/mescc-tools-mini-kaem.kaem index ac6772a..b154aa6 100644 --- a/amd64/mescc-tools-mini-kaem.kaem +++ b/amd64/mescc-tools-mini-kaem.kaem @@ -1,7 +1,7 @@ #! /usr/bin/env bash # SPDX-FileCopyrightText: 2022 Andrius Štikonas # SPDX-FileCopyrightText: 2017 Jeremiah Orians -# SPDX-FileCopyrightText: 2017 2017 Jan Nieuwenhuizen +# SPDX-FileCopyrightText: 2017 Jan Nieuwenhuizen # # 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 diff --git a/kaem.amd64 b/kaem.amd64 index 09a7a2e..06f1278 100644 --- a/kaem.amd64 +++ b/kaem.amd64 @@ -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 diff --git a/mescc-tools b/mescc-tools index 0aeb341..3cc384b 160000 --- a/mescc-tools +++ b/mescc-tools @@ -1 +1 @@ -Subproject commit 0aeb341af469e124607c3cc44dab04943efc41ac +Subproject commit 3cc384b5d75853e33d27ed02539029044b6ba112