1.创建Config.in文件如下:
config BR2_PACKAGE_LIBFOO bool "libfoo" help This is a comment that explains what libfoo is. http://foosoftware.org/libfoo/Config的语法要求如下http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt 2.创建 xx.mk文件
以下的操作的是基于buildroot的根目录下
mkdir package/apache
vi package/apache/apache.mk
APACHE_VERSION = 2.2.21 //软件版本 APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2 //软件压缩包简写 APACHE_SITE = http://apache.etoak.com/httpd //软件下载地址 APACHE_INSTALL_STAGING = YES //安装在根目录上 APACHE_INSTALL_TARGET = YES //安装 APACHE_CONF_OPT = --enable-modules=so \ // ./configure所配置的内容 --enable-rewrite $(eval $(call AUTOTARGETS, package,apache)) //call AUTOTARGETS 表示使用automakefile模式vi package/apache/Config.mk
config BR2_PACKAGE_APACHE bool "apache" help this is a comment that explain what "apache" is.
vi package/Config.in
添加
source "package/apache/Config.in"最后打开make menuconfig把apache选项选上,进行编译,当然编译的过程并不顺利,这并不是因为编译工具的问题,只是代码对交叉编译的兼容性不好,当然问题经过一番努力后,还是解决,以后有机会再聊这个,过于详细就离题了。
具体可参考我的另一篇文章利用Buildroot编译apache:http://blog.csdn.net/youyudehexie/article/details/7612222