diff --git a/configure b/configure index 0497264153..ec3a705018 100755 --- a/configure +++ b/configure @@ -16,6 +16,7 @@ Usage: $0 options: --floppy Specifies the location of the floppy (device or image). + --debug Activates bochs serial debug emulation. --help Prints out this help. EOF } @@ -36,12 +37,14 @@ assertparam() # platform=`uname` floppy= +debug=0 # parse parameters # while [ $# \> 0 ] ; do case "$1" in --floppy) assertparam "$1" $#; floppy=$2; shift 2;; + --debug) debug=1; shift 1;; --help | -h) usage; exit 0;; *) echo Invalid argument: \`$1\'; exit 1;; esac @@ -87,3 +90,12 @@ cat << EOF > BuildConfig FLOPPY_PATH = "$floppy" ; GCC_PATH = ${GCC_PATH} ; 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 + diff --git a/src/kernel/core/arch/x86/arch_dbg_console.c b/src/kernel/core/arch/x86/arch_dbg_console.c index eefca3e762..abed139ed9 100755 --- a/src/kernel/core/arch/x86/arch_dbg_console.c +++ b/src/kernel/core/arch/x86/arch_dbg_console.c @@ -10,11 +10,13 @@ #include #include +#include + #include #include -#define BOCHS_E9_HACK 0 +//#define BOCHS_E9_HACK 0 // Select between COM1 and COM2 for debug output #define USE_COM1 1