On Tue, May 24, 2011 at 12:10:52AM -0400, Jon Ringle wrote:
> By using lndir, the .ko files are kept separate from the src directory
> and building multiple architectures can be supported
> 
> Signed-off-by: Jon Ringle <[email protected]>
> ---
>  rules/templates/template-src-linux-driver-in   |    1 +
>  rules/templates/template-src-linux-driver-make |   11 ++++++-----
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/rules/templates/template-src-linux-driver-in 
> b/rules/templates/template-src-linux-driver-in
> index 7cb61c8..6edb6bc 100644
> --- a/rules/templates/template-src-linux-driver-in
> +++ b/rules/templates/template-src-linux-driver-in
> @@ -3,6 +3,7 @@
>  config @PACKAGE@
>       tristate
>       select KERNEL
> +     select HOST_LNDIR
>       prompt "@package@"
>       help
>         FIXME
> diff --git a/rules/templates/template-src-linux-driver-make 
> b/rules/templates/template-src-linux-driver-make
> index 6d6b385..70d708c 100644
> --- a/rules/templates/template-src-linux-driver-make
> +++ b/rules/templates/template-src-linux-driver-make
> @@ -18,7 +18,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  #
>  @PACKAGE@_VERSION    := @VERSION@
>  @PACKAGE@            := @package@-$(@PACKAGE@_VERSION)
> -@PACKAGE@_SRCDIR             := $(PTXDIST_WORKSPACE)/local_src/$(@PACKAGE@)
> +@PACKAGE@_URL                := 
> lndir://$(PTXDIST_WORKSPACE)/local_src/$(@PACKAGE@)
>  @PACKAGE@_DIR                := $(BUILDDIR)/$(@PACKAGE@)
>  @PACKAGE@_LICENSE    := unknown
>  
> @@ -48,10 +48,6 @@ $(STATEDIR)/@[email protected]:
>  
>  $(STATEDIR)/@[email protected]:
>       @$(call targetinfo)
> -#    # The kernel cannot build an out-of-tree driver out-of-tree :-)
> -#    # So we make a local copy.
> -     rm -fr $(@PACKAGE@_DIR)
> -     cp -a $(@PACKAGE@_SRCDIR) $(@PACKAGE@_DIR)
>       $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) \
>               -C $(KERNEL_DIR) \
>               M=$(@PACKAGE@_DIR) \
> @@ -64,6 +60,11 @@ $(STATEDIR)/@[email protected]:
>  
>  $(STATEDIR)/@[email protected]:
>       @$(call targetinfo)
> +     @$(call clean, $(@PACKAGE@_PKGDIR))
> +     cd $(@PACKAGE@_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \
> +             $(filter-out INSTALL_MOD_PATH=%,$(KERNEL_MAKEVARS)) \
> +             INSTALL_MOD_PATH=$(@PACKAGE@_PKGDIR) \
> +             modules_install

You forgot to remove this. We don't want to call modules_install twice.

Michael

>       @$(call touch)
>  
>  # 
> ----------------------------------------------------------------------------
> -- 
> 1.7.0.4
> 
> 
> -- 
> ptxdist mailing list
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to