From 3f533e1f668e2262c71a4eb39d6867dfd32ff832 Mon Sep 17 00:00:00 2001
From: Markus Gothe <markus.gothe@genexis.eu>
Date: Thu, 4 Jun 2020 15:58:49 +0200
Subject: [PATCH] Print correct block numbers in nand-partition.txt and fix
 minor typo.

Change-Id: I89fbd2054c9f91d711dfa6d9416c399c7ba36f48
---
 iopsys-brcm63xx-arm/image/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/iopsys-brcm63xx-arm/image/Makefile b/iopsys-brcm63xx-arm/image/Makefile
index d0cd8d6d5..e5c52ff14 100644
--- a/iopsys-brcm63xx-arm/image/Makefile
+++ b/iopsys-brcm63xx-arm/image/Makefile
@@ -49,8 +49,8 @@ UBI_OPTS = -v -m $(CONFIG_TARGET_NAND_PAGESZ) -p $(CONFIG_TARGET_NAND_BLOCKSZ)
 
 #Production Image Parameters
 FIELD_ORDER = 14
-CFE_START_BLOCK = 1
-UBI_START_BLOCK = 32
+CFE_START_BLOCK = 0
+UBI_START_BLOCK = 33
 CFE_END_BLOCK = $(shell expr $(UBI_START_BLOCK) - 1 )
 UBI_END_BLOCK = 1024
 
@@ -427,7 +427,7 @@ ifeq ($(BUILD_ECC_USE_BOARDIDS),1)
 	)
 else
 
-	cp $(KDIR) ; cp $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v.tmp
+	cd $(KDIR) ; cp $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v.tmp
 
 ifeq ($(CONFIG_TARGET_IMAGE_PRODUCTION_PARAMS),y)
 	cd $(KDIR) ; $(HOSTTOOLS_DIR)/editnvram $(TARGET_IMAGE_IS_LITTLE_ENDIAN) --boardid=$(CONFIG_TARGET_IMAGE_PRODUCTION_BOARD_ID) --voiceboardid=$(CONFIG_TARGET_IMAGE_PRODUCTION_VOICEBOARD_ID) --production=$(TARGET_IMAGE_PRODUCTION_FLAG) $(TARGET_IMAGE_MAC_NUM) $(TARGET_IMAGE_BASE_MAC) -O $(CONFIG_TARGET_IMAGE_PRODUCTION_NVRAM_OFFSET) cfe$(CONFIG_BCM_CHIP_ID)_nand.v.tmp cfe$(CONFIG_BCM_CHIP_ID)_nand.v.out && \
@@ -442,10 +442,10 @@ endif
 	cp $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.ecc $(BIN_DIR)/$(IHGSP_BUILD_VERSION)_cfe.ecc
 	cp $(KDIR)/root-nand.ecc $(BIN_DIR)/$(IHGSP_BUILD_VERSION)_root.ecc
 
-	echo -e "Part \tStart \tEnd \tProg \tBadBlock \tPart-Name" > $(BIN_DIR)/nand-partittion.txt
+	echo -e "Part \tStart \tEnd \tProg \tBadBlock \tPart-Name" > $(BIN_DIR)/nand-partition.txt
 	#Need to fix the bad block and udes block in nand-partition.txt file.
-	echo -e "0 \t$(CFE_START_BLOCK) \t$(CFE_END_BLOCK) \t0 \t0 \t\tBootloader" >> $(BIN_DIR)/nand-partittion.txt
-	echo -e "1 \t$(UBI_START_BLOCK) \t$(UBI_END_BLOCK) \t0 \t0 \t\tSystem" >> $(BIN_DIR)/nand-partittion.txt
+	echo -e "0 \t$(CFE_START_BLOCK) \t$(CFE_END_BLOCK) \t0 \t0 \t\tBootloader" >> $(BIN_DIR)/nand-partition.txt
+	echo -e "1 \t$(UBI_START_BLOCK) \t$(UBI_END_BLOCK) \t0 \t0 \t\tSystem" >> $(BIN_DIR)/nand-partition.txt
 
 	ln -sf $(BIN_DIR)/$(IHGSP_BUILD_VERSION)_cfe.ecc $(BIN_DIR)/cfe.ecc
 	ln -sf $(BIN_DIR)/$(IHGSP_BUILD_VERSION)_root.ecc $(BIN_DIR)/root.ecc
-- 
GitLab