Re: [PATCH] user-cr: Support kernel builds done with O=

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

 



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@xxxxxxxxxx>
> ---
>  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
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux