[Buildroot] [PATCHv2 0/4] Use kmod instead of module-init-tools

13 messages, 2 authors, 2013-09-03 · open the first message on its own page

[Buildroot] [PATCHv2 0/4] Use kmod instead of module-init-tools

From: Thomas Petazzoni <hidden>
Date: 2013-08-27 17:28:30

Hello,

Here is a v2 of this patch set. Changes since the v1 are:

 * Add a patch (first patch in the series) to properly indent the
   existing KMOD_INSTALL_TOOLS macro.

 * Adjust the newly introduced host variant of kmod to only install a
   symlink for depmod, since it's the only tool that will ever be used
   in a cross-compilation context. Suggested by Arnout.

Thanks,

Thomas

Thomas Petazzoni (4):
  kmod: indent properly the KMOD_INSTALL_TOOLS macro
  kmod: allow to build a host variant
  linux: use kmod instead of module-init-tools
  module-init-tools: remove package

 Config.in.legacy                                   | 11 +++++
 linux/linux.mk                                     |  2 +-
 package/Config.in                                  |  3 --
 package/kmod/kmod.mk                               | 15 ++++++-
 package/module-init-tools/Config.in                |  9 -----
 ...nit-tools-3.15-add-manpages-config-option.patch | 47 ----------------------
 package/module-init-tools/module-init-tools.mk     | 28 -------------
 7 files changed, 25 insertions(+), 90 deletions(-)
 delete mode 100644 package/module-init-tools/Config.in
 delete mode 100644 package/module-init-tools/module-init-tools-3.15-add-manpages-config-option.patch
 delete mode 100644 package/module-init-tools/module-init-tools.mk

-- 
1.8.1.2

[Buildroot] [PATCHv2 1/4] kmod: indent properly the KMOD_INSTALL_TOOLS macro

From: Thomas Petazzoni <hidden>
Date: 2013-08-27 17:28:31

The KMOD_INSTALL_TOOLS macro uses a non-conventional indentation. This
commit fixes this.

Signed-off-by: Thomas Petazzoni <redacted>
---
 package/kmod/kmod.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index 72a24af..71a2632 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -44,8 +44,9 @@ KMOD_DEPENDENCIES += \
 	$(if $(BR2_PACKAGE_MODULE_INIT_TOOLS),module-init-tools)
 
 define KMOD_INSTALL_TOOLS
-	for i in depmod insmod lsmod modinfo modprobe rmmod; \
-	do ln -sf ../usr/bin/kmod $(TARGET_DIR)/sbin/$$i; done
+	for i in depmod insmod lsmod modinfo modprobe rmmod; do \
+		ln -sf ../usr/bin/kmod $(TARGET_DIR)/sbin/$$i; \
+	done
 endef
 
 KMOD_POST_INSTALL_TARGET_HOOKS += KMOD_INSTALL_TOOLS
-- 
1.8.1.2

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Thomas Petazzoni <hidden>
Date: 2013-08-27 17:28:32

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.

Note that only the depmod tool is installed on the host, since that's
the only one likely to be used on the host in a cross-compilation
context.

Signed-off-by: Thomas Petazzoni <redacted>
---
 package/kmod/kmod.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index 71a2632..4445fa8 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -54,4 +54,14 @@ else
 KMOD_CONF_OPT += --disable-tools
 endif
 
+# We only install depmod, since that's the only tool used for the
+# host.
+define HOST_KMOD_INSTALL_TOOLS
+	mkdir -p $(HOST_DIR)/sbin/
+	ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/depmod
+endef
+
+HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
1.8.1.2

[Buildroot] [PATCHv2 3/4] linux: use kmod instead of module-init-tools

From: Thomas Petazzoni <hidden>
Date: 2013-08-27 17:28:33

Signed-off-by: Thomas Petazzoni <redacted>
---
 linux/linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index 578d535..025fd51 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -35,7 +35,7 @@ endif
 LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
 
 LINUX_INSTALL_IMAGES = YES
