2008年7月11日 星期五

Cross-compiling madwafi for ARM

svn checkout http://svn.madwifi.org/madwifi/trunk madwifi
make KERNELPATH=`pwd`/kernels/linux-2.6.16-current ATH_RATE="ath_rate/sample" TARGET="armv4-le-elf" TOOLPREFIX="arm-linux-" DESTDIR="`pwd`/target" STRIP=arm-linux-strip modules
make KERNELPATH=`pwd`/kernels/linux-2.6.16-current ATH_RATE="ath_rate/sample" TARGET="armv4-le-elf" TOOLPREFIX="arm-linux-" DESTDIR="`pwd`/target" STRIP=arm-linux-strip install

Since rev1711 ( new HAL v0.9.18.0), including madwifi-0.9.4, until 2413, building with arm toolchain without VFP would have the following problem. It is fixed by adding "LDOPTS += --no-warn-mismatch" at rev2414. Revision before 1710 and after 2414 has no this problem.
# make KERNELPATH=`pwd`/kernels/linux-2.6.16-current ATH_RATE="ath_rate/sample" TARGET="armv4-le-elf" TOOLPREFIX="arm-linux-" DESTDIR="`pwd`/target" STRIP=arm-linux-strip modules
ARGET="armv4-le-elf" TOOLPREFIX="arm-linux-" DESTDIR="`pwd`/target" modules
Checking requirements... ok.
Checking kernel configuration... ok.
make -C./kernels/linux-2.6.16-current SUBDIRS=/home/mac/star/madwifi-0.9.4 modules
make[1]: Entering directory `./kernels/linux-2.6.16-current'
CC [M] ./madwifi-0.9.4/ath/if_ath.o
In file included from ./madwifi-0.9.4/ath/../include/compat.h:138,
from :17:
include/linux/skbuff.h: In function `__dev_alloc_skb':
include/linux/skbuff.h:1053: warning: ISO C90 forbids mixed declarations and code
CC [M] /home/mac/star/madwifi-0.9.4/ath/if_ath_pci.o
In file included from ./madwifi-0.9.4/ath/../include/compat.h:138,
from :17:
include/linux/skbuff.h: In function `__dev_alloc_skb':
include/linux/skbuff.h:1053: warning: ISO C90 forbids mixed declarations and code
LD [M] ./madwifi-0.9.4/ath/ath_pci.o
CC [M] ./madwifi-0.9.4/ath_hal/ah_os.o
In file included from ./madwifi-0.9.4/ath_hal/../include/compat.h:138,
from :16:
include/linux/skbuff.h: In function `__dev_alloc_skb':
include/linux/skbuff.h:1053: warning: ISO C90 forbids mixed declarations and code
HOSTCC ./madwifi-0.9.4/ath_hal/uudecode
UUDECODE ./madwifi-0.9.4/ath_hal/armv4-le-elf.hal.o
LD [M] ./madwifi-0.9.4/ath_hal/ath_hal.o
arm-linux-ld: ERROR: ./madwifi-0.9.4/ath_hal/armv4-le-elf.hal.o uses VFP instructions, whereas ./madwifi-0.9.4/ath_hal/ath_hal.o does not
arm-linux-ld: failed to merge target specific data of file ./madwifi-0.9.4/ath_hal/armv4-le-elf.hal.o
make[3]: *** [./madwifi-0.9.4/ath_hal/ath_hal.o] Error 1
make[2]: *** [./madwifi-0.9.4/ath_hal] Error 2
make[1]: *** [_module_./madwifi-0.9.4] Error 2

3.8 Options to Request or Suppress Warnings
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
-Werror
Make all warnings into errors.

1 則留言: