Well, it looks like third time is the charm. While the previous
patch worked well, it did generate a lot of warning when
using "make menuconfig". This was because I over optimized.
Signed-off-by: Jose Vasconcellos <[EMAIL PROTECTED]>
Jose Vasconcellos wrote:
Hi Claudio,
Yes, this problem is not target specific. The issue is that if the
kernel .config file is modified such that some crypto files are
included in the kernel build then the build of the crypto module
breaks.
I think the solution is to check to see if the modules are already
included in the kernel before building them. This is what I'm
trying to do in the patch.
My previous patch was not correct as my use of conditionals
inside a define is broken; I'm not clear how it worked. Attached
is hopefully a proper patch. I spent the day testing so I think it's
in good shape. Feedback is welcomed.
Jose
Claudio wrote:
Hi Jose
I have found the same problem on etrax some months ago, issues
reported on https://dev.openwrt.org/ticket/3726
I believe that avoid to overwrite CRYPTO_* variable inside default
kernel can fix this problem (see the proposed patch on ticket)
Regards
2008/10/30 Jose Vasconcellos <[EMAIL PROTECTED]>:
Problem: newer kernels (2.6.26.7, 2.6.27) may force parts of the crypto
subsystem into the kernel if there are dependencies on the crypto
subsystem. This breaks the package/kernel/modules/crypto.mk. This fix
checks the kernel .config file to see if the module is already included
in the kernel (CONFIG_CRYPTO_.*=y) and if it is, then it's not added to
the build.
Signed-off-by: Jose Vasconcellos <[EMAIL PROTECTED]>
Index: package/kernel/modules/crypto.mk
===================================================================
--- package/kernel/modules/crypto.mk (revision 13088)
+++ package/kernel/modules/crypto.mk (working copy)
@@ -33,6 +33,17 @@
# XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
# always set, even if no hash modules are selected
define KernelPackage/crypto-core
+ crypto_modules := $$(shell grep ^CONFIG_CRYPTO_ $(LINUX_DIR)/.config)
+ crypto_files :=
+ # only add files that are not part of the kernel
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_ALGAPI=y,$$(crypto_modules)),,crypto_algapi)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_BLKCIPHER=y,$$(crypto_modules)),,$(BLKCIPHER_PREFIX)blkcipher)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_ECB=y,$$(crypto_modules)),,ecb)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_CBC=y,$$(crypto_modules)),,cbc)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_DEFLATE=y,$$(crypto_modules)),,deflate)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_HASH=y,$$(crypto_modules)),,crypto_hash)
+ crypto_files += $$(if $$(findstring CONFIG_CRYPTO_MANAGER=y,$$(crypto_modules)),,cryptomgr)
+
SUBMENU:=$(CRYPTO_MENU)
TITLE:=Core CryptoAPI modules
KCONFIG:= \
@@ -46,22 +57,8 @@
CONFIG_CRYPTO_HMAC \
CONFIG_CRYPTO_MANAGER
FILES:= \
- $(LINUX_DIR)/crypto/crypto_algapi.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/$(BLKCIPHER_PREFIX)blkcipher.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/cbc.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/ecb.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/crypto_hash.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/crypto/cryptomgr.$(LINUX_KMOD_SUFFIX)
- AUTOLOAD:=$(call AutoLoad,01, \
- crypto_algapi \
- cryptomgr \
- crypto_hash \
- $(BLKCIPHER_PREFIX)blkcipher \
- cbc \
- ecb \
- deflate \
- )
+ $$(patsubst %,$(LINUX_DIR)/crypto/%.$(LINUX_KMOD_SUFFIX),$$(crypto_files))
+ AUTOLOAD:=$(call AutoLoad,01,$$(crypto_files))
endef
define KernelPackage/crypto-core/2.4
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel