openwrt使用源码编译应用程序

1.跟使用SDK类似,在openwrt/pakage目录下建立如下,具体文件内容见上篇 openwrt使用sdk编译应用程序
song@song-virtual-machine:attitude_adjustment$ ls package/helloworld/
Makefile  src
song@song-virtual-machine:attitude_adjustment$ ls package/helloworld/src/
helloworld.c  Makefile

2.先配置,选中刚添加的helloworld
song@song-virtual-machine:attitude_adjustment$ make menuconfig

Utilities  ---> < *> helloworld......................... Helloworld -- prints a snarky message (NEW)  

3.编译
song@song-virtual-machine:attitude_adjustment$ make V=s

4.会在attitude_adjustment/bin/ar71xx/package下生成ipk文件
song@song-virtual-machine:attitude_adjustment$ ls bin/ar71xx/packages/helloworld_1_ar71xx.ipk 
bin/ar71xx/packages/helloworld_1_ar71xx.ipk


另外,根据需要选择软件包,要想通过web登陆配置,4个地方要选:Base system-->uci,Libraries-->libuci-lua,LuCI全选,Network-->uhttpd。
http://www.cnblogs.com/zmkeil/archive/2013/04/17/3027385.html

你可能感兴趣的:(openwrt使用源码编译应用程序)