diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-06 02:15:46 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-06 02:15:46 +0000 |
commit | e6b1eeef0c29fd19ea770675ef7ea654ad3cf1c7 (patch) | |
tree | a82eb2b549252998f1d2bfbb792f55070ad36280 /target/imagebuilder | |
parent | 560be77d4cb0cd68d67d6c2e88f2d8e2a25145b5 (diff) | |
download | master-187ad058-e6b1eeef0c29fd19ea770675ef7ea654ad3cf1c7.tar.gz master-187ad058-e6b1eeef0c29fd19ea770675ef7ea654ad3cf1c7.tar.bz2 master-187ad058-e6b1eeef0c29fd19ea770675ef7ea654ad3cf1c7.zip |
[buildroot] use opkg/host for package installation
- speeds up rebuild operations
- aligns generated package list format with the one created by opkg on the target
- fixes broken dependency handling in imagebuilder
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22949 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/imagebuilder')
-rw-r--r-- | target/imagebuilder/files/Makefile | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index b72e3f1724..bcdcf03de5 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -52,12 +52,15 @@ help: FORCE # override variables from rules.mk PACKAGE_DIR:=$(TOPDIR)/packages -IPKG:= \ +OPKG:= \ IPKG_TMP="$(TOPDIR)/tmp/ipkgtmp" \ IPKG_INSTROOT="$(TARGET_DIR)" \ IPKG_CONF_DIR="$(TOPDIR)/tmp" \ IPKG_OFFLINE_ROOT="$(TARGET_DIR)" \ - $(SCRIPT_DIR)/ipkg -force-defaults + $(STAGING_DIR_HOST)/bin/opkg \ + -f $(TOPDIR)/tmp/opkg.conf \ + --force-depends \ + --force-overwrite define Profile $(eval $(call Profile/Default)) @@ -79,10 +82,18 @@ _call_info: FORCE echo 'Available Profiles:' echo; $(PROFILE_LIST) -$(TOPDIR)/tmp/ipkg.conf: FORCE +$(TOPDIR)/tmp/opkg.conf: FORCE @mkdir -p $(TOPDIR)/tmp + @mkdir -p $(TARGET_DIR)/tmp @echo 'dest root /' > $@ @echo 'src packages file:$(PACKAGE_DIR)' >> $@ + @echo 'arch all 100' >> $@ +ifneq ($(CONFIG_TARGET_adm5120),y) + @echo 'arch $(BOARD) 200' >> $@ +else + @echo 'arch $(BOARD)_$(ARCH) 200' >> $@ +endif + @echo 'option offline_root $(TARGET_DIR)' >> $@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(USER_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) # "-pkgname" in the package list means remove "pkgname" from the package list @@ -102,18 +113,18 @@ endif $(MAKE) package_postinst $(MAKE) build_image -package_index: $(TOPDIR)/tmp/ipkg.conf FORCE +package_index: $(TOPDIR)/tmp/opkg.conf FORCE @echo @echo Building package index... (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \ gzip -9c Packages > Packages.gz \ ) >/dev/null 2>/dev/null - $(IPKG) update + $(OPKG) update package_install: FORCE @echo @echo Installing packages... - $(IPKG) install $(BUILD_PACKAGES) + $(OPKG) install $(BUILD_PACKAGES) copy_files: FORCE @echo @@ -122,6 +133,9 @@ copy_files: FORCE package_postinst: FORCE @echo + @echo Cleaning up + @rm -f $(TARGET_DIR)/tmp/opkg.lock + @echo @echo Activating init scripts @( \ cd $(TARGET_DIR); \ |