-LINUX_DEPENDENCIES  += host-module-init-tools host-lzop
+LINUX_DEPENDENCIES  += host-kmod host-lzop
 
 ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
 	LINUX_DEPENDENCIES += host-uboot-tools
-- 
1.8.1.2

[Buildroot] [PATCHv2 4/4] module-init-tools: remove package

From: Thomas Petazzoni <hidden>
Date: 2013-08-27 17:28:34

This commit removes the module-init-tools package and adds the
relevant Config.in.legacy entries to ease the migration for users.

Signed-off-by: Thomas Petazzoni <redacted>
---
 Config.in.legacy                                   | 11 +++++
 package/Config.in                                  |  3 --
 package/module-init-tools/Config.in                |  9 -----
 ...nit-tools-3.15-add-manpages-config-option.patch | 47 ----------------------
 package/module-init-tools/module-init-tools.mk     | 28 -------------
 5 files changed, 11 insertions(+), 87 deletions(-)
 delete mode 100644 package/module-init-tools/Config.in
 delete mode 100644 package/module-init-tools/module-init-tools-3.15-add-manpages-config-option.patch
 delete mode 100644 package/module-init-tools/module-init-tools.mk
diff --git a/Config.in.legacy b/Config.in.legacy
index 763f16c..ac6f088 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -45,6 +45,17 @@ comment "build, or run, in unpredictable ways.               "
 endif
 
 ###############################################################################
+comment "Legacy options removed in 2013.11"
+
+config BR2_PACKAGE_MODULE_INIT_TOOLS
+	bool "module-init-tools replaced by kmod"
+	select BR2_PACKAGE_KMOD
+	select BR2_PACKAGE_KMOD_TOOLS
+	help
+	  The 'module-init-tools' package has been removed, since it
+	  has been depracated upstream and replaced by 'kmod'.
+
+###############################################################################
 comment "Legacy options removed in 2013.08"
 
 config BR2_ARM_OABI
diff --git a/package/Config.in b/package/Config.in
index 7069d77..4ef8430 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -896,9 +896,6 @@ source "package/cpuload/Config.in"
 source "package/htop/Config.in"
 source "package/keyutils/Config.in"
 source "package/kmod/Config.in"
-if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-source "package/module-init-tools/Config.in"
-endif
 source "package/monit/Config.in"
 source "package/ncdu/Config.in"
 source "package/numactl/Config.in"
