Create package index and do other image preparations just once
This commit is contained in:
parent
1850b4ed47
commit
bc7c4c7060
5
Makefile
5
Makefile
@ -41,9 +41,8 @@ prepare:
|
|||||||
$(GLUON_OPENWRTDIR)/scripts/feeds install -a
|
$(GLUON_OPENWRTDIR)/scripts/feeds install -a
|
||||||
|
|
||||||
echo -e "CONFIG_TARGET_$(BOARD)=y\nCONFIG_TARGET_ROOTFS_JFFS2=n\n$(subst ${ },\n,$(patsubst %,CONFIG_PACKAGE_%=m,$(GLUON_PACKAGES) $(PROFILE_PACKAGES)))" > $(GLUON_OPENWRTDIR)/.config
|
echo -e "CONFIG_TARGET_$(BOARD)=y\nCONFIG_TARGET_ROOTFS_JFFS2=n\n$(subst ${ },\n,$(patsubst %,CONFIG_PACKAGE_%=m,$(GLUON_PACKAGES) $(PROFILE_PACKAGES)))" > $(GLUON_OPENWRTDIR)/.config
|
||||||
$(MAKE) -C $(GLUON_OPENWRTDIR) defconfig prepare
|
$(MAKE) -C $(GLUON_OPENWRTDIR) defconfig prepare package/compile
|
||||||
$(MAKE) -C $(GLUON_BUILDERDIR) kernel
|
$(MAKE) -C $(GLUON_BUILDERDIR) prepare
|
||||||
$(MAKE) -C $(GLUON_OPENWRTDIR) package/compile
|
|
||||||
|
|
||||||
touch $(prepared_stamp)
|
touch $(prepared_stamp)
|
||||||
|
|
||||||
|
@ -71,22 +71,18 @@ PACKAGES:=
|
|||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel-build.mk
|
include $(INCLUDE_DIR)/kernel-build.mk
|
||||||
|
|
||||||
kernel: FORCE
|
prepare: FORCE
|
||||||
$(Kernel/CompileImage)
|
$(Kernel/CompileImage)
|
||||||
|
$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image -f $(GLUON_BUILDERDIR)/Makefile.image prepare
|
||||||
|
$(MAKE) package_index
|
||||||
|
|
||||||
_call_image:
|
_call_image:
|
||||||
echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'
|
echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'
|
||||||
echo 'Packages: $(BUILD_PACKAGES)'
|
echo 'Packages: $(BUILD_PACKAGES)'
|
||||||
echo
|
echo
|
||||||
rm -rf $(TARGET_DIR)
|
rm -rf $(TARGET_DIR)
|
||||||
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR)
|
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(TARGET_DIR)/tmp
|
||||||
if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \
|
$(OPKG) update
|
||||||
echo "Package list missing or not up-to-date, generating it.";\
|
|
||||||
$(MAKE) package_index; \
|
|
||||||
else \
|
|
||||||
mkdir -p $(TARGET_DIR)/tmp; \
|
|
||||||
$(OPKG) update; \
|
|
||||||
fi
|
|
||||||
$(MAKE) package_install
|
$(MAKE) package_install
|
||||||
ifneq ($(USER_FILES),)
|
ifneq ($(USER_FILES),)
|
||||||
$(MAKE) copy_files
|
$(MAKE) copy_files
|
||||||
@ -97,11 +93,9 @@ endif
|
|||||||
package_index: FORCE
|
package_index: FORCE
|
||||||
@echo
|
@echo
|
||||||
@echo Building package index...
|
@echo Building package index...
|
||||||
@mkdir -p $(TOPDIR)/tmp $(TOPDIR)/dl $(TARGET_DIR)/tmp
|
|
||||||
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
|
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
|
||||||
gzip -9c Packages > Packages.gz \
|
gzip -9c Packages > Packages.gz \
|
||||||
) >/dev/null 2>/dev/null
|
) >/dev/null 2>/dev/null
|
||||||
$(OPKG) update
|
|
||||||
|
|
||||||
package_install: FORCE
|
package_install: FORCE
|
||||||
@echo
|
@echo
|
||||||
@ -139,10 +133,13 @@ package_postinst: FORCE
|
|||||||
)
|
)
|
||||||
$(if $(CONFIG_CLEAN_IPKG),rm -rf $(TARGET_DIR)/usr/lib/opkg)
|
$(if $(CONFIG_CLEAN_IPKG),rm -rf $(TARGET_DIR)/usr/lib/opkg)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/image.mk
|
||||||
|
|
||||||
build_image: FORCE
|
build_image: FORCE
|
||||||
@echo
|
@echo
|
||||||
@echo Building images...
|
@echo Building images...
|
||||||
$(NO_TRACE_MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image install TARGET_BUILD=1 IMG_PREFIX="gluon-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))" \
|
$(call Image/mkfs/prepare)
|
||||||
|
$(NO_TRACE_MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 IMG_PREFIX="gluon-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))" \
|
||||||
$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
|
$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
7
builder/Makefile.image
Normal file
7
builder/Makefile.image
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
override BuildImage :=
|
||||||
|
|
||||||
|
# The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/image/Makefile
|
||||||
|
include Makefile
|
||||||
|
|
||||||
|
prepare: FORCE
|
||||||
|
$(call Image/Prepare)
|
Loading…
Reference in New Issue
Block a user