README 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Oberon Microsystems BlackBox Component Builder (http://www.oberon.ch/)
  2. Port for OpenBSD/i386, GNU/Linux/i386
  3. Tested on OpenBSD 5.2, Fedora Core 17, Ubuntu 12.04 LTS
  4. Some significant parts taken from OpenBUGS (http://www.openbugs.info/)
  5. How to build:
  6. compile loader executable (BlackBox itself and simple interpreter):
  7. `uname -s`/libBB0.so must be present (can be built from Windows)
  8. cd BlackBox/`uname -s`/Lin/Rsrc/loader; make
  9. compile self:
  10. cd BlackBox; ./switch-os `uname -s`; ./clean; ./build-dev0; ./build
  11. Files:
  12. original:
  13. BlackBox:
  14. Dev/Mod/*
  15. all except ElfLinker16
  16. Dev/Rsrc/*
  17. Docu/BB-License.odc
  18. Docu/BB-Licensing-Policy.odc
  19. Docu/BB-Open-Source-License.odc
  20. Obx/*
  21. Std/*
  22. System/Mod/
  23. all except Console
  24. System/Rsrc/*
  25. Text/*
  26. Xhtml
  27. OpenBUGS:
  28. Dev/Mod/ElfLinker16.odc
  29. Dev/Docu/ElfLinker.odc
  30. System/Mod/Console.odc
  31. Docu/OpenBUGS-License.odc
  32. http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
  33. {Linux,OpenBSD}/Lin/Mod/Kernel_so_init.odc
  34. modified:
  35. OpenBSD/System/Mod/Kernel.odc:
  36. 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
  37. OpenBSD specific:
  38. Memory management rewritten (based on mmap)
  39. Kernel.TrapHandler
  40. OpenBSD sigcontext-specific
  41. Kernel.Time
  42. CLOCKS_PER_SEC related
  43. Kernel.InitModule
  44. mprotect call added
  45. Kernel.InstallSignals:
  46. do not install signal handler for SIGTHR (when executable linked with -pthread)
  47. IsReadable
  48. Kernel.cmdLine support:
  49. Kernel.INIT (SetCmdLine2)
  50. Linux/System/Mod/Kernel.odc:
  51. OpenBSD/System/Mod/Kernel.odc modified for Linux:
  52. Time*
  53. TrapHandler
  54. mmap: use "/dev/zero" device instead of -1
  55. mprotect addresses must be page-aligned
  56. do not show warning message if signal install failed
  57. OpenBSD/Host/Mod/Files.odc:
  58. OpenBUGS Lin/Mod/linHostFiles.odc:
  59. OpenBSD-specific:
  60. size_t
  61. __xstat -> stat
  62. Kernel.cmdLine support:
  63. str := "" -> str := Kernel.cmdLine$
  64. Linux/Host/Mod/Files.odc:
  65. OpenBUGS Lin/Mod/linHostFiles.odc:
  66. Kernel.cmdLine support:
  67. str := "" -> str := Kernel.cmdLine$
  68. OpenBSD/Host/Mod/Console.odc:
  69. OpenBUGS Lin/Mod/Console.odc:
  70. stdin -> SYSTEM.ADR(__sF[0])
  71. Linux/Host/Mod/Console.odc:
  72. OpenBUGS Lin/Mod/Console.odc
  73. OpenBSD/Lin/Mod/Libc.txt:
  74. OpenBUGS Lin/Mod/Libc.odc:
  75. OpenBSD-specific
  76. Linux/Lin/Mod/Libc.odc:
  77. OpenBUGS Lin/Mod/Libc.odc:
  78. PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
  79. open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
  80. Linux/Lin/Mod/Dl.odc:
  81. OpenBUGS Lin/Mod/Dl.odc
  82. Linux/Host/Mod/Dates.odc: from http://oberoncore.ru/
  83. OpenBSD/Host/Mod/Dates.odc:
  84. Linux/Host/Mod/Dates.odc: OpenBSD-specific
  85. Dev0/Mod
  86. CP*
  87. BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc.
  88. Compiler.odc:
  89. modified original BlackBox Dev/Mod/Compiler.odc
  90. ElfLinker16.odc:
  91. modified OpenBUGS Dev/Mod/ElfLinker16.odc
  92. HostTextConv.odc:
  93. BlackBox 1.6-rc6 Host/Mod/TextConv.odc:
  94. Windows-specific converters removed
  95. new:
  96. Cons/Mod
  97. Interp.odc: console interpreter
  98. Compiler.odc: console interface to Dev compiler
  99. Log.odc: Log.Hook console implementation
  100. {OpenBSD,Linux}/libBB.so: compiled and linked shared library to run BlackBox
  101. {OpenBSD,Linux}/libBB0.so: compiled and linked shared library to run simple development interpreter
  102. Views.odc: minimal Views implementation required to compile StdInterpreter
  103. HostFonts.odc, HostDialog.odc, HostWindows.odc: simple Hosts implementation
  104. Notes:
  105. Dev0:
  106. I will not remove Dev0 because I can not link .so library based on ConsInterp and Dev
  107. Kernel.baseStack issue (preliminary description):
  108. baseStack is upper border:
  109. * of garbage collector stack scan range (see Kernel.MarkLocals)
  110. * of TrapViewer stack show range (see Kernel.TrapHandler)
  111. it is initialized in Kernel.INIT and initially points close to upper
  112. border of library stack (because Kernel.INIT called from library
  113. constructor, which executes close to upper border of library stack)
  114. it can be changed in Kernel.Start to skip unnecessary stack addresses
  115. if libBB.so exports procedure for calling from main program,
  116. then it will be executed on main program stack, not on library
  117. stack, at stack addresses higher than baseStack.
  118. Thus, MarkLocals and TrapViewer will work incorrectly.
  119. in this case, to solve problem, baseStack should be adjusted and
  120. should point to stack on which this exported procedure executes
  121. if necessary, this can be done using auxiliary module Kernel_so_init
  122. A. V. Shiryaev, 2012