Skip to contentSkip to conversation

socfpga: clean up sfp generation

PATCH Superseded Dalon Westergreen 3 participants 4 messages Oct 12, 2018 – Oct 15, 2018 Kbuild

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 socfpga: clean up sfp generation

From: Dalon Westergreen <[email protected]>

Move the sfp file generation entirely to the root Makefile. This means that the u-boot-spl.sfp will only be generated when required and only for the socfpga variants that require it.

sfp generation is now entirely controlled by CONFIG_BUILD_TARGET being set to either spl/u-boot-spl.sfp or more likely u-boot-with-spl.sfp

---
v2:
-> condense changes to 1 patch to avoid breaking git bisect

---
 Makefile             | 11 ++++++++---
 scripts/Makefile.spl | 12 ------------
 2 files changed, 8 insertions(+), 15 deletions(-)
Makefile +8 -3
index aadd1ec8c6..16ce14d071 100644
@@ -1207,6 +1207,14 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
 	$(call if_changed,pad_cat)
 
 ifneq ($(CONFIG_ARCH_SOCFPGA),)
+ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage_v1
+else
+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage
+endif
+spl/u-boot-spl.sfp: spl/u-boot-spl.bin FORCE
+	$(call if_changed,mkimage)
+
 quiet_cmd_socboot = SOCBOOT $@
 cmd_socboot = cat	spl/u-boot-spl.sfp spl/u-boot-spl.sfp	\
 			spl/u-boot-spl.sfp spl/u-boot-spl.sfp	\
@@ -1542,9 +1550,6 @@ spl/sunxi-spl.bin: spl/u-boot-spl
 spl/sunxi-spl-with-ecc.bin: spl/sunxi-spl.bin
 	@:
 
-spl/u-boot-spl.sfp: spl/u-boot-spl
-	@:
-
 spl/boot.bin: spl/u-boot-spl
 	@:
 
scripts/Makefile.spl +0 -12
index 7416abec62..a58113cee2 100644
@@ -198,10 +198,6 @@ ifdef CONFIG_SAMSUNG
 ALL-y	+= $(obj)/$(BOARD)-spl.bin
 endif
 
-ifdef CONFIG_ARCH_SOCFPGA
-ALL-y	+= $(obj)/$(SPL_BIN).sfp
-endif
-
 ifdef CONFIG_ARCH_SUNXI
 ALL-y	+= $(obj)/sunxi-spl.bin
 
@@ -324,14 +320,6 @@ LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE)
 endif
 endif
 
-ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
-MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage_v1
-else
-MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage
-endif
-$(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE
-	$(call if_changed,mkimage)
-
 quiet_cmd_mksunxiboot = MKSUNXI $@
 cmd_mksunxiboot = $(objtree)/tools/mksunxiboot \
 			--default-dt $(CONFIG_DEFAULT_DEVICE_TREE) $< $@
Signature · 1 line
2.17.2
#1 lore raw

PATCH v2 1/1 socfpga: clean up sfp generation

Quoted 25 lines · Dalon Westergreen

From: Dalon Westergreen <[email protected]>

Move the sfp file generation entirely to the root Makefile. This means that the u-boot-spl.sfp will only be generated when required and only for the socfpga variants that require it.

sfp generation is now entirely controlled by CONFIG_BUILD_TARGET being set to either spl/u-boot-spl.sfp or more likely u-boot-with-spl.sfp

---
v2:
-> condense changes to 1 patch to avoid breaking git bisect

---
 Makefile             | 11 ++++++++---
 scripts/Makefile.spl | 12 ------------
 2 files changed, 8 insertions(+), 15 deletions(-)
Makefile +0 -0
index aadd1ec8c6..16ce14d071 100644

Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1210

Quoted 4 lines
Makefile +1 -0
@@ -1207,6 +1207,14 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
 	$(call if_changed,pad_cat)
 
 ifneq ($(CONFIG_ARCH_SOCFPGA),)
+ifdef CONFIG_TARGET_SOCFPGA_ARRIA10

Shouldn't that be ifneq ($(CONFIG....),) ?, just like the line above ?

Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1216

Quoted 6 lines
Makefile +6 -0
+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage_v1
+else
+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage
+endif
+spl/u-boot-spl.sfp: spl/u-boot-spl.bin FORCE
+	$(call if_changed,mkimage)

Otherwise it looks good I think :)

Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH v2 1/1 socfpga: clean up sfp generation

Quoted 12 lines · Marek Vasut

On 10/13/2018 12:13 AM, Dalon Westergreen wrote:
From: Dalon Westergreen <[email protected]>
Move the sfp file generation entirely to the root Makefile. Thismeans that the u-boot-spl.sfp will only be generated when requiredand only for the socfpga variants that require it.
sfp generation is now entirely controlled by CONFIG_BUILD_TARGETbeing set to either spl/u-boot-spl.sfp or more likelyu-boot-with-spl.sfp

---v2: -> condense changes to 1 patch to avoid breaking git bisect---
Makefile | 11 ++++++++--- scripts/Makefile.spl | 12 ------------ 2
files changed, 8 insertions(+), 15 deletions(-)

Makefileindex aadd1ec8c6..16ce14d071 100644--- renamed from Makefile +0 -0
Quoted 4 lines

a/Makefile+++ b/Makefile@@ -1207,6 +1207,14 @@ u-boot.spr: spl/u-boot-spl.img
u-boot.img FORCE $(call if_changed,pad_cat) ifneq
($(CONFIG_ARCH_SOCFPGA),)+ifdef CONFIG_TARGET_SOCFPGA_ARRIA10 Shouldn't that be ifneq ($(CONFIG....),) ?, just like the line above ?

That was just cut and paste from scripts/Makefile.spl, but i will change it. --dalon

Quoted 6 lines

+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage_v1+else+MKIMAGEFLAGS_$(SPL_BIN).sfp = -T
socfpgaimage+endif+spl/u-boot-spl.sfp: spl/u-boot-spl.bin FORCE+ $(call
if_changed,mkimage)
Otherwise it looks good I think :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3282 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181015/9781071c/attachment.bin>

#3 lore raw

PATCH v2 1/1 socfpga: clean up sfp generation

Quoted 29 lines · Dalon
Quoted 28 lines · Marek Vasut

On 10/13/2018 12:13 AM, Dalon Westergreen wrote:
From: Dalon Westergreen <dalon.westergreen at intel.com <mailto:[email protected]>>

Move the sfp file generation entirely to the root Makefile. This means that the u-boot-spl.sfp will only be generated when required and only for the socfpga variants that require it.

sfp generation is now entirely controlled by CONFIG_BUILD_TARGET being set to either spl/u-boot-spl.sfp or more likely u-boot-with-spl.sfp

Signed-off-by Dalon Westergreen <dalon.westergreen at intel.com <mailto:[email protected]>>

---
v2:
-> condense changes to 1 patch to avoid breaking git bisect

---
 Makefile             | 11 ++++++++---
 scripts/Makefile.spl | 12 ------------
 2 files changed, 8 insertions(+), 15 deletions(-)
Makefile +0 -0
index aadd1ec8c6..16ce14d071 100644
@@ -1207,6 +1207,14 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
 	$(call if_changed,pad_cat)
 
Quoted 6 lines
Quoted 4 lines
Makefile +1 -0
 ifneq ($(CONFIG_ARCH_SOCFPGA),)
+ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
 

Shouldn't that be ifneq ($(CONFIG....),) ?, just like the line above ?

That was just cut and paste from scripts/Makefile.spl, but i will change it.

Thanks

Signature · 2 lines
Best regards,
Marek Vasut