diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-06-09 09:46:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-06-09 09:46:12 +0000 |
commit | d5b0e08e9dfec6bdffca4b909f8188a40c541d21 (patch) | |
tree | 0e15837a935e3762fdb02ce63001804d8fd5530f /package/module-init-tools/module-init-tools.mk | |
parent | 8d1ce2a787e196bac5a65b783f6202500eb2abef (diff) |
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/module-init-tools/module-init-tools.mk')
-rw-r--r-- | package/module-init-tools/module-init-tools.mk | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/package/module-init-tools/module-init-tools.mk b/package/module-init-tools/module-init-tools.mk new file mode 100644 index 000000000..75bbf1b19 --- /dev/null +++ b/package/module-init-tools/module-init-tools.mk @@ -0,0 +1,73 @@ +############################################################# +# +# module-init-tools +# +############################################################# +MODULE_INIT_TOOLS_SOURCE=module-init-tools-3.1.tar.bz2 +MODULE_INIT_TOOLS_SITE=ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/ +MODULE_INIT_TOOLS_DIR=$(BUILD_DIR)/module-init-tools-3.1 +MODULE_INIT_TOOLS_BINARY=modprobe +MODULE_INIT_TOOLS_TARGET_BINARY=$(TARGET_DIR)/sbin/$(MODULE_INIT_TOOLS_BINARY) + +STRIPPROG=$(STRIP) + +$(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE): + $(WGET) -P $(DL_DIR) $(MODULE_INIT_TOOLS_SITE)/$(MODULE_INIT_TOOLS_SOURCE) + +$(MODULE_INIT_TOOLS_DIR)/.source: $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE) + bzcat $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + toolchain/patch-kernel.sh $(MODULE_INIT_TOOLS_DIR) \ + package/module-init-tools \*.patch + touch $(MODULE_INIT_TOOLS_DIR)/.source + +$(MODULE_INIT_TOOLS_DIR)/.configured: $(MODULE_INIT_TOOLS_DIR)/.source + (cd $(MODULE_INIT_TOOLS_DIR); \ + $(TARGET_CONFIGURE_OPTS) \ + INSTALL=$(MODULE_INIT_TOOLS_DIR)/install-sh \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/ \ + --sysconfdir=/etc \ + --program-transform-name='' \ + ); + touch $(MODULE_INIT_TOOLS_DIR)/.configured; + +$(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY): $(MODULE_INIT_TOOLS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(MODULE_INIT_TOOLS_DIR) + +ifeq ($(strip $(BR2_PACKAGE_MODUTILS)),y) +$(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY): \ + $(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY) \ + modutils +else +$(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY): \ + $(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY) +endif +ifeq ($(strip $(BR2_PACKAGE_MODUTILS)),y) + $(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) moveold +endif + STRIPPROG='$(STRIPPROG)' \ + $(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) install-exec + rm -Rf $(TARGET_DIR)/usr/man + +module-init-tools: uclibc $(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY) + +module-init-tools-source: $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE) + +module-init-tools-clean: + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(MODULE_INIT_TOOLS_DIR) uninstall + -$(MAKE) -C $(MODULE_INIT_TOOLS_DIR) clean + +module-init-tools-dirclean: + rm -rf $(MODULE_INIT_TOOLS_DIR) + +############################################################# +# +## Toplevel Makefile options +# +############################################################## +ifeq ($(strip $(BR2_PACKAGE_MODULE_INIT_TOOLS)),y) +TARGETS+=module-init-tools +endif |