RE: [PATCH] Make KVM compile on split source/object kernel configurations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Graf wrote:
> On Sep 16, 2008, at 12:22 PM, Zhang, Xiantao wrote:
> 
>> Alexander Graf wrote:
>>> On Sep 16, 2008, at 9:22 AM, Zhang, Xiantao wrote:
>>> 
>>>> Alexander Graf wrote:
>>>>> KVM as is assumes that the kernel obj dir and the kernel source
>>>>> dir are at the same location. This is true for most self-built
>>>>> vanilla kernels, but some distributions split these up (e.g.
>>>>> SUSE). 
>>>>> To keep compatible and have users have a good experience on
>>>>> building KVM on any distribution, this patch attempts to rebuild
>>>>> the logic from the kernel Makefile as closely as possible. With
>>>>> it I successfully built KVM on a current SUSE system.
>>>>> 
>>>>> Signed-off-by: Alexander Graf <agraf@xxxxxxx>
>>>>> 
>>>>> Please check and see if it breaks the build process for anyone
>>>>> else. Building with IA64 on SUSE-kernels is still broken due to
>>>>> similar but separate problems.
>>>> 
>>>> Hi, Graf
>>>> 	what problems did you meet when building kvm/ia64 ?
>>>> Xiantao
>>> 
>>> 
>>> This is the list of stuff I had to modify to get kvm-74 to run. I
>>> haven't tried anything more recent yet.
>>> 
>>> 1) -mno-sdata does not work. Qemu CFLAGS need to be -msdata
>> 
>> Which version of GCC are you using ?
> 
> # gcc --version
> gcc (SUSE Linux) 4.3.2 20080815 (prerelease) [gcc-4_3-branch revision
> 139129]
> 
>> 
>> 
>>> 2) In qemu/ia64.ld SEARCH_DIR is invalid for SUSE. It shouldn't
>>> search in /usr/ia64-linux but in /usr/ia64-suse-linux.
>> You can make a patch to fix it.
> 
> Right, this one should be really easy to fix.
> 
>>> 3) TARGET_PAGE_BITS is wrong
>> Currently, we just set TARGET_PAGE_BITS to 16 by hardcoding in Qemu.
>> In the future, we should add the logic to make it equal to kernel's
>> PAGE_SHIFT.
> 
>  From what I read on the KVM IA64 ML, this is not the first time
> someone ran into this issue. Sounds like a really good idea to add the
> logic ;-).
> 
>>> 4) kernel/ia64/Makefile.pre assumes to find .S files in $KERNELDIR.
>>> They are in $SOURCEDIR.
>> 
>> There is no issue here, I think.  You have to set corrent $KERNELDIR
>> through ./configure --kerneldir=xxxx once target machine and build
>> machine is not same.
> 
> No, since $KERNELDIR is the build dir, as that one contains all the
> configurations. The source dir only contains the sources.
> 
>>> 5) kernel/ia64/Makefile.pre suffers from the same problem my
>>> original fix for x86 addressed.
>> 
>> Ditto.
>> 
>>> 6) The IA64 kernel build system is broken. The file asm-ia64/nr-
>>> irqs.h gets generated during the kernel build, but is not exported
>>> as obj, so it won't be in the split obj directory. Since the
>>> source-dir is clean though, the file simply does not exist on SUSE
>>> rpms. 
>> 
>> You mean the source-dir is clean ?  So the generated header files
>> including (linux/autoconf.h, asm-offsets.h...)should be removed
>> wholely? I don't think they can be built with a clean source for
>> most modules. 
> 
> This is what I'm talking about all the time :-). For SUSE kernels
> there are two distinct directories:
> 
> # ls -l /usr/src
> drwxr-xr-x 24 root root 4096 Aug 27 14:51 linux-2.6.27-rc4-
> HEAD_20080825213702
> drwxr-xr-x  3 root root 4096 Aug 25 23:28 linux-2.6.27-rc4-
> HEAD_20080825213702-obj
> 
> whereas the normal directory contains the sources and the -obj
> directory contains all files that were generated during the build.
> Scratch that with the 2 rpm files - they are all in kernel-sources.
> 
> # ls -l
> /usr/src/linux-2.6.27-rc4-HEAD_20080825213702-obj/ia64/default/ total
> 568 
> -rw-r--r-- 1 root root  76287 Aug 25 23:27 .config
> -rw-r--r-- 2 root root    554 Aug 25 23:28 Makefile
> -rw-r--r-- 1 root root 468615 Aug 25 23:51 Module.symvers
> drwxr-xr-x 3 root root   4096 Aug 26 18:01 arch
> drwxr-xr-x 5 root root   4096 Aug 26 18:01 include
> drwxr-xr-x 2 root root   4096 Aug 26 18:01 include2
> drwxr-xr-x 2 root root   4096 Aug 25 23:28 kernel
> drwxr-xr-x 6 root root   4096 Aug 26 18:01 scripts
> 
> The problem is now that a lot of people assume these two directories
> to be one. This is the default mode when you compile a kernel. SUSE
> does not take this route though, and hasn't for quite a while now. I
> don't know about other distributions, but I guess we're not the only
> ones ;-).
Okay, I see now. But due to shortage of Suse OS at hand, I can't try it
. Anyway once you found any issues related to the compability with Suse
OS, welcome to post patches to fix them. :)
Xiantao

--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux