2
0

README 5.1 KB

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