How to add a new package into BuildRoot

It is easy to add a new package to BuiltRoot, here I want to add opkg to BuildRoot

1. read the documents in the builtroot-2012.02/docs/manual/adding-packages-*

2. add a new directory in the builtroot-2012.02/package, name it as opkg

#mkdir builtroot-2012.02/package/opkg
3. add Config.in in the builtroot-2012.02/package/opkg

#gedit builtroot-2012.02/package/opkg/Config.in
config BR2_PACKAGE_OPKG
	bool "opkg"
	help
	  Opkg is a lightweight package management system based on Ipkg.

	  http://code.google.com/p/opkg/

4. add opkg.mk in the the builtroot-2012.02/package/opkg

#gedit the builtroot-2012.02/package/opkg/opkg.mk
#############################################################
#
# opkg
#
#############################################################
OPKG_VERSION = 0.1.8
OPKG_SOURCE = opkg-$(OPKG_VERSION).tar.gz
OPKG_SITE = http://opkg.googlecode.com/files/
OPKG_AUTORECONF = NO
OPKG_INSTALL_STAGING = YES
OPKG_INSTALL_TARGET = YES
OPKG_CONF_OPT = --disable-pgp
$(eval $(call AUTOTARGETS))

5. modify Config.in in builtroot-2012.02/package

add "source "package/opkg/Config.in"" in line 530

6. return to directory builtroot-2012.02, make menuconfig again to enable theopkg

 #make menuconfig

Package Selection for the target -> Package managers -> opkg

7. make the buildroot again

 #make 
發佈了34 篇原創文章 · 獲贊 8 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章