[Commotion-dev] Adding a cmake option for Babel in Commotion 1.2?

Josh King jking at opentechinstitute.org
Tue Jun 23 11:16:08 EDT 2015


Hey Mathieu,

That depends on what's being patched. In most cases, if it's a
completely custom package or version of a package you need, it would
make sense to add it to the commotion-feed repo or to a separate branch.
However, it looks like you're just adding to the list of stock OpenWRT
packages you're including. If that's the case, then good news! You don't
need to patch anything :-)

You can actually provide custom build configurations that include
additional packages. For instructions, you can check out:

https://github.com/opentechinstitute/commotion-router#create-your-own-build-configurations

But the basic upshot is, you can add a directory to 'configs' that
contains your custom build. For instance, if you want to build Babel
images for Ubiquiti routers, you could copy the
commotion-router/configs/ubnt directory to
commotion-router/configs/ubnt-montreal (or whatever you want to call
that configuration), and edit the
commotion-router/configs/ubnt-montreal/CMakeLists.txt file to add the
following line:

SET(PACKAGES "babel;tinc" PARENT_SCOPE)

So that it reads:

SET(TARGET "ar71xx" PARENT_SCOPE)
SET(SUBTARGET "generic" PARENT_SCOPE)
SET(PROFILE "UBNT" PARENT_SCOPE)
SET(PACKAGES "babel;tinc" PARENT_SCOPE)

If you want to add custom files too, just add them to
commotion-router/configs/ubnt-montreal/files/. Now when you run
cmake-gui, ubnt-montreal will be one of the targets available in the
dropdown, and you can just select that for your build.

I'm also up for accepting pull requests to improve how the buildsystem
works, and for adding new targets. This is just a first pass, and I know
it doesn't cover all use cases (like pulling in additional
configurations from an outside source). Some use cases probably
introduce too much additional complexity, but there are still plenty of
improvements that can be made. Let me know if you have any questions, or
run into any bugs!

On 06/23/2015 11:01 AM, Mathieu Lutfy wrote:
> Hi,
> 
> I was looking at the cmake build options for Commotion 1.2rc (commotion-router git master branch), looking to port forward the patches from RĂ©seau Libre (Montreal) for Babel support.
> 
> What would be the best way to include packages in the CMakeList.txt for supporting Babel, not just for our own specific fork, but to eventually get Babel officially supported by Commotion?
> 
> On IRC, Dan pointed me to this article on cmake: http://www.kitware.com/blog/home/post/82
> 
> So ideally, we would have a cmake build option to enable babel?
> 
> I'm not really familiar with cmake, so this is what I got so far:
> https://gist.github.com/mlutfy/fde3dfbf3b6cb0d71912
> 
> Thanks,
> Mathieu
> _______________________________________________
> Commotion-dev mailing list
> Commotion-dev at lists.chambana.net
> https://lists.chambana.net/mailman/listinfo/commotion-dev
> 

-- 
Josh King
Lead Technologist
The Open Technology Institute
http://opentechinstitute.org
PGP Fingerprint: 8269 ED6F EA3B 7D78 F074 1E99 2FDA 4DA1 69AE 4999

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.chambana.net/pipermail/commotion-dev/attachments/20150623/59c04c8d/attachment.sig>


More information about the Commotion-dev mailing list