diff options
| author | Peter Maydell | 2012-07-18 12:11:09 +0200 |
|---|---|---|
| committer | Marcelo Tosatti | 2012-09-11 23:14:49 +0200 |
| commit | 2879636d55312b5391ec46c7dee5d3a07714c222 (patch) | |
| tree | 6d4ea620df1bd90f85e78ed5baf519eef62daa6f /scripts | |
| parent | Merge branch 'usb.64' of git://git.kraxel.org/qemu (diff) | |
| download | qemu-2879636d55312b5391ec46c7dee5d3a07714c222.tar.gz qemu-2879636d55312b5391ec46c7dee5d3a07714c222.tar.xz qemu-2879636d55312b5391ec46c7dee5d3a07714c222.zip | |
update-linux-headers.sh: Don't hard code list of architectures
Rather than hardcoding the list of architectures in the kernel
header update script, just import headers for every architecture
which supports KVM (with a blacklist exception for ia64 which
has KVM headers but is dead). This reduces the number of QEMU
files which need to be updated to add support for a new KVM
architecture.
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/update-linux-headers.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index a639c5bff0..53a6f87650 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -28,7 +28,21 @@ if [ -z "$output" ]; then output="$PWD" fi -for arch in x86 powerpc s390; do +# This will pick up non-directories too (eg "Kconfig") but we will +# ignore them in the next loop. +ARCHLIST=$(cd "$linux/arch" && echo *) + +for arch in $ARCHLIST; do + # Discard anything which isn't a KVM-supporting architecture + if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then + continue + fi + + # Blacklist architectures which have KVM headers but are actually dead + if [ "$arch" = "ia64" ]; then + continue + fi + make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install rm -rf "$output/linux-headers/asm-$arch" |
