Discussion:
cross compile error with new tarball
James Ham
2008-06-19 23:18:01 UTC
Permalink
Hello,

I'm trying to cross-compile from debian lenny (2.6.24-1-486) to an arcom viper (arm) using 2.6.11.11-arcom3. I run config as follows:

make config CROSS_COMPILE=arm-linux-

then

make

All goes well until make switches to the linux source tree:

make[3]: Entering directory `/usr/src/linux-source-2.6.11.11-arcom3'
CC [M] /usr/src/linux-wlan-ng-0.2.9/src/p80211/p80211mod.o
cc1: error: invalid option `preferred-stack-boundary=2'
cc1: error: unrecognized command line option "-Wno-pointer-sign"
make[4]: *** [/usr/src/linux-wlan-ng-0.2.9/src/p80211/p80211mod.o] Error 1
make[3]: *** [_module_/usr/src/linux-wlan-ng-0.2.9/src/p80211] Error 2
make[3]: Leaving directory `/usr/src/linux-source-2.6.11.11-arcom3'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src/p80211'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src'
make: *** [all] Error 2

I've made a kernel for the target arm machine in this tree, so some of it works at least.

The cross compiler "arm-linux-gcc" is version 3.4.4

I've attached "config.in" and "config.out". Any ideas?

Regards,

Jim Ham
--
James Ham <***@porcine.com>
Solomon Peachy
2008-06-20 13:03:03 UTC
Permalink
Post by James Ham
make config CROSS_COMPILE=arm-linux-
linux-wlan-ng picks up the the build configuration that the kernel is
using. The above isn't all you'd need to build the kernel; you also
need an ARCH= value, like this:

CROSS_COMPILE=arm-linux ARCH=arm make config

- Solomon
--
Solomon Peachy ***@linux-wlan.com
AbsoluteValue Systems http://www.linux-wlan.com
721-D North Drive +1 (321) 259-0737 (office)
Melbourne, FL 32934 +1 (321) 259-0286 (fax)
Jim Ham
2008-06-20 17:12:44 UTC
Permalink
Hello Solomon,
Post by Solomon Peachy
Post by James Ham
I'm trying to cross-compile from debian lenny (2.6.24-1-486) to an
make config CROSS_COMPILE=arm-linux-
linux-wlan-ng picks up the the build configuration that the kernel is
using. The above isn't all you'd need to build the kernel; you also
CROSS_COMPILE=arm-linux ARCH=arm make config
- Solomon
I did a "make distclean", then

CROSS_COMPILE=arm-linux- ARCH=arm make config

then "make".

This changes the error, but it still doesn't complete:

...
make[2]: Entering directory `/usr/src/linux-wlan-ng-0.2.9/src/p80211'
make -C /usr/src/arcom-linux M='/usr/src/wlan2/src/
/usr/src/linux-wlan-ng-0.2.9/src/p80211' WLAN_SRC=/usr/src/wlan2/src/
modules
make[3]: Entering directory `/usr/src/linux-source-2.6.11.11-arcom3'
CC [M] /usr/src/linux-wlan-ng-0.2.9/src/p80211/p80211mod.o
cc1: error: invalid option `abi=apcs-gnu'
make[4]: *** [/usr/src/linux-wlan-ng-0.2.9/src/p80211/p80211mod.o] Error 1
make[3]: *** [_module_/usr/src/linux-wlan-ng-0.2.9/src/p80211] Error 2
make[3]: Leaving directory `/usr/src/linux-source-2.6.11.11-arcom3'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src/p80211'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src'
make: *** [all] Error 2

Any help you can give me is greatly appreciated.

Regards,

Jim Ham

Porcine Associates
+1.650.326.2669
www.porcine.com
Jim Ham
2008-06-20 18:34:05 UTC
Permalink
Hello Solomon,

I've gotten a lot farther, but still no joy.

Google is my friend :-) I found a reference that a line in the arm
Makefile needed to be changed as follows:

PLATFORM_CPPFLAGS + = $ (call cc-option,-mapcs-32,-mabi = apcs-gnu)
改成: With:
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call
cc-option,-mabi=apcs-gnu),) PLATFORM_CPPFLAGS + = $ (call
cc-option,-mapcs-32, $ (call cc-option,-mabi = apcs-gnu),)
再make,就OK了。

Then I discover that ARCH needs to be in the environment, but
CROSS_COMPILE needs to be an argument to "make config". so

export ARCH=arm
make config CROSS_COMPILE=arm-linux-

works. BUT something had tampered with my linux source tree so I was
getting lots of errors when wlan tried to compile modules. So I did a
"make distclean" on the tree and made the kernel _again_.

Then back to the wlan source tree, another make distclean, make config
and make. This got me to the point below.

Googling gfp_t, it appears that this type did not appear until kernel
2.6.14, and I'm cross-compiling to 2.6.11. Again, any suggestions?

Regards,

Jim Ham

...
CC [M] /usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/prism2_usb.o
In file included from
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/prism2_usb.c:2:
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:253: error:
parse error before "gfp_t"
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:253:
warning: function declaration isn't a prototype
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:256: error:
parse error before "gfp_t"
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:256:
warning: function declaration isn't a prototype
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:470: error:
parse error before "gfp_t"
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:471:
warning: function declaration isn't a prototype
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c: In
function `submit_rx_urb':
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:484: error:
`hw' undeclared (first use in this function)
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:484: error:
(Each undeclared identifier is reported only once
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:484: error:
for each function it appears in.)
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:493: error:
`memflags' undeclared (first use in this function)
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c: At top level:
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:535: error:
parse error before "gfp_t"
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:536:
warning: function declaration isn't a prototype
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c: In
function `submit_tx_urb':
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:537: error:
`hw' undeclared (first use in this function)
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:546: error:
`tx_urb' undeclared (first use in this function)
/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/hfa384x_usb.c:546: error:
`memflags' undeclared (first use in this function)
make[5]: ***
[/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver/prism2_usb.o] Error 1
make[4]: *** [_module_/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver]
Error 2
make[4]: Leaving directory `/usr/src/linux-source-2.6.11.11-arcom3'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src/prism2/driver'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src/prism2'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-wlan-ng-0.2.9/src'
make: *** [all] Error 2


Porcine Associates
+1.650.326.2669
www.porcine.com
Jim Ham
2008-06-20 18:45:23 UTC
Permalink
Hello Solomon,

I guess I'm just impatient, but I added the following to the top of
hfa384x_usb.c just under all the includes:

#ifndef gfp_t
#define gfp_t int
#endif

Now the tree makes successfully.

Regards,

Jim

Porcine Associates
+1.650.326.2669
www.porcine.com
Jim Ham
2008-06-20 22:06:32 UTC
Permalink
Hello,

I've applied the patches from Pavel. The project now makes without
errors and I can load the modules on the target also without errors.

Great!

Regards,

Jim

Porcine Associates
+1.650.326.2669
www.porcine.com

Loading...