live-bootstrap/sysa/mescc-tools-extra/go.kaem
fosslinux 649d7b68dc Add mes and mescc-tools-extra
mescc-tools-extra contains two important tools:
- cp
- chmod

mes first builds itself from a mes 0.21 seed as used by guix, and then
builds a mes 0.22 and then mes 0.22 using that created mes 0.22.

It does /not/ use bootstrap.sh as we don't have a proper shell at this
point, it has been manually adapted for kaem.
2020-12-25 18:40:14 +11:00

81 lines
2.1 KiB
Bash

#!/bin/sh
set -ex
# cp command
M2-Planet \
-f /M2-Planet/test/common_x86/functions/file.c \
-f /M2-Planet/test/common_x86/functions/exit.c \
-f /M2-Planet/test/common_x86/functions/malloc.c \
-f /M2-Planet/test/common_x86/functions/getcwd.c \
-f /M2-Planet/test/common_x86/functions/chdir.c \
-f functions/string.c \
-f functions/file_print.c \
-f functions/match.c \
-f functions/require.c \
-f /M2-Planet/functions/calloc.c \
-f functions/in_set.c \
-f functions/numerate_number.c \
-f cp.c \
--architecture x86 \
--debug \
-o cp.M1
blood-elf -f cp.M1 -o cp-footer.M1
M1 \
-f /M2-Planet/test/common_x86/x86_defs.M1 \
-f /M2-Planet/test/common_x86/libc-core.M1 \
-f cp.M1 \
-f cp-footer.M1 \
--LittleEndian \
--architecture x86 \
-o hold
hex2 \
-f /M2-Planet/test/common_x86/ELF-i386-debug.hex2 \
-f hold \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o /after/bin/cp \
--exec_enable
# chmod command
M2-Planet \
-f /M2-Planet/test/common_x86/functions/file.c \
-f /M2-Planet/test/common_x86/functions/exit.c \
-f /M2-Planet/test/common_x86/functions/malloc.c \
-f /M2-Planet/test/common_x86/functions/getcwd.c \
-f /M2-Planet/test/common_x86/functions/chdir.c \
-f functions/string.c \
-f functions/file_print.c \
-f functions/match.c \
-f functions/require.c \
-f functions/in_set.c \
-f functions/numerate_number.c \
-f /M2-Planet/functions/calloc.c \
-f /M2-Planet/test/common_x86/functions/stat.c \
-f chmod.c \
--architecture x86 \
--debug \
-o chmod.M1
blood-elf -f chmod.M1 -o chmod-footer.M1
M1 \
-f /M2-Planet/test/common_x86/x86_defs.M1 \
-f /M2-Planet/test/common_x86/libc-core.M1 \
-f chmod.M1 \
-f chmod-footer.M1 \
--LittleEndian \
--architecture x86 \
-o hold
hex2 \
-f /M2-Planet/test/common_x86/ELF-i386-debug.hex2 \
-f hold \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o /after/bin/chmod \
--exec_enable