[source] build: introduce STAGING_DIR_IMAGE
LEDE Commits
lede-commits at lists.infradead.org
Fri Jan 27 07:53:41 PST 2017
jow pushed a commit to source.git, branch master:
https://git.lede-project.org/7d57db4d9be2e8c8e72108c0b8702029ba8c70de
commit 7d57db4d9be2e8c8e72108c0b8702029ba8c70de
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Fri Jan 27 13:41:04 2017 +0100
build: introduce STAGING_DIR_IMAGE
Introduce a new location STAGING_DIR_IMAGE which is intended to be used by
bootloader iamges and similar image-related artifacts.
This directory is guaranteed to be persistent across kernel upgrades which
might involve a removal of KERNEL_BUILD_DIR and is guranteed to be bundled
with the image builder.
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
rules.mk | 1 +
target/imagebuilder/Makefile | 3 +++
2 files changed, 4 insertions(+)
diff --git a/rules.mk b/rules.mk
index 2586df3..0bd8fde 100644
--- a/rules.mk
+++ b/rules.mk
@@ -152,6 +152,7 @@ STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp
TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR))
TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD)
STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
+STAGING_DIR_IMAGE:=$(STAGING_DIR)/image
BUILD_LOG_DIR:=$(TOPDIR)/logs
PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index d891aab..f9dd61c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -18,6 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
IB_KDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(KERNEL_BUILD_DIR))
IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))
IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(ARCH)/boot/dts/
+IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE))
all: compile
@@ -78,6 +79,8 @@ endif
$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk
find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \
| $(XARGS) rm -rf
+ $(INSTALL_DIR) $(IB_IDIR)
+ -$(CP) $(STAGING_DIR_IMAGE)/* $(IB_IDIR)/
$(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin
$(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
(cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
More information about the lede-commits
mailing list