qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 6/7] Add pc-bios as a git submodule


From: Alexander Graf
Subject: [Qemu-devel] Re: [PATCH 6/7] Add pc-bios as a git submodule
Date: Wed, 29 Jul 2009 23:25:28 +0200





On 29.07.2009, at 20:45, Anthony Liguori <address@hidden> wrote:

This will allow us to build pc-bios on demand



How do you get the submodule? Will there be a 'make sync' kind of target that just grabs everything for me?

I don't really want to mess with submodules when I don't have to.

Alex

Signed-off-by: Anthony Liguori <address@hidden>
---
.gitmodules  |    3 +++
Makefile     |    5 +++--
configure    |   43 +++++++++++++++++++++++++++++++++++++++++--
roms/pc-bios |    1 +
4 files changed, 48 insertions(+), 4 deletions(-)
create mode 100644 .gitmodules
create mode 160000 roms/pc-bios

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..7ff5bb4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "roms/pc-bios"]
+    path = roms/pc-bios
+    url = git://git.qemu.org/pcbios.git
diff --git a/Makefile b/Makefile
index 4f06ec1..7fa5253 100644
--- a/Makefile
+++ b/Makefile
@@ -239,7 +239,7 @@ ar de en-us fi fr-be hr it lv nl pl ru th \ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr

ifdef INSTALL_BLOBS
-BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+BLOBS=vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
bamboo.dtb petalogix-s3adsp1800.dtb
@@ -274,9 +274,10 @@ ifneq ($(BLOBS),)
   done
endif
        # FIXME: this is terrible
-    for rom in multiboot; do \
+    for rom in $(ROMS); do \
     case $$rom in \
       multiboot) srcbin=multiboot.bin ;; \
+        pc-bios) srcbin=BIOS-bochs-latest; dstbin=bios.bin ;; \
     esac; \
     if test -z "$$dstbin" ; then \
       dstbin=$$srcbin ; \
diff --git a/configure b/configure
index 75e5657..71075fd 100755
--- a/configure
+++ b/configure
@@ -17,8 +17,10 @@ TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"
TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"
TMPI="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.i"
TMPSDLLOG="${TMPDIR1}/qemu-conf-sdl-$$-${RANDOM}.log"
+TMPDSL="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.dsl"
+TMPAML="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.aml"

-trap "rm -f $TMPC $TMPO $TMPE $TMPS $TMPI $TMPSDLLOG; exit" 0 2 3 15
+trap "rm -f $TMPC $TMPO $TMPE $TMPS $TMPI $TMPSDLLOG $TMPDSL $TMPAML; exit" 0 2 3 15

# default parameters
prefix=""
@@ -207,6 +209,8 @@ fdt="yes"
sdl="yes"
xen="yes"
pkgversion=""
+bcc="yes"
+iasl="yes"

# OS specific
if check_define __linux__ ; then
@@ -526,6 +530,10 @@ for opt do
  ;;
  --disable-docs) build_docs="no"
  ;;
+  --disable-bcc) bcc="no"
+  ;;
+  --disable-isal) iasl="no"
+  ;;
  *) echo "ERROR: unknown option $opt"; show_help="yes"
  ;;
  esac
@@ -860,6 +868,32 @@ else
fi

##########################################
+# bcc check
+cat > $TMPC <<EOF
+int main() { return 0; }
+EOF
+if test "$bcc" = "yes" ; then
+    if bcc -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
+    :
+    else
+    bcc="no"
+    fi
+fi
+
+#########################################
+# iasl check
+cat > $TMPDSL <<EOF
+DefinitionBlock("$TMPAML", "DSDT", 0x01, "BXPC", "BXDSDT", 0x1) { }
+EOF
+if test "$iasl" = "yes" ; then
+    if iasl $TMPDSL > /dev/null 2> /dev/null ; then
+    :
+    else
+    iasl="no"
+    fi
+fi
+
+##########################################
# zlib check

cat > $TMPC << EOF
@@ -1751,6 +1785,9 @@ if test \( \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
        "$targetos" != "Darwin" \) -o \
        "$i386_cross_prefix" ; then
  roms="$roms multiboot"
+  if test "$bcc" = "yes" -a "$iasl" = "yes" ; then
+    roms="$roms pc-bios"
+  fi
fi
echo "ROMS=$roms" >> $config_host_mak

@@ -2123,7 +2160,7 @@ for rom in $roms; do
    ln -s $source_path/roms/$rom/Makefile pc-bios/$rom/Makefile
    config_mak="pc-bios/$rom/config.mak"
    case "$rom" in
-      multiboot)
+      multiboot|pc-bios)
   prefix=${i386_cross_prefix}
   ;;
    esac
@@ -2136,6 +2173,8 @@ for rom in $roms; do
    echo "CPP=${prefix}cpp" >> $config_mak
    echo "LD=${prefix}${ld}" >> $config_mak
    echo "OBJCOPY=${prefix}${objcopy}" >> $config_mak
+    echo "BCC=bcc" >> $config_mak
+    echo "IASL=iasl" >> $config_mak
done

# build tree in object directory if source path is different from current one
diff --git a/roms/pc-bios b/roms/pc-bios
new file mode 160000
index 0000000..c658541
--- /dev/null
+++ b/roms/pc-bios
@@ -0,0 +1 @@
+Subproject commit c658541caaec566c58a8afccc1ed8b56e0e0fbd9
--
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]