uboot: support -b option for mkenvimage
authortiago.brusamarello <tiago.brusamarello@datacom.ind.br>
Wed, 30 Nov 2016 10:32:33 +0000 (08:32 -0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 30 Nov 2016 15:10:30 +0000 (16:10 +0100)
When generating the environment image the target endianess should
be taken in account for CRC calculation purposes. For big endian
targets the -b flag should be passed to the mkenvimage tool.

Signed-off-by: Tiago Brusamarello <tiago.brusamarello@datacom.ind.br>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
boot/uboot/uboot.mk

index 3e347c108429abafcd14973a3cae7e0be597b9b1..6b9d5445462219bb99632d7c8dfcf3cfdc7f8e22 100644 (file)
@@ -223,6 +223,7 @@ define UBOOT_INSTALL_IMAGES_CMDS
                cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) | \
                        $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
                        $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
+                       $(if $(filter BIG,$(BR2_ENDIAN)),-b) \
                        -o $(BINARIES_DIR)/uboot-env.bin -)
 endef