From patchwork Mon Dec 17 16:01:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 206908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C7EF32C0095 for ; Tue, 18 Dec 2012 03:20:39 +1100 (EST) Received: from localhost ([::1]:41511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkdQj-0006Jp-Up for incoming@patchwork.ozlabs.org; Mon, 17 Dec 2012 11:20:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkdQW-0006Jb-3a for qemu-devel@nongnu.org; Mon, 17 Dec 2012 11:20:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkdQR-0006qd-1A for qemu-devel@nongnu.org; Mon, 17 Dec 2012 11:20:24 -0500 Received: from co9ehsobe002.messaging.microsoft.com ([207.46.163.25]:26593 helo=co9outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkdQH-0006o7-2r; Mon, 17 Dec 2012 11:20:09 -0500 Received: from mail196-co9-R.bigfish.com (10.236.132.238) by CO9EHSOBE036.bigfish.com (10.236.130.99) with Microsoft SMTP Server id 14.1.225.23; Mon, 17 Dec 2012 16:20:07 +0000 Received: from mail196-co9 (localhost [127.0.0.1]) by mail196-co9-R.bigfish.com (Postfix) with ESMTP id 532C37C033B; Mon, 17 Dec 2012 16:13:30 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 4 X-BigFish: VS4(zzzz1de0h1202h1e76h1d1ah1d2ah1082kzz8275bh8275eha1495iz2dh2a8h668h839hd24he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail196-co9 (localhost.localdomain [127.0.0.1]) by mail196-co9 (MessageSwitch) id 1355760802729998_20692; Mon, 17 Dec 2012 16:13:22 +0000 (UTC) Received: from CO9EHSMHS031.bigfish.com (unknown [10.236.132.244]) by mail196-co9.bigfish.com (Postfix) with ESMTP id 9ED5990004C; Mon, 17 Dec 2012 16:13:22 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS031.bigfish.com (10.236.130.41) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 17 Dec 2012 16:11:40 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.318.3; Mon, 17 Dec 2012 16:11:39 +0000 Received: from freescale.com ([10.232.15.72]) by az84smr01.freescale.net (8.14.3/8.14.0) with SMTP id qBHGBW8e030444; Mon, 17 Dec 2012 09:11:33 -0700 Received: by freescale.com (sSMTP sendmail emulation); Mon, 17 Dec 2012 21:31:09 +0530 From: Bharat Bhushan To: , , , , Date: Mon, 17 Dec 2012 21:31:07 +0530 Message-ID: <1355760067-12087-1-git-send-email-bharat.bhushan@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 207.46.163.25 Cc: Bharat Bhushan Subject: [Qemu-devel] [PATCH v2] Added uapi directory into linux-header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Linux ARCH specific header files are now in uapi/ directory also. These header files (epapr_hcalls.h on powerpc) are needed in qemu in linux-headers/uapi/asm/ directory as these are referenced by other header files in linux-headers/asm/. This patch is about changing the scripts for same. Signed-off-by: Bharat Bhushan --- v2: - remove symlink on distclean - review comments on v1 Makefile | 1 + configure | 4 ++++ scripts/update-linux-headers.sh | 12 ++++++++++++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 9ecbcbb..ed320ea 100644 --- a/Makefile +++ b/Makefile @@ -282,6 +282,7 @@ distclean: clean rm -f qemu-doc.vr rm -f config.log rm -f linux-headers/asm + rm -f linux-headers/uapi/asm rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr for d in $(TARGET_DIRS) $(QEMULIBS); do \ rm -rf $$d || exit 1 ; \ diff --git a/configure b/configure index 38b1cc6..4c11e3d 100755 --- a/configure +++ b/configure @@ -3725,6 +3725,10 @@ if test "$linux" = "yes" ; then if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm fi + if [ -e "$source_path/linux-headers/uapi/asm-$linux_arch" ]; then + symlink "$source_path/linux-headers/uapi/asm-$linux_arch" linux-headers/uapi/asm + fi + fi for target in $target_list; do diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 4c7b566..44e6cad 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -46,14 +46,26 @@ for arch in $ARCHLIST; do make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install + if [ -e "$linux/arch/$arch/include/uapi" ] && + ! [ -e "$output/linux-headers/uapi" ] ; then + mkdir "$output/linux-headers/uapi" + fi + rm -rf "$output/linux-headers/asm-$arch" mkdir -p "$output/linux-headers/asm-$arch" + if [ -e "$linux/arch/$arch/include/uapi/asm" ] ; then + rm -rf "$output/linux-headers/uapi/asm-$arch" + mkdir -p "$output/linux-headers/uapi/asm-$arch" + fi for header in kvm.h kvm_para.h; do cp "$tmpdir/include/asm/$header" "$output/linux-headers/asm-$arch" done if [ $arch = x86 ]; then cp "$tmpdir/include/asm/hyperv.h" "$output/linux-headers/asm-x86" fi + if [ $arch = powerpc ]; then + cp "$tmpdir/include/asm/epapr_hcalls.h" "$output/linux-headers/uapi/asm-powerpc/" + fi done rm -rf "$output/linux-headers/linux"