[Prism54-devel] Re: Add depmod to Makefile

Luis R. Rodriguez mcgrof@ruslug.rutgers.edu
Wed, 26 May 2004 01:06:31 -0400


Oh yeah, and if we do accept it, it'll go until after we get a reply
from netdev.

	Luis

On Thu, May 20, 2004 at 08:02:02PM -0400, Pavel Roskin wrote:
> On Wed, 19 May 2004, Margit Schubert-While wrote:
> 
> >>Margit will hopefully appreciate that KVER doesn't need to be overridden.
> >She does :-)
> >
> >The correct way to do it is to use version.h
> >Some distro's make changes to the default Makefile,
> 
> Fixed.  Thank you!  I have already fixed the Makefile in the Orinoco 
> driver.
> 
> >In version.h, however, we should have the correct name.
> >(eg. #define UTS_RELEASE "2.6.4-1-margit")
> >Can you put up an amended patch ?
> 
> Attached.
> 
> >One other nitpick - Can you take out the absolute path for depmod.
> >So just "depmod" instead of "/sbin/depmod".
> 
> I disagree.  /sbin is not in $PATH for users by default, and the root 
> environment inherits $PATH from the user when "su" is used.
> 
> >Oh, and incidentally, a good distro will check if a depmod is needed
> >as part of the boot process. (admittedly, a little late if anything is 
> >wrong)
> 
> Agreed.
> 
> -- 
> Regards,
> Pavel Roskin

> --- Makefile
> +++ Makefile
> @@ -1,11 +1,19 @@
>  # $Id: Makefile,v 1.9 2004/03/02 00:59:22 mcgrof Exp $
>  
> -KVER	       := $(shell uname -r)
> -KDIR           := /lib/modules/$(KVER)/build
> -KMISC          := /lib/modules/$(KVER)/kernel/drivers/net/wireless/prism54/
> -KEXT           := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
> +# Path to the kernel source
> +KDIR           := $(shell readlink -f /lib/modules/`uname -r`/build)
> +
> +# Where to install the modules
> +KMISC          = /lib/modules/$(KVER)/kernel/drivers/net/wireless/prism54/
> +
> +# Output directory used when building Linux kernel, if any (2.6 kernels)
>  KOUT           := $(KDIR)
>  
> +# You should not need to override variables below this line
> +KVER           := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' \
> +		    $(KOUT)/include/linux/version.h)
> +KEXT           := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
> +
>  .PHONY: default modules install clean module-all modules-clean modules-install
>  
>  default: 
> @@ -35,6 +43,9 @@
>  modules-install:
>  	install -d $(KMISC)
>  	install -m 644 -c ksrc/prism54.$(KEXT) $(KMISC)
> +ifeq ($(KVER), $(shell uname -r))
> +	/sbin/depmod -ae
> +endif
>  	#install -d /usr/lib/hotplug/firmware
>  	#install -c isl3877 /usr/lib/hotplug/firmware
>  	#install -c isl3890 /usr/lib/hotplug/firmware


-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E