README 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. Oberon Microsystems BlackBox Component Builder (http://www.oberon.ch/)
  2. Port for OpenBSD/i386, GNU/Linux/i386, FreeBSD/i386
  3. Tested on:
  4. OpenBSD 5.4
  5. Fedora Core 17
  6. Ubuntu 12.04 LTS, 12.10, 13.10, 14.04
  7. FreeBSD 9.0 (non-GUI part only)
  8. Status:
  9. non-GUI part: stable, but TODO list is not empty
  10. GUI part: incomplete, but runnable implementation
  11. How to build:
  12. if you have 64-bit version of Ubuntu, do this:
  13. sudo apt-get install libc6-dev-i386
  14. cd BlackBox
  15. ./clean
  16. ./switch-target `uname -s` [ GUI ]
  17. compile loader executable:
  18. cd BlackBox/Lin/Rsrc/loader
  19. make clean
  20. make
  21. mv loader ../../../_`uname -s`_/Lin/Rsrc/loader/
  22. compile self:
  23. cd BlackBox
  24. ./build
  25. ./pack-dev0
  26. How to run (after build):
  27. GUI only:
  28. if you have 64-bit version of Ubuntu, do this:
  29. sudo apt-get install libgtk2.0-0:i386
  30. cd BlackBox
  31. ./run-BlackBox
  32. Files:
  33. original:
  34. BlackBox:
  35. Comm/Mod/Streams.odc
  36. Comm/Docu/*
  37. Dev/Mod/*
  38. all except ElfLinker16
  39. Dev/Docu/*
  40. all except ElfLinker
  41. Dev/Rsrc/*
  42. Dev/Spec/*
  43. Docu/BB-License.odc
  44. Obx/*
  45. Std/*
  46. System/Mod/
  47. all except Console
  48. System/Rsrc/*
  49. Text/*
  50. Xhtml
  51. _Windows_/{Comm,BlackBox.exe,BlackBox.exe.manifest}
  52. _Windows_GUI/*
  53. __GUI/{Comm,Dev,Form,Host/Rsrc/*.odc,Obx,Std,System,Empty.odc,Tour.odc}
  54. OpenBUGS (http://www.openbugs.net/):
  55. Dev/Mod/ElfLinker16.odc
  56. Dev/Docu/ElfLinker.odc
  57. Docu/OpenBUGS-License.odc
  58. http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
  59. _FreeBSDLinuxOpenBSD_/System/Mod/Kernel_so_init.odc
  60. http://oberoncore.ru/projects/bb16ru-kras/:
  61. Dev/Rsrc/ru/Strings.odc
  62. Std/Rsrc/ru/Strings.odc
  63. System/Rsrc/ru/Strings.odc
  64. __GUI/Host/Rsrc/ru/Strings.odc
  65. http://gitlab.molpit.com/oberon/blackbox-freenix/:
  66. _{LinuxOpenBSD,Linux,OpenBSD}_GUI
  67. modified:
  68. _OpenBSD_/System/Mod/Kernel.odc:
  69. BlackBox 1.6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
  70. OpenBSD specific:
  71. Memory management rewritten (based on mmap)
  72. Kernel.TrapHandler
  73. OpenBSD sigcontext-specific
  74. Kernel.Time
  75. Kernel.InitModule
  76. mprotect call added
  77. Kernel.InstallSignals:
  78. do not install signal handler for SIGTHR (when executable linked with -pthread)
  79. IsReadable
  80. GetRefVar memory access protection
  81. _Linux_/System/Mod/Kernel.odc:
  82. _OpenBSD_/System/Mod/Kernel.odc modified for Linux:
  83. Time*
  84. TrapHandler
  85. mmap: use "/dev/zero" device instead of -1
  86. mprotect addresses must be page-aligned
  87. do not show warning message if signal install failed
  88. _FreeBSD_/System/Mod/Kernel.odc:
  89. _OpenBSD_/System/Mod/Kernel.odc modified for FreeBSD:
  90. Time*
  91. TrapHandler
  92. SetupModListAccess: initial module list must be writeable (read only by default in FreeBSD)
  93. _Linux_/Host/Mod/Files.odc:
  94. OpenBUGS Lin/Mod/linHostFiles.odc:
  95. synchronized with BlackBox 1.6
  96. server configuration via BB_PRIMARY_DIR and BB_SECONDARY_DIR environment variables (not command line)
  97. filenames encoding translation implemented
  98. _OpenBSD_/Host/Mod/Files.odc:
  99. _Linux_/Host/Mod/Files.odc:
  100. OpenBSD-specific:
  101. size_t
  102. __xstat -> stat
  103. LEN(clock_t) = 8
  104. _FreeBSD_/Host/Mod/Files.odc:
  105. _Linux_/Host/Mod/Files.odc:
  106. FreeBSD-specific:
  107. size_t
  108. __xstat -> stat
  109. mode_t
  110. _Linux_/Lin/Mod/Libc.odc:
  111. OpenBUGS Lin/Mod/Libc.odc:
  112. PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
  113. open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
  114. _Linux_/Lin/Mod/Dl.odc:
  115. OpenBUGS Lin/Mod/Dl.odc
  116. _Linux_/Host/Mod/Dates.odc: from http://oberoncore.ru/
  117. _FreeBSDOpenBSD_/Host/Mod/Dates.odc:
  118. _Linux_/Host/Mod/Dates.odc: OpenBSD and FreeBSD specific
  119. _FreeBSDLinuxOpenBSD_/Host/Mod/TextConv.odc:
  120. BlackBox 1.6 Host/Mod/TextConv.odc:
  121. Windows-specific converters removed
  122. _FreeBSDLinuxOpenBSD_/Host/Mod/PackedFiles.odc:
  123. BlackBox 1.6 Host/Mod/PackedFiles.odc:
  124. use BB_PACKED_NAME environment variable instead of appName
  125. GetNextSubLoc, GetLoc: filenames-specific
  126. _FreeBSDLinuxOpenBSD_Interp/Host/Mod/DevPackedFiles.odc:
  127. _FreeBSDLinuxOpenBSD_/Host/Mod/PackedFiles.odc:
  128. with priority to packed files
  129. _FreeBSDLinuxOpenBSD_/System/Mod/Config.odc:
  130. BlackBox 1.6 System/Mod/Config.odc:
  131. Windows-specific removed
  132. _FreeBSDLinuxOpenBSD_GUI/Host/Mod/Registry.odc:
  133. BlackBox 1.6 Host/Mod/Registry.odc
  134. _Windows_Interp/Host/Mod/{Dates.odc,Lang.odc}:
  135. part of BlackBox 1.6 Host/Mod/Dialog.odc
  136. _Windows_Interp/Host/Mod/DevPackedFiles.odc:
  137. BlackBox 1.6 Host/Mod/PackedFiles.odc:
  138. with priority to packed files
  139. new:
  140. Console:
  141. System/Mod/Console.odc: Console interface
  142. _FreeBSDLinux_/Host/Mod/Console.odc: Console implementation for Linux and FreeBSD
  143. _OpenBSD_/Host/Mod/Console.odc:
  144. _Linux_/Host/Mod/Console.odc: stdin -> SYSTEM.ADR(__sF[0]) (OpenBSD-specific)
  145. _Windows_{GUI,Interp}/Host/Mod/Console.odc:
  146. Console implementation for Windows
  147. Cons/Mod
  148. Interp.odc: console interpreter
  149. Compiler.odc: console interface to Dev compiler
  150. Log.odc: Log.Hook console implementation
  151. {_OpenBSD_,_FreeBSD_}/Lin/Mod/Libc.odc: OpenBSD and FreeBSD specific libc interface
  152. {_OpenBSD_,_FreeBSD_}/Lin/Mod/Dl.odc: OpenBSD and FreeBSD specific interface to dl
  153. {_Linux_,_OpenBSD_,_FreeBSD_}/Lin/Mod/Iconv.odc: interface to iconv
  154. {_Linux_,_OpenBSD_}/Lin/Mod/Ioctl.odc: interface to ioctl
  155. {_Linux_,_OpenBSD_}/Lin/Mod/Termios.odc: interface to termios
  156. {_Linux_,_OpenBSD_}/Lin/Mod/Net.odc: interface to network functionality
  157. _FreeBSDLinuxOpenBSD_/Host/Mod/Lang.odc: Dialog.LanguageHook implementation and LANG environment variable support
  158. _LinuxOpenBSD_/Comm/Mod/V24.odc: CommV24 implementation for Linux and OpenBSD
  159. _OpenBSD_/Comm/Mod/TCP.odc: CommTCP implementation for OpenBSD
  160. _Linux_/Comm/Mod/TCP.odc: CommTCP implementation for Linux
  161. _Linux_/Lin/Mod/Rt.odc: interface to librt
  162. {_OpenBSD_,_Linux_}/libBB.so: compiled and linked shared library to run BlackBox
  163. {_OpenBSD_,_Linux_}/libBB0.so: compiled, linked and packed shared library to run console interpreter
  164. _Windows_/dev0.exe: compiled and linked simple development interpreter
  165. Dev0/Views.odc: minimal Views implementation required to compile StdInterpreter
  166. __Interp/Host/Mod: Fonts.odc, Dialog.odc, Windows.odc: simple Host implementation
  167. __Interp/System/Mod/Init.odc: Init for console interpreter
  168. Notes:
  169. Kernel.baseStack issue:
  170. baseStack is upper border:
  171. * of garbage collector stack scan range (see Kernel.MarkLocals)
  172. * of TrapViewer stack show range (see Kernel.TrapHandler)
  173. it is initialized in Kernel.INIT and initially points close to upper
  174. border of library stack (because Kernel.INIT called from library
  175. constructor, which executes close to upper border of library stack)
  176. it can be changed in Kernel.Start to skip unnecessary stack addresses
  177. if libBB.so exports procedure for calling from main program,
  178. then it will be executed on main program stack, not on library
  179. stack, at stack addresses higher than baseStack.
  180. Thus, MarkLocals and TrapViewer will work incorrectly.
  181. in this case, to solve problem, baseStack should be adjusted and
  182. should point to stack on which this exported procedure executes
  183. if necessary, this can be done using auxiliary module Kernel_so_init,
  184. or by using Kernel.Start
  185. Command line support removed because there is no easy way to access argc argv from outside main()
  186. Environment variables supported instead:
  187. BB_PRIMARY_DIR
  188. BB_SECONDARY_DIR (was: /USE command line option)
  189. BB_PACKED_NAME
  190. Alexander V. Shiryaev, 2014