Thanks for the reply!

So I am able to compile the kernel folder.

Then, in userland, I modified the main Makefile by adding (at the beginning):

>export MY_CROSS_COMPILE=arm-linux-gnueabi-
>export MY_ARCH=arm
>export MY_HOST=arm
>export MY_CC=arm-linux-gnueabi-gcc

and then modifying each entry in this way:

>libpfring:
> cd lib; ./configure --host=${MY_HOST} CC=${MY_CC} 
> CROSS_COMPILE=${MY_CROSS_COMPILE} ARCH=${MY_ARCH}; make CC=${MY_CC} 
> CROSS_COMPILE=${MY_CROSS_COMPILE} ARCH=${MY_ARCH}
>
> [etc...]

when running the main makefile, I get the errors while compiling the folder 
libs:


ar x libs/libpfring_zero_x86_64_corei7.a
ar x libs/libpfring_dna_x86_64_corei7.a
ar x libs/libpfring_zc_x86_64_corei7.a
=*= making library libpfring.a =*=
ar rs libpfring.a pfring.o pfring_mod.o pfring_utils.o pfring_mod_stack.o 
pfring_mod_usring.o pfring_hw_filtering.o pfring_dna_bouncer.o 
pfring_mod_dna_cluster.o pfring_dna_cluster.o pfring_dna_vas.o pfring_dna_sal.o 
pfring_libzero.o hugepages_lib.o  pfring_mod_dna.o pfring_dna.o 
pfring_e1000e_dna.o pfring_e1000_dna.o pfring_ixgbe_dna.o pfring_igb_dna.o 
silicom_ts.o pfring_dna_utils.o  pfring_zc_dev_e1000.o pfring_zc_dev_e1000e.o 
pfring_zc_dev_ixgbe.o pfring_zc_dev_igb.o pfring_zc_dev_rss.o 
pfring_zc_dev_sal.o pfring_mod_zc.o pfring_mod_zc_dev.o pfring_mod_zc_spsc.o 
pfring_zc_cluster.o pfring_zc_mm.o uio_lib.o hugetlb_lib.o pfring_zc_kvm.o 
pfring_zc_kvm_utils.o   
ranlib libpfring.a
=*= making library libpfring.so =*=
arm-linux-gnueabi-gcc -g -shared -static pfring.o pfring_mod.o pfring_utils.o 
pfring_mod_stack.o pfring_mod_usring.o pfring_hw_filtering.o 
pfring_dna_bouncer.o pfring_mod_dna_cluster.o pfring_dna_cluster.o 
pfring_dna_vas.o pfring_dna_sal.o pfring_libzero.o hugepages_lib.o  
pfring_mod_dna.o pfring_dna.o pfring_e1000e_dna.o pfring_e1000_dna.o 
pfring_ixgbe_dna.o pfring_igb_dna.o silicom_ts.o pfring_dna_utils.o  
pfring_zc_dev_e1000.o pfring_zc_dev_e1000e.o pfring_zc_dev_ixgbe.o 
pfring_zc_dev_igb.o pfring_zc_dev_rss.o pfring_zc_dev_sal.o pfring_mod_zc.o 
pfring_mod_zc_dev.o pfring_mod_zc_spsc.o pfring_zc_cluster.o pfring_zc_mm.o 
uio_lib.o hugetlb_lib.o pfring_zc_kvm.o pfring_zc_kvm_utils.o    -lpthread  -o 
libpfring.so
pfring.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [libpfring.so] Error 1
make[1]: Leaving directory 
`/home/maciej/phd_projects/iommus/simulations/arm-cross-compile/PF_RING-ARM/userland/lib'
make: *** [libpfring] Error 2


Thanks!
Mac

________________________________________
From: [email protected] 
[[email protected]] on behalf of 
[email protected] [[email protected]]
Sent: Saturday, July 26, 2014 12:00 PM
To: [email protected]
Subject: Ntop-misc Digest, Vol 121, Issue 23

Send Ntop-misc mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://listgateway.unipi.it/mailman/listinfo/ntop-misc
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ntop-misc digest..."


Today's Topics:

   1. A question about cross-compiling PF_RING for ARM (Besta  Maciej)
   2. Re: A question about cross-compiling PF_RING for ARM (Luca Deri)
   3. Re: A little experiment with pfbridge + BPF filter        didn't
      work (Morgan Yang)


----------------------------------------------------------------------

Message: 1
Date: Sat, 26 Jul 2014 00:42:33 +0000
From: "Besta  Maciej" <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [Ntop-misc] A question about cross-compiling PF_RING for ARM
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hello everyone,

I have a question related to compiling PF_RING. I want to cross compile it for 
ARM, and
I encountered some issues. I was able to cross-compile the kernel module, 
however I'm having some bigger
trouble while doing the same for "userland" codes.

The problem arises when trying to cross-compile the folder userland/lib. 
Regardless of what combination
of cross-compilation options I use, at some point I get some unmet dependencies 
or unrecognized files.

For example, when compiling with:
> make CC=arm-linux-gnueabi-gcc CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm
I get:
> pfring_dna_bouncer.o: file not recognized: File format not recognized

I found out that the folder userland/lib/libs contains some dependencies that 
probably work only for x86.
Thus, is it actually possible to cross-compile your software for ARM? Or the 
other hand, the Makefile contains
${CROSS_COMPILE} variables, so it would suggest there is a way for achieving 
this.

Thank you for any help/advice!

------------------------------

Message: 2
Date: Sat, 26 Jul 2014 08:50:19 +0200
From: Luca Deri <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: [Ntop-misc] A question about cross-compiling PF_RING for
        ARM
Message-ID: <[email protected]>
Content-Type: text/plain;       charset=us-ascii

Besta
Can you please provide a comprehensive error report with exact errors? We 
compile on ARM from time to time as you can see

Luca

Sent from my iPhone (sorry for typos)

> On 26/lug/2014, at 02:42, "Besta  Maciej" <[email protected]> wrote:
>
> Hello everyone,
>
> I have a question related to compiling PF_RING. I want to cross compile it 
> for ARM, and
> I encountered some issues. I was able to cross-compile the kernel module, 
> however I'm having some bigger
> trouble while doing the same for "userland" codes.
>
> The problem arises when trying to cross-compile the folder userland/lib. 
> Regardless of what combination
> of cross-compilation options I use, at some point I get some unmet 
> dependencies or unrecognized files.
>
> For example, when compiling with:
>> make CC=arm-linux-gnueabi-gcc CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm
> I get:
>> pfring_dna_bouncer.o: file not recognized: File format not recognized
>
> I found out that the folder userland/lib/libs contains some dependencies that 
> probably work only for x86.
> Thus, is it actually possible to cross-compile your software for ARM? Or the 
> other hand, the Makefile contains
> ${CROSS_COMPILE} variables, so it would suggest there is a way for achieving 
> this.
>
> Thank you for any help/advice!
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc


------------------------------

Message: 3
Date: Sat, 26 Jul 2014 00:14:05 -0700
From: Morgan Yang <[email protected]>
To: [email protected]
Subject: Re: [Ntop-misc] A little experiment with pfbridge + BPF
        filter  didn't work
Message-ID:
        <CAHV_CwZvRFaaXpNp-BLPhcO-fL=egp2qx+3m_2xerfq0ua-...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thanks Alfredo :-), it was the end of the day and I got lazy


On Fri, Jul 25, 2014 at 1:22 AM, Alfredo Cardigliano <[email protected]>
wrote:

> Hi Morgan
> what about using gdb? :-)
>
> However the getopt() optstring:
> "ha:b:c:fvpg:w:?
> should be
> ?ha:b:c:f:vpg:w:"
>
> I added -f to the code in svn.
>
> Alfredo
>
> On 25 Jul 2014, at 03:52, Morgan Yang <[email protected]> wrote:
>
> I added bpf filtering to the userland example pfbridge, using the example
> from pfcount
>
>  /* Adding BPF filter */
>   if(bpfFilter != NULL) {
>     int rc = pfring_set_bpf_filter(a_ring, bpfFilter);
>     if(rc != 0)
>       printf("pfring_set_bpf_filter(%s) returned %d\n", bpfFilter, rc);
>     else
>       printf("Successfully set BPF filter '%s'\n", bpfFilter);
>   }
>
> However, when I run it, I get a segfault immediately
> pfbridge[14908]: segfault at 8 ip 00000035b9681461 sp 00007fff3a4291a8
> error 4 in libc-2.12.so[35b9600000+18b000]
>
> I've attached modified pfbridge.
>
> I don't think i left out anything explicit, the bpf instructiion seemed
> pretty straight foward.....
> <pfbridge_mod.c>_______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
>
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://listgateway.unipi.it/mailman/private/ntop-misc/attachments/20140726/fc280f28/attachment.htm>

------------------------------

_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc


End of Ntop-misc Digest, Vol 121, Issue 23
******************************************
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to