aboutsummaryrefslogtreecommitdiffstats
path: root/boot/uboot/uboot.mk
diff options
context:
space:
mode:
authorArnaud RĂ©billout <rebillout@syscom.ch>2012-12-20 02:47:18 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-03-24 20:49:15 +0100
commit7b252919409e7bb63f6035fbe3b7167f4abbfed1 (patch)
treef61bdb58e7096bccc82153362e585747bf8be117 /boot/uboot/uboot.mk
parenta8694c3cb5711023fcce911bb673c01b36d48d64 (diff)
downloadbuildroot-novena-7b252919409e7bb63f6035fbe3b7167f4abbfed1.tar.gz
buildroot-novena-7b252919409e7bb63f6035fbe3b7167f4abbfed1.zip
uboot: integrate mkenvimage
This commit provides configuration options to automatically generate a binary environment image for U-Boot. Two options are available (and mandatory): * the location of a text file describing U-Boot environment. * the size of the environment. [Peter: fix Config.in indentation + typo] Signed-off-by: Arnaud RĂ©billout <rebillout@syscom.ch> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r--boot/uboot/uboot.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ea77259d1..c337e7552 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -104,6 +104,9 @@ define UBOOT_INSTALL_IMAGES_CMDS
cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
$(if $(BR2_TARGET_UBOOT_SPL),
cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
+ $(if $(BR2_TARGET_UBOOT_ENVIMAGE),
+ $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
+ -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
endef
define UBOOT_INSTALL_OMAP_IFT_IMAGE
@@ -125,6 +128,19 @@ UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT
UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE
endif
+ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
+# we NEED a environment settings unless we're at make source
+ifeq ($(filter source,$(MAKECMDGOALS)),)
+ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)
+$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting))
+endif
+ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),)
+$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
+endif
+endif
+UBOOT_DEPENDENCIES += host-uboot-tools
+endif
+
$(eval $(generic-package))
ifeq ($(BR2_TARGET_UBOOT),y)