[Olsr-dev] Building on Android

Charles Boyd (spam-protected)
Fri Jun 25 20:52:07 CEST 2010

Hi Everyone.

I notice that most of the compiler warnings which Mitar mentioned come from
the file olsrd/src/linux/kernel_routes_ioctl.c (when trying to compile the
latest version of olsrd). It seems that major changes have happened in the
/linux directory.

The first difference I noted between the new version and the older version
is that linux/kernel_routes.c is no longer there, but instead we have
kernel_routes_ioctl (roughly the same as the old kernel_routes) and a new

I get some interesting errors about specific functions in
kernel_routes_ioctrl.c, namely from olsr_ioctrl_add_route6 and
olsr_ioctrl_del_route6. I am also seeing the repeated warnings come up about
"cast increases required alignment of target type".

from add_route6:
src/linux/kernel_routes_ioctl.c:195: error: storage size of 'kernel_route'
isn't known
src/linux/kernel_routes_ioctl.c:200: error: invalid application of 'sizeof'
to incomplete type 'struct in6_rtmsg'
from del_route6:
src/linux/kernel_routes_ioctl.c:296: error: storage size of 'kernel_route'
isn't known
src/linux/kernel_routes_ioctl.c:301: error: invalid application of 'sizeof'
to incomplete type 'struct in6_rtmsg'

Has there been a change in the type definition for in6_rtmsg?

There haven't been too many changes in the _route6 functions, so perhaps
there is some other, more hidden change that's causing these problems.

I will write more later as I find more things out.

- Charles

On Fri, Jun 25, 2010 at 8:31 AM, Mitar <(spam-protected)> wrote:

> Hi!
> On Fri, Jun 25, 2010 at 8:01 AM, Sven-Ola Tuecke <(spam-protected)> wrote:
> > - There is a command line interface to interact with wpa_supplicant named
> > "wpa_cli". wpa_cli uses a named pipe to communicate. On my samsung
> galaxy, the
> > pipe is located somewhere under /data/misc/wifi which may be changed on
> your
> > mobile phone to other location.
> When you published your solution I checked it against mine and found
> out that it seems we have different WiFi stack on Samsung Galaxy and
> mine HTC Hero. If I remember correctly. Because for me I could not
> just add a network with wpa_cli and it would work. (I tested this with
> your ff script.) And also my wifi interface is not called eth0. So
> there are some differences among Android phones on this level it
> seems.
> I first  had to change/add in /system/etc/wifi/tiwlan.ini:
> WiFiAdhoc = 1
> dot11DesiredSSID = open.wlan-lj.net
> dot11DesiredBSSType = 0
> Then I could even see ad-hoc networks in GUI and connect to them. Or
> probably just to one of them as SSID is hard-coded.
> Then I added configuration of the network to
> /data/misc/wifi/wpa_supplicant.conf. But this is probably the same as
> adding it dynamically through wpa_cli.
> One more thing about "So nothing to worry about: copiler is printing
> out hints that something in memory consumes more bytes than
> normallly."
> I was asking this because last year I have been doing one compiler to
> ARM platform and had problems because I misaligned stack (to 4 bytes
> and not to 8 as Debian ABI for armel platform specifies) before
> calling standard lib functions which then behaved really really
> interesting - while still working. For example printf still worked,
> but for unicode strings it threw out all accents. Sometimes. So it
> depended on how much code there was in a program. One more code line
> and printf worked as it should. One less and it did funny things. 4
> bytes. ;-)
> But probably GCC is smart enough to take care of all this when some of
> structures oversize. I just wanted to be sure. I like make programs
> compiling without any warnings with -Wall.
> Mitar
> --
> Olsr-dev mailing list
> (spam-protected)
> http://lists.olsr.org/mailman/listinfo/olsr-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20100625/550df25f/attachment.html>

More information about the Olsr-dev mailing list