AMDmain.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #! /bin/bash -v
  2. # First I will build the PSL cross compiler...
  3. ./AMDasm.sh
  4. # Now I use the cross-compiler to make the kernel of the kernel, ie
  5. # the two files main.s and dmain.s. Those get assembled and linked with
  6. # some fairly minimal C code to create a bpsl executable. To make that
  7. # usable further parts of the kernel have to be compiled into FASL formed
  8. # and passed through bpsl to create an initial image file.
  9. # Here I specialise what I am doing to build JUST the AMD64_ext versions
  10. # of main.s and dmain.s, but I believe that there is not a great deal of
  11. # cause for these to differ from any other versions used on x86_64 targets
  12. # (well the C-coded parts of the kernel can deal with the variations in
  13. 8 system support, and the stuff here can abstract over variety or encompass
  14. # all possibilities). It is plausible that this will be pretty close to
  15. # adequate for other 64-bit targets, and may not be too far from usable on
  16. # 32-bit ones too.
  17. export MACHINE=AMD64_ext
  18. export PXK=../psl/dist/kernel/AMD64_ext
  19. export PK=../psl/dist/kernel
  20. cp $PC/bare-psl.sym $MACHINE.sym
  21. cat >tmp.sl <<EOF
  22. (setq *echo t)
  23. (off usermode)
  24. (off immediatequote)
  25. (put 'intern 'lose t)
  26. (setf *writingasmfile t)
  27. (off pcmac)
  28. (off usermode)
  29. (on verboseload)
  30. (asmout "main")
  31. (dskin "$PK/firstkernel.sl")
  32. (dskin "$PXK/main-start.sl")
  33. (dskin "$PXK/io.sl")
  34. (dskin "$PXK/intern.sl")
  35. (dskin "$PXK/faslin.sl")
  36. (dskin "$PXK/alloc.sl")
  37. (dskin "$PK/support.sl")
  38. (dskin "$PXK/sys-support.sl")
  39. (dskin "$PXK/externals.sl")
  40. (dskin "$PXK/pthread.sl") % Will obviously not be very useful
  41. % as such on Windows! But the general
  42. % concept of threads and mutexes is still
  43. % viable.
  44. (dskin "$PXK/dl-support.sl")
  45. (dskin "$PK/lastkernel.sl")
  46. (asmend)
  47. (exitlisp)
  48. EOF
  49. script -c "./vsl -i AMDasm.img tmp.sl" AMDmain.log
  50. # end of script