OpenWrt Forum Archive

Topic: Help on package creation confusion

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I want to try and add my simple custom hello world type app to the firmware build for my linksys AP. I have been reading about packages but I'm not clear on the whats/wheres/whys.

Its probably because of all of the config/scripts seems confusing  to me coming from a wince environment - but there we go I have this work to do, so some basic advice would be welcome!

I thought the process was to create to create a helloworld dir in the packages directory with a makefile as specified in the howto package notes. I then assumed that I could download a tarred target to be built from the local host ftp server what would be magically included into the build.

Having put this in place I find that the make menuconfig does not show my package, even though its hacked from the hotplug2 package in utils, that does appear. I then find that there is a SDK that can be used to create packages (http://events.ccc.de/congress/2005/fahr … penWRT.pdf) and this mentions things like config.in (what ever that is), as part of the process

So do I have to use the SDK, and if so what does this do that just hacking into the packages directory does not?

The other thing that I'm not sure of is what exactly should be in the tar fiel that is downloaded into the build process, would that be the hello.c and makefile for it, or the binary output?

If someone could put be right on the basics, and the particular points mentioned - I would REALLY appreciate it!

Thanks

nick

The trick is making sure your package Makefile is correct.  I have a tutorial on building a simple helloworld application for Openwrt here: http://people.bu.edu/ebishop/openwrt-programming.html  which mainly assumes you will be using the SDK, though the same idea applies if you want to build a firmware image.  At the very least, it's a good idea to make sure it compiles ok with the SDK first. 

Once you have it building in the SDK you can put the same files in the package subdirectory of the full buildroot system, run make menuconfig and then select your package.  Note where you put your package --  the CATAGORY directive in the openwrt Makefile will tell you which category to find your package under to select when you run make menuconfig.  The various categories will be the last part of the make menuconfig menu, right above the dashed line which is right above "Reset to defaults"

Hope this helps!

Hi,

Thanks very much for the reply ... I'll get cracking

nick

The discussion might have continued from here.