<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 51: Compiling for ARM</title><link href="https://sourceforge.net/p/linux-gpib/bugs/51/" rel="alternate"/><link href="https://sourceforge.net/p/linux-gpib/bugs/51/feed.atom" rel="self"/><id>https://sourceforge.net/p/linux-gpib/bugs/51/</id><updated>2016-02-05T08:14:32.541000Z</updated><subtitle>Recent changes to 51: Compiling for ARM</subtitle><entry><title>#51 Compiling for ARM</title><link href="https://sourceforge.net/p/linux-gpib/bugs/51/?limit=25#ae0d" rel="alternate"/><published>2016-02-05T08:14:32.541000Z</published><updated>2016-02-05T08:14:32.541000Z</updated><author><name>E Saul</name><uri>https://sourceforge.net/u/odo2064/</uri></author><id>https://sourceforge.net1b286b17e32abbe2a6ba9f42e50fccfc0dc34acf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Where in the world would someone want to crosscompile this for the Raspi??? it doesn't take 5 minutes even on Raspi1.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#51 Compiling for ARM</title><link href="https://sourceforge.net/p/linux-gpib/bugs/51/?limit=25#10fb" rel="alternate"/><published>2013-05-27T22:45:32.708000Z</published><updated>2013-05-27T22:45:32.708000Z</updated><author><name>Andreas Huettel</name><uri>https://sourceforge.net/u/dilfridge/</uri></author><id>https://sourceforge.net0035146cf62dcd4dc461238435146ebf19392bce</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I don't think the issue is with the linux-gpib files (I have just completed 99% successfully a native build of 3.2.17(plus r1600) on armv5tel &lt;span&gt;[*]&lt;/span&gt;; the only errors were the unresolved symbols request_dma and free_dma in pc2_gpib.ko as above, but the binaries were all generated fine). Please check your cross-compile environment- do you mabe have special arm equivalents for the automake/autoconf binaries, similar to ${CROSS_COMPILE}gcc as the arm gcc? configure.log might be interesting, too.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[*]&lt;/span&gt;&lt;br /&gt;
cassis portage # uname -a&lt;br /&gt;
Linux cassis 3.7.10-gentoo #2 Mon Apr 1 07:44:36 CEST 2013 armv5tel Feroceon 88FR131 rev 1 (v5l) Marvell OpenRD Ultimate Board GNU/Linux&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Compiling for ARM</title><link href="https://sourceforge.net/p/linux-gpib/bugs/51/" rel="alternate"/><published>2012-04-10T17:23:58Z</published><updated>2012-04-10T17:23:58Z</updated><author><name>Paul Boschert</name><uri>https://sourceforge.net/u/ebcdic-paul/</uri></author><id>https://sourceforge.net729b59c1bce68b73e9dadc7f387a7d6422b48f4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a NI USB to GPIB converter I'm trying to get working with Linux.  The ARM's operating system is Debian 6.0 sid.&lt;/p&gt;
&lt;p&gt;The package libgpib0-dev hasn't been built for the arm architecture so instead I'm compiling from the source.  I've checked out linux-gpib from your svn repository (tried with revision 1588 and 1584) after reading &lt;a href="http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3458217&amp;amp;group_id=42378&amp;amp;atid=432940."&gt;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3458217&amp;amp;group_id=42378&amp;amp;atid=432940.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'm building on Ubuntu 10.04.3 32-bit, trying to cross compile for the ARM architecture.&lt;br /&gt;
I've exported ARCH=arm, and exported CROSS_COMPILE=/path/to/crosscompile/env/arm-arago-linux-gnueabi-&lt;br /&gt;
After running ./bootstrap I run ./configure:&lt;br /&gt;
./configure \
--host=arm-arago-linux-gnueabi \
--with-linux-srcdir=${HOME}/workspace/trunk/linux-omap/ \
--prefix=${HOME}/cm-t3517/rootfs/ \
--disable-guile-binding \
--disable-perl-binding \
--disable-php-binding \
--disable-python-binding \
--disable-tcl-binding&lt;/p&gt;
&lt;p&gt;Then when I make I get the following errors:&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function 'send_command':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:230:2: error: implicit declaration of function 'get_fs'&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:231:2: error: implicit declaration of function 'set_fs'&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:231:10: error: 'KERNEL_DS' undeclared (first use in this function)&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:231:10: note: each undeclared identifier is reported only once for each function it appears in&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function 'usb_gpib_detach':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:493:12: error: 'KERNEL_DS' undeclared (first use in this function)&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function 'usb_gpib_read':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:723:12: error: 'KERNEL_DS' undeclared (first use in this function)&lt;br /&gt;
make[6]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.o] Error 1&lt;br /&gt;
make[5]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/lpvo_usb_gpib] Error 2&lt;br /&gt;
make[4]: *** [_module_/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib] Error 2&lt;/p&gt;
&lt;p&gt;Following your advice at (http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3458217&amp;amp;group_id=42378&amp;amp;atid=432940) I add #include &amp;lt;asm/uaccess.h&amp;gt;&lt;/p&gt;
&lt;p&gt;I re-make and get the following errors:&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c: In function 'pc2_generic_attach':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c:299:3: error: implicit declaration of function 'request_dma'&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c: In function 'pc2_detach':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c:366:4: error: implicit declaration of function 'free_dma'&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c: In function 'pc2a_common_attach':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c:429:3: warning: 'check_region' is deprecated (declared at include/linux/ioport.h:160)&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.c:432:2: warning: 'check_region' is deprecated (declared at include/linux/ioport.h:160)&lt;br /&gt;
make[6]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2/pc2_init.o] Error 1&lt;br /&gt;
make[5]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/pc2] Error 2&lt;br /&gt;
make[4]: *** [_module_/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib] Error 2&lt;/p&gt;
&lt;p&gt;Since &amp;lt;asm/dma.h&amp;gt; is in the include list, I resolve this by adding #ifdef CONFIG_ISA_DMA_API around the calls to request_dma and free_dma.  I also change the calls to check_region to check_mem_region even though it's just a warning.&lt;/p&gt;
&lt;p&gt;I re-make and get the following errors:&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/tnt4882/mite.c: In function 'mite_init':&lt;br /&gt;
/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/tnt4882/mite.c:87:3: error: implicit declaration of function 'pci_dev_get'&lt;br /&gt;
make[6]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/tnt4882/mite.o] Error 1&lt;br /&gt;
make[5]: *** [/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib/tnt4882] Error 2&lt;br /&gt;
make[4]: *** [_module_/home/paul-dev/workspace/linux-gpib_1588/linux-gpib/drivers/gpib] Error 2&lt;/p&gt;
&lt;p&gt;I resolved this by adding a #ifdef CONFIG_PCI around the call to pci_dev_get&lt;/p&gt;
&lt;p&gt;I re-make and all the kernel modules compile successfully.&lt;br /&gt;
Running file on one of the modules indicated it was an ARM binary.  Oddly, some of the test binary tools like gpib_config and ibtest were listed as x86 binaries.  When I tried make install, I can't get past the following errors:&lt;/p&gt;
&lt;p&gt;cc1: error: unrecognized command line option "-m64"&lt;br /&gt;
cc1: error: unrecognized command line option "-mno-red-zone"&lt;br /&gt;
cc1: error: unrecognized command line option "-mcmodel=kernel"&lt;br /&gt;
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"&lt;/p&gt;
&lt;p&gt;When I run ${CROSS_COMPILE}gcc -dumpspecs and grep for the above options, they're not listed.  However when I run gcc -dumpspecs and grep for the above options, they are listed.  Some how the specs for my local copy of gcc are being included in the make install.&lt;/p&gt;
&lt;p&gt;I believe there are some issues with the automake scripts because gpib_config and ibtest are still x86 binaries and somehow local gcc specs are being used instead of the cross compiler's specs.&lt;/p&gt;
&lt;p&gt;The kernel source I'm using is based on the linux-omap tree and I've been cross compiling it successfully for months using the same cross compiler.&lt;/p&gt;
&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>