To build sanos from source you first need to download sanos-src-x.x.x.zip from
the download page and unzip it into a directory (e.g. c:\sanos).
The source code for sanos is compiled under Windows. I use Microsoft Visual C version 7
(i.e. Visual Studio.NET 2002) to compile the source code. The boot sector is assembled using NASM.
A copy of the NASM assembler is distributed
with the source release of sanos (in the tools directory).
You can build sanos from a command line using the Makefile
in the root directory of the sanos distribution. If your Visual Studio
is not placed in its default location you need to have your path setup for
Visual Studio. This is most easily done by running vsvars32.bat.
This file is usually located in C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin.
The Makefile compiles and links all the code and builds
a boot floppy image in img/sanos.flp. See here
for booting and installing this image.
The root directory of the sanos source distribution contains a Makefile, that can
be used to build sanos. After running vsvars32.bat you can build sanos by
running:
c:\sanos> nmake sanos
This will build all the files in the bin directory. You can then build
different install medias from these files:
nmake bootdiskimg directory (img\sanos.flp)nmake boothdimg
directory (img\sanos.vmdk). This image can be used to boot from
in PC emulators supporting vmdk format (VMware and Qemu).nmake bootcdimg directory (img\sanos.iso).
This requires mkisofs to be installed in the tools directory.nmake netbootimgimg directory (img\sanos.0).
This image can be used for making sanos boot over the network using PXE.nmake sdkdiskimg directory (img\sanos.vmdk).
This image contains sanos, the SDK for building applications under sanos, and the source
code for sanos.nmake minimalimg directory (img\minimal.flp)
with a minimal configuration of Sanos.
You can use the following versions of Visual Studio for building sanos:
nmake MSVC=7 sanos).nmake MSVC=8 sanos).nmake MSVC=9 sanos).nmake MSVC=10 sanos).You can also use the Express (i.e. "free") versions of Visual Studio.
You can also build sanos from within the Visual Studio IDE.
Go to to the build directory and double click sanos.sln.
After Visual Studio has started right click the image project and select 'Set as Startup
Project'.
Right click the sanos solution in the project pane and select 'Build Solution'.
This will compile and link all the code and create a floppy image sanos.flp)
in the img subdirectory.
The Makefile first builds the sanos specific win32 based tools:
mkdfs - File system creation toolsmkfloppy - Raw floppy writer utilitymkpart - Partition utilitydbggw - Remote debugger gatewaysow - Sanos-on-Windows libraryThese tools are placed in the tools directory. Next,
all the sanos executable files are compiled, linked, and placed in the
bin directory. The following components are built:
boot)osldr.dll)krnl.dll)*.sys)os.dll)libc.lib)*.exe)*.dll)The only expected build warning is in osldr:
LINK : warning LNK4096: /BASE value '0x10000' is invalid for Windows 95 and Windows 98; image may not run
The last step in the build process is to make a floppy disk boot image using the
mkdfs tool. The control file bootdisk.lst in the
build directory is used to create the image. This image (sanos.flp)
is placed in the img directory.