M2-Planet/bootstrap.sh

28 lines
583 B
Bash
Raw Normal View History

2018-06-22 02:33:50 +01:00
#! /usr/bin/env bash
set -ex
# Make the required bin directry
[ -d bin ] || mkdir bin
2018-08-26 21:34:31 +01:00
# Build debug footer
blood-elf -f seed.M1 \
-o bin/seed-footer.M1 || exit 1
2018-06-22 02:33:50 +01:00
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
2018-08-26 21:34:31 +01:00
-f functions/libc-core.M1 \
2018-06-22 02:33:50 +01:00
-f seed.M1 \
2018-08-26 21:34:31 +01:00
-f bin/seed-footer.M1 \
2018-06-22 02:33:50 +01:00
--LittleEndian \
--Architecture 1 \
2018-08-26 21:34:31 +01:00
-o bin/seed.hex2 || exit 2
2018-06-22 02:33:50 +01:00
# Resolve all linkages
2018-08-26 21:34:31 +01:00
hex2 -f test/common_x86/ELF-i386-debug.hex2 \
2018-06-22 02:33:50 +01:00
-f bin/seed.hex2 \
--LittleEndian \
--Architecture 1 \
--BaseAddress 0x8048000 \
-o bin/M2-Planet \
--exec_enable || exit 2