]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/build.sh
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / OvmfPkg / build.sh
index 0ddef044c0f7e3170cd2f5be5399277f9b6e94e0..e107eeae860afa9a382d68a7e55ab0f3880c56ff 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
 #
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -44,6 +44,7 @@ fi
 PROCESSOR=X64
 BUILDTARGET=DEBUG
 BUILD_OPTIONS=
+PLATFORMFILE=
 LAST_ARG=
 RUN_QEMU=no
 
@@ -78,7 +79,7 @@ for arg in "$@"
 do
   if [ -z "$LAST_ARG" ]; then
     case $arg in
-      -a|-b|-t)
+      -a|-b|-t|-p)
         LAST_ARG=$arg
         ;;
       qemu)
@@ -98,6 +99,9 @@ do
       -b)
         BUILDTARGET=$arg
         ;;
+      -p)
+        PLATFORMFILE=$arg
+        ;;
       -t)
         TARGET_TOOLS=$arg
         ;;
@@ -126,6 +130,10 @@ case $PROCESSOR in
     ;;
 esac
 
+if [ -z "$PLATFORMFILE" ]; then
+  PLATFORMFILE=$WORKSPACE/OvmfPkg/OvmfPkg$Processor.dsc
+fi
+
 ADD_QEMU_HDA=yes
 for arg in "$@"
 do
@@ -171,9 +179,9 @@ fi
 if [[ "$RUN_QEMU" == "yes" ]]; then
   if [[ ! -d $QEMU_FIRMWARE_DIR ]]; then
     mkdir $QEMU_FIRMWARE_DIR
-    ln -s $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
-    ln -s $FV_DIR/CirrusLogic5446.rom $QEMU_FIRMWARE_DIR/vgabios-cirrus.bin
   fi
+  ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
+  ln -sf $FV_DIR/OvmfVideo.rom $QEMU_FIRMWARE_DIR/vgabios-cirrus.bin
   if [[ "$ADD_QEMU_HDA" == "yes" ]]; then
     AUTO_QEMU_HDA="-hda fat:$BUILD_ROOT_ARCH"
   else
@@ -189,6 +197,6 @@ fi
 # Build the edk2 OvmfPkg
 #
 echo Running edk2 build for OvmfPkg$Processor
-build -p $WORKSPACE/OvmfPkg/OvmfPkg$Processor.dsc $BUILD_OPTIONS -a $PROCESSOR -b $BUILDTARGET -t $TARGET_TOOLS
+build -p $PLATFORMFILE $BUILD_OPTIONS -a $PROCESSOR -b $BUILDTARGET -t $TARGET_TOOLS
 exit $?