Fix kvm-79 userland for separate kernel objdir
PATCH 1/1 Fix kvm-79 userland for separate kernel objdir
I needed this patch to make kvm-79 build (with --with-patched-kernel) with separate kernel objdir and 2.6.28-rc5
-Andi
Makefile renamed from Makefile~ +1 -1
@@ -33,7 +33,7 @@ header-sync-n: header-sync-y: - make -C kernel LINUX=$(KERNELDIR) header-sync + make -C kernel LINUX=$(KERNELSOURCEDIR) header-sync rm -f kernel/include/asm ln -sf asm-$(sane-arch) kernel/include/asm
Signature · 1 line
[email protected]
Am Donnerstag, 20. November 2008 schrieb Andi Kleen:
Makefile line 38
Quoted 10 lines
Makefile renamed from Makefile~ +1
-1@@ -33,7 +33,7 @@ header-sync-n: header-sync-y: - make -C kernel LINUX=$(KERNELDIR) header-sync + make -C kernel LINUX=$(KERNELSOURCEDIR) header-sync rm -f kernel/include/asm ln -sf asm-$(sane-arch) kernel/include/asm
Hmm. In my config.mak KERNELSOURCEDIR is empty. Looks like this patch would break headers_sync on kernels without a separate objdirs or builds with configure --kerneldir=blah.
Christian
Quoted 6 lines · Christian Borntraeger
Am Donnerstag, 20. November 2008 schrieb Andi Kleen:
Quoted 5 lines
Makefile renamed from Makefile~ +0
-0@@ -33,7 +33,7 @@ header-sync-n:
Quoted 9 lines
Makefile line 38
Quoted 5 lines
Makefile renamed from Makefile~ +1
-1header-sync-y: - make -C kernel LINUX=$(KERNELDIR) header-sync + make -C kernel LINUX=$(KERNELSOURCEDIR) header-sync rm -f kernel/include/asm ln -sf asm-$(sane-arch) kernel/include/asmHmm. In my config.mak KERNELSOURCEDIR is empty. Looks like this patch would break
headers_syncon kernels without a separate objdirs or builds with configure --kerneldir=blah.
How about this variant? Does it work for you?
-Andi
Makefile renamed from Makefile~ +3 -1
@@ -33,7 +33,9 @@ header-sync-n: header-sync-y: - make -C kernel LINUX=$(KERNELDIR) header-sync + make -C kernel \ + LINUX=$(if "$(KERNELSOURCEDIR)",$(KERNELSOURCEDIR),$(KERNELDIR)) \ + header-sync rm -f kernel/include/asm ln -sf asm-$(sane-arch) kernel/include/asm
Am Donnerstag, 20. November 2008 schrieb Andi Kleen:
Quoted 7 lines
How about this variant? Does it work for you?
(quoted diff) +0
-1-Andi
Makefile line 38
Quoted 7 lines
Makefile renamed from Makefile~ +3
-1@@ -33,7 +33,9 @@ header-sync-n: header-sync-y: - make -C kernel LINUX=$(KERNELDIR) header-sync + make -C kernel \ + LINUX=$(if "$(KERNELSOURCEDIR)",$(KERNELSOURCEDIR),$(KERNELDIR)) \ + header-sync
Nope.
cborntra@cborntra:/space/kvm-userspace$ make
make -C kernel \
LINUX= \
header-sync
fatal: Not a git repository
make[1]: Entering directory `/space/kvm-userspace/kernel'
rm -rf header-tmp
rsync -R \
""/./include/linux/kvm*.h \
\
header-tmp/
rsync: link_stat "/include/linux/kvm*.h" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at main.c(1058)
[sender=3.0.3]
make[1]: *** [header-sync] Fehler 23
make[1]: Leaving directory `/space/kvm-userspace/kernel'
make: *** [header-sync-y] Fehler 2But
LINUX=$(if $(KERNELSOURCEDIR),$(KERNELSOURCEDIR),$(KERNELDIR)) \
(without the " )
seems to work.
Quoted 6 lines
But
LINUX=$(if $(KERNELSOURCEDIR),$(KERNELSOURCEDIR),$(KERNELDIR)) \(without the " )
seems to work.
Ok. I've never been very good at writing Makefiles. Looks good with that too.
-Andi
Signature · 1 line
[email protected]