Skip to contentSkip to conversation

Makefile: Drop SPL_FIT_SOURCE support

PATCH In review Marek Vasut 5 participants 10 messages Oct 4, 2024 – Oct 15, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Makefile: Drop SPL_FIT_SOURCE support

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

---
 Makefile                |  6 ------
 boot/Kconfig            |  8 --------
 doc/usage/fit/howto.rst | 11 +++--------
 3 files changed, 3 insertions(+), 22 deletions(-)
Makefile +0 -6
index af24de4165e..a70926ec2fa 100644
@@ -1417,18 +1417,12 @@ u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
 # or a generator script
 # NOTE: Please do not use this. We are migrating away from Makefile rules to use
 # binman instead.
-ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
-U_BOOT_ITS := u-boot.its
-$(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
-	$(call if_changed,copy)
-else
 ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
 U_BOOT_ITS := u-boot.its
 $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
 	$(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
 	$(patsubst %,$(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
 endif
-endif
 
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
boot/Kconfig +0 -8
index 925afe06a19..51e6cd6cb1d 100644
@@ -282,14 +282,6 @@ config SPL_FIT_IMAGE_POST_PROCESS
 	  injected into the FIT creation (i.e. the blobs would have been pre-
 	  processed before being added to the FIT image).
 
-config SPL_FIT_SOURCE
-	string ".its source file for U-Boot FIT image"
-	depends on SPL_FIT
-	help
-	  Specifies a (platform specific) FIT source file to generate the
-	  U-Boot FIT image. This could specify further image to load and/or
-	  execute.
-
 config USE_SPL_FIT_GENERATOR
 	bool "Use a script to generate the .its script"
 	depends on SPL_FIT
doc/usage/fit/howto.rst +3 -8
index b5097d4460b..280eff724f6 100644
@@ -57,14 +57,9 @@ own subnode under the /images node, which should then be referenced from one or
 multiple /configurations subnodes. The required images must be enumerated in
 the "loadables" property as a list of strings.
 
-If a platform specific image source file (.its) is shipped with the U-Boot
-source, it can be specified using the CONFIG_SPL_FIT_SOURCE Kconfig symbol.
-In this case it will be automatically used by U-Boot's Makefile to generate
-the image.
-If a static source file is not flexible enough, CONFIG_SPL_FIT_GENERATOR
-can point to a script which generates this image source file during
-the build process. It gets passed a list of device tree files (taken from the
-CONFIG_OF_LIST symbol).
+CONFIG_SPL_FIT_GENERATOR can point to a script which generates this image source
+file during the build process. It gets passed a list of device tree files (taken
+from the CONFIG_OF_LIST symbol).
 
 The SPL also records to a DT all additional images (called loadables) which are
 loaded. The information about loadables locations is passed via the DT node with
Signature · 1 line
2.45.2
#1 lore raw

PATCH 2/2 Makefile: Drop SPL_FIT_GENERATOR support

The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR support as there are no more users.

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

---
 Makefile                | 18 ------------------
 boot/Kconfig            | 15 ---------------
 doc/usage/fit/howto.rst |  4 ----
 3 files changed, 37 deletions(-)
Makefile +0 -18
index a70926ec2fa..45592eb2bac 100644
@@ -1139,13 +1139,6 @@ ifeq ($(CONFIG_OF_EMBED)$(CONFIG_EFI_APP),y)
 	@echo >&2 "CONFIG_OF_SEPARATE for boards in mainline."
 	@echo >&2 "See doc/develop/devicetree/control.rst for more info."
 	@echo >&2 "===================================================="
-endif
-ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
-	@echo >&2 "===================== WARNING ======================"
-	@echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
-	@echo >&2 "to binman instead, to avoid the proliferation of"
-	@echo >&2 "arch-specific scripts with no tests."
-	@echo >&2 "===================================================="
 endif
 	$(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
 		$(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
@@ -1413,17 +1406,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
 u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
 	$(call if_changed,objcopy)
 
-# Boards with more complex image requirements can provide an .its source file
-# or a generator script
-# NOTE: Please do not use this. We are migrating away from Makefile rules to use
-# binman instead.
-ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
-U_BOOT_ITS := u-boot.its
-$(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
-	$(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
-	$(patsubst %,$(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
-endif
-
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
 	-a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
boot/Kconfig +0 -15
index 51e6cd6cb1d..4314227d5f8 100644
@@ -282,21 +282,6 @@ config SPL_FIT_IMAGE_POST_PROCESS
 	  injected into the FIT creation (i.e. the blobs would have been pre-
 	  processed before being added to the FIT image).
 
-config USE_SPL_FIT_GENERATOR
-	bool "Use a script to generate the .its script"
-	depends on SPL_FIT
-	default y if SPL_FIT && ARCH_ZYNQMP
-
-config SPL_FIT_GENERATOR
-	string ".its file generator script for U-Boot FIT image"
-	depends on USE_SPL_FIT_GENERATOR
-	default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
-	help
-	  Specifies a (platform specific) script file to generate the FIT
-	  source file used to build the U-Boot FIT image file. This gets
-	  passed a list of supported device tree file stub names to
-	  include in the generated image.
-
 if VPL
 
 config VPL_FIT
doc/usage/fit/howto.rst +0 -4
index 280eff724f6..675c9aa5bb0 100644
@@ -57,10 +57,6 @@ own subnode under the /images node, which should then be referenced from one or
 multiple /configurations subnodes. The required images must be enumerated in
 the "loadables" property as a list of strings.
 
-CONFIG_SPL_FIT_GENERATOR can point to a script which generates this image source
-file during the build process. It gets passed a list of device tree files (taken
-from the CONFIG_OF_LIST symbol).
-
 The SPL also records to a DT all additional images (called loadables) which are
 loaded. The information about loadables locations is passed via the DT node with
 fit-images name.
Signature · 1 line
2.45.2
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] Makefile: Drop SPL_FIT_GENERATOR support

Quoted 25 lines · Marek Vasut

The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR support as there are no more users.

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

Quoted 5 lines
---
 Makefile                | 18 ------------------
 boot/Kconfig            | 15 ---------------
 doc/usage/fit/howto.rst |  4 ----
 3 files changed, 37 deletions(-)

Double yay. I didn't know that the last user was gone.

Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] Makefile: Drop SPL_FIT_GENERATOR support

In reply to Marek Vasut
Quoted 5 lines · Marek Vasut

The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR support as there are no more users.

Quoted 106 lines

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

---
 Makefile                | 18 ------------------
 boot/Kconfig            | 15 ---------------
 doc/usage/fit/howto.rst |  4 ----
 3 files changed, 37 deletions(-)
Makefile +0 -18
index a70926ec2fa..45592eb2bac 100644
@@ -1139,13 +1139,6 @@ ifeq ($(CONFIG_OF_EMBED)$(CONFIG_EFI_APP),y)
        @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline."
        @echo >&2 "See doc/develop/devicetree/control.rst for more info."
        @echo >&2 "===================================================="
-endif
-ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
-       @echo >&2 "===================== WARNING ======================"
-       @echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
-       @echo >&2 "to binman instead, to avoid the proliferation of"
-       @echo >&2 "arch-specific scripts with no tests."
-       @echo >&2 "===================================================="
 endif
        $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
                $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
@@ -1413,17 +1406,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
 u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
        $(call if_changed,objcopy)
 
-# Boards with more complex image requirements can provide an .its source file
-# or a generator script
-# NOTE: Please do not use this. We are migrating away from Makefile rules to use
-# binman instead.
-ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
-U_BOOT_ITS := u-boot.its
-$(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
-       $(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
-       $(patsubst %,$(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
-endif
-
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
        -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
boot/Kconfig +0 -15
index 51e6cd6cb1d..4314227d5f8 100644
@@ -282,21 +282,6 @@ config SPL_FIT_IMAGE_POST_PROCESS
          injected into the FIT creation (i.e. the blobs would have been pre-
          processed before being added to the FIT image).
 
-config USE_SPL_FIT_GENERATOR
-       bool "Use a script to generate the .its script"
-       depends on SPL_FIT
-       default y if SPL_FIT && ARCH_ZYNQMP
-
-config SPL_FIT_GENERATOR
-       string ".its file generator script for U-Boot FIT image"
-       depends on USE_SPL_FIT_GENERATOR
-       default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
-       help
-         Specifies a (platform specific) script file to generate the FIT
-         source file used to build the U-Boot FIT image file. This gets
-         passed a list of supported device tree file stub names to
-         include in the generated image.
-
 if VPL
 
 config VPL_FIT
doc/usage/fit/howto.rst +0 -5
index 280eff724f6..675c9aa5bb0 100644
@@ -57,10 +57,6 @@ own subnode under the /images node, which should then be referenced from one or
 multiple /configurations subnodes. The required images must be enumerated in
 the "loadables" property as a list of strings.
 
-CONFIG_SPL_FIT_GENERATOR can point to a script which generates this image source
-file during the build process. It gets passed a list of device tree files (taken
-from the CONFIG_OF_LIST symbol).
-
 The SPL also records to a DT all additional images (called loadables) which are
 loaded. The information about loadables locations is passed via the DT node with
 fit-images name.
--

2.45.2

Reviewed-by on v1 1/2
#4 lore raw
In reply to Marek Vasut
Quoted 26 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

Quoted 6 lines
---
 Makefile                |  6 ------
 boot/Kconfig            |  8 --------
 doc/usage/fit/howto.rst | 11 +++--------
 3 files changed, 3 insertions(+), 22 deletions(-)

yay

Reviewed-by on v1 1/2
#5 lore raw
In reply to Marek Vasut
Quoted 6 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

Quoted 93 lines

---
Cc: AKASHI Takahiro <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peter Robinson <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
NOTE: Depends on https://lore.kernel.org/u-boot/[email protected]/

---
 Makefile                |  6 ------
 boot/Kconfig            |  8 --------
 doc/usage/fit/howto.rst | 11 +++--------
 3 files changed, 3 insertions(+), 22 deletions(-)
Makefile +0 -6
index af24de4165e..a70926ec2fa 100644
@@ -1417,18 +1417,12 @@ u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
 # or a generator script
 # NOTE: Please do not use this. We are migrating away from Makefile rules to use
 # binman instead.
-ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
-U_BOOT_ITS := u-boot.its
-$(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
-       $(call if_changed,copy)
-else
 ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
 U_BOOT_ITS := u-boot.its
 $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
        $(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
        $(patsubst %,$(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
 endif
-endif
 
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
boot/Kconfig +0 -8
index 925afe06a19..51e6cd6cb1d 100644
@@ -282,14 +282,6 @@ config SPL_FIT_IMAGE_POST_PROCESS
          injected into the FIT creation (i.e. the blobs would have been pre-
          processed before being added to the FIT image).
 
-config SPL_FIT_SOURCE
-       string ".its source file for U-Boot FIT image"
-       depends on SPL_FIT
-       help
-         Specifies a (platform specific) FIT source file to generate the
-         U-Boot FIT image. This could specify further image to load and/or
-         execute.
-
 config USE_SPL_FIT_GENERATOR
        bool "Use a script to generate the .its script"
        depends on SPL_FIT
doc/usage/fit/howto.rst +3 -9
index b5097d4460b..280eff724f6 100644
@@ -57,14 +57,9 @@ own subnode under the /images node, which should then be referenced from one or
 multiple /configurations subnodes. The required images must be enumerated in
 the "loadables" property as a list of strings.
 
-If a platform specific image source file (.its) is shipped with the U-Boot
-source, it can be specified using the CONFIG_SPL_FIT_SOURCE Kconfig symbol.
-In this case it will be automatically used by U-Boot's Makefile to generate
-the image.
-If a static source file is not flexible enough, CONFIG_SPL_FIT_GENERATOR
-can point to a script which generates this image source file during
-the build process. It gets passed a list of device tree files (taken from the
-CONFIG_OF_LIST symbol).
+CONFIG_SPL_FIT_GENERATOR can point to a script which generates this image source
+file during the build process. It gets passed a list of device tree files (taken
+from the CONFIG_OF_LIST symbol).
 
 The SPL also records to a DT all additional images (called loadables) which are
 loaded. The information about loadables locations is passed via the DT node with
--

2.45.2

#6 lore raw
In reply to Marek Vasut
Quoted 5 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#7 lore raw
Quoted 10 lines · Tom Rini
Quoted 5 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

Applied to u-boot/master, thanks!

Look like 5b9261fb0b1e ("Makefile: Drop SPL_FIT_GENERATOR support") may have broken ARCH_ZYNQMP, it still seem to use a mkimage_fit_atf.sh and CI pipeline now fails:

https://source.denx.de/u-boot/u-boot/-/pipelines/22715

Regards,
Jonas

#8 lore raw
Quoted 9 lines · Jonas Karlman
Quoted 8 lines · Tom Rini
Quoted 5 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

Quoted 8 lines
Quoted 2 lines

Applied to u-boot/master, thanks!

Look like 5b9261fb0b1e ("Makefile: Drop SPL_FIT_GENERATOR support") may have broken ARCH_ZYNQMP, it still seem to use a mkimage_fit_atf.sh and CI pipeline now fails:

https://source.denx.de/u-boot/u-boot/-/pipelines/22715

Sigh, thanks.

Signature · 1 line
Tom
#9 lore raw
Quoted 13 lines · Tom Rini
Quoted 12 lines · Jonas Karlman
Quoted 10 lines · Tom Rini
Quoted 5 lines · Marek Vasut

The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which is long superseded by binman, drop SPL_FIT_SOURCE support as there are no more users.

Applied to u-boot/master, thanks!

Quoted 7 lines
Quoted 5 lines

Look like 5b9261fb0b1e ("Makefile: Drop SPL_FIT_GENERATOR support") may have broken ARCH_ZYNQMP, it still seem to use a mkimage_fit_atf.sh and CI pipeline now fails:

https://source.denx.de/u-boot/u-boot/-/pipelines/22715

Sigh, thanks.

And yes, I missed that, sorry.

Do you want a revert for 2/2 ?