diff mbox

[kvm-unit-tests,v5,16/18] mkstandalone: add support for powerpc

Message ID 1455734459-31902-17-git-send-email-drjones@redhat.com
State Superseded
Headers show

Commit Message

Andrew Jones Feb. 17, 2016, 6:40 p.m. UTC
PowerPC needs firmware.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 configure               | 2 ++
 powerpc/run             | 2 +-
 scripts/mkstandalone.sh | 5 +++++
 3 files changed, 8 insertions(+), 1 deletion(-)

Comments

Radim Krčmář Feb. 18, 2016, 2:51 p.m. UTC | #1
2016-02-17 19:40+0100, Andrew Jones:
> PowerPC needs firmware.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Gibson Feb. 19, 2016, 3:53 a.m. UTC | #2
On Wed, Feb 17, 2016 at 07:40:57PM +0100, Andrew Jones wrote:
> PowerPC needs firmware.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  configure               | 2 ++
>  powerpc/run             | 2 +-
>  scripts/mkstandalone.sh | 5 +++++
>  3 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index b2ad199da7873..7d5702e28d627 100755
> --- a/configure
> +++ b/configure
> @@ -83,6 +83,7 @@ elif [ "$arch" = "arm" ] || [ "$arch" = "arm64" ]; then
>      testdir=arm
>  elif [ "$arch" = "ppc64" ]; then
>      testdir=powerpc
> +    firmware="$testdir/boot_rom.bin"
>  else
>      testdir=$arch
>  fi
> @@ -137,4 +138,5 @@ OBJDUMP=$cross_prefix$objdump
>  AR=$cross_prefix$ar
>  API=$api
>  TEST_DIR=$testdir
> +FIRMWARE=$firmware
>  EOF
> diff --git a/powerpc/run b/powerpc/run
> index 47aecb7600832..c5108100fc5e0 100755
> --- a/powerpc/run
> +++ b/powerpc/run
> @@ -42,7 +42,7 @@ fi
>  
>  M='-machine pseries'
>  M+=",accel=$ACCEL"
> -command="$qemu $M -bios powerpc/boot_rom.bin"
> +command="$qemu $M -bios $FIRMWARE"
>  command+=" -display none -serial stdio -kernel"
>  echo $command "$@"
>  
> diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
> index b0f1e7c098afb..c7e78f83fb086 100755
> --- a/scripts/mkstandalone.sh
> +++ b/scripts/mkstandalone.sh
> @@ -53,6 +53,11 @@ generate_test ()
>  
>  	echo "trap 'rm -f \$cleanup' EXIT"
>  
> +	if [ "$FIRMWARE" ]; then
> +		temp_file FIRMWARE "$FIRMWARE"
> +		echo 'export FIRMWARE'
> +	fi
> +
>  	temp_file bin "$kernel"
>  	args[3]='$bin'
>
diff mbox

Patch

diff --git a/configure b/configure
index b2ad199da7873..7d5702e28d627 100755
--- a/configure
+++ b/configure
@@ -83,6 +83,7 @@  elif [ "$arch" = "arm" ] || [ "$arch" = "arm64" ]; then
     testdir=arm
 elif [ "$arch" = "ppc64" ]; then
     testdir=powerpc
+    firmware="$testdir/boot_rom.bin"
 else
     testdir=$arch
 fi
@@ -137,4 +138,5 @@  OBJDUMP=$cross_prefix$objdump
 AR=$cross_prefix$ar
 API=$api
 TEST_DIR=$testdir
+FIRMWARE=$firmware
 EOF
diff --git a/powerpc/run b/powerpc/run
index 47aecb7600832..c5108100fc5e0 100755
--- a/powerpc/run
+++ b/powerpc/run
@@ -42,7 +42,7 @@  fi
 
 M='-machine pseries'
 M+=",accel=$ACCEL"
-command="$qemu $M -bios powerpc/boot_rom.bin"
+command="$qemu $M -bios $FIRMWARE"
 command+=" -display none -serial stdio -kernel"
 echo $command "$@"
 
diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
index b0f1e7c098afb..c7e78f83fb086 100755
--- a/scripts/mkstandalone.sh
+++ b/scripts/mkstandalone.sh
@@ -53,6 +53,11 @@  generate_test ()
 
 	echo "trap 'rm -f \$cleanup' EXIT"
 
+	if [ "$FIRMWARE" ]; then
+		temp_file FIRMWARE "$FIRMWARE"
+		echo 'export FIRMWARE'
+	fi
+
 	temp_file bin "$kernel"
 	args[3]='$bin'