Build final versions of hex2 and M1.

This commit is contained in:
Andrius Štikonas 2022-11-26 18:26:19 +00:00
parent 83e0f53dcd
commit 296737c133
5 changed files with 42 additions and 4 deletions

View File

@ -157,8 +157,7 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
system->boot->free_pool(device_path);
system->boot->free_pool(executable);
system->boot->open_protocol(child_ih, &guid1, (void **) &child_image, child_ih, 0,
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
system->boot->open_protocol(child_ih, &guid1, (void **) &child_image, child_ih, 0, EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
child_image->load_options = command;
child_image->load_options_size = 2 * (i + 1);
child_image->device = image->device;

@ -1 +1 @@
Subproject commit b8664784b6a24e07173bef962542fd7066d33c44
Subproject commit 12d40f6c82c8bd2aa194c417bfab2803643b7155

2
M2libc

@ -1 +1 @@
Subproject commit 49252ff89a4366db3ef7ffdaed7b1db60180a3cb
Subproject commit 453ba693526d0d9b2bfbf31b5ba33eb301adc2de

0
amd64/bin/placeholder Normal file
View File

View File

@ -1,3 +1,4 @@
#! /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>
@ -60,3 +61,41 @@ amd64\artifact\catm.efi amd64\artifact\M1-macro-0-0.M1 M2libc\amd64\amd64_defs.M
amd64\artifact\M0.efi amd64\artifact\M1-macro-0-0.M1 amd64\artifact\M1-macro-0.hex2
amd64\artifact\catm.efi amd64\artifact\M1-macro-0-0.hex2 M2libc\amd64\uefi\PE32-amd64.hex2 amd64\artifact\M1-macro-0.hex2
amd64\artifact\hex2-0.efi amd64\artifact\M1-macro-0-0.hex2 amd64\artifact\M1-0.efi
# This is the last stage where catm will need to be used and the last stage where
# M0 is used, as we will being using it's much more powerful and cross-platform
# version with a bunch of extra goodies.
# We are also switching to a more powerful C library that supports more of the POSIX standard.
#######################################
# 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\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
amd64\artifact\catm.efi amd64\artifact\hex2_linker-1-0.hex2 M2libc\amd64\uefi\PE32-amd64.hex2 amd64\artifact\hex2_linker-1.hex2
amd64\artifact\hex2-0.efi amd64\artifact\hex2_linker-1-0.hex2 amd64\artifact\hex2-1.efi
# This is the last stage where we will be using the handwritten hex2 and instead
# be using the far more powerful, cross-platform version with a bunch more goodies
###################################
# 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\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
amd64\artifact\hex2-1.efi --architecture amd64 --little-endian -f M2libc/amd64/uefi/PE32-amd64.hex2 -f amd64/artifact/M1-macro-1.hex2 -o amd64/bin/M1.efi
#####################################
# 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\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
amd64\artifact\hex2-1.efi --architecture amd64 --little-endian -f M2libc/amd64/uefi/PE32-amd64.hex2 -f amd64/artifact/hex2_linker-2.hex2 -o amd64/bin/hex2.efi