kaem.run 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #! /usr/bin/env bash
  2. ## Copyright (C) 2017 Jeremiah Orians
  3. ## This file is part of M2-Planet.
  4. ##
  5. ## M2-Planet is free software: you can redistribute it and/or modify
  6. ## it under the terms of the GNU General Public License as published by
  7. ## the Free Software Foundation, either version 3 of the License, or
  8. ## (at your option) any later version.
  9. ##
  10. ## M2-Planet is distributed in the hope that it will be useful,
  11. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ## GNU General Public License for more details.
  14. ##
  15. ## You should have received a copy of the GNU General Public License
  16. ## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
  17. # Make the required bin directry
  18. mkdir -p bin
  19. # Build debug footer
  20. blood-elf -f seed.M1 -o bin/seed-footer.M1
  21. # Macro assemble with libc written in M1-Macro
  22. M1 -f test/common_x86/x86_defs.M1 \
  23. -f functions/libc-core.M1 \
  24. -f seed.M1 \
  25. -f bin/seed-footer.M1 \
  26. --LittleEndian \
  27. --Architecture 1 \
  28. -o bin/seed.hex2
  29. # Resolve all linkages
  30. hex2 -f test/common_x86/ELF-i386-debug.hex2 \
  31. -f bin/seed.hex2 \
  32. --LittleEndian \
  33. --Architecture 1 \
  34. --BaseAddress 0x8048000 \
  35. -o bin/M2-Planet \
  36. --exec_enable