Hi
I wrote this question to the VillageTelco group, but I think that it fix better in this list.
"We want make some test with batman-adv and we would like change some parameter of the code. So I suppose that I have to add the "new code" to the trunk of openwrt and compile them together(batman-adv module and openwrt). But this procedure takes quite time... I think this because the kernel in which I compile batman-adv must be the same that the kernel in which I`m going to run the batman-adv module, mustn't it?But I think that I'm missing something, what am I wrong?
Is there any way to compile only the kernel module of batman-adv so that it can work fine with the kernel of openwrt and don't last so long? What should we do for try our own changes in the code of batman-adv?
Thank you Regards"
On Thursday 22 November 2012 10:14:31 Esteban Municio wrote: [...]
"We want make some test with batman-adv and we would like change some parameter of the code. So I suppose that I have to add the "new code" to the trunk of openwrt and compile them together(batman-adv module and openwrt). But this procedure takes quite time... I think this because the kernel in which I compile batman-adv must be the same that the kernel in which I`m going to run the batman-adv module, mustn't it?But I think that I'm missing something, what am I wrong?
Not in which you compile but against which you compile. But yes, you have to compile it against an ABI compatible kernel compared to the kernel which is used on your target platform. (ABI can also be changed by just changing the kernel config, compiler, ...)
Is there any way to compile only the kernel module of batman-adv so that it can work fine with the kernel of openwrt and don't last so long?
No idea here because I have no idea what you are doing right now.
What should we do for try our own changes in the code of batman-adv?
You should just clean the batman-adv part of openwrt after each change instead of compiling everything again. You can for example modify the prepare part of the Makefile script of the batman-adv openwrt package to copy the .c/.h/.sh/Makefile* from your development folder. At least Martin did this (or at least something similar). A simple `make package/batman-adv/{clean,prepare,compile,install}` after each test change would be enough to just get the new code, recompile the batman-adv module and to generate a ipk package for batman-adv. This ipk file can be copied to your testnode and installed using `opkg instal *.ipk`. The new module will be loaded after a restart.
But an initial compile of the OpenWRT target kernel is still necessary.
Btw. you can get write access to the batman git repositories when you like to.
Kind regards, Sven
On 2012-11-22 19:00, Sven Eckelmann wrote:
You should just clean the batman-adv part of openwrt after each change instead of compiling everything again. You can for example modify the prepare part of the Makefile script of the batman-adv openwrt package to copy the .c/.h/.sh/Makefile* from your development folder. At least Martin did this (or at least something similar).
Attached is my package/feeds/batman/batman-adv-devel/Makefile :) Maybe it can help a little bit... Look for absolute paths to ~/projects/batman-adv/ and ~/projects/batctl
I'm not understanding well your advices...
What should we do for try our own changes in the code of batman-adv?
You should just clean the batman-adv part of openwrt after each change instead of compiling everything again. You can for example modify the prepare part of the Makefile script of the batman-adv openwrt package to copy the .c/.h/.sh/Makefile* from your development folder. At least Martin did this (or at least something similar).
Do you mean that I should modify the makefile (my path to this makefile is .../backfire/trunk/feeds/packages/net/batman-adv/Makefile)so instead the download the code of batman-adv, it compile my own code?
A simple `make package/batman-adv/{clean,prepare,compile,install}` after each test change would be enough to just get the new code, recompile the batman-adv module and to generate a ipk package for batman-adv. This ipk file can be copied to your testnode and installed using `opkg instal *.ipk`. The new module will be loaded after a restart.
But an initial compile of the OpenWRT target kernel is still necessary.
Btw. you can get write access to the batman git repositories when you like to.
But, how can I compile only the batman module and generate ipk package? If I compile directly the batman-adv code, the batman-adv.ko module does not work in the testnode. Can I generate a batman-adv ipk package with out compile the whole openwrt?
Sorry for my thickness ;-)
On Thursday 22 November 2012 16:10:52 Esteban Municio wrote:
I'm not understanding well your advices...
What should we do for try our own changes in the code of batman-adv?
You should just clean the batman-adv part of openwrt after each change instead of compiling everything again. You can for example modify the prepare part of the Makefile script of the batman-adv openwrt package to copy the .c/.h/.sh/Makefile* from your development folder. At least Martin did this (or at least something similar).
Do you mean that I should modify the makefile (my path to this makefile is .../backfire/trunk/feeds/packages/net/batman-adv/Makefile)so instead the download the code of batman-adv, it compile my own code?
I thought you wanted an easy way to modify and test the batman-adv code. And this is a way to do it.
A simple `make package/batman-adv/{clean,prepare,compile,install}` after each test change would be enough to just get the new code, recompile the batman-adv module and to generate a ipk package for batman-adv. This ipk file can be copied to your testnode and installed using `opkg instal *.ipk`. The new module will be loaded after a restart.
But an initial compile of the OpenWRT target kernel is still necessary.
Btw. you can get write access to the batman git repositories when you like to.
But, how can I compile only the batman module and generate ipk package? If I compile directly the batman-adv code, the batman-adv.ko module does not work in the testnode. Can I generate a batman-adv ipk package with out compile the whole openwrt?
I already told you. You can do it with `make package/batman-adv/{clean,prepare,compile,install}`
But first you have to compile a complete image of openwrt and flash your device with it. All following builds for this image/kernel can be done using `make package/batman-adv/{clean,prepare,compile,install}`
Kind regards, Sven
I already told you. You can do it with `make package/batman-adv/{clean,prepare,compile,install}`
But first you have to compile a complete image of openwrt and flash your device with it. All following builds for this image/kernel can be done using `make package/batman-adv/{clean,prepare,compile,install}`
Nice! Now I understood, I had only to execute that sentence.That was just what I was looking for. Thank you very much
Regards
b.a.t.m.a.n@lists.open-mesh.org