123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- Oberon Microsystems BlackBox Component Builder (http://www.oberon.ch/)
- Port for OpenBSD/i386, GNU/Linux/i386
- Tested on OpenBSD 5.2, Fedora Core 17, Ubuntu 12.04 LTS
- Some significant parts taken from OpenBUGS (http://www.openbugs.info/)
- How to build:
- cd BlackBox
- ./clean
- ./switch-target `uname -s`
- compile loader executable:
- cd BlackBox/Lin/Rsrc/loader
- make clean
- make
- mv loader ../../../_`uname -s`_/Lin/Rsrc/loader/
- compile self:
- cd BlackBox
- ./build
- ./pack-dev0
- Files:
- original:
- BlackBox:
- Comm/Mod/Streams.odc
- Comm/Docu/*
- Dev/Mod/*
- all except ElfLinker16
- Dev/Docu/*
- all except ElfLinker
- Dev/Rsrc/*
- Docu/BB-License.odc
- Docu/BB-Licensing-Policy.odc
- Docu/BB-Open-Source-License.odc
- Obx/*
- Std/*
- System/Mod/
- all except Console
- System/Rsrc/*
- Text/*
- Xhtml
- OpenBUGS:
- Dev/Mod/ElfLinker16.odc
- Dev/Docu/ElfLinker.odc
- Docu/OpenBUGS-License.odc
- http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
- _LinuxOpenBSD_/System/Mod/Kernel_so_init.odc
- http://oberoncore.ru/projects/bb16ru-kras/:
- Dev/Rsrc/ru/Strings.odc
- Std/Rsrc/ru/Strings.odc
- System/Rsrc/ru/Strings.odc
- modified:
- _OpenBSD_/System/Mod/Kernel.odc:
- 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
- OpenBSD specific:
- Memory management rewritten (based on mmap)
- Kernel.TrapHandler
- OpenBSD sigcontext-specific
- Kernel.Time
- CLOCKS_PER_SEC related
- Kernel.InitModule
- mprotect call added
- Kernel.InstallSignals:
- do not install signal handler for SIGTHR (when executable linked with -pthread)
- IsReadable
- GetRefVar memory access protection
- _Linux_/System/Mod/Kernel.odc:
- _OpenBSD_/System/Mod/Kernel.odc modified for Linux:
- Time*
- TrapHandler
- mmap: use "/dev/zero" device instead of -1
- mprotect addresses must be page-aligned
- do not show warning message if signal install failed
- _Linux_/Host/Mod/Files.odc:
- OpenBUGS Lin/Mod/linHostFiles.odc:
- synchronized with BlackBox 1.6-rc6
- server configuration via BB_PRIMARY_DIR and BB_SECONDARY_DIR environment variables (not command line)
- filenames encoding translation implemented
- _OpenBSD_/Host/Mod/Files.odc:
- _Linux_/Host/Mod/Files.odc:
- OpenBSD-specific:
- size_t
- __xstat -> stat
- _OpenBSD_/Lin/Mod/Libc.txt:
- OpenBUGS Lin/Mod/Libc.odc:
- OpenBSD-specific
- _Linux_/Lin/Mod/Libc.odc:
- OpenBUGS Lin/Mod/Libc.odc:
- PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
- open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
- _Linux_/Lin/Mod/Dl.odc:
- OpenBUGS Lin/Mod/Dl.odc
- _Linux_/Host/Mod/Dates.odc: from http://oberoncore.ru/
- _OpenBSD_/Host/Mod/Dates.odc:
- _Linux_/Host/Mod/Dates.odc: OpenBSD-specific
- Dev0/Mod:
- CP*
- BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc.
- Compiler.odc:
- modified original BlackBox Dev/Mod/Compiler.odc
- Linker.odc:
- modified original BlackBox Dev/Mod/Linker.odc
- ElfLinker16.odc:
- modified OpenBUGS Dev/Mod/ElfLinker16.odc
- _LinuxOpenBSD_/Host/Mod/TextConv.odc:
- BlackBox 1.6-rc6 Host/Mod/TextConv.odc:
- Windows-specific converters removed
- _LinuxOpenBSD_/Host/Mod/PackedFiles.odc:
- BlackBox 1.6-rc6 Host/Mod/PackedFiles.odc:
- use BB_PACKED_NAME environment variable instead of appName
- GetNextSubLoc, GetLoc: filenames-specific
- _LinuxOpenBSD_/System/Mod/Config.odc:
- BlackBox 1.6-rc6 System/Mod/Config.odc:
- Windows-specific removed
- new:
- Console:
- System/Mod/Console.odc: Console interface
- _Linux_/Host/Mod/Console.odc: Console implementation for Linux
- _OpenBSD_/Host/Mod/Console.odc:
- _Linux_/Host/Mod/Console.odc: stdin -> SYSTEM.ADR(__sF[0]) (OpenBSD-specific)
- _Windows_/Host/Mod/Console.odc:
- Console implementation for Windows
- Cons/Mod
- Interp.odc: console interpreter
- Compiler.odc: console interface to Dev compiler
- Log.odc: Log.Hook console implementation
- {_Linux_,_OpenBSD_}/Lin/Mod/Iconv.odc: interface to libiconv system library
- {_Linux_,_OpenBSD_}/Lin/Mod/Ioctl.odc: interface to ioctl
- {_Linux_,_OpenBSD_}/Lin/Mod/Termios.odc: interface to termios
- {_Linux_,_OpenBSD_}/Lin/Mod/Net.odc: interface to network functionality
- _LinuxOpenBSD_/Host/Mod/Lang.odc: Dialog.LanguageHook implementation and LANG environment variable support
- _LinuxOpenBSD_/Comm/Mod/V24.odc: CommV24 implementation for Linux and OpenBSD
- _OpenBSD_/Comm/Mod/TCP.odc: CommTCP implementation for OpenBSD
- _Linux_/Comm/Mod/TCP.odc: CommTCP implementation for Linux
- {_OpenBSD_,_Linux_}/libBB.so: compiled and linked shared library to run BlackBox
- {_OpenBSD_,_Linux_}/libBB0.so: compiled and linked shared library to run simple development interpreter
- _Windows_/dev0.exe: compiled and linked simple development interpreter
- Dev0/Views.odc: minimal Views implementation required to compile StdInterpreter
- __Interp/Host/Mod: Fonts.odc, Dialog.odc, Windows.odc: simple Hosts implementation
- __Interp/System/Mod/Init.odc: Init for console interpreter
- Notes:
- Kernel.baseStack issue:
- baseStack is upper border:
- * of garbage collector stack scan range (see Kernel.MarkLocals)
- * of TrapViewer stack show range (see Kernel.TrapHandler)
- it is initialized in Kernel.INIT and initially points close to upper
- border of library stack (because Kernel.INIT called from library
- constructor, which executes close to upper border of library stack)
- it can be changed in Kernel.Start to skip unnecessary stack addresses
- if libBB.so exports procedure for calling from main program,
- then it will be executed on main program stack, not on library
- stack, at stack addresses higher than baseStack.
- Thus, MarkLocals and TrapViewer will work incorrectly.
- in this case, to solve problem, baseStack should be adjusted and
- should point to stack on which this exported procedure executes
- if necessary, this can be done using auxiliary module Kernel_so_init,
- or by using Kernel.Start
- Command line support removed because there is no easy way to access argc argv from outside main()
- Environment variables supported instead:
- BB_PRIMARY_DIR
- BB_SECONDARY_DIR (was: /USE command line option)
- BB_PACKED_NAME
- A. V. Shiryaev, 2012
|