b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211
@ 2016-06-08 10:03 Harms, Hannes
  2016-06-08 11:20 ` Sven Eckelmann
  0 siblings, 1 reply; 4+ messages in thread
From: Harms, Hannes @ 2016-06-08 10:03 UTC (permalink / raw)
  To: b.a.t.m.a.n


Hi,

I want to test the new batman V with throughput based metric, but I
could not find out how to compile batman-adv against cfg80211 from linux 
backports.

At the moment first I am compiling cfg80211 and ath10k from the 
backports tree.
After that I manually copy the created Modules.symvers from backports 
build dir to the batman-adv folder
and running make with  KBUILD_EXTRA_SYMBOLS, because otherwise I am 
getting a warning that the
cfg80211_get_station symbol is missing.

Then batman-adv compiles fine.
After loading the module I am getting an error with 
batadv_v_elp_throughput_metric_update :

[  150.332710] Unable to handle kernel NULL pointer dereference at 
virtual address 00000000
[  150.341079] pgd = 80004000
[  150.343900] [00000000] *pgd=00000000
[  150.347735] Internal error: Oops: 80000007 [#1] SMP ARM
[  150.347768] Modules linked in: batman_adv(O) bluetooth 6lowpan_iphc 
arc4 sky2 ath10k_pci(O) ath10k_core(O) ath(O) mac80211(O) ftdi_sio 
usbserial cfg80211(O) compat(O)
[  150.347779] CPU: 0 PID: 21 Comm: kworker/u4:1 Tainted: G           O 
3.14.48+yocto+g36eba1d #1
[  150.347836] Workqueue: bat_events 
batadv_v_elp_throughput_metric_update [batman_adv]
[  150.347841] task: 9c0c5f80 ti: 9c1e4000 task.ti: 9c1e4000
[  150.347848] PC is at 0x0
[  150.347851] LR is at 0x0
[  150.347857] pc : [<00000000>]    lr : [<00000000>] psr: 20070013
[  150.347857] sp : 9c1e5f08  ip : 0000001e  fp : 9c004400
[  150.347861] r10: 9c1e4008  r9 : 00000000  r8 : 9c004400
[  150.347865] r7 : 00000000  r6 : 9de20500  r5 : 00000002  r4 : 9c1bc980
[  150.347868] r3 : 96a0ee38  r2 : 00000001  r1 : 00000000  r0 : 96a0ee00
[  150.347874] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM 
Segment kernel
[  150.347878] Control: 10c53c7d  Table: 2697804a  DAC: 00000015
[  150.347882] Process kworker/u4:1 (pid: 21, stack limit = 0x9c1e4238)
[  150.347886] Stack: (0x9c1e5f08 to 0x9c1e6000)

Regards Hannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211
  2016-06-08 10:03 [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211 Harms, Hannes
@ 2016-06-08 11:20 ` Sven Eckelmann
  2016-06-09 13:44   ` Harms, Hannes
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-06-08 11:20 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

On Wednesday 08 June 2016 12:03:32 Harms, Hannes wrote:
> 
> Hi,
> 
> I want to test the new batman V with throughput based metric, but I
> could not find out how to compile batman-adv against cfg80211 from linux 
> backports.

You cannot build against the backports modules with the batman-adv Makefile.
This is only for systems which don't replace cfg80211 with an incompatible
version. But you should have a look at the OpenWrt compile rules (especially
NOSTDINC_FLAGS [1]). It basically uses its own compat-hack header and uses
the rest from the backports compat layer + the new cfg80211 headers.

Most important here is that you don't compile against cfg80211.h of your
kernel when your backports stuff uses complete different struct definitions
(this is most likely what causes the crash on your system).

Kind regards,
	Sven 

[1] https://github.com/openwrt-routing/packages/blob/master/batman-adv/Makefile

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211
  2016-06-08 11:20 ` Sven Eckelmann
@ 2016-06-09 13:44   ` Harms, Hannes
  2016-06-10  8:15     ` Sven Eckelmann
  0 siblings, 1 reply; 4+ messages in thread
From: Harms, Hannes @ 2016-06-09 13:44 UTC (permalink / raw)
  To: Sven Eckelmann, b.a.t.m.a.n

Hi Sven,

thanks for the advice.
I managed somehow to integrate batman inside my backport tree
and changed the Makefiles etc. Now the mesh is up and BATMAn V seems to 
work,
at least I can ping other nodes and measure throughput.

But unfortunately now batctl always says that the mesh is not activated 
(no interface),
which is obviously wrong. Maybe  I made somewhere a mistake while 
porting the code.

Can you guess what goes wrong?

Best Regards,
Hannes


Am 08.06.2016 um 13:20 schrieb Sven Eckelmann:
> On Wednesday 08 June 2016 12:03:32 Harms, Hannes wrote:
>> Hi,
>>
>> I want to test the new batman V with throughput based metric, but I
>> could not find out how to compile batman-adv against cfg80211 from linux
>> backports.
> You cannot build against the backports modules with the batman-adv Makefile.
> This is only for systems which don't replace cfg80211 with an incompatible
> version. But you should have a look at the OpenWrt compile rules (especially
> NOSTDINC_FLAGS [1]). It basically uses its own compat-hack header and uses
> the rest from the backports compat layer + the new cfg80211 headers.
>
> Most important here is that you don't compile against cfg80211.h of your
> kernel when your backports stuff uses complete different struct definitions
> (this is most likely what causes the crash on your system).
>
> Kind regards,
> 	Sven
>
> [1] https://github.com/openwrt-routing/packages/blob/master/batman-adv/Makefile

-- 
Dipl.-Ing. Hannes Harms
Technische Universität Braunschweig
Institut für mobile Maschinen und Nutzfahrzeuge
Langer Kamp 19a
D-38106 Braunschweig

Durchwahl: +49 (0)531 391-7197
E-Mail:  hannes.harms@tu-braunschweig.de
http://www.tu-braunschweig.de/imn


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211
  2016-06-09 13:44   ` Harms, Hannes
@ 2016-06-10  8:15     ` Sven Eckelmann
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2016-06-10  8:15 UTC (permalink / raw)
  To: Harms, Hannes; +Cc: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

On Thursday 09 June 2016 15:44:03 Harms, Hannes wrote:
[...]
> But unfortunately now batctl always says that the mesh is not activated 
> (no interface),
> which is obviously wrong. Maybe  I made somewhere a mistake while 
> porting the code.
> 
> Can you guess what goes wrong?

I don't even know what code you've ported. Was it batman-adv 2016.2? Maybe you
are using an really old version and ran in an already fixed bug [1] which made
it impossible to add down interfaces and later use them in B.A.T.M.A.N. V. Or
there is something else because there is no "mesh is not activated" or "no
interface" error in batctl/batman-adv and so I have to guess what you may
have meant and what you have tried to execute.

Kind regards,
	Sven

[1] https://www.open-mesh.org/issues/248

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-10  8:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 10:03 [B.A.T.M.A.N.] How to compile BATMAN V against linux backports cfg80211 Harms, Hannes
2016-06-08 11:20 ` Sven Eckelmann
2016-06-09 13:44   ` Harms, Hannes
2016-06-10  8:15     ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).