diff mbox

[-v2] uboot: support -b option for mkenvimage

Message ID 1480501797-31170-1-git-send-email-tiago.brusamarello@datacom.ind.br
State Superseded
Headers show

Commit Message

tiago.brusamarello Nov. 30, 2016, 10:29 a.m. UTC
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>

---
Changes v1 -> v2:
  - removed unwanted space inside macro call
  - changed 'findstring' to 'filter'

Signed-off-by: Tiago Brusamarello <tiago.brusamarello@datacom.ind.br>
---
 boot/uboot/uboot.mk | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 3e347c1..6b9d544 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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