aboutsummaryrefslogtreecommitdiff
path: root/package/modutils
diff options
context:
space:
mode:
authorGravatar Eric Andersen <andersen@codepoet.org>2005-06-09 09:46:12 +0000
committerGravatar Eric Andersen <andersen@codepoet.org>2005-06-09 09:46:12 +0000
commitd5b0e08e9dfec6bdffca4b909f8188a40c541d21 (patch)
tree0e15837a935e3762fdb02ce63001804d8fd5530f /package/modutils
parent8d1ce2a787e196bac5a65b783f6202500eb2abef (diff)
downloadbuildroot-d5b0e08e9dfec6bdffca4b909f8188a40c541d21.tar.gz
buildroot-d5b0e08e9dfec6bdffca4b909f8188a40c541d21.tar.bz2
http://bugs.uclibc.org/view.php?id=178
This patch provides modutils and module-init-tools. I know busybox can load modules, but modinfo may also be very useful for kernel/driver debugging purposes. I have managed binaries concurrency between modutils and module-init-tools, but I'm not sure this is the best way to do it... Thanks for your work.
Diffstat (limited to 'package/modutils')
-rw-r--r--package/modutils/Config.in12
-rw-r--r--package/modutils/modutils.mk62
-rw-r--r--package/modutils/modutils.patch24
3 files changed, 98 insertions, 0 deletions
diff --git a/package/modutils/Config.in b/package/modutils/Config.in
new file mode 100644
index 0000000000..581242ddca
--- /dev/null
+++ b/package/modutils/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_MODUTILS
+ bool "modutils"
+ default n
+ help
+ The modutils packages includes the kerneld program for automatic
+ loading and unloading of modules, as well as other module
+ management programs. Examples of loaded and unloaded modules are
+ device drivers and filesystems, as well as some other things.
+
+ linux v.<2.6
+
+ http://www.kernel.org/pub/linux/utils/kernel/modutils/v2.4
diff --git a/package/modutils/modutils.mk b/package/modutils/modutils.mk
new file mode 100644
index 0000000000..01a55530db
--- /dev/null
+++ b/package/modutils/modutils.mk
@@ -0,0 +1,62 @@
+#############################################################
+#
+# modutils
+#
+#############################################################
+MODUTILS_SOURCE=modutils-2.4.27.tar.bz2
+MODUTILS_SITE=ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/
+MODUTILS_DIR=$(BUILD_DIR)/modutils-2.4.27
+MODUTILS_BINARY=insmod
+MODUTILS_TARGET_BINARY=$(TARGET_DIR)/sbin/$(MODUTILS_BINARY)
+
+STRIPPROG=$(STRIP)
+
+$(DL_DIR)/$(MODUTILS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MODUTILS_SITE)/$(MODUTILS_SOURCE)
+
+$(MODUTILS_DIR)/.source: $(DL_DIR)/$(MODUTILS_SOURCE)
+ bzcat $(DL_DIR)/$(MODUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ toolchain/patch-kernel.sh $(MODUTILS_DIR) \
+ package/modutils \*.patch
+ touch $(MODUTILS_DIR)/.source
+
+$(MODUTILS_DIR)/.configured: $(MODUTILS_DIR)/.source
+ (cd $(MODUTILS_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ INSTALL=$(MODUTILS_DIR)/install-sh \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --sysconfdir=/etc \
+ );
+ touch $(MODUTILS_DIR)/.configured;
+
+$(MODUTILS_DIR)/$(MODUTILS_BINARY): $(MODUTILS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(MODUTILS_DIR)
+
+$(TARGET_DIR)/$(MODUTILS_TARGET_BINARY): $(MODUTILS_DIR)/$(MODUTILS_BINARY)
+ STRIPPROG='$(STRIPPROG)' \
+ $(MAKE) prefix=$(TARGET_DIR) -C $(MODUTILS_DIR) install-bin
+ rm -Rf $(TARGET_DIR)/usr/man
+
+modutils: uclibc $(TARGET_DIR)/$(MODUTILS_TARGET_BINARY)
+
+modutils-source: $(DL_DIR)/$(MODUTILS_SOURCE)
+
+modutils-clean:
+ $(MAKE) prefix=$(TARGET_DIR)/usr -C $(MODUTILS_DIR) uninstall
+ -$(MAKE) -C $(MODUTILS_DIR) clean
+
+modutils-dirclean:
+ rm -rf $(MODUTILS_DIR)
+
+#############################################################
+#
+## Toplevel Makefile options
+#
+##############################################################
+ifeq ($(strip $(BR2_PACKAGE_MODUTILS)),y)
+TARGETS+=modutils
+endif
diff --git a/package/modutils/modutils.patch b/package/modutils/modutils.patch
new file mode 100644
index 0000000000..16a6527f83
--- /dev/null
+++ b/package/modutils/modutils.patch
@@ -0,0 +1,24 @@
+--- _modutils-2.4.26/Makefile.in 2005-02-01 12:41:39.000000000 +0100
++++ modutils-2.4.26/Makefile.in 2005-02-01 12:39:18.000000000 +0100
+@@ -3,7 +3,7 @@
+ include Makefile.common
+
+ TARGETS = all install-bin clean distclean realclean dep depend
+-SUBDIRS = util obj insmod genksyms depmod @kerneld_SUBDIR@
++SUBDIRS = util obj insmod depmod @kerneld_SUBDIR@
+ ifneq (@kerneld_SUBDIR@,)
+ SUBDIRS += man_kerneld
+ endif
+--- _modutils-2.4.26/insmod/Makefile.in 2003-10-27 05:42:07.000000000 +0100
++++ modutils-2.4.26/insmod/Makefile.in 2005-02-01 12:39:40.000000000 +0100
+@@ -126,10 +126,6 @@
+ $(MKDIR) $(DESTDIR)$(sbindir); \
+ $(INSTALL) $(STRIP) $$i $(DESTDIR)$(sbindir); done;
+ set -e; \
+- for i in $(srcdir)/insmod_ksymoops_clean $(srcdir)/kernelversion; do \
+- $(MKDIR) $(DESTDIR)$(sbindir); \
+- $(INSTALL) $$i $(DESTDIR)$(sbindir); done;
+- set -e; \
+ for i in $(COMB); do \
+ ln -sf insmod $(DESTDIR)$(sbindir)/$$i; \
+ (test "$(insmod_static)" = yes && \