【发布时间】:2019-06-17 16:01:42
【问题描述】:
我使用CORE_IMAGE_EXTRA_INSTALL += "iptables" 将iptables 包添加到我的设备映像中。
我尝试在设备上运行它并收到以下错误消息:
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.9.11-1.0.0+gc27010d
iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
好像我缺少内核模块。
在将标准内核模块添加到映像时需要您的帮助(在哪里可以找到所有模块文件以及如何将其添加和加载到映像中)。
【问题讨论】:
-
你需要在你的内核中激活iptables,激活方式取决于你的内核版本。
-
内核版本为 4.9.11-1.0.0。下一步是什么?
-
在 Yocto 中,您有一种类型的内核允许 configuration fragments 和一种不允许的类型,您必须替换整个 defconfig。在任何情况下,您都可以使用
bitbake -c menuconfig virtual/kernel配置您的内核,并在网络中检查是否设置了 netfilter/iptables 选项。 -
谢谢。我使用了
bitbake -c menuconfig virtual/kernel,但找不到包含iptables的模块。你知道在哪里可以找到它吗? -
iptables 内核端称为 netfilter,例如见elixir.bootlin.com/linux/latest/source/net/netfilter/Kconfig。您可以在控制台菜单中搜索带有“/”的选项。
标签: kernel-module yocto