OS/2 build instructions
The OS/2 port is not yet completed. These instructions are here for those who wish to help out.
Prerequisites on OS/2
- OS/2 running on Intel hardware... ;-)
- GCC 3.3.5 CSD3:
ftp://ftp.netlabs.org/pub/gcc/GCC-3.3.5-csd3.zip - Use wlink as the linker:
ftp://ftp.netlabs.org/pub/gcc/wl-hll-r1.zip
Make sure you setEMXOMFLD_LINKER=wl.exeandEMXOMFLD_TYPE=WLINK. - SDL:
ftp://ftp.netlabs.org/pub/sdl/sdl-1.2.10-bin-20060602.zip
Unpack this intotools/os2.x86/libsdl/v1.2.10-20060602/or alternatively set thePATH_SDK_LIBSDLenvironment variable to point to a directory where you unpacked the archive to. If you get compiler errors in the SDL headers, the patch at the bottom of this page will help you. - glib 1.2 + libIDL 0.6:
http://hobbes.nmsu.edu/cgi-bin/h-search?key=glibidl_20070521.zip
Unpack this intotools/os2.x86/glibidl/or alternatively setVBOX_PATH_GLIBandVBOX_PATH_LIBIDLenvironment variables to point to theglibidl/gcc335/subdirectory of the unpacked archive. - Checkout of the latest libc trunk.
- Latest Qt3 trunk:
http://svn.netlabs.org/repos/qt3/trunk/
Checkout this into a directory, build according to the build instructions and set theQTDIRenvironment variable to point to the directory you checked it out into. - The current BCC port requires that
\tmpexists. - Subversion: http://www.smedley.info/os2ports/index.php?page=subversion
- The xerces and xalan sources we use together with the appropriate kBuild makefiles can be found here: http://virtualbox.org/download/testcase/xerces-and-xalan-vbox-src.tar.bz2
Untar them into the VirtualBox trunk directory.
Building VirtualBox
- Load the gcc environment (gccenv.cmd).
- Make sure the environment variables
USERorUSERNAMEis set to something sensible. - Change to the root directory of the sources and execute
kBuild\envos2.cmd
SET VBOX_OSE=1- Create symbolic links to the kLdr and os2ddk:
kmk_ln -s <libc trunk>/libc/include/os2ddk src/VBox/Runtime/include/os2ddk kmk_ln -s <libc trunk>/kLdr src/VBox/Runtime/kLdr
- To build type
kmk
The default is to a release build, should you wish to do a debug or profile build addBUILD_TYPE=debugorBUILD_TYPE=profileas argument to kmk or set it as an environment variable.
Running VirtualBox
Since this is work in progress there are just testcases and a VBoxBFE with display problems on some graphics cards at this point.
You can either run it without loading the driver and therefore without rawmode enabled by executing set VBOX_SUPLIB_FAKE=fake on the command line. The alternative is to copy VBoxDrv.sys from out\os2.x86\release\bin to your boot drive and add a DEVICE=c:\VBoxDrv.sys statement to your config.sys.
If you like to see the VBoxBFE SDL window and immediately hit an assertion, do this:
- Change directory to
out\os2.x86\release\bin - Add this directory to the
BEGINLIBPATHvariable (full path, remember). - Execute
.\VBoxBFE.exe -m 64and you an BIOS error saying it can't read the boot drive. If you happen to have an knoppix iso or simliar around try boot it using the-cdromand-boot doptions.
The SDL patch
diff -rwu SDL/include/SDL_audio.h D:/coding/vbox/svn/trunk/tools/os2.x86/libsdl/v1.2.10-20060602/SDL/include/SDL_audio.h
--- SDL/include/SDL_audio.h Mon May 1 03:03:00 2006
+++ D:/coding/vbox/svn/trunk/tools/os2.x86/libsdl/v1.2.10-20060602/SDL/include/SDL_audio.h Sat Jan 13 06:47:04 2007
@@ -76,6 +76,8 @@
#define AUDIO_S16SYS AUDIO_S16MSB
#endif
+/* A filter callback */
+typedef void (SDLCALL * SDL_AudioCVTFilterCall)(struct SDL_AudioCVT *cvt, Uint16 format);
/* A structure to hold a set of audio conversion filters and buffers */
typedef struct SDL_AudioCVT {
@@ -88,7 +90,7 @@
int len_cvt; /* Length of converted audio buffer */
int len_mult; /* buffer must be len*len_mult big */
double len_ratio; /* Given len, final size is len*len_ratio */
- void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
+ SDL_AudioCVTFilterCall filters[10];
int filter_index; /* Current audio conversion function */
} SDL_AudioCVT;
diff -rwu SDL/include/SDL_config_os2.h D:/coding/vbox/svn/trunk/tools/os2.x86/libsdl/v1.2.10-20060602/SDL/include/SDL_config_os2.h
--- SDL/include/SDL_config_os2.h Mon May 1 03:03:00 2006
+++ D:/coding/vbox/svn/trunk/tools/os2.x86/libsdl/v1.2.10-20060602/SDL/include/SDL_config_os2.h Sat Jan 13 06:44:38 2007
@@ -27,6 +27,9 @@
/* This is a set of defines to configure the SDL features */
+#ifdef __GNUC__
+# include <stdint.h>
+#else
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
@@ -37,6 +40,7 @@
typedef unsigned long uintptr_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
+#endif
#define SDL_HAS_64BIT_TYPE 1

