0

how can I build the cross compiling environment to openwrt on ubuntu?

asked 2014-04-28 05:43:03 -0700

shouwangllh gravatar image

I want to develop new app on openwrt on ubuntu, which I have already built the firmware on tp-link wr703n. I got a compiled program which is built on windows. Now I have to build a cross compiling environment. I have got the SDK, but when I compiled the program by "make", I got error "platform.h:37:2: error: #error No OS GROUP defined". I rewrite the platform.h, but it's still not working. How to fix it? Or what I did is wrong? Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-04-28 11:01:36 -0700

bspencer gravatar image

Not certain if this is specific to AllJoyn or just a general app? If you look at the wiki page here for building AllJoyn: https://wiki.allseenalliance.org/develop/building_and_running

You will see a section for the Arduino Yun. The Yun runs Linino, which is OpenWRT based, and you can see the way that we set the cross compile toolchain up and then use scons to build the AllJoyn files. The true way to build for OpenWRT is to build a package. To do this you would need to setup a Makefile that contains the appropriate information for the package such as the name, location, version, etc. so that when you make menuconfig you can select it as a builtin or compile add-on, etc.

We also have a feed you can pull down to add AllJoyn into OpenWRT. You can do so by following the steps here on the wiki page: https://wiki.allseenalliance.org/develop/openwrt This allows you to have the AllJoyn libraries compiled and inserted into the libs folder on your OpenWRT image.

edit flag offensive delete publish link more

Comments

I‘m sorry, but I have already installed alljoyn on my openwrt system. Now I want to develop a new app based on the SDK I got when I built the firmware. I got stuck when I compiled the app, "platform.h:37:2: error: #error No OS GROUP defined". In the header file, as shown below #if defined(QCC_OS_GROUP_POSIX) #include <qcc posix="" platform_types.h=""> #elif defined(QCC_OS_GROUP_WINDOWS) #include <qcc windows="" platform_types.h=""> #include <qcc windows="" mapping.h=""> #elif defined(QCC_OS_GROUP_WINRT) #include <qcc winrt="" platform_types.h=""> #include <qcc winrt="" mapping.h="">. so what can I do to fix it?

shouwangllh ( 2014-04-28 17:13:11 -0700 )edit

Looks like you are not passing in the compiler flags needed when we compile AllJoyn. You should look at the Makefile from the AllJoyn feed to see that we need certain flags when you compile with our software. You will want to pass in -DQCC_OS_GROUP_POSIX and -DQCC_OS_LINUX into your CFLAGS. An example Makefile for OpenWRT can be found here: https://git.allseenalliance.org/cgit/core/openwrt_feed.git/tree/alljoyn-sample_apps/Makefile?h=attitude_adjustment

bspencer ( 2014-05-02 16:37:46 -0700 )edit

Thank you for helping me. But the line on the website is "Invalid branch: attitude_adjustment

". Where can I find the example?

shouwangllh ( 2014-05-02 18:12:13 -0700 )edit

looks like the system added a < / p > to the end, here is the link again: https://git.allseenalliance.org/cgit/core/openwrt_feed.git/tree/alljoyn-sample_apps/Makefile?h=attitude_adjustment

bspencer ( 2014-05-05 09:59:03 -0700 )edit

Thank you for your advice.

shouwangllh ( 2014-05-05 17:05:11 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
2 followers

Stats

Asked: 2014-04-28 05:43:03 -0700

Seen: 2,725 times

Last updated: Apr 28 '14