diff mbox

[1/3] kmod: allow to build a host variant

Message ID 1376996742-4638-2-git-send-email-thomas.petazzoni@free-electrons.com
State Superseded
Headers show

Commit Message

Thomas Petazzoni Aug. 20, 2013, 11:05 a.m. UTC
Since module-init-tools is deprecated, we now want to use kmod instead
for the installation of modules during the kernel build process. In
order to do this, we need to be able to build a host variant of kmod,
which is want this patch allows to do.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/kmod/kmod.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Arnout Vandecappelle Aug. 21, 2013, 8:07 p.m. UTC | #1
On 20/08/13 13:05, Thomas Petazzoni wrote:
> Since module-init-tools is deprecated, we now want to use kmod instead
> for the installation of modules during the kernel build process. In
> order to do this, we need to be able to build a host variant of kmod,
> which is want this patch allows to do.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>   package/kmod/kmod.mk | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
> index 72a24af..8951a56 100644
> --- a/package/kmod/kmod.mk
> +++ b/package/kmod/kmod.mk
> @@ -53,4 +53,13 @@ else
>   KMOD_CONF_OPT += --disable-tools
>   endif
>
> +define HOST_KMOD_INSTALL_TOOLS
> +	mkdir -p $(HOST_DIR)/sbin/
> +	for i in depmod insmod lsmod modinfo modprobe rmmod; \
> +	do ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/$$i; done

  Even though this is cut&paste of the above, I would indent it properly 
here (and maybe also above).

  Maybe for the host tools, only include depmod. The others _really_ 
shouldn't be used.

  Regards,
  Arnout

> +endef
> +
> +HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS
> +
>   $(eval $(autotools-package))
> +$(eval $(host-autotools-package))
>
diff mbox

Patch

diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index 72a24af..8951a56 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -53,4 +53,13 @@  else
 KMOD_CONF_OPT += --disable-tools
 endif
 
+define HOST_KMOD_INSTALL_TOOLS
+	mkdir -p $(HOST_DIR)/sbin/
+	for i in depmod insmod lsmod modinfo modprobe rmmod; \
+	do ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/$$i; done
+endef
+
+HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))