Home/Support/Support Forum/No ip_tables.ko module available on ConnectCore6
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

No ip_tables.ko module available on ConnectCore6

0 votes
Hello,

I am working on a ConnectCore6 device. I set up a DHCP server on wlan0 and i now want to implement a home made web captive portal.
To do that trick i have to use the "iptables" command. This command is present on my system (iptables included in bitbake .conf file) but when i want to execute it, the system complains that the ip_tables.ko is missing.
Do i miss something? Has someone any idea?

Best regard

Tristan
asked May 28, 2015 in Linux by Tristan New to the Community (4 points)

Please log in or register to answer this question.

2 Answers

+1 vote
is it configured to build as a kernel module?
Do you have it in:
lib/modules/3.10.0-custom/kernel/net/ipv4/netfilter/ip_tables.ko

do you see this line when building:
INSTALL net/ipv4/netfilter/ip_tables.ko
also check this thread out:
https://e2e.ti.com/support/embedded/linux/f/354/t/327585
answered May 29, 2015 by LeonidM Veteran of the Digi Community (4,116 points)
0 votes
Thanks for your reply.

No, the ip_table.ko is not included in my image and the folder /net.. in Lib/modules/../kernel does not exist.
I check the thread but i do not really understand in which folder i have to execute the menuconfig command.
answered Jun 4, 2015 by Tristan New to the Community (4 points)
bitbake -c deveshell linux-dey
In the new terminal:
make menuconfig
bitbake -C compile linux-dey

Alternatively to configure the kernel in yocto you do:

bitbake -c menuconfig virtual/kernel
bitbake -C compile virtual/kernel
(note the capital C)

Graphical kernel configuration is not supported from the bitbake command line. You can still do it from a new shell (without the Yocto environment) once you know the kernel's source location.

Shell 1 (with DEY environment setup)
-----------------------------------------------------------

bitbake -e virtual/kernel ^WORKDIR=

Shell 2 (new environment)
-----------------------------------------

cd ${WORKDIR} (replace path from the output above)
make ARCH=arm xconfig

Once your changes are made, go back to shell 1 and do:

bitbake -C compile virtual/kernel
Thanks a lot for your help. I am now able to customize my new kernel and compile it without any error.
My last question in now how to integrate it directly in my new image? (I not want to copy manually the modules and the uImage files) I want to run the command "bitbake dey-image-graphical" and that the .sdcard file directly include my custom kernel.
I saw on other post that i have to copy the custom .config (menuconfig file) file as defconfig file in the linux-dey folder is that right? When i do that, the image compilation fails in the dey-linux- 3.10 do_compile function.
Is there any other way to achieve that?
To recap:

If you want to make changes in the kernel config, you need a second terminal to do the configuration:

Terminal-1 (with bitbake environment):

# bitbake -e virtual/kernel | grep '^S='
S="<absolute-path-to-project>/tmp/work/ccimx6sbc-dey-linux-gnueabi/linux-dey/3.10-r0/git"

Then on Terminal-2:

# cd <absolute-path-to-project>/tmp/work/ccimx6sbc-dey-linux-gnueabi/linux-dey/3.10-r0/git
# make ARCH=arm xconfig

... configure ...

Back in Terminal-1, you recompile the kernel and regenerate the boot image with the new kernel:

# bitbake -C compile virtual/kernel
# bitbake -c cleanall dey-image-graphical
# bitbake dey-image-graphical

(NOTE: first command with upper case 'C', and second command with lower case 'c')

This way you will have a boot image with the new kernel included and your rootfs images will include the kernel modules as well.

If you want to have this kernel configuration for other projects, you can copy it to the DEY installation directory, but notice that it's not a full kernel configuration what you have to copy but the minimized defconfig format. To get it you go again to your Terminal-2 window and run:

# make ARCH=arm savedefconfig

This will create a file called "defconfig" in that directory. That's the file you need to copy to your "<DEY-INSTALLDIR>/sources/meta-digi/meta-digi-arm/recipes-kernel/linux/linux-dey-3.10/ccimx6sbc/" overwriting the one over there.

Hope this helps.

--
Javier Viguera
...