2000-05-06 21:34:20 +02:00
|
|
|
To build the operating system, a batch file (BUILD.BAT) is included
|
|
|
|
to make life easier. This file is in the FDKERNEL directory of the
|
|
|
|
distribution. In addition, there is a corresponding batch file
|
|
|
|
(CLEAN.BAT) to clean up the source directories.
|
|
|
|
|
2002-01-27 02:13:07 +01:00
|
|
|
There is a CONFIG.B file that specifies all the paths and names of
|
2000-05-06 21:34:20 +02:00
|
|
|
the compiler, assembler, etc. that you want to use. You MUST copy
|
2002-01-27 02:13:07 +01:00
|
|
|
it to CONFIG.BAT first, then edit it to reflect your setup.
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
The reason for this copying of files is that when new releases of the
|
|
|
|
kernel come out, you can extract them over your previous source, and
|
|
|
|
not have to worry about resetting up your configuration because your
|
2002-01-27 02:13:07 +01:00
|
|
|
CONFIG.BAT file will not get replaced!
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2000-08-15 05:42:17 +02:00
|
|
|
You will also need to download the latest version of NASM and Turbo C
|
|
|
|
2.01. Install Turbo C and NASM somewhere (it doesn't really matter
|
|
|
|
where) and then be sure to edit the CONFIG.MAK file to reflect where
|
|
|
|
you put the tools.
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
You can find NASM at http://nasm.sourceforge.net. Version 0.98.36 is
|
|
|
|
strongly recommended. The older 0.98 will also work fine, but
|
|
|
|
any version in between is likely to fail. It's best to use a NASM
|
|
|
|
that is native to your host; that is, when compiling in Windows, use
|
|
|
|
the win32 version. The DJGPP version is less likely to run out of
|
|
|
|
memory than the DOS version.
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
Optionally, the kernel can be compressed using UPX. You can find
|
|
|
|
UPX at http://upx.sourceforge.net. Simply adjust config.bat to
|
|
|
|
enable it.
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
This kernel will now compile with Turbo C 2.01, Turbo C++ 1.01 (now freely
|
2000-05-06 21:34:20 +02:00
|
|
|
available!), Turbo C 3.0, Borland C 4.51 & 5.01. It should work with
|
2003-03-15 05:18:09 +01:00
|
|
|
other Borland compilers, Microsoft C and (Open)Watcom C.
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
The OpenWatcom 1.0 compiler for DOS can now be downloaded at
|
2002-02-09 01:40:33 +01:00
|
|
|
www.openwatcom.org: you need at least the following zips from
|
|
|
|
ftp://ftp.openwatcom.org/watcom/zips/
|
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
cm_core_all - Core binaries (All hosts)
|
|
|
|
cm_clib_hdr - C runtime library header files
|
|
|
|
cm_clib_a16 - C runtime libraries (16-bit all targets)
|
2002-02-09 01:40:33 +01:00
|
|
|
clib_a16 - C runtime libraries (16-bit all targets)
|
2003-03-15 05:18:09 +01:00
|
|
|
cm_clib_d16 - C runtime libraries (16-bit DOS)
|
2002-02-09 01:40:33 +01:00
|
|
|
clib_d16 - C runtime libraries (16-bit DOS)
|
2003-03-15 05:18:09 +01:00
|
|
|
cm_core_dos - Core binaries (DOS host)
|
|
|
|
core_doswin - Core binaries (DOS & Win16 hosts)
|
|
|
|
c_doswin - C compiler (DOS & Win16 hosts)
|
|
|
|
ext_dos4gw - DOS/4GW DOS extender
|
2002-02-09 01:40:33 +01:00
|
|
|
|
2003-03-15 05:18:09 +01:00
|
|
|
Replace "dos" by "nt" for an NT/Win9x host or "os2" for an OS/2 host.
|
2002-02-09 01:40:33 +01:00
|
|
|
The host needs to be a 386+ with at least 8MB of memory.
|
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
If you feel hardy, read on to understand the directory structure. A
|
|
|
|
more complete description of the build environment is contained in a
|
|
|
|
companion book, "The FreeDOS Kernel" (ISBN: 0-87930-436-7) published
|
|
|
|
by R&D Books, an imprint of Miller Freeman of Lawrence, Kansas (USA)
|
|
|
|
and distributed in the USA and Canada by Publishers Group West. See
|
|
|
|
the file README.TXT for more details.
|
|
|
|
|
|
|
|
|
|
|
|
Directory Structure
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
fdkernel root directory
|
|
|
|
+-----bin holds image of distribution disk
|
|
|
|
+-----boot boot.bin (boot sector)
|
|
|
|
+-----docs documentation directory
|
|
|
|
+-----drivers DEVICE.LIB
|
|
|
|
+-----hdr common *.h files
|
|
|
|
+-----kernel The kernel itself
|
|
|
|
+-----lib LIBM.LIB and DEVICE.LIB
|
|
|
|
+-----sys SYS.COM and supporting programs
|
|
|
|
+-----utils Miscellaneous utilities
|
|
|
|
|
|
|
|
|
|
|
|
Organization in a nutshell
|
|
|
|
--------------------------
|
|
|
|
Each component or group of utilities is segregated into its own
|
|
|
|
directory. In order to build that component or utility, a makefile
|
|
|
|
exists in the directory that bears the component's or utility's
|
|
|
|
basename.
|
|
|
|
|
|
|
|
Each makefile has at least two targets, production and clean. The
|
|
|
|
target production builds the expected component or utility and the
|
|
|
|
component clean cleans up the directory for distribution. The
|
|
|
|
makefile may have at least one additional target that builds the
|
|
|
|
component. Study the makefile to better understand this.
|
|
|
|
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
|
|
|
|
|