2
0

README 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. Docu/OpenBUGS-License.odc
  31. http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
  32. {Linux,OpenBSD}/Lin/Mod/Kernel_so_init.odc
  33. modified:
  34. OpenBSD/System/Mod/Kernel.odc:
  35. 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
  36. OpenBSD specific:
  37. Memory management rewritten (based on mmap)
  38. Kernel.TrapHandler
  39. OpenBSD sigcontext-specific
  40. Kernel.Time
  41. CLOCKS_PER_SEC related
  42. Kernel.InitModule
  43. mprotect call added
  44. Kernel.InstallSignals:
  45. do not install signal handler for SIGTHR (when executable linked with -pthread)
  46. IsReadable
  47. Kernel.cmdLine support:
  48. Kernel.INIT (SetCmdLine2)
  49. Linux/System/Mod/Kernel.odc:
  50. OpenBSD/System/Mod/Kernel.odc modified for Linux:
  51. Time*
  52. TrapHandler
  53. mmap: use "/dev/zero" device instead of -1
  54. mprotect addresses must be page-aligned
  55. do not show warning message if signal install failed
  56. OpenBSD/Host/Mod/Files.odc:
  57. OpenBUGS Lin/Mod/linHostFiles.odc:
  58. OpenBSD-specific:
  59. size_t
  60. __xstat -> stat
  61. Kernel.cmdLine support:
  62. str := "" -> str := Kernel.cmdLine$
  63. Linux/Host/Mod/Files.odc:
  64. OpenBUGS Lin/Mod/linHostFiles.odc:
  65. Kernel.cmdLine support:
  66. str := "" -> str := Kernel.cmdLine$
  67. OpenBSD/Lin/Mod/Libc.txt:
  68. OpenBUGS Lin/Mod/Libc.odc:
  69. OpenBSD-specific
  70. Linux/Lin/Mod/Libc.odc:
  71. OpenBUGS Lin/Mod/Libc.odc:
  72. PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
  73. open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
  74. Linux/Lin/Mod/Dl.odc:
  75. OpenBUGS Lin/Mod/Dl.odc
  76. Linux/Host/Mod/Dates.odc: from http://oberoncore.ru/
  77. OpenBSD/Host/Mod/Dates.odc:
  78. Linux/Host/Mod/Dates.odc: OpenBSD-specific
  79. Dev0/Mod
  80. CP*
  81. BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc.
  82. Compiler.odc:
  83. modified original BlackBox Dev/Mod/Compiler.odc
  84. Linker.odc:
  85. modified original BlackBox Dev/Mod/Linker.odc
  86. ElfLinker16.odc:
  87. modified OpenBUGS Dev/Mod/ElfLinker16.odc
  88. HostTextConv.odc:
  89. BlackBox 1.6-rc6 Host/Mod/TextConv.odc:
  90. Windows-specific converters removed
  91. new:
  92. Console:
  93. System/Mod/Console.odc: Console interface
  94. Linux/Host/Mod/Console.odc: Console implementation for Linux
  95. OpenBSD/Host/Mod/Console.odc:
  96. Linux/Host/Mod/Console.odc: stdin -> SYSTEM.ADR(__sF[0]) (OpenBSD-specific)
  97. Windows/Host/Mod/Console.odc:
  98. Console implementation for Windows
  99. Cons/Mod
  100. Interp.odc: console interpreter
  101. Compiler.odc: console interface to Dev compiler
  102. Log.odc: Log.Hook console implementation
  103. Enc: encodings conversion subsystem
  104. {OpenBSD,Linux}/Host/Mod/Lang.odc: Dialog.LanguageHook implementation and LANG environment variable support
  105. {OpenBSD,Linux}/libBB.so: compiled and linked shared library to run BlackBox
  106. {OpenBSD,Linux}/libBB0.so: compiled and linked shared library to run simple development interpreter
  107. Windows/dev0.exe: compiled and linked simple development interpreter
  108. Views.odc: minimal Views implementation required to compile StdInterpreter
  109. HostFonts.odc, HostDialog.odc, HostWindows.odc: simple Hosts implementation
  110. Notes:
  111. Dev0:
  112. I will not remove Dev0 because I can not link .so library based on ConsInterp and Dev
  113. Kernel.baseStack issue (preliminary description):
  114. baseStack is upper border:
  115. * of garbage collector stack scan range (see Kernel.MarkLocals)
  116. * of TrapViewer stack show range (see Kernel.TrapHandler)
  117. it is initialized in Kernel.INIT and initially points close to upper
  118. border of library stack (because Kernel.INIT called from library
  119. constructor, which executes close to upper border of library stack)
  120. it can be changed in Kernel.Start to skip unnecessary stack addresses
  121. if libBB.so exports procedure for calling from main program,
  122. then it will be executed on main program stack, not on library
  123. stack, at stack addresses higher than baseStack.
  124. Thus, MarkLocals and TrapViewer will work incorrectly.
  125. in this case, to solve problem, baseStack should be adjusted and
  126. should point to stack on which this exported procedure executes
  127. if necessary, this can be done using auxiliary module Kernel_so_init
  128. A. V. Shiryaev, 2012