diff options
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r-- | boot/uboot/uboot.mk | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 31190922f..486773aa7 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -33,6 +33,7 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) UBOOT_BIN = u-boot.img else UBOOT_BIN = u-boot.bin +UBOOT_BIN_IFT = $(UBOOT_BIN).ift endif UBOOT_ARCH=$(KERNEL_ARCH) @@ -88,12 +89,36 @@ define UBOOT_BUILD_CMDS $(UBOOT_MAKE_TARGET) endef +define UBOOT_BUILD_OMAP_IFT + $(HOST_DIR)/usr/bin/gpsign -f $(@D)/u-boot.bin \ + -c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)) +endef + 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)/) endef +define UBOOT_INSTALL_OMAP_IFT_IMAGE + cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/ +endef + +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y) +# we NEED a config file unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),) +$(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),) +$(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +endif +UBOOT_DEPENDENCIES += host-omap-u-boot-utils +UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE +endif + $(eval $(call GENTARGETS)) ifeq ($(BR2_TARGET_UBOOT),y) |