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