[OpenWrt-Devel] Linux kernel config options handling in OpenWRT

Hauke Mehrtens hauke at hauke-m.de
Mon Aug 17 17:29:11 EDT 2015


On 08/17/2015 10:43 AM, Alexey Brodkin wrote:
> Hello,
> 
> I'm playing with OpenWRT for a new platform and have a question on
> how OpenWRT handles KCONFIG kernel options.
> 
> For example I select "KernelPackage/crypto-core" in OpenWRT's menuconfig
> then KCONFIG is populated with:
> ------------------>8--------------------
> CONFIG_CRYPTO=y
> CONFIG_CRYPTO_HW=y
> CONFIG_CRYPTO_BLKCIPHER
> CONFIG_CRYPTO_ALGAPI
> ------------------>8--------------------
> 
> From what I may see from grepping through OpenWRT that KCONFIG value
> is only used to determine if those options are enabled in kernel configuration
> but not for force selection of options in kernel.

They are mainly used for selecting the config options in the kernel. I
do not know how exactly it is done.

> In other words if I want to get crypto core built I need to make sure first
> that in my say "target/linux/board/config-4.1" options mentioned above are
> enabled. Is that observation correct?

no

> I'm asking because my initial assumption was I need to provide a minimal
> kernel configuration in "target/linux/board/config-4.1" and then on
> selection of kmods in OpenWRT's menuconfig missing config options
> will be automatically added in kernel config.

Your initial assumption was correct. You should provide a minimal
"target/linux/board/config-4.1" which selects all kernel options which
will be compiled into the main kernel image, it should not contain any
option selected as a module, everything you want to build as a module
should be defined in a OpenWrt kernel package and they it can be
selected optional.

> But apparently no options are auto-enabled because I'm seeing that kind
> of build failure if CONFIG_CRYPTO_BLKCIPHER is not explicitly set in my
> kernel config:
> ------------------>8--------------------
> NOTICE: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
> -4.1.3/crypto/crypto_algapi.ko' is built-in.
> ERROR: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
> -4.1.3/crypto/crypto_blkcipher.ko' is missing.
> modules/crypto.mk:30: recipe for target 'xxx/openwrt/bin/axs10x
> -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk' failed
> make[3]: *** [xxx/openwrt/bin/axs10x
> -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk] Error 1
> ------------------>8--------------------

The kmod-crypto-core from KernelPackage/crypto-core should select the
CONFIG_CRYPTO_BLKCIPHER option.

Hauke
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list