aboutsummaryrefslogtreecommitdiff
path: root/boot/barebox/barebox.mk
diff options
context:
space:
mode:
Diffstat (limited to 'boot/barebox/barebox.mk')
-rw-r--r--boot/barebox/barebox.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 143338edd4..5ec47f64f4 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -67,9 +67,22 @@ define BAREBOX_BUILD_BAREBOXENV_CMDS
endef
endif
+ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
+BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+define BAREBOX_BUILD_CUSTOM_ENV
+ $(@D)/scripts/bareboxenv -s \
+ $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
+ $(@D)/$(BAREBOX_ENV_NAME)
+endef
+define BAREBOX_INSTALL_CUSTOM_ENV
+ cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR)
+endef
+endif
+
define BAREBOX_BUILD_CMDS
$(BAREBOX_BUILD_BAREBOXENV_CMDS)
$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
+ $(BAREBOX_BUILD_CUSTOM_ENV)
endef
define BAREBOX_INSTALL_IMAGES_CMDS
@@ -78,6 +91,7 @@ define BAREBOX_INSTALL_IMAGES_CMDS
else \
cp $(@D)/barebox.bin $(BINARIES_DIR);\
fi
+ $(BAREBOX_INSTALL_CUSTOM_ENV)
endef
ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)