Made bochs e9 hack switchable by configure
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@249 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,6 +16,7 @@ Usage: $0 <options>
|
|||||||
options:
|
options:
|
||||||
--floppy <floppy location> Specifies the location of the floppy
|
--floppy <floppy location> Specifies the location of the floppy
|
||||||
(device or image).
|
(device or image).
|
||||||
|
--debug Activates bochs serial debug emulation.
|
||||||
--help Prints out this help.
|
--help Prints out this help.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -36,12 +37,14 @@ assertparam()
|
|||||||
#
|
#
|
||||||
platform=`uname`
|
platform=`uname`
|
||||||
floppy=
|
floppy=
|
||||||
|
debug=0
|
||||||
|
|
||||||
# parse parameters
|
# parse parameters
|
||||||
#
|
#
|
||||||
while [ $# \> 0 ] ; do
|
while [ $# \> 0 ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--floppy) assertparam "$1" $#; floppy=$2; shift 2;;
|
--floppy) assertparam "$1" $#; floppy=$2; shift 2;;
|
||||||
|
--debug) debug=1; shift 1;;
|
||||||
--help | -h) usage; exit 0;;
|
--help | -h) usage; exit 0;;
|
||||||
*) echo Invalid argument: \`$1\'; exit 1;;
|
*) echo Invalid argument: \`$1\'; exit 1;;
|
||||||
esac
|
esac
|
||||||
@@ -87,3 +90,12 @@ cat << EOF > BuildConfig
|
|||||||
FLOPPY_PATH = "$floppy" ;
|
FLOPPY_PATH = "$floppy" ;
|
||||||
GCC_PATH = ${GCC_PATH} ;
|
GCC_PATH = ${GCC_PATH} ;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Generate bochs debug emulation hack header
|
||||||
|
cat << EOF > headers/private/kernel/arch/bochs_hack.h
|
||||||
|
// Bochs serial debug emulation hack definition
|
||||||
|
// Note: This file has been automatically generated by configure.
|
||||||
|
|
||||||
|
#define BOCHS_E9_HACK $debug
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,13 @@
|
|||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <arch/dbg_console.h>
|
#include <arch/dbg_console.h>
|
||||||
|
|
||||||
|
#include <arch/bochs_hack.h>
|
||||||
|
|
||||||
#include <stage2.h>
|
#include <stage2.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define BOCHS_E9_HACK 0
|
//#define BOCHS_E9_HACK 0
|
||||||
|
|
||||||
// Select between COM1 and COM2 for debug output
|
// Select between COM1 and COM2 for debug output
|
||||||
#define USE_COM1 1
|
#define USE_COM1 1
|
||||||
|
|||||||
Reference in New Issue
Block a user