[Olsr-dev] My experience building olsrdv2 for openwrt
Will Hawkins
(spam-protected)
Tue Oct 1 20:32:58 CEST 2013
Hello all!
First of all, I wanted to say how excited I am about the great
development being done on Olsrd v2. I just got it to compile for OpenWRT
and I wanted to share my experience.
1. I started by following the instructions on the wiki page
(http://www.olsr.org/mediawiki/index.php/Compile_OLSRd2). After adding
the feeds to feeds.conf, it appears necessary that I run
scripts/feeds install -a
scripts/feeds update -a
before the package is available for selection in menuconfig.
2. During compilation I noticed two errors, both in the
generate_builddata.cmake of oonfapi and olsrdv2 feeds . The
STRING(REGEX MATCH "v${OONF_VERSION}-" FOUND_VERSION ${OONF_LIB_GIT})
and
STRING(REGEX MATCH "v${OONF_APP_VERSION}-" FOUND_VERSION ${OONF_APP_GIT})
lines do not appear to work as designed. The *_VERSION variables are
stripped down to just the revision information in generate_version.cmake
file. So, to fix this, in the olsrdv2 feed, I replaced the
execute_process command with this
execute_process(COMMAND git describe --always --long --tags --dirty
--match "v[0-9]*"
OUTPUT_VARIABLE OONF_APP_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE)
and added
STRING(REGEX REPLACE "^v(.*)-[^-]*-[^-]*$" "\\1" OONF_APP_GIT
${OONF_APP_GIT_TAG})
as line 13 in generate_builddata.cmake. Then, I changed the REGEX_MATCH
command to
STRING(REGEX MATCH "${OONF_APP_VERSION}" FOUND_VERSION ${OONF_APP_GIT})
I made a similar set of changes to generate_builddata.cmake in the
oonfapi feed too.
With only those two changes, everything compiled smoothly! Please let me
know if I missed something obvious in the instructions that would have
saved me from seeing those errors. Otherwise, I hope that information is
useful to someone else.
Next, it's time to test how it runs. I will keep everyone posted!
Will
More information about the Olsr-dev
mailing list