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
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(+)
@@ -54,4 +54,14 @@ elseKMOD_CONF_OPT+=--disable-toolsendif+# 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))
@@ -45,6 +45,17 @@ comment "build, or run, in unpredictable ways. "endif###############################################################################+comment"Legacy options removed in 2013.11"++configBR2_PACKAGE_MODULE_INIT_TOOLS+bool"module-init-tools replaced by kmod"+selectBR2_PACKAGE_KMOD+selectBR2_PACKAGE_KMOD_TOOLS+help+The'module-init-tools'packagehasbeenremoved,sinceit+hasbeendepracatedupstreamandreplacedby'kmod'.++###############################################################################comment"Legacy options removed in 2013.08"configBR2_ARM_OABI
@@ -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/
@@ -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.
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
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
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
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
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
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