README 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. This is a development environment for ELKS-86 and standalone 8086 code.
  2. All you need to do is 'make' from the top directory and the main parts
  3. of the package will be made. These can be tested by using the 'ncc'
  4. program from the newly created bin subdirectory. (ncc is a varient of
  5. the bcc driver program that doesn't need to be installed to be used).
  6. Use 'make install' to install them.
  7. Some other bits can be built by 'make other' and installed with
  8. 'make install-other'.
  9. Note the the make files for the libraries can only be run using
  10. GNU-make but version 3.82 has a bug (No. 30612) that prevents this
  11. working properly.
  12. If you want it to install under /usr/local instead you can specify
  13. the prefix on the first make ie: 'make PREFIX=/usr/local' this is
  14. remembered until 'make.fil' is rebuilt.
  15. The manual pages in the man subdirectory are matched to these programs,
  16. there are also some hints for using as86 well. The tests and bootblocks
  17. directories give some example code.
  18. The bcc command defaults to using /usr/lib/bcc/include and /usr/lib/bcc
  19. the libraries _and_ include files are copied to these locations by
  20. install. This can be changed by overriding 'PREFIX=/usr/...' or
  21. 'LIBDIR=/usr/...' on the initial make. Also available in the
  22. same way are the BINDIR, INCLDIR, ASLDDIR, MANDIR and ELSESRC.
  23. The 'ELKSSRC=/usr/src/elks' variable can be altered if you have ELKS on
  24. path different from the default or ELKSSRC=/dev/null uses the supplied
  25. ELKS headers. The ASLDDIR variable can be used to move as86 and ld86
  26. into the LIBDIR with 'ASLDDIR=$(LIBDIR)'. The final '/include' is added
  27. to the end of INCLDIR.
  28. In the unlikely event you're makeing a non-cross development environment
  29. you can, on the initial make, do "make PREFIX=/' to have the libraries
  30. and include files in 'Native' locations.
  31. Note: These prefix options only effect the 'bcc.c' driver program and
  32. the install scripts, all the others get their paths from bcc.c.
  33. The ELKSSRC location can, however, greatly effect how the ELKS
  34. libraries are built.
  35. If you don't want to install in the locations specified above there
  36. is also a DIST= argument to make install that is used to specify the
  37. distribution root to install to.
  38. The last option is not to install at all. All the executables in the
  39. bin directory can be moved to whereever you wish except for bcc and ncc.
  40. To use bcc at any other location you can create a symlink from your
  41. new location to the 'ncc' executable and it will be able to find
  42. the libraries in the build directory:
  43. eg:
  44. cp ar86 elksemu objdump86 $HOME/bin/.
  45. cp as86 as86_encap ld86 $HOME/bin/. # Optional.
  46. ln -s `pwd`/ncc $HOME/bin/bcc
  47. All the versions of the library are built by make; 'normal', 'fast',
  48. 'MSDOS', 'standalone' and Linux-i386.
  49. You use the other libraries like this:
  50. 'FAST' $ bcc -Mf prog.c -o prog
  51. Caller saves $ bcc -Mc prog.c -o prog
  52. MSDOS $ bcc -Md prog.c -o prog.com
  53. Standalone $ bcc -Ms prog.c -o prog.sys
  54. Linux-i386 $ bcc -Ml prog.c -o prog
  55. The 'Fast' and 'Caller saves' versions alter the function call assember
  56. in an effort to make it smaller and faster.
  57. The 'MSDOS' version creates _small_ model (64k+64k) COM files. Because
  58. of DOS limitations the filesize is limited to about 65000 bytes but
  59. the BSS and Stack can be upto 64k on top of that.
  60. The 'standalone' version creates executables like normal ELKS a.out
  61. files but with no operating system calls, just BIOS ones. These
  62. files are suitable for running on a bare machine started by one of
  63. the boot blocks in the bootblocks subdirectory. If you add a '-d'
  64. option to the link stage the a.out header will be removed.
  65. The Linux-i386 version generates static Linux OMAGIC a.out programs,
  66. they need neither elksemu nor a.out shared libraries to run. Unfortunatly
  67. these can no longer be converted to ELF executables as Linux will not
  68. execute unpageable ELF executables. To allow conversion to ELF if you
  69. pass the '-z' flag to 'bcc -Ml' the linker will now create QMAGIC a.out
  70. executables, these are somewhat larger but can be converted with objcopy.
  71. If you want to install everything in one go just login as root an do:
  72. $ make install-all
  73. The as86 and ld86 with this are _different_ from the minimum version
  74. needed for the linux-i386 kernel and can replace them, versions before
  75. 0.12.0 will not work with this version of bcc.
  76. I suggest you install the kernel patch or load the module to allow
  77. transparent execution of elks executables. If you're using a post
  78. 2.1.43 or 2.0.36 kernel the only module you need is the binfmt_misc
  79. driver configured like this:
  80. echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:' \
  81. > /proc/sys/fs/binfmt_misc/register
  82. The elksemu executable must be stored in /usr/bin/elksemu or the above
  83. line adjusted.
  84. Previous kernel versions need a special module or patch described in
  85. elksemu/README (All the options need the elksemu executable installed
  86. correctly)
  87. Copyrights
  88. ----------
  89. The `bcc', 'as' and `ld' parts of the distribution are now covered by
  90. the GPL. The `bccfp' library now in the libc/i386fp directory is under
  91. the LGPL. (Primary copyright holder Bruce Evans)
  92. The contents of the libc and libbsd subdirectories are under the LGPL
  93. with a few noted exceptions. The programs in 'tests', elksemu, copt
  94. and the bootblocks directory are under the GPL. Dis88 is freely
  95. distributable if the source is distributed also. Unproto is freely
  96. distributable as long as Wietse Venema <wietse@wzv.win.tue.nl> and the
  97. "Mathematics and Computing Science Dept. Eindhoven University of
  98. Technology. The Netherlands." is given credit.
  99. In libc the regular expression routine and the printf/scanf functions are
  100. not under LGPL, the former is 'freely distributable' the latter is public
  101. domain.
  102. See the COPYING file in this directory for the GPL and the COPYING file
  103. in the libc directory for the LGPL.
  104. --
  105. Rob. (Robert de Bath <robert$@debath.co.uk>)