[Buildroot] [PATCH v2] Add support for Flattened Image Trees

Yegor Yefremov yegorslists at googlemail.com
Fri Sep 19 08:37:23 UTC 2014


On Fri, Sep 19, 2014 at 7:23 AM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> Yegor Yefremov <yegorslists at googlemail.com> schreef:
>>On Thu, Sep 18, 2014 at 6:21 PM, Thomas De Schampheleire
>><patrickdepinguin at gmail.com> wrote:
>>> Yegor Yefremov <yegorslists at googlemail.com> schreef:
>>>>
>>>>I've figured the stuff out too:
>>>>
>>>>ROOTFS_FIT_DEPENDENCIES = uboot-tools
>>>
>>> This should be host-uboot-tools, no?
>>
>>Fixed
>>
>>>>ifeq ($(BR2_FIT_INSTALL_TARGET),y)
>>>>define ROOTFS_FIT_CMD
>>>>        cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \
>>>>        $(HOST_DIR)/usr/bin/mkimage -f $(BINARIES_DIR)/`basename
>>>>$(BR2_FIT_PATH)` $(BINARIES_DIR)/$(BR2_FIT_BLOB_NAME) && \
>>>>        mkdir -p $(TARGET_DIR)/boot/ && \
>>>>        cp $(BINARIES_DIR)/$(BR2_FIT_BLOB_NAME) $(TARGET_DIR)/boot/
>>>>endef
>>>>else
>>>>define ROOTFS_FIT_CMD
>>>>        cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \
>>>>        $(HOST_DIR)/usr/bin/mkimage -f $(BINARIES_DIR)/`basename
>>>>$(BR2_FIT_PATH)` $(BINARIES_DIR)/$(BR2_FIT_BLOB_NAME)
>>>>endef
>>>>endif
>>>>
>>>>$(eval $(call ROOTFS_TARGET,fit))
>>>
>>> There's a lot of duplication here that can be avoided...
>>
>>How do I define "nop" in a Makefile syntactically? What do you  mean
>>with "target_cmd ('true') "?
>
> I meant what Thomas P proposed in his comments on v3, the shell command true which is basically a nop if used in this way..

Something like this?

################################################################################
#
# Build the FIT image
#
################################################################################

ROOTFS_FIT_DEPENDENCIES = host-uboot-tools

ifeq ($(BR2_FIT_INSTALL_TARGET),y)
define FIT_INSTALL_ITB_TARGET
        mkdir -p $(TARGET_DIR)/boot/ && \
        cp $(BINARIES_DIR)/$(basename $(notdir $(call
qstrip,$(BR2_FIT_PATH)))).itb $(TARGET_DIR)/boot/
endef
else
define FIT_INSTALL_ITB_TARGET
        true
endef
endif

define ROOTFS_FIT_CMD
        cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \
        $(HOST_DIR)/usr/bin/mkimage -f $(BINARIES_DIR)/$(notdir $(call
qstrip,$(BR2_FIT_PATH))) $(BINARIES_DIR)/$(basename $(notdir $(call
qstrip,$(BR2_FIT_PATH)))).itb && \
        $(FIT_INSTALL_ITB_TARGET)
endef

$(eval $(call ROOTFS_TARGET,fit))


More information about the buildroot mailing list