diff --git a/package/module-init-tools/Config.in b/package/module-init-tools/Config.in
deleted file mode 100644
index 77e3bce..0000000
--- a/package/module-init-tools/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_MODULE_INIT_TOOLS
-	bool "module-init-tools"
-	help
-	  The module-init-tools package contains a set of programs for
-	  loading, inserting, and removing kernel modules for Linux
-	  (versions 2.5.48 and above). It serves the same function that
-	  the "modutils" package serves for Linux 2.4.
-
-	  http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/
diff --git a/package/module-init-tools/module-init-tools-3.15-add-manpages-config-option.patch b/package/module-init-tools/module-init-tools-3.15-add-manpages-config-option.patch
deleted file mode 100644
index 28f51de..0000000
--- a/package/module-init-tools/module-init-tools-3.15-add-manpages-config-option.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Disable manual pages generation when docbook2man is not available.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.am  |    7 ++++++-
- configure.ac |    7 +++----
- 2 files changed, 9 insertions(+), 5 deletions(-)
-
-Index: module-init-tools-3.11/Makefile.am
-===================================================================
---- module-init-tools-3.11.orig/Makefile.am
-+++ module-init-tools-3.11/Makefile.am
-@@ -39,7 +39,12 @@
- MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5
- MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
- SGML = $(addprefix doc/,  $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
--dist_man_MANS = $(MAN5) $(MAN8)
-+
-+if HAVE_DOCBOOKTOMAN
-+MANPAGES  = $(MAN5) $(MAN8)
-+endif
-+dist_man_MANS = $(MANPAGES)
-+
- # If they haven't overridden mandir, fix it (never /man!)
- mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi)
- 
-Index: module-init-tools-3.11/configure.ac
-===================================================================
---- module-init-tools-3.11.orig/configure.ac
-+++ module-init-tools-3.11/configure.ac
-@@ -29,13 +29,12 @@
- AC_PROG_CC
- AC_PROG_RANLIB
- 
--AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],)
--if test x"$DOCBOOKTOMAN" = xno
-+AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man)
-+if test x"$DOCBOOKTOMAN" = x
- then
- 	AC_MSG_WARN([docbook2man not found])
--	# fail with a meaningfull error if $DOCBOOKTOMAN called by the makefile
--	DOCBOOKTOMAN=docbook2man
- fi
-+AM_CONDITIONAL([HAVE_DOCBOOKTOMAN], [test "x$DOCBOOKTOMAN" != "x"])
-  
- # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
- # between a broken cc and a working cc but missing libz.a.
diff --git a/package/module-init-tools/module-init-tools.mk b/package/module-init-tools/module-init-tools.mk
deleted file mode 100644
index 88abec4..0000000
--- a/package/module-init-tools/module-init-tools.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-#
-# module-init-tools
-#
-################################################################################
-
-MODULE_INIT_TOOLS_VERSION = 3.15
-MODULE_INIT_TOOLS_SOURCE = module-init-tools-$(MODULE_INIT_TOOLS_VERSION).tar.bz2
-MODULE_INIT_TOOLS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/module-init-tools/
-MODULE_INIT_TOOLS_LICENSE = GPLv2+
-MODULE_INIT_TOOLS_LICENSE_FILES = COPYING
-
-MODULE_INIT_TOOLS_CONF_ENV = ac_cv_prog_DOCBOOKTOMAN=''
-MODULE_INIT_TOOLS_CONF_OPT = \
-	--disable-static-utils \
-	--disable-builddir \
-	--program-transform-name=''
-
-# module-init-tools-3.15-add-manpages-config-option.patch is modifying
-# configure.ac and Makefile.am
-MODULE_INIT_TOOLS_AUTORECONF = YES
-HOST_MODULE_INIT_TOOLS_AUTORECONF = YES
-HOST_MODULE_INIT_TOOLS_CONF_ENV = ac_cv_prog_DOCBOOKTOMAN=''
-HOST_MODULE_INIT_TOOLS_CONF_OPT = --disable-static-utils
-
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))
-
-- 
1.8.1.2

[Buildroot] [PATCHv2 1/4] kmod: indent properly the KMOD_INSTALL_TOOLS macro

From: Peter Korsgaard <hidden>
Date: 2013-09-02 20:51:02

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 Thomas> The KMOD_INSTALL_TOOLS macro uses a non-conventional indentation. This
 Thomas> commit fixes this.

Committed, thanks.

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Peter Korsgaard <hidden>
Date: 2013-09-02 20:51:19

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 Thomas> Since module-init-tools is deprecated, we now want to use kmod instead
 Thomas> for the installation of modules during the kernel build process. In
 Thomas> order to do this, we need to be able to build a host variant of kmod,
 Thomas> which is want this patch allows to do.

 Thomas> Note that only the depmod tool is installed on the host, since that's
 Thomas> the only one likely to be used on the host in a cross-compilation
 Thomas> context.

Committed, thanks.

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 3/4] linux: use kmod instead of module-init-tools

From: Peter Korsgaard <hidden>
Date: 2013-09-02 20:52:08

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 Thomas> Signed-off-by: Thomas Petazzoni [off-list ref]

Committed, thanks.

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 4/4] module-init-tools: remove package

From: Peter Korsgaard <hidden>
Date: 2013-09-02 20:53:09

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 Thomas> This commit removes the module-init-tools package and adds the
 Thomas> relevant Config.in.legacy entries to ease the migration for users.

Committed, thanks.

