On Sat, May 21, 2011 at 6:05 AM, Michael Olbrich <[email protected]>wrote:
> On Sat, May 21, 2011 at 01:27:13AM -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 | 39 > ++++++++++++++++-------- > > 2 files changed, 27 insertions(+), 13 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 > > This is not sufficient. The dependency is created for prepare not extract. > I think dgen must generate something like this: > > ifneq ($(findstring lndir://,$(<PKG>_URL)),) > $(STATEDIR)/<pkg>.extract: $(STATEDIR)/<lndir>.install > endif > > Is the above for template-src-linux-driver-make? If I do that, do I remove the select HOST_LNDIR from template-src-linux-driver-in? > and lndir must default to 'y' and lndir.make must have: > LAZY_PACKAGES-$(PTXCONF_HOST_LNDIR) += lndir > > Or something like this. > > Ok > > prompt "@package@" > > help > > FIXME > > diff --git a/rules/templates/template-src-linux-driver-make > b/rules/templates/template-src-linux-driver-make > > index 6d6b385..dfe35eb 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,14 +48,7 @@ $(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) \ > > - modules > > + cd $(@PACKAGE@_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) > $(KERNEL_MAKEVARS) > > You're changing a lot of unrelated stuff here, why? > > The above is not unrelated. With lndir, there is no need to make a copy, because lndir created a shadow tree with symlinks for all the files. The kernel module can be build a normal. > > @$(call touch) > > > > # > ---------------------------------------------------------------------------- > > @@ -64,6 +57,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 > > @$(call touch) > > > > # > ---------------------------------------------------------------------------- > > @@ -72,10 +70,25 @@ $(STATEDIR)/@[email protected]: > > > > $(STATEDIR)/@[email protected]: > > @$(call targetinfo) > > - $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) \ > > - -C $(KERNEL_DIR) \ > > - M=$(@PACKAGE@_DIR) \ > > - modules_install > > + @$(call install_init, @package@) > > + @$(call install_fixup, @package@, PACKAGE, @package@) > > + @$(call install_fixup, @package@, PRIORITY, optional) > > + @$(call install_fixup, @package@, VERSION, $(@PACKAGE@_VERSION)) > > + @$(call install_fixup, @package@, SECTION, base) > > + @$(call install_fixup, @package@, AUTHOR, "@AUTHOR@") > > + @$(call install_fixup, @package@, DEPENDS,) > > + @$(call install_fixup, @package@, DESCRIPTION, missing) > > + > > + @cd $(@PACKAGE@_PKGDIR) && \ > > + find lib -type d | while read dir; do \ > > + $(call install_copy, @package@, 0, 0, 0755, /$${dir}); \ > > + done > > + > > + @cd $(@PACKAGE@_PKGDIR) && \ > > + find lib -name "*.ko" | while read file; do \ > > + $(call install_copy, @package@, 0, 0, 0644, -, /$${file}, > k); \ > > + done > > This is broken. All external kernel modules are currently installed with > the kernel, so we can run depmod before packaging everything. > Also: you're missing the install_finish call. > > Ok. I'll remove this part and restore the original. The reason I had the above was because I had a need in initramfs to only install specific kernel modules and not all of them. But this is unrelated to the lndir, so I just undo this hunk. Jon
-- ptxdist mailing list [email protected]
