Re: [B.A.T.M.A.N.] batman advanced in openwrt

Jacob Marble
2009-06-15T22:08:42Z

On Mon, Jun 15, 2009 at 4:03 PM, Jacob Marble<jacobmarble@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marble<jacobmarble@gmail.com> wrote:
>> On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindner<lindner_marek@yahoo.de> wrote:
>>> On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
>>>> > This message indicates that this nodes already has one interface which is
>>>> > not activate. Could you post "cat /proc/net/batman-adv/interfaces" after
>>>> > you get this result ?
>>>>
>>>> "echo 'ath0' > interfaces"
>>>> "cat interfaces"
>>>> ath0
>>>>
>>>> [     97532] Adding interface: ath0
>>>> [     97532] Can't activate module: the primary interface is not active
>>>> [     97534] Adding route towards: 00:15:6d:a7:6a:14 (via
>>>> 00:15:6d:a7:6a:14) [     97534] Creating new global hna entry:
>>>> 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
>>>
>>> It looks like a bug that I fixed in revision 1254. What version are you using ?
>>>
>>
>> 1176 (from OpenWrt repositories).  I'll get the latest svn.
>>
>
> Alright, I have OpenWrt SVN compiling, which has revision 1289.
> However, I would like to compile the batman-advanced code from the
> batman SVN repository instead.  I have tried copying the
> batman-advanced directory to [the openwrt sdk]/package/ and then run
> make, and this doesn't work.  I have tried compiling the
> batman-advanced code by simply "make
> KERNELPATH=~/OpenWrt-SDK-atheros-for-Linux-i686/" and that didn't
> work.  I have tried several paths for KERNELPATH, but I think I need
> the other cross-compile tools to be available as well...
>
> Can someone give me a quick-and-dirty "Howto compile for OpenWrt"?
> Afterwards, I could put together a nice README.openwrt for the SVN
> repository.
>
> TIA,
>
> Jake
>

I tried to define CC:

$ make KERNELPATH=~/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10/
V=99 CC=~/build/openwrt-svn/staging_dir/toolchain-mips_gcc-4.1.2_uClibc-0.9.30.1/usr/bin/mips-openwrt-linux-gcc
make -C /home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10/
REVISION=1288 M=/home/jake/build/batman-adv-svn
PWD=/home/jake/build/batman-adv-svn -j 2 modules
make[1]: Entering directory
`/home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10'
CC [M] /home/jake/build/batman-adv-svn/main.o
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
CC [M] /home/jake/build/batman-adv-svn/proc.o
make[2]: *** [/home/jake/build/batman-adv-svn/main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[2]: *** [/home/jake/build/batman-adv-svn/proc.o] Error 1
make[1]: *** [_module_/home/jake/build/batman-adv-svn] Error 2
make[1]: Leaving directory
`/home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10'
make: *** [all] Error 2