I have also removed the FAQ entry about compilation issues for
module-init-tools.

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Peter Korsgaard <hidden>
Date: 2013-09-02 20:58:04

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 Thomas> Since module-init-tools is deprecated, we now want to use kmod instead
 Thomas> for the installation of modules during the kernel build process. In
 Thomas> order to do this, we need to be able to build a host variant of kmod,
 Thomas> which is want this patch allows to do.

 Thomas> Note that only the depmod tool is installed on the host, since that's
 Thomas> the only one likely to be used on the host in a cross-compilation
 Thomas> context.

 Thomas> Signed-off-by: Thomas Petazzoni [off-list ref]
 Thomas> ---
 Thomas>  package/kmod/kmod.mk | 10 ++++++++++
 Thomas>  1 file changed, 10 insertions(+)

 Thomas> diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
 Thomas> index 71a2632..4445fa8 100644
 Thomas> --- a/package/kmod/kmod.mk
 Thomas> +++ b/package/kmod/kmod.mk
 Thomas> @@ -54,4 +54,14 @@ else
 Thomas>  KMOD_CONF_OPT += --disable-tools
 Thomas>  endif
 
 Thomas> +# We only install depmod, since that's the only tool used for the
 Thomas> +# host.
 Thomas> +define HOST_KMOD_INSTALL_TOOLS
 Thomas> +	mkdir -p $(HOST_DIR)/sbin/
 Thomas> +	ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/depmod
 Thomas> +endef
 Thomas> +
 Thomas> +HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS
 Thomas> +

We also need to set HOST_KMOD_AUTORECONF = YES because of the
configure.ac patch (arguably we should default HOST_<pkg>_AUTORECONF =
<pkg>_AUTORECONF).

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Thomas Petazzoni <hidden>
Date: 2013-09-02 21:48:44

Dear Peter Korsgaard,

On Mon, 02 Sep 2013 22:58:04 +0200, Peter Korsgaard wrote:
 Thomas> +# We only install depmod, since that's the only tool used for the
 Thomas> +# host.
 Thomas> +define HOST_KMOD_INSTALL_TOOLS
 Thomas> +	mkdir -p $(HOST_DIR)/sbin/
 Thomas> +	ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/depmod
 Thomas> +endef
 Thomas> +
 Thomas> +HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS
 Thomas> +

We also need to set HOST_KMOD_AUTORECONF = YES because of the
configure.ac patch (arguably we should default HOST_<pkg>_AUTORECONF =
<pkg>_AUTORECONF).
Ah, yes, right. I didn't see the problem since the configure.ac patch
is only to support gcc < 4.6.x on the host, which wasn't my case. But
certainly useful in general indeed.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Peter Korsgaard <hidden>
Date: 2013-09-02 22:46:01

quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 >> We also need to set HOST_KMOD_AUTORECONF = YES because of the
 >> configure.ac patch (arguably we should default HOST_<pkg>_AUTORECONF =
 >> <pkg>_AUTORECONF).

 Thomas> Ah, yes, right. I didn't see the problem since the configure.ac patch
 Thomas> is only to support gcc < 4.6.x on the host, which wasn't my case. But
 Thomas> certainly useful in general indeed.

Not only that, but if you don't have (the right version of) autotools on
your build host it also fails.

Anyway, fixed.

-- 
Bye, Peter Korsgaard

[Buildroot] [PATCHv2 2/4] kmod: allow to build a host variant

From: Thomas Petazzoni <hidden>
Date: 2013-09-03 07:02:58

Dear Peter Korsgaard,

On Tue, 03 Sep 2013 00:46:01 +0200, Peter Korsgaard wrote:
quoted
quoted
quoted
quoted
quoted
"Thomas" == Thomas Petazzoni [off-list ref] writes:
 >> We also need to set HOST_KMOD_AUTORECONF = YES because of the
 >> configure.ac patch (arguably we should default HOST_<pkg>_AUTORECONF =
 >> <pkg>_AUTORECONF).

 Thomas> Ah, yes, right. I didn't see the problem since the configure.ac patch
 Thomas> is only to support gcc < 4.6.x on the host, which wasn't my case. But
 Thomas> certainly useful in general indeed.

Not only that, but if you don't have (the right version of) autotools on
your build host it also fails.
Ah, yes, right: configure.ac is newer than configure, so it tries to
automatically regenerate the configure script from configure.ac. Makes
sense, thanks for fixing it!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help