On 14-12-03 03:01 AM, Olivier Roth wrote:
Hi,

I'm trying to include an configuration fragment to the linux-yocto kernel.
The fragment is correctly applied, but there is another fragment (coming
from "kernel-cache/features/netfilter/netfilter.cfg") that is overriding
some of my configurations.

This is my structure inside "meta-mine/receipes-kernel/linux/":
.
├── files
│       └── mine.cfg
└── linux-yocto_3.10.bbappend


This is in my linux-yocto_3.10.bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://fw104-fragment.cfg"

And in my mine.cfg I have some configuration options like:

CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_ACCT=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
....


So when I do an bitbake linux-yocto -c kernel_configcheck -f the
configuration fragment mine.cfg is correctly applied, but, I have this
in the ".meta/cfg/standard/common-pc/required_redefinition.txt":

Value of CONFIG_IP_NF_FILTER is redefined by fragment
.meta/cfg/files/mine.cfg.sanitized:
Previous value: CONFIG_IP_NF_FILTER=m
New value: CONFIG_IP_NF_FILTER=y
--
Value of CONFIG_IP_NF_FILTER is redefined by fragment
.meta/cfg/kernel-cache/features/netfilter/netfilter.cfg.sanitized:
Previous value: CONFIG_IP_NF_FILTER=y
New value: CONFIG_IP_NF_FILTER=m
Value of CONFIG_IP_NF_IPTABLES is redefined by fragment
.meta/cfg/files/mine.cfg.sanitized:
Previous value: CONFIG_IP_NF_IPTABLES=m
New value: CONFIG_IP_NF_IPTABLES=y
--
Value of CONFIG_IP_NF_IPTABLES is redefined by fragment
.meta/cfg/kernel-cache/features/netfilter/netfilter.cfg.sanitized:
Previous value: CONFIG_IP_NF_IPTABLES=y
New value: CONFIG_IP_NF_IPTABLES=m
........

So my configuration is applied correclty, but this
"netfilter.cfg.sanitized" is always overriding my stuff.

What could I do to disable this netfilter.cfg, or to patch my own
configuration after this one?

Which release / branch are you building from ?  There are a couple of
ways to solve this, but they change a bit based on the release.

What you are hitting is that the recipe is specifying netfilter in
the KERNEL_FEATURES. Features are a 'contract' between the build
system/userspace and the kernel configuration, if those values are
not present, then something may not work.  To enforce that contract,
kernel features are applied after configuration fragments on the
SRC_URI.

So you can either override KERNEL_FEATURES and pull out the
netfilter specification, or create your own KERNEL_FEATURE in your
layer, and specify your fragment there. Since your new fragment
is also a kernel feature, you can put it last, and have it applied
after the ones defined in the base recipes.

Bruce


Thanks for your help!


Regards

Roth Olivier







--
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to