File: INSTALL

package info (click to toggle)
dosemu 1.4.0+svn.1999-2
  • links: PTS
  • area: contrib
  • in suites: squeeze
  • size: 15,552 kB
  • ctags: 22,600
  • sloc: ansic: 136,915; asm: 4,107; sh: 1,606; perl: 1,411; makefile: 974; tcl: 599; awk: 404; yacc: 300; lex: 157
file content (227 lines) | stat: -rw-r--r-- 9,693 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
DOSEMU installation instructions (from source)
==============================================

-> REQUIREMENTS for DOSEMU:
    - egcs >= 2.91.66 (1.1.2) / gcc >= 2.95.2
    - glibc >= 2.1.3
    - Linux >= 2.0.30, 2.x.y >= 2.1.27 (>= 2.4.20 recommended)
      2.6 kernels <= 2.6.5 can be problematic
    - x86 (i386/x86-64) target CPU
    - bison (not just yacc) and flex
    - development libraries: X and S-Lang are strongly recommended.
      For full-screen use with X.org 7 or newer you may also
      need the libXxf86vm development libraries.
      GPM, SDL (>= 1.2), SVGALIB (>= 1.9.21), ALSA libraries, and
      libsndfile can be used when available.

--------------------------------------------------------------------------
1. Compile
--------------------------------------------------------------------------

- (optional) adjust compiletime-settings; see compiletime-settings.help
  for help.

- make
or
- create a seperate directory and run
    $SRCDIR/configure (or $SRCDIR/default-configure; see below)
    make
  in that directory.

See section 3 for compiling on x86-64.

--------------------------------------------------------------------------
2a. Install 
--------------------------------------------------------------------------

- download dosemu-freedos-<version>bin.tgz from dosemu.org or one of its 
  mirrors and rename it to dosemu-freedos-bin.tgz
- su -		(become root)
- make install

--------------------------------------------------------------------------
2b. Update
--------------------------------------------------------------------------

- su -		(become root)
- make install

You can now start DOSEMU using "dosemu". By default, when you start it the
first time it creates a private C: drive in the directory
$HOME/.dosemu/drive_c. This directory initially only contains the
config.sys and autoexec.bat files, and a tmp directory. All FreeDOS files
and all DOSEMU support files (exitemu.com and so on) can be found on the
shared read-only drive Z: (drive D: during config.sys processing).

Runtime configuration variables can be stored in the file ~/.dosemurc.
This file overrides the dosemu.conf file which is usually either in
/etc/dosemu or in /etc. By default, most error and debug messages are
logged to the file ~/.dosemu/boot.log.

If you do not want to use FreeDOS, a simple way to use a different DOS is
to copy or symbolically link the DOS system files (io.sys. msdos.sys,
command.com, and so on, or equivalents) to $HOME/.dosemu/drive_c, and
DOSEMU will automatically use them when you next boot it.

If you do not want to use the $HOME/.dosemu/drive_c location, then you
can adjust dosemu.conf or ~/.dosemurc yourself and point $_hdimage to the
right boot directory or hdimage (which can be a symbolic link).
Alternatively you can create or adjust symbolic links in ~/.dosemu/drives
such as
	~/.dosemu/drives/c ---> /dosc (ln -s /dosc ~/.dosemu/drives/c)
and so on where /dosc is your mounted DOS partition or
	~/.dosemu/drives/c ---> ~/msdos
where you put a working DOS installation in ~/msdos. This symbolic link is
also created the first time you run dosemu or if you run dosemu -install.

--------------------------------------------------------------------------
3.  Want to use a different configuration ?
--------------------------------------------------------------------------

Then you have to edit compiletime-settings (changing on/off) and run
./configure or ./default-configure _prior_ to running make.

If you want a DOSEMU executable with development settings (debug info,
experimental features, and so on) then it is easier to use the file 
compiletime-settings.devel -- you can use it by running
	./default-configure -d
(*not* ./configure -d) prior to running make.

Notes about x86-64
==================
On x86-64 DOSEMU can run in both 32-bit and 64-bit mode.
The 64-bit version is generally easier to compile, but is not as
well tested as the 32-bit version. Both versions fall back to
CPU emulation for 16-bit real mode DOS programs, but run DPMI
programs natively.

The configure script causes compilation of the native 64-bit
version by default. If you want a 32-bit version, then you need to
set target_bits to 32 in compiletime-settings or use the
--with-target-bits=32 configure option.

When compiling a 32-bit DOSEMU on a 64-bit system, the configure script
(depending on the distribution) may not find the correct libraries.
Try something like
--x-libraries=/usr/X11R6/lib
as a configure option to explicitly give the location of the 32-bit
X libraries.
On Fedora Core 3 AMD64 the following was necessary:
 ln -s /usr/lib/libslang-utf8.so.1 libslang.so
 ln -s /usr/lib/libSDL-1.2.so.0 libSDL.so
 LIBS=-L$PWD ./configure --x-libraries=/usr/X11R6/lib
