Compilation of sample program from openwrt

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
madhu542
Posts: 3
Joined: Thu Sep 20, 2012 4:35 am

Compilation of sample program from openwrt

Post by madhu542 »

Hi,
I want to compile a sample program from openwrt (I am using openwrt trunk).

Followed the steps which are mentioned in the below link: compilation completed successfully but I couldn't see, helloworld_1_mipsel.ipk in the bin/ path as mentioned in the link.

http://www.gargoyle-router.com/wiki/dok ... wrt_coding

Can anyone help me what went wrong!

-madhu.

madhu542
Posts: 3
Joined: Thu Sep 20, 2012 4:35 am

Re: Compilation of sample program from openwrt

Post by madhu542 »

I cross checked with V=99 option and found like below:


madhu@Ideapad:~/Desktop/802.1x/openwrt_example/trunk$ make package/helloworld/compile V=99
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk'
make[2]: Entering directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk/package/toolchain'
WARNING: skipping libssp -- package not selected
WARNING: skipping libstdcpp -- package not selected
WARNING: skipping libpthread -- package not selected
WARNING: skipping librt -- package not selected
WARNING: skipping libgfortran -- package not selected
WARNING: skipping ldd -- package not selected
WARNING: skipping ldconfig -- package not selected
make[2]: Leaving directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk/package/toolchain'
make[2]: Entering directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk/package/helloworld'
WARNING: skipping helloworld -- package not selected
make[2]: Leaving directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk/package/helloworld'
make[1]: Leaving directory `/home/madhu/Desktop/802.1x/openwrt_example/trunk'
madhu@Ideapad:~/Desktop/802.1x/openwrt_example/trunk$

please help me why my package is getting skipped while compiling?

madhu542
Posts: 3
Joined: Thu Sep 20, 2012 4:35 am

Re: Compilation of sample program from openwrt

Post by madhu542 »

Target System' is set to 'Atheros 231x/5312

I checked the option "select all packages by default" in build settings -->

how to select new helloworld package?

User avatar
ericwong
Posts: 430
Joined: Sat Aug 25, 2012 6:15 am
Location: Melbourne, Australia
Contact:

Re: Compilation of sample program from openwrt

Post by ericwong »

1st, do you know how to compile OpenWRT rom successfully first?
I think you should build OpenWRT ROM without gargoyle first, to understand how it works. it will solve most of the problems/questions you are asking.

2nd, why are you posting this when what you are doing seems to have nothing to do with Gargoyle... If you don't need gargoyle features, build OpenWRT ROM, not gargoyle.. it will only make things more difficult.
Eric Wong

PM me if you need to buy Gargoyle router in Australia/NZ, willing to pay me to help you on your Gargoyle configurations or build custom configured ROM with pre-installed app or try to fix your bricked router. Yes, I am looking for job/work.

twinclouds
Posts: 13
Joined: Sat Jan 12, 2013 11:55 pm

Re: Compilation of sample program from openwrt

Post by twinclouds »

I have the same "out of sync problem ..." when rebuild custom images of Gargoyle.
The steps that I used after first build was:
(1) Go to the custom-src directory and do a "make menuconfig" to select the target and the packages that I want to include.
(2) Go to the Gargoyle root directory and do a "make custom".
The result was it built all the ar71xx images without the specified packages included. I checked again by doing another "make menuconfig" and found all of what I selected were gone.
Are these right steps? or I should do something else?
BTW, I have been building Openwrt for a few years without any problem. The steps were somewhat different, though. When compile the Openwrt images, I did
(1) "make menuconfig" to select the target and the packages that I need.
(2) "make V=99" to generate the images and packages.
Both are done in the Openwrt root directory.
I am not sure what I did were right in the Gargoyle case.

User avatar
ericwong
Posts: 430
Joined: Sat Aug 25, 2012 6:15 am
Location: Melbourne, Australia
Contact:

Re: Compilation of sample program from openwrt

Post by ericwong »

twinclouds wrote: The steps that I used after first build was:
(1) Go to the custom-src directory and do a "make menuconfig" to select the target and the packages that I want to include.
Your first step is wrong, at least when working with gargoyle.
You shouldn't use "make menuconfig" to launch the menuconfig, you should ONLY launch the menuconfig using the "make custom" command. If you launch menuconfig within Openwrt and make changes there, you risk having all sorts of problems downstream as it compiles...

Read my other thread about re-launching menuconfig and follow my method there..

At least I know it works for me.
I would like a better way but don't know how..
Eric Wong

PM me if you need to buy Gargoyle router in Australia/NZ, willing to pay me to help you on your Gargoyle configurations or build custom configured ROM with pre-installed app or try to fix your bricked router. Yes, I am looking for job/work.

twinclouds
Posts: 13
Joined: Sat Jan 12, 2013 11:55 pm

Re: Compilation of sample program from openwrt

Post by twinclouds »

Hi, Eric:
Thanks for your prompt reply. The problem is that "make custom" in the gargoyle directory only works for me the first time and everything are perfect. However, when I did rebuild, it never gave me the menuconfig menu so I couldn't select the target and packages that I wanted. No matter I did "make menuconfig" in the custom-src directory or not, it always gave me the "out of sync error" and builds all of the targets in ar7xxx.
When you talked about the other thread, were you talking about the "built gargoyle from trunk" thread? Maybe I overlooked but I could not find the solution to my rebuild problem. Maybe you were talking about something else. In either case, please let me know what is your solution to the rebuild problem.
Thanks again for your help.

User avatar
ericwong
Posts: 430
Joined: Sat Aug 25, 2012 6:15 am
Location: Melbourne, Australia
Contact:

Re: Compilation of sample program from openwrt

Post by ericwong »

twinclouds wrote:Hi, Eric:
Thanks for your prompt reply. The problem is that "make custom" in the gargoyle directory only works for me the first time and everything are perfect. However, when I did rebuild, it never gave me the menuconfig menu so I couldn't select the target and packages that I wanted. No matter I did "make menuconfig" in the custom-src directory or not, it always gave me the "out of sync error" and builds all of the targets in ar7xxx.
When you talked about the other thread, were you talking about the "built gargoyle from trunk" thread? Maybe I overlooked but I could not find the solution to my rebuild problem. Maybe you were talking about something else. In either case, please let me know what is your solution to the rebuild problem.
Thanks again for your help.
My point is I have not found a way to do a rebuild (like you can with Openwrt) and relaunch menuconfig. That is what I said in the other post too.

There is no solution to this problem.. at least not that I know of.
I would like to know how to do this too.

The best you can do is save the configuration using menuconfig and overwrite gargoyle/target/config and then do another make custom. However, this way have the tendency to create problems and not a proper solution.

The post is here (it is easy to find..)
http://www.gargoyle-router.com/phpbb/vi ... f=7&t=3171
Eric Wong

PM me if you need to buy Gargoyle router in Australia/NZ, willing to pay me to help you on your Gargoyle configurations or build custom configured ROM with pre-installed app or try to fix your bricked router. Yes, I am looking for job/work.

twinclouds
Posts: 13
Joined: Sat Jan 12, 2013 11:55 pm

Re: Compilation of sample program from openwrt

Post by twinclouds »

Eric:
Thanks. I found a solution, though. Not a perfect one, a kind like hack, but it works so far.
What I did was after done with make menuconfig in custom-src, I set the .config file there to read only (chmod 444). Then, I went to the gargoyle directory to do a make custom. It would tell you could not overwrite the .config file but went ahead to compile the image anyway. I tried a couple times and seemed everything went well. Not sure it will break anything but worth a try. So far so good.
Of course, you will have to make the custom-src/.config writable, before doing next make menuconfig, then make it read only again.
The speed is much faster the second time.

Post Reply