[systemd-devel] [PATCH] ease installation on non-running kernels

Greg KH gregkh at linuxfoundation.org
Thu Jun 19 10:32:55 PDT 2014


On Tue, Jun 17, 2014 at 11:18:24PM +0200, Simon Peeters wrote:
> ---
>  Makefile | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index c593b51..178257b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -17,7 +17,8 @@ kdbus$(EXT)-y := \
>  
>  obj-m += kdbus$(EXT).o
>  
> -KERNELDIR 		?= /lib/modules/$(shell uname -r)/build
> +KERNELVER		?= $(shell uname -r)
> +KERNELDIR 		?= /lib/modules/$(KERNELVER)/build
>  PWD			:= $(shell pwd)
>  
>  all: module test
> @@ -38,12 +39,12 @@ check:
>  	test/test-kdbus
>  
>  install: module
> -	mkdir -p /lib/modules/$(shell uname -r)/kernel/drivers/kdbus$(EXT)/
> -	cp -f kdbus$(EXT).ko /lib/modules/$(shell uname -r)/kernel/drivers/kdbus$(EXT)/
> -	depmod $(shell uname -r)
> +	mkdir -p /lib/modules/$(KERNELVER)/kernel/drivers/kdbus$(EXT)/
> +	cp -f kdbus$(EXT).ko /lib/modules/$(KERNELVER)/kernel/drivers/kdbus$(EXT)/
> +	depmod $(KERNELVER)
>  
>  uninstall:
> -	rm -f /lib/modules/$(shell uname -r)/kernel/drivers/kdbus/kdbus$(EXT).ko
> +	rm -f /lib/modules/$(KERNELVER)/kernel/drivers/kdbus/kdbus$(EXT).ko
>  
>  coccicheck:
>  	$(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck

Now applied, thanks.

greg k-h


More information about the systemd-devel mailing list