Your mileage may vary. Other distributions may use other directories
for the 32-bit libraries.

Optimizations: 
BIG NOTE: do _not_ use -O3 in CFLAGS, because it forces _inline_ at
places where we don't want it !

---- NOTE: the setup tool is temporarily disabled! ----
Or (if you have Tcl/Tk installed) alternatively, you can use the menu
driven configuration tool:

- ./setup-dosemu

then choose "Compile configuration / compilation", when you have
finished toggling the configuration switches, click < Ok> and choose
the appropriate action ...
... well it should be self descriptive.


--------------------------------------------------------------------------
4.  Configure for a system wide suid-root (or sudo-using) installation
--------------------------------------------------------------------------

(Note: this is only necessary if you wish to use graphics on the console
 or need direct port access, hardware interrupts or raw network access.
 Moreover, suidroot binaries might be a means to compromise system security).

- Install system-wide, as explained above in section 2.
  Modify /etc/dosemu/dosemu.conf by using the info in the file ./doc/README.txt
  chapter 2

- Either make dosemu.bin suid-root:
	chmod u+s /path/to/dosemu.bin, and use the "-s" switch.
  or (recommended for better protection):
	* leave dosemu.bin non-suid-root
	* install "sudo" if you haven't already done so
	* use "visudo" as root to add entries such as
		joeuser   hostname=(root) PASSWD: /usr/local/bin/dosemu.bin
	  to your /etc/sudoers file, where "joeuser" is the user who is
	  allowed to run privileged DOSEMU and "hostname" is the name of
	  your current host (use "ALL" for any host).
	* if you change PASSWD to NOPASSWD then joeuser does not need to type
	  the user's password (not root's password) when invoking DOSEMU
	  (a little less secure, if somebody hacks into joeuser's account).
	* invoke dosemu using "dosemu -s" when privileged functionality,
	  such as console graphics, is needed.
  This way DOSEMU will only use its root privileges during the 
  initialization phase, and drops them before booting the DOS.

- Certain privileged settings such as I/O ports, hardware IRQ passing,
  and console graphics can only be enabled using the system-wide dosemu.conf 
  and not in ~/.dosemurc.

- If you are using dosemu via "sudo" then a dosemu.users file is no longer
  necessary, unless you wish to restrict the capabilities of individual
  users.

  However, with a suid-root dosemu.bin some extra precautions are in place:
  by default only local users on the console are allowed to use it, and
  are only allowed console graphics.
  In that case, other more specialized settings, such as $_ports, 
  $_irqpassing and $_hardware_ram, cannot be used by a normal user.
  For that you need to adjust the file /etc/dosemu/dosemu.users, which
  contains a list of users who are privileged to use these DOSEMU features.
  Example:

    joeuser c_all

  For a more detailed description on 'running as user' have a look
  at ./doc/README.txt 'Running dosemu as a normal user' (chapter 6).


More notes about system-wide installation
=========================================

This section provides a little background and explanations, aimed
at Linux distributors, people who set up large installations
and anyone else who is interested.

By default, every user has his or her own C drive 'somewhere' (default
is $HOME/.dosemu/drive_c). Drive Z: (or D: during config.sys processing)
points to a shared read/only drive with FreeDOS and DOSEMU support files.
This way each user has full write access to the C: drive, which is what
is normally expected in a DOSish environment.

The systemwide install, "make install" keeps the DOSEMU binaries, the docs
and the templates to generate the user's private DOSEMU instance on demand.
Whenever DOSEMU is first called by a user who has no DOS installed yet,
it will try to install FreeDOS (essentially, it copies the config.sys and
autoexec.bat files, and creates a tmp directory on the provate C: drive),
before it launches DOS. If it cannot find a FreeDOS, it will tell the user
and ask for a different location to boot from.

This systemwide installation can be created as follows:

  - in addition to the DOSEMU source distribution you first have
    to download at least the file dosemu-freedos-bin.tgz from dosemu.org
    (this contains a bootable collection of suitable FreeDos binaries).

  - adjust the paths in compiletime-settings and compile the DOSEMU 
    source as follows: 

    $ cd /where/you/unpacked/the/dosemu/source/dosemu-<version>
    $ make
    $ su -
    # make install
    
where you can also pack the result into a RPM or what ever package format 
you like.

If you upgrade an existing DOSEMU or dosemu-freedos tarball then this
this change will have an immediate effect on all users, because the shared
Z: drive points to the commonly used DOS binaries.

			--Bart Oldeman, 2007/05/02