* [PATCH] user-cr: Support kernel builds done with O=
@ 2009-07-13 3:04 Matt Helsley
[not found] ` <20090713030401.GB5213-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Matt Helsley @ 2009-07-13 3:04 UTC (permalink / raw)
To: Oren Laadan; +Cc: Containers
Support kernel builds such as:
make O=../kbuild bzImage
The Makefile must differentiate between where the kernel source is and where
the build output is. The readlink test to determine KERN_ARCH is the only
part of the Makefile that relies on kernel build output at the moment.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 0ae5fe0..f0439d4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,20 @@
-KERNELPATH ?= ../linux
+KERNELSRC ?= ../linux
+KERNELBUILD ?= ../linux
# compile with debug ?
DEBUG = -DCHECKPOINT_DEBUG
# find linux architecure
-KERN_ARCH = $(shell readlink $(KERNELPATH)/include/asm | sed 's/^asm-//')
+KERN_ARCH = $(shell readlink $(KERNELBUILD)/include/asm | sed 's/^asm-//')
# look for includes
-PATHS = -I$(KERNELPATH)/include \
- -I$(KERNELPATH)/arch/$(KERN_ARCH)/include
+PATHS = -I$(KERNELSRC)/include \
+ -I$(KERNELSRC)/arch/$(KERN_ARCH)/include
# checkpoint_hdr files
-CKPT_HDR = $(KERNELPATH)/include/linux/checkpoint_hdr.h \
- $(KERNELPATH)/arch/$(KERN_ARCH)/include/asm/checkpoint_hdr.h
+CKPT_HDR = $(KERNELSRC)/include/linux/checkpoint_hdr.h \
+ $(KERNELSRC)/arch/$(KERN_ARCH)/include/asm/checkpoint_hdr.h
# extra warnings and fun
WARNS := -Wall -Wstrict-prototypes -Wno-trigraphs
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] user-cr: Support kernel builds done with O=
[not found] ` <20090713030401.GB5213-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
@ 2009-07-13 23:00 ` Oren Laadan
0 siblings, 0 replies; 2+ messages in thread
From: Oren Laadan @ 2009-07-13 23:00 UTC (permalink / raw)
To: Matt Helsley; +Cc: Containers
Got it.
I added another change to allow taking the headers from
the install directory (variable: KERNELHDR, defaulf it
$(KERNELSRC)/usr/include).
Hopefully I didn't break anything...
Oren.
Matt Helsley wrote:
> Support kernel builds such as:
>
> make O=../kbuild bzImage
>
> The Makefile must differentiate between where the kernel source is and where
> the build output is. The readlink test to determine KERN_ARCH is the only
> part of the Makefile that relies on kernel build output at the moment.
>
> Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> Makefile | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 0ae5fe0..f0439d4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,19 +1,20 @@
>
> -KERNELPATH ?= ../linux
> +KERNELSRC ?= ../linux
> +KERNELBUILD ?= ../linux
>
> # compile with debug ?
> DEBUG = -DCHECKPOINT_DEBUG
>
> # find linux architecure
> -KERN_ARCH = $(shell readlink $(KERNELPATH)/include/asm | sed 's/^asm-//')
> +KERN_ARCH = $(shell readlink $(KERNELBUILD)/include/asm | sed 's/^asm-//')
>
> # look for includes
> -PATHS = -I$(KERNELPATH)/include \
> - -I$(KERNELPATH)/arch/$(KERN_ARCH)/include
> +PATHS = -I$(KERNELSRC)/include \
> + -I$(KERNELSRC)/arch/$(KERN_ARCH)/include
>
> # checkpoint_hdr files
> -CKPT_HDR = $(KERNELPATH)/include/linux/checkpoint_hdr.h \
> - $(KERNELPATH)/arch/$(KERN_ARCH)/include/asm/checkpoint_hdr.h
> +CKPT_HDR = $(KERNELSRC)/include/linux/checkpoint_hdr.h \
> + $(KERNELSRC)/arch/$(KERN_ARCH)/include/asm/checkpoint_hdr.h
>
> # extra warnings and fun
> WARNS := -Wall -Wstrict-prototypes -Wno-trigraphs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-13 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 3:04 [PATCH] user-cr: Support kernel builds done with O= Matt Helsley
[not found] ` <20090713030401.GB5213-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-07-13 23:00 ` Oren Laadan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox