Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
2,317 Views

IP table support in Yocto

Hi,

We are using Intel Quark SoC based SBC. It supports two Ethernet ports.

I need you help in including IP table support (port forward feature) in Yocto image. By doing some initial search, it seems rebuilding of kernel image is required.I guess Yocto does not support "apt-get install" option to include packages.I am using BSP user guide for rebuilding the kernel image. Could you help me to select specific option (in kernel configuration) which is required for IP table/port forward?

Cheers,

Ram

12 Replies
Highlighted
Honored Contributor I
36 Views

Hi Ram,

The yoccto package manager is opkg (yocto is not related to Debian, so no apt-"tools" available), I'd try with opkg first.

There is a thread on building the kernel with iptables-yocto:

but I don't know if it's useful, I've not tried myself.

HTH,

Fernando.

Highlighted
Community Manager
36 Views

Hello Ram2255,

 

 

Rebuilding the image might not be the only option you have, you could try installing the Iptables package ( http://www.linuxfromscratch.org/blfs/view/svn/postlfs/iptables.html) from source. If there are too many dependencies or if you have issues installing it you will indeed require to add it to the image using the BSP. For this I would suggest you to read sections 4.1.2.2 and 5.7 of Yocto's Mega Manual ( http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html) in order to learn how to modify the image using menuconfig.

 

 

-Peter.
Highlighted
Community Manager
36 Views

Hello Ram2255,

 

 

Do you have any update about this?

 

 

-Peter.
0 Kudos
Highlighted
Community Manager
36 Views

No; Not yet Peter!!!

I am still trying..

Even i tried to start with fresh build environment. It seems some of the modules are moved in git (BSP V 1.0.1).

- Ramesh

0 Kudos
Highlighted
Honored Contributor I
36 Views

Hi Ramesh,

Would you please explain what you tried and how it failed? Explicit technical details would be useful.

Fernando.

0 Kudos
Highlighted
Honored Contributor I
36 Views

Ram2255 wrote:

No; Not yet Peter!!!

I am still trying..

Even i tried to start with fresh build environment. It seems some of the modules are moved in git (BSP V 1.0.1).

- Ramesh

Just in case: I've followed the instructions in the link provided by Peter, and they worked, at least in that no command/step end up giving a failure.

I'm using the latest yocto eglibc image

https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Software ==>

Intel® Galileo Board microSD Card Linux* Operating System Image

https://software.intel.com/galileo-image/latest Latest Yocto* Poky image for Galileo

(iot-devkit-prof-dev-image-galileo-20160606)

I'm using Intel Galileo (aka Intel Galileo Gen1)

Installation sources and step-by-step guide:

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/iptables.html Iptables-1.6.0

a) Download sources

b) unzip-untar sources

c)

./configure --prefix=/usr \

--sbindir=/sbin \

--disable-nftables \

--enable-libipq \

--with-xtlibdir=/lib/xtables

d)

make; make install

e)

ln -sfv ../../sbin/xtables-multi /usr/bin/iptables-xml

f)

for file in ip4tc ip6tc ipq iptc xtables

do

mv -v /usr/lib/lib${file}.so.* /lib &&

ln -sfv ../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so

done

Some of the steps take a relatively long time (> 20 minutes)

I did not "use" this installation, I did not set up rules, etc., I just wanted to see if the installation from sources process worked, or at least did not have problems in the curren eglibc yocto image provided by Intel.

HTH,

Fernando.

0 Kudos
Highlighted
Community Manager
36 Views

Thanks Fernando!!!

I am having issues at step 'd'. Btw, i am using BSP V1.0.1 (Its running project and i can not migrate it to latest BSP immediately due to other dependencies in the project)

Error message :

'

*** Error: No suitable bison/yacc found. ***

Please install the 'bison' package.

'

I tried opkg update for this purpose & encountered the error message of 'wget: bad address 'repo.opkg.net''

0 Kudos
Highlighted
Honored Contributor I
36 Views

Ram2255 wrote:

Thanks Fernando!!!

I am having issues at step 'd'. Btw, i am using BSP V1.0.1 (Its running project and i can not migrate it to latest BSP immediately due to other dependencies in the project)

Error message :

'

*** Error: No suitable bison/yacc found. ***

Please install the 'bison' package.

'

I tried opkg update for this purpose & encountered the error message of 'wget: bad address 'repo.opkg.net''

Welcome.

I'm not using yocto sources, I'm using the Linux image.

Fernando.

0 Kudos
Highlighted
Community Manager
36 Views

Why can't you update to the latest BSP? What dependencies issues would you have? I mean, using the latest one would probably cause you less issues.

 

 

You are receiving the error message above when running the make command, right? If so, that means that you are missing a dependency and you should install bison first. You can find its source code in http://ftp.gnu.org/gnu/bison/, its installation steps can be found within the package's files.

 

 

-Peter.
0 Kudos
Highlighted
Honored Contributor I
36 Views

Hi Peter,

I think your post should be addressed to Ram2255, I'm not using yocto sources-BSP, I'm using yocto eglibc (binary, as downloaded from the Intel site) + iptables sources... or maybe I'm losing something...

Fernando.

0 Kudos
Highlighted
Community Manager
36 Views

Hi FGT,

 

 

My reply was addressed to Ram, I clicked on the reply button of your post by mistake. I apologize.

 

 

-Peter.
0 Kudos
Highlighted
Community Manager
36 Views

Hello Ram,

 

 

Do you have any update about this?

 

 

-Peter.
0 Kudos