Skip to contentSkip to conversation

ARM: at91: Apply PMECC header for NAND_BOOT only

PATCH New Derald D. Woods 2 participants 2 messages Feb 17, 2019 – Feb 18, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: at91: Apply PMECC header for NAND_BOOT only

This commit guards against applying the PMECC header in a non-NAND_BOOT scenario. This a modified version of a previous patch found here:

https://patchwork.ozlabs.org/patch/1009885/

Now that SPL_GENERATE_ATMEL_PMECC_HEADER has been converted to Kconfig, this provides an additional guard for building and using the 'atmel_pmecc_params' tool.

---
 scripts/Makefile.spl | 2 ++
 1 file changed, 2 insertions(+)
scripts/Makefile.spl +2 -0
index 9d5921606e..8732479f39 100644
@@ -177,10 +177,12 @@ ifeq ($(CONFIG_SYS_SOC),"at91")
 MKIMAGEFLAGS_boot.bin = -T atmelimage
 
 ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y)
+ifeq ($(CONFIG_NAND_BOOT),y)
 MKIMAGEFLAGS_boot.bin += -n $(shell $(obj)/../tools/atmel_pmecc_params)
 
 boot.bin: $(obj)/../tools/atmel_pmecc_params
 endif
+endif
 
 boot.bin: $(obj)/u-boot-spl.bin FORCE
 	$(call if_changed,mkimage)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 ARM: at91: Apply PMECC header for NAND_BOOT only

Quoted 19 lines · Derald D. Woods

This commit guards against applying the PMECC header in a non-NAND_BOOT scenario. This a modified version of a previous patch found here:

https://patchwork.ozlabs.org/patch/1009885/

Now that SPL_GENERATE_ATMEL_PMECC_HEADER has been converted to Kconfig, this provides an additional guard for building and using the 'atmel_pmecc_params' tool.

---
  scripts/Makefile.spl | 2 ++
  1 file changed, 2 insertions(+)
scripts/Makefile.spl +0 -0
index 9d5921606e..8732479f39 100644

scripts/Makefile.spl ifeq ($(CONFIG_SYS_SOC),"at91") · line 185

Quoted 9 lines
scripts/Makefile.spl +2 -0
@@ -177,10 +177,12 @@ ifeq ($(CONFIG_SYS_SOC),"at91")
  MKIMAGEFLAGS_boot.bin = -T atmelimage
 
  ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y)
+ifeq ($(CONFIG_NAND_BOOT),y)
  MKIMAGEFLAGS_boot.bin += -n $(shell $(obj)/../tools/atmel_pmecc_params)
 
  boot.bin: $(obj)/../tools/atmel_pmecc_params
  endif
+endif

Hello Derald,

This would actually make the functionality "not happening" if the configuration is done badly, but the Kconfig will still be activated, which will contradict it's behavior: enable something, but not working, because inside the Makefile, there is a hack to stop it in some cases... So I would prefer if you can make SPL_GENERATE_ATMEL_PMECC_HEADER depend in Kconfig directly to CONFIG_NAND_BOOT.
Does that fit your thoughts as well?

Thanks,
Eugen

Quoted 4 lines
scripts/Makefile.spl +0 -0
  boot.bin: $(obj)/u-boot-spl.bin FORCE
  	$(call if_changed,mkimage)