[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: ref
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files |
Date: |
Mon, 27 Feb 2017 17:24:01 +1100 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Thu, Feb 23, 2017 at 04:59:55PM +1100, Sam Bobroff wrote:
> Refactor the architecture specific code to make it easier
> to add new special case files.
>
> There should be no change in functionality.
>
> Signed-off-by: Sam Bobroff <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> v2:
>
> I've factored the script to make it easier to add new files.
>
> scripts/update-linux-headers.sh | 25 +++++++++++--------------
> 1 file changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index ef11a8ab42..c75c30da1b 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -76,28 +76,25 @@ for arch in $ARCHLIST; do
> fi
>
> make -C "$linux" INSTALL_HDR_PATH="$tmpdir" ARCH=$arch headers_install
> + ARCH_EXTRA=
> + ARCH_STD_EXTRA=
> + case "$arch" in
> + powerpc) ARCH_EXTRA=epapr_hcalls.h ;;
> + s390) ARCH_STD_EXTRA="kvm_virtio.h virtio-ccw.h" ;;
> + x86) ARCH_EXTRA="unistd_32.h unistd_x32.h unistd_64.h"
> ARCH_STD_EXTRA="hyperv.h" ;;
> + esac
>
> rm -rf "$output/linux-headers/asm-$arch"
> mkdir -p "$output/linux-headers/asm-$arch"
> - for header in kvm.h kvm_para.h unistd.h; do
> + for header in kvm.h kvm_para.h unistd.h $ARCH_EXTRA; do
> cp "$tmpdir/include/asm/$header" "$output/linux-headers/asm-$arch"
> done
> - if [ $arch = powerpc ]; then
> - cp "$tmpdir/include/asm/epapr_hcalls.h"
> "$output/linux-headers/asm-powerpc/"
> - fi
>
> rm -rf "$output/include/standard-headers/asm-$arch"
> mkdir -p "$output/include/standard-headers/asm-$arch"
> - if [ $arch = s390 ]; then
> - cp_portable "$tmpdir/include/asm/kvm_virtio.h"
> "$output/include/standard-headers/asm-s390/"
> - cp_portable "$tmpdir/include/asm/virtio-ccw.h"
> "$output/include/standard-headers/asm-s390/"
> - fi
> - if [ $arch = x86 ]; then
> - cp_portable "$tmpdir/include/asm/hyperv.h"
> "$output/include/standard-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_x32.h"
> "$output/linux-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x86/"
> - fi
> + for header in $ARCH_STD_EXTRA; do
> + cp_portable "$tmpdir/include/asm/$header"
> "$output/include/standard-headers/asm-$arch/"
> + done
> done
>
> rm -rf "$output/linux-headers/linux"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [RFC PATCH v2 00/12] ISA 3.00 KVM guest support, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 04/12] Move virtio_mmio.h to fix update-linux-headers.sh, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 03/12] scripts/update-linux-headers.sh: add new files for ARM, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 01/12] spapr: Small cleanup of PPC MMU enums, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files, Sam Bobroff, 2017/02/23
- Re: [Qemu-ppc] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files,
David Gibson <=
- [Qemu-ppc] [RFC PATCH v2 06/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary., Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 09/12] spapr: Add h_register_process_table() hypercall, Sam Bobroff, 2017/02/23
- [Qemu-ppc] [RFC PATCH v2 07/12] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3, Sam Bobroff, 2017/02/23