> -----Original Message----- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Monday, December 17, 2012 8:39 PM > To: Bhushan Bharat-R65777 > Cc: qemu-devel qemu-devel; qemu-...@nongnu.org List; Jan Kiszka; Peter Maydell > Subject: Re: [PATCH] Added uapi directory into linux-header > > > On 17.12.2012, at 16:02, Bhushan Bharat-R65777 wrote: > > > > > > >> -----Original Message----- > >> From: Alexander Graf [mailto:ag...@suse.de] > >> Sent: Monday, December 17, 2012 8:24 PM > >> To: Bhushan Bharat-R65777 > >> Cc: qemu-devel qemu-devel; qemu-...@nongnu.org List; Jan Kiszka; > >> Peter Maydell > >> Subject: Re: [PATCH] Added uapi directory into linux-header > >> > >> > >> On 17.12.2012, at 15:51, Bhushan Bharat-R65777 wrote: > >> > >>> > >>> > >>>> -----Original Message----- > >>>> From: Alexander Graf [mailto:ag...@suse.de] > >>>> Sent: Monday, December 17, 2012 7:45 PM > >>>> To: Bhushan Bharat-R65777 > >>>> Cc: qemu-devel qemu-devel; qemu-...@nongnu.org List; Bhushan > >>>> Bharat-R65777; Jan Kiszka; Peter Maydell > >>>> Subject: Re: [PATCH] Added uapi directory into linux-header > >>>> > >>>> > >>>> On 17.12.2012, at 05:08, Bharat Bhushan wrote: > >>>> > >>>>> 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 <bharat.bhus...@freescale.com> > >>>> > >>>> Please include people who were participating in the discussion > >>>> previously in CC when you post a new version. > >>>> > >>>>> --- > >>>>> configure | 1 + > >>>>> scripts/update-linux-headers.sh | 10 ++++++++++ > >>>>> 2 files changed, 11 insertions(+), 0 deletions(-) > >>>>> > >>>>> diff --git a/configure b/configure index 38b1cc6..51cce6b 100755 > >>>>> --- a/configure > >>>>> +++ b/configure > >>>>> @@ -3724,6 +3724,7 @@ if test "$linux" = "yes" ; then > >>>>> # For non-KVM architectures we will not have asm headers > >>>>> if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then > >>>>> symlink "$source_path/linux-headers/asm-$linux_arch" > >>>>> linux-headers/asm > >>>>> + symlink "$source_path/linux-headers/uapi/asm-$linux_arch" > >>>>> + linux-headers/uapi/asm > >>>> > >>>> This is still wrong. You want this guarded by another if [ -e ]. > >>> > >>> This is not wrong because .... > >>> > >>>> > >>>>> fi > >>>>> fi > >>>>> > >>>>> diff --git a/scripts/update-linux-headers.sh > >>>>> b/scripts/update-linux-headers.sh index 4c7b566..d40f9c4 100755 > >>>>> --- a/scripts/update-linux-headers.sh > >>>>> +++ b/scripts/update-linux-headers.sh > >>>>> @@ -46,14 +46,24 @@ for arch in $ARCHLIST; do > >>>>> > >>>>> make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch > >>>>> headers_install > >>>>> > >>>>> + if ! [ -e "$output/linux-headers/uapi" ] ; then > >>>>> + mkdir "$output/linux-headers/uapi" > >>>>> + fi > >>>> > >>>> ... which would mean you don't need this bit. > >>> > >>> ... because here we ensure that the directory exists. > >> > >> But that means we create a uapi directory for archs that don't have one, > right? > > > > Yes, I think that's the direction going forward (user specific header files > > in > uapi/). > > Sure, but we shouldn't be faster than Linux itself here ;).
I am fine with what makes you happier :) > > > > >> > >>> > >>>> > >>>>> + > >>>>> rm -rf "$output/linux-headers/asm-$arch" > >>>>> mkdir -p "$output/linux-headers/asm-$arch" > >>>>> + rm -rf "$output/linux-headers/uapi/asm-$arch" > >>>>> + mkdir -p "$output/linux-headers/uapi/asm-$arch" > >>>> > >>>> Only if it exists, no? > >>> > >>> Above it is ensured that the directory always exists .. > >>> > >>>> > >>>>> + > >>>>> 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 "$linux/arch/$arch/include/uapi/asm/epapr_hcalls.h" > >>>> "$output/linux-headers/uapi/asm-$arch/" > >>>>> + fi > >>>> > >>>> Why is this pointing at $linux and not $tmpdir? > >>> > >>> Because I found that $tmpdir does not have epapr_haclls.h, though I > >>> do not > >> know why ? any idea why ? > >> > >> Smells like a kernel bug :). In fact, I remember that we used to > >> forget uapi/asm/epapr_hcalls.h in the header list a while ago. > > > > I am not able to locate which command (set of commands) are installing > > the header files (all/selectively header files of > > arch/powerpc/include/asm/ and arch/powerp/include/uapi/asm/) in > > $tmpdir/ > > There is a make target headers_install to install user space headers into a > directory. To be installed by this, the file needs to be listed in > arch/powerpc/include/uapi/asm/Kbuild. Commit > c99ec973a63e2249020d6d93a46d7572432da6a2 put it in there, so it should get > installed... Ahh, thanks . Actually all the files are getting installed in $tmpdir/include/asm/ while I was looking for the header file in $tmpdir/include/uapi/asm/ -Bharat > > > > >> Are you sure you're > >> basing on the latest kvm code? > > > > kvm-ppc-next branch of http://github.com/agraf/linux-2.6.git > > Yeah, that one is good :) > > > Alex >