Skip to content

Commit

Permalink
Put all build artifacts in artifact and isolate the AMD64 build and o…
Browse files Browse the repository at this point in the history
…utput
  • Loading branch information
oriansj committed Oct 4, 2021
1 parent 5f91de4 commit 3e33078
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 150 deletions.
30 changes: 1 addition & 29 deletions AMD64/.gitignore
@@ -1,35 +1,7 @@
# These files are generated when the build runs
# and should never be included
M0
M1-0
M1-macro-footer.M1
M1-macro.M1
M2
M2-footer.M1
M2.M1
blood-elf-0
blood-elf-footer.M1
blood-elf.M1
catm
cc_amd64
get_machine-footer.M1
get_machine.M1
hex0
hex1
hex2-0
hex2-1
hex2_linker-footer.M1
hex2_linker.M1
hold
kaem-footer.M1
kaem.M1
kaem-0
temp1
mes-footer.M1
mes.M1
mes.hex2

# The files build in the NASM tests
# The files built
bin/*

# All of the build artifacts
Expand Down
2 changes: 2 additions & 0 deletions AMD64/bin/placeholder
@@ -0,0 +1,2 @@
# For keeping the bin directory, despite wanting to ignore it's contents

8 changes: 4 additions & 4 deletions AMD64/kaem.run
Expand Up @@ -28,15 +28,15 @@
##################################################

../bootstrap-seeds/POSIX/AMD64/kaem-optional-seed mescc-tools-seed-kaem.kaem
./kaem-0 mescc-tools-mini-kaem.kaem
../bin/kaem --verbose --strict -f mescc-tools-full-kaem.kaem
./artifact/kaem-0 mescc-tools-mini-kaem.kaem
./bin/kaem --verbose --strict -f mescc-tools-full-kaem.kaem

######################################################
# Phase 15-22 Build mescc-tools-extra from M2-Planet #
######################################################
../bin/kaem --verbose --strict --file mescc-tools-extra.kaem
./bin/kaem --verbose --strict --file mescc-tools-extra.kaem

#########################
# Load after.kaem hook #
#########################
../bin/kaem --verbose --strict --file ../after.kaem
./bin/kaem --verbose --strict --file ../after.kaem
8 changes: 4 additions & 4 deletions AMD64/mescc-tools-extra.kaem
Expand Up @@ -20,13 +20,13 @@

ARCH="amd64"
M2LIBC="../M2libc"
TOOLS="../bin"
TOOLS="../AMD64/bin"
BLOOD_FLAG="--64"
BASE_ADDRESS="0x00600000"
BINDIR="../bin"
BINDIR="../AMD64/bin"
ENDIAN_FLAG="--little-endian"
BUILDDIR="../AMD64/artifact"
cd ../mescc-tools-extra
../bin/kaem --verbose --strict --file mescc-tools-extra.kaem
../AMD64/bin/kaem --verbose --strict --file mescc-tools-extra.kaem
cd ..
./bin/sha256sum -c amd64.answers
./AMD64/bin/sha256sum -c amd64.answers
60 changes: 30 additions & 30 deletions AMD64/mescc-tools-full-kaem.kaem
Expand Up @@ -21,7 +21,7 @@
#################################################
# Phase-12 Build final blood-elf from C sources #
#################################################
./M2 --architecture amd64 \
./artifact/M2 --architecture amd64 \
-f ../M2libc/sys/types.h \
-f ../M2libc/stddef.h \
-f ../M2libc/amd64/Linux/unistd.h \
Expand All @@ -32,23 +32,23 @@
-f ../mescc-tools/stringify.c \
-f ../mescc-tools/blood-elf.c \
--debug \
-o blood-elf.M1
-o ./artifact/blood-elf-1.M1

./blood-elf-0 --64 --little-endian -f blood-elf.M1 -o blood-elf-footer.M1
../bin/M1 --architecture amd64 \
./artifact/blood-elf-0 --64 --little-endian -f ./artifact/blood-elf-1.M1 -o ./artifact/blood-elf-1-footer.M1
./bin/M1 --architecture amd64 \
--little-endian \
-f ../M2libc/amd64/amd64_defs.M1 \
-f ../M2libc/amd64/libc-full.M1 \
-f blood-elf.M1 \
-f blood-elf-footer.M1 \
-o hold
-f ./artifact/blood-elf-1.M1 \
-f ./artifact/blood-elf-1-footer.M1 \
-o ./artifact/blood-elf-1.hex2

../bin/hex2 --architecture amd64 \
./bin/hex2 --architecture amd64 \
--little-endian \
--base-address 0x00600000 \
-f ../M2libc/amd64/ELF-amd64-debug.hex2 \
-f hold \
-o ../bin/blood-elf
-f ./artifact/blood-elf-1.hex2 \
-o ./bin/blood-elf

# Now we have our shipping debuggable blood-elf, the rest will be down hill from
# here as we have ALL of the core pieces of compiling and assembling debuggable
Expand All @@ -57,7 +57,7 @@
#############################################
# Phase-13 Build get_machine from C sources #
#############################################
./M2 --architecture amd64 \
./artifact/M2 --architecture amd64 \
-f ../M2libc/sys/types.h \
-f ../M2libc/stddef.h \
-f ../M2libc/amd64/Linux/unistd.h \
Expand All @@ -67,30 +67,30 @@
-f ../M2libc/bootstrappable.c \
-f ../mescc-tools/get_machine.c \
--debug \
-o get_machine.M1
-o artifact/get_machine.M1

../bin/blood-elf --64 --little-endian -f get_machine.M1 -o get_machine-footer.M1
./bin/blood-elf --64 --little-endian -f ./artifact/get_machine.M1 -o ./artifact/get_machine-footer.M1

../bin/M1 --architecture amd64 \
./bin/M1 --architecture amd64 \
--little-endian \
-f ../M2libc/amd64/amd64_defs.M1 \
-f ../M2libc/amd64/libc-full.M1 \
-f get_machine.M1 \
-f get_machine-footer.M1 \
-o hold
-f ./artifact/get_machine.M1 \
-f ./artifact/get_machine-footer.M1 \
-o ./artifact/get_machine.hex2

../bin/hex2 --architecture amd64 \
./bin/hex2 --architecture amd64 \
--little-endian \
--base-address 0x00600000 \
-f ../M2libc/amd64/ELF-amd64-debug.hex2 \
-f hold \
-o ../bin/get_machine
-f ./artifact/get_machine.hex2 \
-o ./bin/get_machine

############################################
# Phase-14 Build M2-Planet from M2-Planet #
############################################

./M2 --architecture amd64 \
./artifact/M2 --architecture amd64 \
-f ../M2libc/sys/types.h \
-f ../M2libc/stddef.h \
-f ../M2libc/amd64/Linux/unistd.h \
Expand All @@ -107,21 +107,21 @@
-f ../M2-Planet/cc_macro.c \
-f ../M2-Planet/cc.c \
--debug \
-o M2.M1
-o ./artifact/M2-1.M1

../bin/blood-elf --little-endian --64 -f M2.M1 -o M2-footer.M1
./bin/blood-elf --little-endian --64 -f ./artifact/M2-1.M1 -o ./artifact/M2-1-footer.M1

../bin/M1 --architecture amd64 \
./bin/M1 --architecture amd64 \
--little-endian \
-f ../M2libc/amd64/amd64_defs.M1 \
-f ../M2libc/amd64/libc-full.M1 \
-f M2.M1 \
-f M2-footer.M1 \
-o hold
-f ./artifact/M2-1.M1 \
-f ./artifact/M2-1-footer.M1 \
-o ./artifact/M2-1.hex2

../bin/hex2 --architecture amd64 \
./bin/hex2 --architecture amd64 \
--little-endian \
--base-address 0x00600000 \
-f ../M2libc/amd64/ELF-amd64-debug.hex2 \
-f hold \
-o ../bin/M2-Planet
-f ./artifact/M2-1.hex2 \
-o ./bin/M2-Planet

0 comments on commit 3e33078

Please sign in to comment.