summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/config
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@intel.com>2015-08-28 09:58:54 +0800
committerYang Zhang <yang.z.zhang@intel.com>2015-09-01 12:44:00 +0800
commite44e3482bdb4d0ebde2d8b41830ac2cdb07948fb (patch)
tree66b09f592c55df2878107a468a91d21506104d3f /qemu/roms/openbios/config
parent9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 (diff)
Add qemu 2.4.0
Change-Id: Ic99cbad4b61f8b127b7dc74d04576c0bcbaaf4f5 Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Diffstat (limited to 'qemu/roms/openbios/config')
-rw-r--r--qemu/roms/openbios/config/examples/amd64_config.xml61
-rw-r--r--qemu/roms/openbios/config/examples/ppc64_config.xml77
-rw-r--r--qemu/roms/openbios/config/examples/ppc_config.xml85
-rw-r--r--qemu/roms/openbios/config/examples/sparc32_config.xml74
-rw-r--r--qemu/roms/openbios/config/examples/sparc64_config.xml74
-rw-r--r--qemu/roms/openbios/config/examples/x86_config.xml63
-rwxr-xr-xqemu/roms/openbios/config/scripts/reldir10
-rwxr-xr-xqemu/roms/openbios/config/scripts/switch-arch427
-rw-r--r--qemu/roms/openbios/config/xml/config-c.xsl57
-rw-r--r--qemu/roms/openbios/config/xml/config-forth.xsl41
-rw-r--r--qemu/roms/openbios/config/xml/dictionary.xsl195
-rw-r--r--qemu/roms/openbios/config/xml/fcode.xsl48
-rw-r--r--qemu/roms/openbios/config/xml/makefile.xsl20
-rw-r--r--qemu/roms/openbios/config/xml/object.xsl327
-rw-r--r--qemu/roms/openbios/config/xml/rules.xml34
-rw-r--r--qemu/roms/openbios/config/xml/util.xsl80
-rw-r--r--qemu/roms/openbios/config/xml/xinclude.xsl43
17 files changed, 1716 insertions, 0 deletions
diff --git a/qemu/roms/openbios/config/examples/amd64_config.xml b/qemu/roms/openbios/config/examples/amd64_config.xml
new file mode 100644
index 000000000..e8904b78d
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/amd64_config.xml
@@ -0,0 +1,61 @@
+ <!-- kernel binaries (AMD64) -->
+ <option name="CONFIG_IMAGE_ELF_MULTIBOOT" type="boolean" value="true"/>
+
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_PORT" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="false"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFSP" type="boolean" value="true"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="true"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="true"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
+ <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="4"/>
+ <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_VGA" type="boolean" value="false"/>
diff --git a/qemu/roms/openbios/config/examples/ppc64_config.xml b/qemu/roms/openbios/config/examples/ppc64_config.xml
new file mode 100644
index 000000000..5f79c21cc
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/ppc64_config.xml
@@ -0,0 +1,77 @@
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_PORT" type="integer" value="0"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_OFMEM" type="boolean" value="true"/>
+ <option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="4"/>
+ <option name="CONFIG_VGA_WIDTH" type="integer" value="800"/>
+ <option name="CONFIG_VGA_HEIGHT" type="integer" value="600"/>
+ <option name="CONFIG_VGA_DEPTH" type="integer" value="8"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="true"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_MAC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="true"/>
+ <option name="CONFIG_HFSP" type="boolean" value="true"/>
+ <option name="CONFIG_ISO9660" type="boolean" value="true"/>
+ <option name="CONFIG_EXT2" type="boolean" value="true"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
+ <option name="CONFIG_RTAS" type="boolean" value="false"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
+ <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
+ <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
+ <option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/>
+ <option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/>
+ <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_ADB" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_MACIO" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_ESCC" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/>
+ <option name="CONFIG_FW_CFG_ADDR" type="integer" value="0xf0000510"/>
diff --git a/qemu/roms/openbios/config/examples/ppc_config.xml b/qemu/roms/openbios/config/examples/ppc_config.xml
new file mode 100644
index 000000000..4c14eb6c8
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/ppc_config.xml
@@ -0,0 +1,85 @@
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_PC_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_PC_KBD" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_PORT" type="integer" value="0"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_OFMEM" type="boolean" value="true"/>
+ <option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="4"/>
+ <option name="CONFIG_VGA_WIDTH" type="integer" value="800"/>
+ <option name="CONFIG_VGA_HEIGHT" type="integer" value="600"/>
+ <option name="CONFIG_VGA_DEPTH" type="integer" value="8"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_BOOTCODE" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="true"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_MAC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="true"/>
+ <option name="CONFIG_HFSP" type="boolean" value="true"/>
+ <option name="CONFIG_ISO9660" type="boolean" value="true"/>
+ <option name="CONFIG_EXT2" type="boolean" value="true"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_PPC_64BITSUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
+ <option name="CONFIG_RTAS" type="boolean" value="false"/>
+ <option name="CONFIG_LOCALS" type="boolean" value="true"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
+ <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
+ <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
+ <option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/>
+ <option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/>
+ <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_ADB" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_MACIO" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_ESCC" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/>
+ <option name="CONFIG_FW_CFG_ADDR" type="integer" value="0xf0000510"/>
+ <option name="CONFIG_DRIVER_USB" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_USB" type="boolean" value="false"/>
+ <option name="CONFIG_USB_HID" type="boolean" value="true"/>
diff --git a/qemu/roms/openbios/config/examples/sparc32_config.xml b/qemu/roms/openbios/config/examples/sparc32_config.xml
new file mode 100644
index 000000000..f2d6afc72
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/sparc32_config.xml
@@ -0,0 +1,74 @@
+ <!-- kernel binaries (SPARC32) -->
+ <option name="CONFIG_IMAGE_ELF_MULTIBOOT" type="boolean" value="true"/>
+
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VIDEO" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_ESP" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_SUN_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_OBP" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_IOMMU" type="boolean" value="false"/>
+ <option name="CONFIG_SERIAL_PORT" type="integer" value="0"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="9600"/>
+ <option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_OFMEM" type="boolean" value="true"/>
+ <option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="8"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="false"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_SUN_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFSP" type="boolean" value="false"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_EXT2FS" type="boolean" value="false"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_SBUS" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_SBUS" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_OBIO" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_ESP" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FLOPPY" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_FLOPPY" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_ESCC" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_ESCC_SUN" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/>
+ <option name="CONFIG_FW_CFG_ADDR" type="integer" value="0xd00000510ULL"/>
diff --git a/qemu/roms/openbios/config/examples/sparc64_config.xml b/qemu/roms/openbios/config/examples/sparc64_config.xml
new file mode 100644
index 000000000..a4e1336b4
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/sparc64_config.xml
@@ -0,0 +1,74 @@
+ <!-- kernel binaries (SPARC64) -->
+ <option name="CONFIG_IMAGE_ELF_MULTIBOOT" type="boolean" value="true"/>
+
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_SUN_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_SERIAL_PORT" type="integer" value="0"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_OFMEM" type="boolean" value="true"/>
+ <option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="8"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="false"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="false"/>
+ <option name="CONFIG_SUN_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFSP" type="boolean" value="false"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_EXT2FS" type="boolean" value="false"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
+ <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
+ <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_FLOPPY" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_FLOPPY" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_EBUS" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_PC_KBD" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_PC_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/>
+ <option name="CONFIG_FW_CFG_ADDR" type="integer" value="0x510"/>
diff --git a/qemu/roms/openbios/config/examples/x86_config.xml b/qemu/roms/openbios/config/examples/x86_config.xml
new file mode 100644
index 000000000..390eaba52
--- /dev/null
+++ b/qemu/roms/openbios/config/examples/x86_config.xml
@@ -0,0 +1,63 @@
+ <!-- kernel binaries (AMD64) -->
+ <option name="CONFIG_IMAGE_ELF_MULTIBOOT" type="boolean" value="true"/>
+
+ <!-- Kernel Debugging -->
+ <option name="CONFIG_DEBUG" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_BOOT" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_PORT" type="boolean" value="true"/>
+ <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
+ <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
+
+
+ <!-- Module Configuration -->
+ <option name="CONFIG_CMDLINE" type="boolean" value="true"/>
+ <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
+ <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
+ <option name="CONFIG_LOADER_FORTH" type="boolean" value="true"/>
+ <option name="CONFIG_LOADER_XCOFF" type="boolean" value="false"/>
+
+ <!-- Filesystem Configuration -->
+ <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
+ <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
+ <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
+ <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFSP" type="boolean" value="false"/>
+ <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_UFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_ISO9660" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
+
+ <!-- Miscellaneous -->
+ <option name="CONFIG_LINUXBIOS" type="boolean" value="true"/>
+
+ <!-- Drivers -->
+ <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
+ <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
+ <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="4"/>
+ <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
+ <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
+ <option name="CONFIG_DRIVER_FLOPPY" type="boolean" value="false"/>
+ <option name="CONFIG_DEBUG_FLOPPY" type="boolean" value="false"/>
diff --git a/qemu/roms/openbios/config/scripts/reldir b/qemu/roms/openbios/config/scripts/reldir
new file mode 100755
index 000000000..50f384ec8
--- /dev/null
+++ b/qemu/roms/openbios/config/scripts/reldir
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PREF="."
+for x in 0 1 2 3 4 5 6 7 ; do
+ test -f $PREF/config/configure.in && break
+ PREF="../$PREF"
+done
+ROOT=$( echo $(pwd) | sed "s,\(//*[^/][^/]*\)\{$x\}/*\$,," )
+RELNAME=$( echo $(pwd) | sed "s,^$ROOT/*,,g" )
+echo $RELNAME
diff --git a/qemu/roms/openbios/config/scripts/switch-arch b/qemu/roms/openbios/config/scripts/switch-arch
new file mode 100755
index 000000000..d5e2f7710
--- /dev/null
+++ b/qemu/roms/openbios/config/scripts/switch-arch
@@ -0,0 +1,427 @@
+#!/bin/sh
+
+#
+# MOLPATH is needed if you want to build openbios-mol.elf
+#
+MOLPATH=$HOME/mol-0.9.71
+
+if [ x"$1" = x -o "$1" = "-help" ]; then
+ printf "Usage:\n $0 [arch-config]...\n"
+ printf "arch-config values supported for native or cross compiled builds:\n"
+ printf " amd64, ppc, sparc32, sparc64, x86\n\n"
+ printf "Add \"unix-\" prefix to compile openbios-unix executable (native only)\n"
+ printf "Add \"builtin-\" prefix to compile openbios-builtin executables\n\n"
+ printf "Without prefixes, builtin and unix targets are selected\n\n"
+ printf "Special targets: mol-ppc briq-ppc pearpc-ppc qemu-ppc qemu-ppc64 xbox-x86\n\n"
+ printf "Example: $0 builtin-sparc32 unix-amd64 builtin-amd64\n"
+ exit 0
+fi
+
+crosscflags()
+{
+ host=$1
+ target=$2
+
+ if test "$host" = "powerpc" -o "$host" = "ppc" \
+ -o "$host" = "mips" -o "$host" = "s390" \
+ -o "$host" = "sparc32" -o "$host" = "sparc64" \
+ -o "$host" = "m68k" -o "$host" = "armv4b"; then
+ hostbigendian="yes"
+ else
+ hostbigendian="no"
+ fi
+
+# host long bits test
+ if test "$host" = "sparc64" -o "$host" = "ia64" \
+ -o "$host" = "amd64" -o "$host" = "x86_64" \
+ -o "$host" = "alpha"; then
+ hostlongbits="64"
+ else
+ hostlongbits="32"
+ fi
+
+ if test "$target" = "powerpc" -o "$target" = "ppc" \
+ -o "$target" = "powerpc64" -o "$target" = "ppc64" \
+ -o "$target" = "mips" -o "$target" = "s390" \
+ -o "$target" = "sparc32" -o "$target" = "sparc64" \
+ -o "$target" = "m68k" -o "$target" = "armv4b"; then
+ targetbigendian="yes"
+ else
+ targetbigendian="no"
+ fi
+
+# target long bits test
+ if test "$target" = "sparc64" -o "$target" = "ia64" \
+ -o "$target" = "amd64" -o "$target" = "x86_64" \
+ -o "$target" = "powerpc64" -o "$target" = "ppc64" \
+ -o "$target" = "alpha"; then
+ targetlongbits="64"
+ else
+ targetlongbits="32"
+ fi
+
+ if test "$targetbigendian" = "$hostbigendian"; then
+ cflags="-USWAP_ENDIANNESS"
+ else
+ cflags="-DSWAP_ENDIANNESS"
+ fi
+
+ if test "$targetlongbits" = "$hostlongbits"; then
+ cflags="$cflags -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH"
+ elif test "$targetlongbits" -lt "$hostlongbits"; then
+ cflags="$cflags -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH"
+ else
+ cflags="$cflags -DNATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH"
+ fi
+
+ if test "$target" = "sparc64" -o "$target" = "ia64" \
+ -o "$target" = "amd64" -o "$target" = "x86_64" \
+ -o "$target" = "alpha"; then
+ if test "$host" = "x86"; then
+ cflags="$cflags -DNEED_FAKE_INT128_T"
+ elif test "$host" = "arm"; then
+ cflags="$cflags -DNEED_FAKE_INT128_T"
+ elif test "$host" = "ppc" -a `uname -s` = "Darwin"; then
+ cflags="$cflags -DNEED_FAKE_INT128_T"
+ fi
+ fi
+
+ CROSSCFLAGS=$cflags
+}
+
+archname()
+{
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
+ -e "s/Power Macintosh/ppc/"`
+}
+
+select_prefix()
+{
+ TARGETS="${1}-unknown-linux-gnu- ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-"
+
+ if [ x"$CROSS_COMPILE" != "x" ]; then
+ TARGETS=$CROSS_COMPILE
+ fi
+
+ for TARGET in $TARGETS
+ do
+ if type ${TARGET}gcc > /dev/null 2>&1
+ then
+ return
+ fi
+ done
+ if [ "$ARCH" = "$HOSTARCH" ]; then
+ return
+ fi
+ echo "ERROR: no ${1} cross-compiler found !" 1>&2
+ exit 1
+}
+
+config_set_boolean()
+{
+ option=`echo $1 | tr a-z A-Z`
+ echo "<option name=\"$option\" type=\"boolean\" value=\"true\" />"
+}
+
+exists()
+{
+ type "$1" >/dev/null 2>&1
+}
+
+
+SRCDIR=`dirname "$0"`/../..
+BUILDDIR=`pwd`
+
+# make source path absolute
+SRCDIR=`cd "$SRCDIR"; pwd`
+
+if test "x$HOSTARCH" = "x"; then
+ archname
+fi
+
+VERSION=`head $SRCDIR/VERSION`
+
+echo "Configuring OpenBIOS on $HOSTARCH for $*"
+
+if exists toke; then
+ :
+else
+ echo "Unable to locate toke executable from the fcode-utils package - aborting"
+ exit 1
+fi
+
+target_list=""
+for target in $*; do
+ case $target in
+ unix-*|builtin-*|plain-*|mol-ppc|briq-ppc|pearpc-ppc|qemu-ppc|qemu-ppc64|xbox-x86)
+ target_list="$target_list $target"
+ ;;
+ cross-*)
+ echo "\"cross-\" prefix is no longer needed"
+ target=`echo $target | sed s/cross-//g`
+ target_list="$target_list builtin-$target"
+ ;;
+ *)
+ #default: build builtin and if possible, unix target
+ target_list="$target_list builtin-$target unix-$target"
+ ;;
+ esac
+done
+
+arch_list=""
+for target in $target_list; do
+ arch=`echo $target | sed s/.*-//g`
+ if ! test -f $SRCDIR/config/examples/${arch}_config.xml; then
+ echo "Cannot find $SRCDIR/config/examples/${arch}_config.xml" >&2
+ exit 1
+ fi
+ if ! echo $arch_list | grep -q "$arch"; then
+ arch_list="$arch_list $arch"
+ fi
+done
+
+for ARCH in $arch_list; do
+ unix="no"
+ builtin="no"
+ plain="no"
+ mol="no"
+ briq="no"
+ pearpc="no"
+ qemu="no"
+ xbox="no"
+ cross="no"
+
+ for target in $target_list; do
+ case $target in
+ *-$ARCH)
+ :
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ case $target in
+ mol-ppc)
+ mol="yes"
+ ;;
+ briq-ppc)
+ briq="yes"
+ ;;
+ pearpc-ppc)
+ pearpc="yes"
+ ;;
+ builtin-ppc|qemu-ppc|builtin-ppc64|qemu-ppc64)
+ qemu="yes"
+ ;;
+ xbox-x86)
+ xbox="yes"
+ ;;
+ builtin-sparc32)
+ builtin="yes"
+ qemu="yes"
+ ;;
+ builtin-sparc64)
+ builtin="yes"
+ qemu="yes"
+ ;;
+ unix-*)
+ if [ "$ARCH" != "$HOSTARCH" ]; then
+ # Can't cross compile Unix target
+ continue
+ fi
+ unix="yes"
+ ;;
+ builtin-*)
+ builtin="yes"
+ ;;
+ plain-*)
+ plain="yes"
+ ;;
+ esac
+ done
+
+ BASEARCH=$ARCH
+ case $ARCH in
+ amd64)
+ select_prefix x86_64
+ CFLAGS="-fno-builtin"
+ AS_FLAGS=
+ ;;
+
+ ppc)
+ select_prefix powerpc
+ if [ "$unix" = "no" ]; then
+ CFLAGS="-m32 -msoft-float -fno-builtin-bcopy -fno-builtin-log2"
+ AS_FLAGS="-m32"
+ else
+ CFLAGS="-fno-builtin"
+ AS_FLAGS=
+ fi
+ ;;
+
+ ppc64)
+ select_prefix powerpc64
+ CFLAGS="-Wa,-a64 -m64 -msoft-float -fno-builtin"
+ AS_FLAGS="-Wa,-a64"
+ BASEARCH=ppc
+ ;;
+
+ sparc32)
+ select_prefix sparc
+ CFLAGS="-Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc -fno-builtin"
+ AS_FLAGS="-Wa,-xarch=v8 -Wa,-32"
+ ;;
+
+ sparc64)
+ select_prefix sparc64
+ CFLAGS="-Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany -fno-builtin"
+ AS_FLAGS="-Wa,-xarch=v9b -Wa,-64"
+ ;;
+
+ x86)
+ select_prefix i486
+ CFLAGS="-fno-builtin -m32"
+ AS_FLAGS="-Wa,-32"
+ ;;
+ esac
+ if [ "$ARCH" != "$HOSTARCH" -o `uname -s` = "Darwin" ]; then
+ cross="yes"
+ fi
+ crosscflags $HOSTARCH $ARCH
+ OBJDIR=$BUILDDIR/obj-$ARCH
+ ODIRS="$ODIRS $OBJDIR"
+
+ printf "Initializing build tree $OBJDIR..."
+ rm -rf "$OBJDIR"
+ mkdir "$OBJDIR"
+ mkdir -p $OBJDIR/target
+ mkdir -p $OBJDIR/target/include
+ mkdir -p $OBJDIR/target/arch
+ mkdir -p $OBJDIR/target/arch/unix
+ mkdir -p $OBJDIR/target/arch/$ARCH
+ mkdir -p $OBJDIR/target/libgcc
+ mkdir -p $OBJDIR/target/kernel
+ mkdir -p $OBJDIR/target/libopenbios
+ mkdir -p $OBJDIR/target/packages
+ mkdir -p $OBJDIR/target/fs
+ mkdir -p $OBJDIR/target/fs/grubfs
+ mkdir -p $OBJDIR/target/fs/hfs
+ mkdir -p $OBJDIR/target/fs/hfsplus
+ mkdir -p $OBJDIR/target/fs/iso9660
+ mkdir -p $OBJDIR/target/fs/ext2
+ mkdir -p $OBJDIR/target/drivers
+ mkdir -p $OBJDIR/target/libc
+ mkdir -p $OBJDIR/host/include
+ mkdir -p $OBJDIR/host/kernel
+ mkdir -p $OBJDIR/forth
+ ln -s $SRCDIR/include/arch/$BASEARCH $OBJDIR/target/include/asm
+ #compile the host binary with target settings instead
+ #ln -s $SRCDIR/include/arch/$HOSTARCH $OBJDIR/host/include/asm
+ if [ "$mol" = "yes" ]; then
+ printf "\nUsing MOL path $MOLPATH...\n"
+ mkdir -p $OBJDIR/target/arch/ppc/mol
+ ln -s $MOLPATH/src/shared/osi_calls.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/shared/osi.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/shared/prom.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/include/boothelper_sh.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/include/video_sh.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/include/pseudofs_sh.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/include/kbd_sh.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/drivers/disk/include/scsi_sh.h $OBJDIR/target/include/
+ ln -s $MOLPATH/src/drivers/disk/include/ablk_sh.h $OBJDIR/target/include/
+ fi
+ if [ "$briq" = "yes" ]; then
+ mkdir -p $OBJDIR/target/arch/ppc/briq
+ fi
+ if [ "$pearpc" = "yes" ]; then
+ mkdir -p $OBJDIR/target/arch/ppc/pearpc
+ fi
+ if [ "$qemu" = "yes" ]; then
+ mkdir -p $OBJDIR/target/arch/ppc/qemu
+ fi
+ if [ "$xbox" = "yes" ]; then
+ mkdir -p $OBJDIR/target/arch/x86/xbox
+ fi
+ echo "ok."
+
+ ODIR=$OBJDIR
+
+ printf "Creating target config.mak..."
+ echo "ARCH=$ARCH" > $ODIR/config.mak
+ if [ "$cross" = "yes" ]; then
+ echo "TARGET=$TARGET" >> $ODIR/config.mak
+ fi
+ echo "CFLAGS=$CFLAGS" >> $ODIR/config.mak
+ echo "AS_FLAGS=$AS_FLAGS" >> $ODIR/config.mak
+ echo "HOSTARCH?=$HOSTARCH" >> $ODIR/config.mak
+ echo "CROSSCFLAGS=$CROSSCFLAGS" >> $ODIR/config.mak
+ echo "VERSION=\"$VERSION\"" >> $ODIR/config.mak
+ echo "SRCDIR=$SRCDIR" >> $ODIR/config.mak
+ echo "ok."
+
+ printf "Creating target rules.mak..."
+ ln -s $SRCDIR/config/xml/rules.xml $ODIR/rules.xml
+ echo "<?xml version=\"1.0\"?><config>" > $ODIR/config.xml
+ # Generic
+ config_set_boolean CONFIG_$ARCH >> $ODIR/config.xml
+ if [ "$BASEARCH" != "$ARCH" ]; then
+ config_set_boolean CONFIG_$BASEARCH >> $ODIR/config.xml
+ fi
+ if [ "$mol" = "yes" ]; then
+ config_set_boolean CONFIG_MOL >> $ODIR/config.xml
+ fi
+ if [ "$briq" = "yes" ]; then
+ config_set_boolean CONFIG_BRIQ >> $ODIR/config.xml
+ fi
+ if [ "$pearpc" = "yes" ]; then
+ config_set_boolean CONFIG_PEARPC >> $ODIR/config.xml
+ fi
+ if [ "$qemu" = "yes" ]; then
+ config_set_boolean CONFIG_QEMU >> $ODIR/config.xml
+ fi
+ if [ "$xbox" = "yes" ]; then
+ config_set_boolean CONFIG_XBOX >> $ODIR/config.xml
+ fi
+ if [ "$targetbigendian" = "yes" ]; then
+ config_set_boolean CONFIG_BIG_ENDIAN >> $ODIR/config.xml
+ else
+ config_set_boolean CONFIG_LITTLE_ENDIAN >> $ODIR/config.xml
+ fi
+ # Kernel binaries
+ if [ "$plain" = "yes" ]; then
+ config_set_boolean CONFIG_IMAGE_ELF >> $ODIR/config.xml
+ fi
+ if [ "$builtin" = "yes" ]; then
+ config_set_boolean CONFIG_IMAGE_ELF_EMBEDDED >> $ODIR/config.xml
+ fi
+ # Build hosted Unix binary?
+ if [ "$unix" = "yes" ]; then
+ config_set_boolean CONFIG_HOST_UNIX >> $ODIR/config.xml
+ #config_set_boolean CONFIG_UNIX_QT >> $ODIR/config.xml
+ #config_set_boolean CONFIG_PLUGINS >> $ODIR/config.xml
+ fi
+ cat $SRCDIR/config/examples/${ARCH}_config.xml >> $ODIR/config.xml
+
+ cd $ODIR
+ echo "</config>" >> $ODIR/config.xml
+ ln -s $SRCDIR/Makefile.target $ODIR/Makefile
+ xsltproc $SRCDIR/config/xml/xinclude.xsl $SRCDIR/build.xml > $ODIR/build-full.xml
+ xsltproc $SRCDIR/config/xml/makefile.xsl $ODIR/build-full.xml > $ODIR/rules.mak
+ echo "ok."
+ printf "Creating config files..."
+ xsltproc $SRCDIR/config/xml/config-c.xsl $ODIR/config.xml > $ODIR/host/include/autoconf.h
+ xsltproc $SRCDIR/config/xml/config-c.xsl $ODIR/config.xml > $ODIR/target/include/autoconf.h
+ xsltproc $SRCDIR/config/xml/config-forth.xsl $ODIR/config.xml > $ODIR/forth/config.fs
+ echo "ok."
+
+ cd $BUILDDIR
+done
+
+if [ "$SRCDIR" != "$BUILDDIR" ]; then
+ ln -s $SRCDIR/Makefile $BUILDDIR
+fi
+
+echo "ODIRS=$ODIRS" >> $BUILDDIR/config-host.mak
+echo "TARGETS=$arch_list" >> $BUILDDIR/config-host.mak
diff --git a/qemu/roms/openbios/config/xml/config-c.xsl b/qemu/roms/openbios/config/xml/config-c.xsl
new file mode 100644
index 000000000..62ed85446
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/config-c.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template match="/">
+ <!-- add comment -->
+ <xsl:text>/*&#10; * Automatically generated C config: don't edit&#10; */&#10;&#10;</xsl:text>
+
+ <!-- scan all config options -->
+ <xsl:for-each select="config/option">
+ <xsl:choose>
+
+ <!-- config option "boolean" -->
+ <xsl:when test="@type='boolean'">
+ <xsl:choose>
+ <xsl:when test="@value='true'">
+ <xsl:text>#define </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> 1</xsl:text>
+ </xsl:when>
+ <xsl:when test="@value='false'">
+ <xsl:text>#undef </xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">&#10;ERROR: boolean configuration option '<xsl:value-of select="@name"/>' has unsupported value '<xsl:value-of select="@type"/>' instead of [true|false].</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <!-- config option "integer" -->
+ <xsl:when test="@type='integer'">
+ <xsl:text>#define </xsl:text>
+ <xsl:value-of select="@name"/><xsl:text> </xsl:text>
+ <xsl:value-of select="@value"/>
+ </xsl:when>
+
+ <!-- config option "string" -->
+ <xsl:when test="@type='string'">
+ <xsl:text>#define </xsl:text>
+ <xsl:value-of select="@name"/><xsl:text> </xsl:text> "<xsl:value-of select="@value"/>" </xsl:when>
+
+ <!-- unsupported config option: bail out -->
+ <xsl:otherwise>
+ <xsl:message terminate="yes">&#10;ERROR: configuration option '<xsl:value-of select="@name"/> has unsupported type '<xsl:value-of select="@type"/>'.</xsl:message>
+ </xsl:otherwise>
+
+ </xsl:choose>
+
+ <xsl:text>&#10;</xsl:text>
+ </xsl:for-each>
+
+ </xsl:template>
+
+ <xsl:output method="text" indent="no" encoding="iso-8859-15"/>
+
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/config-forth.xsl b/qemu/roms/openbios/config/xml/config-forth.xsl
new file mode 100644
index 000000000..cace0deb9
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/config-forth.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template match="/">
+ <xsl:for-each select="config/option">
+ <xsl:choose>
+ <xsl:when test="@type='boolean'">
+ <xsl:choose>
+ <xsl:when test="@value='true'">
+ <xsl:text>[DEFINE] </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ <xsl:when test="@value='false'">
+ <!-- nothing to do -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">&#10;ERROR: boolean configuration option '<xsl:value-of select="@name"/>' has unsupported value '<xsl:value-of select="@type"/>' instead of [true|false].</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="@type='integer'">
+ <!-- this makes absolutely no sense but the old code did it as well -->
+ <xsl:text>[DEFINE] </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ <!-- config option "string" -->
+ <xsl:when test="@type='string'">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">&#10;ERROR: configuration option '<xsl:value-of select="@name"/>' has unsupported type '<xsl:value-of select="@type"/>'.</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:output method="text" indent="no" encoding="iso-8859-15"/>
+
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/dictionary.xsl b/qemu/roms/openbios/config/xml/dictionary.xsl
new file mode 100644
index 000000000..61f62d84c
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/dictionary.xsl
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template match="/" mode="dictionaries">
+
+ <xsl:text>&#10;#&#10;# dictionary rules&#10;#&#10;&#10;</xsl:text>
+
+ <!-- Set all dictionary source lists empty -->
+ <xsl:for-each select="//dictionary">
+ <xsl:sort select="@name"/>
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions = 0">
+
+ <xsl:if test="not(preceding::dictionary/@name = @name)">
+ <xsl:value-of select="@name"/>
+ <xsl:text>-DICTIONARY :=&#10;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- Add all forth source files to their dictionaries -->
+ <xsl:for-each select="//dictionary/object">
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="dictname">
+ <xsl:value-of select="parent::*/@name"/>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+
+ <xsl:variable name="source"><xsl:value-of select="@source" /></xsl:variable>
+
+ <!-- Handle just Forth source, not FCode -->
+ <xsl:if test="not(@target = 'fcode')">
+ <xsl:value-of select="$dictname"/><xsl:text>-DICTIONARY:=$(</xsl:text>
+ <xsl:value-of select="$dictname"/><xsl:text>-DICTIONARY) </xsl:text>
+
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="$source"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:text>&#10;&#10;</xsl:text>
+
+ <!-- Create targets for all dictionaries -->
+ <xsl:for-each select="//dictionary">
+ <xsl:sort select="@name"/>
+
+ <xsl:variable name="outer-conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$outer-conditions = 0">
+
+ <xsl:if test="not(preceding::dictionary/@name = @name)">
+ <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
+ <xsl:variable name="init">
+ <xsl:value-of select="(//dictionary[@name=$name]/attribute::init)[last()]"/>
+ </xsl:variable>
+ <!-- dictionary name and dependencies -->
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="@name"/><xsl:text>.dict: $(</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>-DICTIONARY) $(ODIR)/forthstrap</xsl:text>
+ <xsl:if test="$init!=''">
+ <xsl:text> $(ODIR)/</xsl:text><xsl:value-of select="$init"/><xsl:text>.dict</xsl:text>
+ </xsl:if>
+
+ <!-- Check for Fcode dependency -->
+ <xsl:for-each select="object[@target = 'fcode']">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions = 0">
+
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:value-of select="@source"/>
+
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:text>&#10;</xsl:text>
+ <!-- rule -->
+ <xsl:text>&#9;$(call quiet-command,$(ODIR)/forthstrap</xsl:text>
+ <xsl:for-each select="//dictionary[@name = @name]">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions = 0">
+ <xsl:text> -I</xsl:text>
+ <xsl:text>$(SRCDIR)/</xsl:text>
+ <xsl:value-of select="$path"/>
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- needed to locate files with full path -->
+ <xsl:text> -I$(SRCDIR)</xsl:text>
+ <!-- needed to include config and build date -->
+ <xsl:text> -I$(ODIR)/forth</xsl:text>
+
+ <xsl:text> -D $@</xsl:text>
+ <xsl:text> -M $@.d</xsl:text>
+ <xsl:if test="$init!=''">
+ <xsl:text> -d $(ODIR)/</xsl:text><xsl:value-of select="$init"/><xsl:text>.dict</xsl:text>
+ </xsl:if>
+ <xsl:text> -c $@-console.log</xsl:text>
+ <xsl:text> $(</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>-DICTIONARY)," GEN $(TARGET_DIR)$@")&#10;&#10;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- Create dictionaries target containing all dictionaries -->
+ <xsl:text>dictionaries: </xsl:text>
+ <xsl:for-each select="//dictionary">
+ <xsl:sort select="@name"/>
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions = 0">
+
+ <xsl:if test="not(preceding::dictionary/@name = @name)">
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="@name"/><xsl:text>.dict </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/fcode.xsl b/qemu/roms/openbios/config/xml/fcode.xsl
new file mode 100644
index 000000000..ccc7e6e84
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/fcode.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template match="/" mode="fcode">
+
+ <xsl:text>&#10;#&#10;# fcode rules&#10;#&#10;&#10;</xsl:text>
+
+ <!-- Create linker targets for FCode roms -->
+ <xsl:for-each select="//fcode">
+ <xsl:variable name="outer-conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$outer-conditions = 0">
+ <xsl:if test="(ancestor-or-self::*)">
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- Fcode name -->
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>:</xsl:text>
+
+ <xsl:text> $(SRCDIR)/</xsl:text>
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="@source"/>
+
+ <!-- FIXME this requires strict spaces in rules.xml -->
+ <xsl:value-of select="document('rules.xml',.)//rule[@target='host'][@entity='fcode']"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/makefile.xsl b/qemu/roms/openbios/config/xml/makefile.xsl
new file mode 100644
index 000000000..56c494cc6
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/makefile.xsl
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:include href="util.xsl"/>
+ <xsl:include href="dictionary.xsl"/>
+ <xsl:include href="object.xsl"/>
+ <xsl:include href="fcode.xsl"/>
+
+ <xsl:template match="/">
+ <xsl:value-of select="document('rules.xml',.)/rules/pre"/>
+ <xsl:apply-templates select="." mode="dictionaries"/>
+ <xsl:apply-templates select="." mode="fcode"/>
+ <xsl:apply-templates select="." mode="objects"/>
+ </xsl:template>
+
+ <xsl:output method="text" indent="no" encoding="iso-8859-15"/>
+
+</xsl:stylesheet>
+
diff --git a/qemu/roms/openbios/config/xml/object.xsl b/qemu/roms/openbios/config/xml/object.xsl
new file mode 100644
index 000000000..cf521f59f
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/object.xsl
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- wrapper that calls "objects" with parameters -->
+ <xsl:template match="/" mode="objects">
+ <xsl:call-template name="objects">
+ <xsl:with-param name="target" select="'host'"/>
+ </xsl:call-template>
+ <xsl:call-template name="objects">
+ <xsl:with-param name="target" select="'target'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- main work happens here -->
+ <xsl:template name="objects">
+
+ <xsl:param name="target"/>
+
+ <xsl:text>&#10;#&#10;# </xsl:text>
+ <xsl:value-of select="$target"/>
+ <xsl:text> compiler rules&#10;#&#10;&#10;</xsl:text>
+
+ <!-- create rules for all compile objects -->
+ <xsl:for-each select="//object[(ancestor-or-self::*)[@target = $target]]">
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+
+ <!-- full path of object file -->
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="$target"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="substring-before(@source,'.')"/>
+ <xsl:text>.o: </xsl:text>
+
+ <!-- path of source file -->
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="@source"/>
+
+
+ <xsl:choose>
+ <xsl:when test="child::rule">
+ <xsl:value-of select="child::rule"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="@flags!=''">
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='1']"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@flags"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='2']"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- FIXME this requires strict spaces in rules.xml -->
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- Create linker targets for all executables -->
+ <xsl:for-each select="//executable">
+
+ <xsl:variable name="outer-conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$outer-conditions = 0">
+ <xsl:if test="(ancestor-or-self::*)[@target = $target]">
+
+ <!-- executable name -->
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>:</xsl:text>
+
+ <!-- add all objects -->
+ <xsl:for-each select="object">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:value-of select="$target"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="substring-before(@source,'.')"/>
+ <xsl:text>.o</xsl:text>
+
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- external objects last -->
+ <xsl:for-each select="external-object">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:value-of select="@source"/>
+ </xsl:if>
+
+ </xsl:for-each>
+
+ <!-- print executable rule -->
+ <xsl:choose>
+ <xsl:when test="child::rule">
+ <xsl:value-of select="child::rule"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- FIXME this requires strict spaces in rules.xml -->
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='executable']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- create linker targets for all libs -->
+ <xsl:for-each select="//library">
+ <xsl:sort select="@name"/>
+
+ <xsl:variable name="outer-conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$outer-conditions = 0">
+
+
+ <xsl:if test="(ancestor-or-self::*)[@target = $target]">
+
+ <xsl:if test="not(preceding::library/@name = @name)">
+
+ <!-- output library name -->
+ <xsl:text>$(ODIR)/lib</xsl:text>
+ <xsl:value-of select="@name"/>
+
+ <xsl:choose>
+ <xsl:when test="@type='static'">
+ <xsl:text>.a</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='dynamic'">
+ <xsl:text>.so</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:text>: </xsl:text>
+
+ <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
+
+ <!-- enumerate all objects for library target -->
+ <xsl:for-each select="//library[@name=$name]/object">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+
+ <xsl:variable name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:text>$(ODIR)/</xsl:text>
+ <xsl:value-of select="$target"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="$path"/>
+ <xsl:value-of select="substring-before(@source,'.')"/>
+ <xsl:text>.o </xsl:text>
+
+ </xsl:if>
+
+ </xsl:for-each>
+
+ <!-- external objects last -->
+ <xsl:for-each select="external-object">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$conditions=0">
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:value-of select="@source"/>
+ </xsl:if>
+
+ </xsl:for-each>
+
+
+ <!-- FIXME this requires strict spaces in rules.xml -->
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='library']"/>
+
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+
+ <!-- create libs rule for all libraries -->
+ <xsl:value-of select="$target"/>
+ <xsl:text>-libraries: </xsl:text>
+
+ <!-- don't build unused libraries
+ <xsl:for-each select="//library">
+ <xsl:if test="object[(ancestor-or-self::*)[@target = $target]]">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="$conditions=0">
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:text>lib</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:choose>
+ <xsl:when test="@type='static'">
+ <xsl:text>.a</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='dynamic'">
+ <xsl:text>.so</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ -->
+ <xsl:text>&#10;</xsl:text>
+
+ <!-- create exe rule for all executables -->
+ <xsl:value-of select="$target"/>
+ <xsl:text>-executables: </xsl:text>
+
+ <xsl:for-each select="//executable">
+ <xsl:if test="(ancestor-or-self::*)[@target = $target]">
+
+ <xsl:variable name="conditions">
+ <xsl:text>0</xsl:text>
+ <xsl:for-each select="(ancestor-or-self::*)[@condition!='']">
+ <xsl:call-template name="resolve-condition">
+ <xsl:with-param select="@condition" name="expression"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="$conditions=0">
+ <xsl:text> $(ODIR)/</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>&#10;</xsl:text>
+
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/rules.xml b/qemu/roms/openbios/config/xml/rules.xml
new file mode 100644
index 000000000..29a720a06
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/rules.xml
@@ -0,0 +1,34 @@
+<rules>
+ <!-- host compiler build rules -->
+<rule target="host" entity="executable">
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) -o $@ $^," HOSTCC $(TARGET_DIR)$@")
+</rule>
+<rule target="host" entity="object">
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $&lt;," HOSTCC $(TARGET_DIR)$@")
+</rule>
+<rule target="host" entity="object" extracflags="1">
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES)</rule>
+<rule target="host" entity="object" extracflags="2"> -c -o $@ $&lt;," HOSTCC $(TARGET_DIR)$@")
+</rule>
+<rule target="host" entity="library">
+ $(call quiet--command,$(AR) cru $@ $^; $(RANLIB) $@," HOSTAR $(TARGET_DIR)$@")
+</rule>
+<rule target="host" entity="fcode">
+ $(call quiet-command,$(TOKE) -o $@ $^," TOKE $(TARGET_DIR)$@")
+</rule>
+
+ <!-- target/cross compiler build rules -->
+<rule target="target" entity="executable">
+ $(call quiet-command,$(CC) $(CFLAGS) -o $@ $^," CC $(TARGET_DIR)$@")
+</rule>
+<rule target="target" entity="object">
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $&lt;," CC $(TARGET_DIR)$@")
+</rule>
+<rule target="target" entity="object" extracflags="1">
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES)</rule>
+<rule target="target" entity="object" extracflags="2"> -c -o $@ $&lt;," CC $(TARGET_DIR)$@")
+</rule>
+<rule target="target" entity="library">
+ $(call quiet-command,$(AR) cru $@ $^; $(RANLIB) $@," AR $(TARGET_DIR)$@")
+</rule>
+</rules>
diff --git a/qemu/roms/openbios/config/xml/util.xsl b/qemu/roms/openbios/config/xml/util.xsl
new file mode 100644
index 000000000..3b583b9ac
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/util.xsl
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-15" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- get-dirname: get directory part of file $path-->
+
+<!-- call me with:
+ <xsl:param name="path">
+ <xsl:for-each select="ancestor::build">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="@base" name="path"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:param>
+ -->
+
+<xsl:template name="get-dirname">
+ <xsl:param name="path"/>
+ <xsl:choose>
+ <xsl:when test="contains($path, '/')">
+ <xsl:choose>
+ <xsl:when test="substring($path, string-length($path)) != '/'">
+ <xsl:call-template name="get-dirname">
+ <xsl:with-param select="substring($path, 1, string-length($path)-1)" name="path"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$path"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ No valid relative path
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- return value: 0=found, 1=not found -->
+<xsl:template name="resolve-condition">
+ <xsl:param name="expression"/>
+ <xsl:param name="confexpr">CONFIG_<xsl:value-of select="$expression"/></xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$expression!=''">
+ <xsl:variable name="value"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::value"/></xsl:variable>
+ <xsl:variable name="type"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::type"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$type='boolean'">
+ <xsl:choose>
+ <xsl:when test="$value='true'"><xsl:text>0</xsl:text></xsl:when>
+ <xsl:when test="$value='false'"><xsl:text>1</xsl:text></xsl:when>
+ <!-- boolean but no value is false -->
+ <xsl:when test="$value=''"><xsl:text>1</xsl:text></xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">Error:<xsl:value-of select="$confexpr"/> has no valid value '<xsl:value-of select="$value"/>'.</xsl:message>
+ </xsl:otherwise>
+
+ </xsl:choose>
+ </xsl:when>
+ <!-- if it doesn't exist, it is false -->
+ <xsl:when test="$type=''"><xsl:text>1</xsl:text></xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">Error:<xsl:value-of select="$confexpr"/> is not a boolean value ('<xsl:value-of select="$type"/>').</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- debug - ->
+ <xsl:message>
+ <xsl:value-of select="$confexpr"/> = <xsl:value-of select="$value"/>
+ </xsl:message>
+ <!- - -->
+ </xsl:when>
+ <!-- if no expression is there we return true -->
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/qemu/roms/openbios/config/xml/xinclude.xsl b/qemu/roms/openbios/config/xml/xinclude.xsl
new file mode 100644
index 000000000..5bcbf535e
--- /dev/null
+++ b/qemu/roms/openbios/config/xml/xinclude.xsl
@@ -0,0 +1,43 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!--
+ Stefans own xinclude implementation.
+ We really don't want to bother the users with namespaces
+ -->
+
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+<!-- <xsl:template match="xi:include" xmlns:xi="http://www.w3.org/2001/XInclude"> -->
+ <xsl:template match="include">
+ <xsl:variable name="href"><xsl:value-of select="@href"/>
+ </xsl:variable>
+ <xsl:for-each select="document(@href)">
+ <!--
+ <xsl:copy><xsl:copy-of select="@*"/>
+ <xsl:attribute name="base">
+ <xsl:value-of select="$href"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="node()" />
+ </xsl:copy>
+ -->
+ <xsl:element name="{local-name(*)}" namespace="{namespace-uri(..)}">
+ <xsl:copy-of select="*/@*"/>
+ <xsl:attribute name="base">
+ <xsl:value-of select="$href"/>
+ </xsl:attribute>
+ <xsl:for-each select="*">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet>