User Tools

Site Tools


openwrt_coding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
openwrt_coding [2009/06/11 03:49]
eric
openwrt_coding [2013/05/21 16:12] (current)
eric
Line 3: Line 3:
 //Written by Eric Bishop <eric[AT]gargoyle-router.com>// //Written by Eric Bishop <eric[AT]gargoyle-router.com>//
  
-Part I: A Simple Program In C added 8/23/2007+[[openwrt_coding#Part I: A Simple Program In C -- 8/23/2007]]
  
-Part II: C++ and the Standard Template Library (STL) added 10/10/2007+[[openwrt_coding#Part II: C++ and the Standard Template Library (STL) -- 10/10/2007]]
  
-Part III: Building and Using the Kamikaze SDK added 12/9/2007+[[openwrt_coding#Part III: Building and Using the Kamikaze SDK -- 12/9/2007]]
  
 =====Tutorial Moved To New Location -- 7/26/2008===== =====Tutorial Moved To New Location -- 7/26/2008=====
  
-I haven't updated this document in a while so be aware that some of the information here may be a bit out of date. I wrote this document almost a year ago now, but it still contains useful information about programming in C/C++ for OpenWrt. I recently released Gargoyle, a new web interface for OpenWrt, and I've moved this tutorial onto the official Gargoyle website. My old, website (which was kind of pathetic) is now obsolete, and has been taken down. I apologize for any inconvenience this may cause.+I haven't updated this document in a while so be aware that some of the information here may be a bit out of date. I wrote this document almost a year ago now, but it still contains useful information about programming in C/C++ for OpenWrt.  I recently released Gargoyle, a new web interface for OpenWrt, and I've moved this tutorial onto the official Gargoyle website. My old, website (which was kind of pathetic) is now obsolete, and has been taken down. I apologize for any inconvenience this may cause.
  
  
-This tutorial now makes use of external stylesheets to fit in with the Gargoyle website theme. I realize this may make it more difficult to download and easily reference on your local computer, so I will continue to make the old version of this tutorial available. This version can be found here.+This tutorial now makes use of external stylesheets to fit in with the Gargoyle website theme. I realize this may make it more difficult to download and easily reference on your local computer, so I will continue to make the old version of this tutorial available. This version can be found [[http://gargoyle-router.com/old-openwrt-coding.html|here]].
  
  
Line 51: Line 51:
  
 helloworld: helloworld.o helloworld: helloworld.o
-     $(CC) $(LDFLAGS) helloworld.o -o helloworld helloworld.o: +     $(CC) $(LDFLAGS) helloworld.o -o helloworld 
-     helloworld.c $(CC) $(CFLAGS) -c helloworld.c + 
 +helloworld.o: helloworld.c  
 +     $(CC) $(CFLAGS) -c helloworld.c 
  
 # remove object files and executable when user executes "make clean" # remove object files and executable when user executes "make clean"
Line 286: Line 288:
 </shell>  </shell> 
  
-Now, ssh into the router. We just copied the package to root's home directory so we are finally ready to install our program. In root's home directory, (where we end up immediately after connecting to the router via ssh) type "ipkg install helloworld_1_mipsel.ipk" and the ipkg system will do the rest.+Now, ssh into the router. We just copied the package to root's home directory so we are finally ready to install our program. In root's home directory, (where we end up immediately after connecting to the router via ssh) type "ipkg install helloworld_1_mipsel.ipk" [NOTE: on OpenWrt 8.09 and later you need to run opkg install helloworld_1_mipsel.ipk, as ipkg has been replaced with a new, improved utility called opkg] and the ipkg system will do the rest.
  
 <shell> <shell>
openwrt_coding.1244692182.txt.gz · Last modified: 2009/06/11 03:49 by eric