README 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. cd BlackBox
  7. ./clean
  8. ./switch-target `uname -s`
  9. compile loader executable:
  10. cd BlackBox/Lin/Rsrc/loader
  11. make clean
  12. make
  13. mv loader ../../../_`uname -s`_/Lin/Rsrc/loader/
  14. compile self:
  15. cd BlackBox
  16. ./build
  17. ./pack-dev0
  18. Files:
  19. original:
  20. BlackBox:
  21. Comm/Mod/Streams.odc
  22. Comm/Docu/*
  23. Dev/Mod/*
  24. all except ElfLinker16
  25. Dev/Docu/*
  26. all except ElfLinker
  27. Dev/Rsrc/*
  28. Docu/BB-License.odc
  29. Docu/BB-Licensing-Policy.odc
  30. Docu/BB-Open-Source-License.odc
  31. Obx/*
  32. Std/*
  33. System/Mod/
  34. all except Console
  35. System/Rsrc/*
  36. Text/*
  37. Xhtml
  38. OpenBUGS:
  39. Dev/Mod/ElfLinker16.odc
  40. Dev/Docu/ElfLinker.odc
  41. Docu/OpenBUGS-License.odc
  42. http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
  43. _LinuxOpenBSD_/System/Mod/Kernel_so_init.odc
  44. http://oberoncore.ru/projects/bb16ru-kras/:
  45. Dev/Rsrc/ru/Strings.odc
  46. Std/Rsrc/ru/Strings.odc
  47. System/Rsrc/ru/Strings.odc
  48. modified:
  49. _OpenBSD_/System/Mod/Kernel.odc:
  50. 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
  51. OpenBSD specific:
  52. Memory management rewritten (based on mmap)
  53. Kernel.TrapHandler
  54. OpenBSD sigcontext-specific
  55. Kernel.Time
  56. CLOCKS_PER_SEC related
  57. Kernel.InitModule
  58. mprotect call added
  59. Kernel.InstallSignals:
  60. do not install signal handler for SIGTHR (when executable linked with -pthread)
  61. IsReadable
  62. GetRefVar memory access protection
  63. _Linux_/System/Mod/Kernel.odc:
  64. _OpenBSD_/System/Mod/Kernel.odc modified for Linux:
  65. Time*
  66. TrapHandler
  67. mmap: use "/dev/zero" device instead of -1
  68. mprotect addresses must be page-aligned
  69. do not show warning message if signal install failed
  70. _Linux_/Host/Mod/Files.odc:
  71. OpenBUGS Lin/Mod/linHostFiles.odc:
  72. synchronized with BlackBox 1.6-rc6
  73. server configuration via BB_PRIMARY_DIR and BB_SECONDARY_DIR environment variables (not command line)
  74. filenames encoding translation implemented
  75. _OpenBSD_/Host/Mod/Files.odc:
  76. _Linux_/Host/Mod/Files.odc:
  77. OpenBSD-specific:
  78. size_t
  79. __xstat -> stat
  80. _OpenBSD_/Lin/Mod/Libc.txt:
  81. OpenBUGS Lin/Mod/Libc.odc:
  82. OpenBSD-specific
  83. _Linux_/Lin/Mod/Libc.odc:
  84. OpenBUGS Lin/Mod/Libc.odc:
  85. PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
  86. open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
  87. _Linux_/Lin/Mod/Dl.odc:
  88. OpenBUGS Lin/Mod/Dl.odc
  89. _Linux_/Host/Mod/Dates.odc: from http://oberoncore.ru/
  90. _OpenBSD_/Host/Mod/Dates.odc:
  91. _Linux_/Host/Mod/Dates.odc: OpenBSD-specific
  92. Dev0/Mod:
  93. CP*
  94. BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc.
  95. Compiler.odc:
  96. modified original BlackBox Dev/Mod/Compiler.odc
  97. Linker.odc:
  98. modified original BlackBox Dev/Mod/Linker.odc
  99. ElfLinker16.odc:
  100. modified OpenBUGS Dev/Mod/ElfLinker16.odc
  101. _LinuxOpenBSD_/Host/Mod/TextConv.odc:
  102. BlackBox 1.6-rc6 Host/Mod/TextConv.odc:
  103. Windows-specific converters removed
  104. _LinuxOpenBSD_/Host/Mod/PackedFiles.odc:
  105. BlackBox 1.6-rc6 Host/Mod/PackedFiles.odc:
  106. use BB_PACKED_NAME environment variable instead of appName
  107. GetNextSubLoc, GetLoc: filenames-specific
  108. _LinuxOpenBSD_/System/Mod/Config.odc:
  109. BlackBox 1.6-rc6 System/Mod/Config.odc:
  110. Windows-specific removed
  111. new:
  112. Console:
  113. System/Mod/Console.odc: Console interface
  114. _Linux_/Host/Mod/Console.odc: Console implementation for Linux
  115. _OpenBSD_/Host/Mod/Console.odc:
  116. _Linux_/Host/Mod/Console.odc: stdin -> SYSTEM.ADR(__sF[0]) (OpenBSD-specific)
  117. _Windows_/Host/Mod/Console.odc:
  118. Console implementation for Windows
  119. Cons/Mod
  120. Interp.odc: console interpreter
  121. Compiler.odc: console interface to Dev compiler
  122. Log.odc: Log.Hook console implementation
  123. {_Linux_,_OpenBSD_}/Lin/Mod/Iconv.odc: interface to libiconv system library
  124. {_Linux_,_OpenBSD_}/Lin/Mod/Ioctl.odc: interface to ioctl
  125. {_Linux_,_OpenBSD_}/Lin/Mod/Termios.odc: interface to termios
  126. {_Linux_,_OpenBSD_}/Lin/Mod/Net.odc: interface to network functionality
  127. _LinuxOpenBSD_/Host/Mod/Lang.odc: Dialog.LanguageHook implementation and LANG environment variable support
  128. _LinuxOpenBSD_/Comm/Mod/V24.odc: CommV24 implementation for Linux and OpenBSD
  129. _OpenBSD_/Comm/Mod/TCP.odc: CommTCP implementation for OpenBSD
  130. _Linux_/Comm/Mod/TCP.odc: CommTCP implementation for Linux
  131. {_OpenBSD_,_Linux_}/libBB.so: compiled and linked shared library to run BlackBox
  132. {_OpenBSD_,_Linux_}/libBB0.so: compiled and linked shared library to run simple development interpreter
  133. _Windows_/dev0.exe: compiled and linked simple development interpreter
  134. Dev0/Views.odc: minimal Views implementation required to compile StdInterpreter
  135. __Interp/Host/Mod: Fonts.odc, Dialog.odc, Windows.odc: simple Hosts implementation
  136. __Interp/System/Mod/Init.odc: Init for console interpreter
  137. Notes:
  138. Kernel.baseStack issue:
  139. baseStack is upper border:
  140. * of garbage collector stack scan range (see Kernel.MarkLocals)
  141. * of TrapViewer stack show range (see Kernel.TrapHandler)
  142. it is initialized in Kernel.INIT and initially points close to upper
  143. border of library stack (because Kernel.INIT called from library
  144. constructor, which executes close to upper border of library stack)
  145. it can be changed in Kernel.Start to skip unnecessary stack addresses
  146. if libBB.so exports procedure for calling from main program,
  147. then it will be executed on main program stack, not on library
  148. stack, at stack addresses higher than baseStack.
  149. Thus, MarkLocals and TrapViewer will work incorrectly.
  150. in this case, to solve problem, baseStack should be adjusted and
  151. should point to stack on which this exported procedure executes
  152. if necessary, this can be done using auxiliary module Kernel_so_init,
  153. or by using Kernel.Start
  154. Command line support removed because there is no easy way to access argc argv from outside main()
  155. Environment variables supported instead:
  156. BB_PRIMARY_DIR
  157. BB_SECONDARY_DIR (was: /USE command line option)
  158. BB_PACKED_NAME
  159. A. V. Shiryaev, 2012