mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [RFC: PATCH] u-boot: Add target name options.
@ 2022-03-10 11:56 Christian Melki
  2022-03-11  9:46 ` Michael Olbrich
  2022-03-14 10:14 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Melki @ 2022-03-10 11:56 UTC (permalink / raw)
  To: ptxdist

Add possibility to remove install of the normal u-boot.bin.
A lot of targets do not need it, some targets do not even build it
(Which generates an error during the install).
Add a i.mx8 family flash.bin image name.

This entire thing bugs me a bit.
I don't really like the idea of a lot of target types just to copy files.
Usually I know what the target file is named and what I want it installed as
(which sometimes is a more generic name than the build name).
I can see this disappearing in favor of a more generic "copy this" "to this" with
the default names filled in and a help listing the typical binary target names
as a guideline.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 platforms/u-boot.in | 13 +++++++++++++
 rules/u-boot.make   |  5 +++++
 2 files changed, 18 insertions(+)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index c439e9c5d..56b96fb1e 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -170,6 +170,13 @@ endif
 
 comment "target install"
 
+config U_BOOT_INSTALL_U_BOOT_BIN
+	prompt "install u-boot.bin"
+	bool
+	default true
+	help
+	  Installing the U-Boot default binary target.
+
 config U_BOOT_INSTALL_SREC
 	prompt "install u-boot.srec"
 	bool
@@ -258,6 +265,12 @@ config U_BOOT_INSTALL_U_BOOT_STM32
 	  platform image directory. Say yes if you are building for STM32MP1
 	  SOCs.
 
+config U_BOOT_INSTALL_U_BOOT_FLASH_BIN
+	prompt "install flash.bin"
+	bool
+	help
+	  Installing the U-Boot image to Gateworks.
+
 comment "build dependencies"
 
 config U_BOOT_NEEDS_HOST_OPENSSL
diff --git a/rules/u-boot.make b/rules/u-boot.make
index d127cf1e0..ac5a7786b 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -139,7 +139,9 @@ $(STATEDIR)/u-boot.install:
 $(STATEDIR)/u-boot.targetinstall:
 	@$(call targetinfo)
 	@$(call world/image-clean, U_BOOT)
+ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_BIN
 	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.bin)
+endif
 ifdef PTXCONF_U_BOOT_INSTALL_SREC
 	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.srec)
 endif
@@ -176,6 +178,9 @@ endif
 ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_STM32
 	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.stm32)
 endif
+ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_FLASH_BIN
+	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/flash.bin)
+endif
 ifndef PTXCONF_U_BOOT_ENV_IMAGE_NONE
 	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot-env.img)
 endif
-- 
2.32.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [RFC: PATCH] u-boot: Add target name options.
  2022-03-10 11:56 [ptxdist] [RFC: PATCH] u-boot: Add target name options Christian Melki
@ 2022-03-11  9:46 ` Michael Olbrich
  2022-03-14 10:14 ` [ptxdist] [APPLIED] " Michael Olbrich
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2022-03-11  9:46 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

On Thu, Mar 10, 2022 at 12:56:12PM +0100, Christian Melki wrote:
> Add possibility to remove install of the normal u-boot.bin.
> A lot of targets do not need it, some targets do not even build it
> (Which generates an error during the install).
> Add a i.mx8 family flash.bin image name.
> 
> This entire thing bugs me a bit.
> I don't really like the idea of a lot of target types just to copy files.
> Usually I know what the target file is named and what I want it installed as
> (which sometimes is a more generic name than the build name).
> I can see this disappearing in favor of a more generic "copy this" "to this" with
> the default names filled in and a help listing the typical binary target names
> as a guideline.

If feels a bit like whack a mole...

That's one of the reasons why I prefer Barebox. I haven't seen anything but
images/barebox-<boardname>.img in a long time...

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  platforms/u-boot.in | 13 +++++++++++++
>  rules/u-boot.make   |  5 +++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index c439e9c5d..56b96fb1e 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -170,6 +170,13 @@ endif
>  
>  comment "target install"
>  
> +config U_BOOT_INSTALL_U_BOOT_BIN
> +	prompt "install u-boot.bin"
> +	bool
> +	default true

	default y

I'll fix it while applying.

Michael

> +	help
> +	  Installing the U-Boot default binary target.
> +
>  config U_BOOT_INSTALL_SREC
>  	prompt "install u-boot.srec"
>  	bool
> @@ -258,6 +265,12 @@ config U_BOOT_INSTALL_U_BOOT_STM32
>  	  platform image directory. Say yes if you are building for STM32MP1
>  	  SOCs.
>  
> +config U_BOOT_INSTALL_U_BOOT_FLASH_BIN
> +	prompt "install flash.bin"
> +	bool
> +	help
> +	  Installing the U-Boot image to Gateworks.
> +
>  comment "build dependencies"
>  
>  config U_BOOT_NEEDS_HOST_OPENSSL
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index d127cf1e0..ac5a7786b 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -139,7 +139,9 @@ $(STATEDIR)/u-boot.install:
>  $(STATEDIR)/u-boot.targetinstall:
>  	@$(call targetinfo)
>  	@$(call world/image-clean, U_BOOT)
> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_BIN
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.bin)
> +endif
>  ifdef PTXCONF_U_BOOT_INSTALL_SREC
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.srec)
>  endif
> @@ -176,6 +178,9 @@ endif
>  ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_STM32
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.stm32)
>  endif
> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_FLASH_BIN
> +	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/flash.bin)
> +endif
>  ifndef PTXCONF_U_BOOT_ENV_IMAGE_NONE
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot-env.img)
>  endif
> -- 
> 2.32.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [APPLIED] u-boot: Add target name options.
  2022-03-10 11:56 [ptxdist] [RFC: PATCH] u-boot: Add target name options Christian Melki
  2022-03-11  9:46 ` Michael Olbrich
@ 2022-03-14 10:14 ` Michael Olbrich
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2022-03-14 10:14 UTC (permalink / raw)
  To: ptxdist; +Cc: Christian Melki

Thanks, applied as 4975736bc39c39dfc204677a927ef3deecd3a373.

Michael

[sent from post-receive hook]

On Mon, 14 Mar 2022 11:14:41 +0100, Christian Melki <christian.melki@t2data.com> wrote:
> Add possibility to remove install of the normal u-boot.bin.
> A lot of targets do not need it, some targets do not even build it
> (Which generates an error during the install).
> Add a i.mx8 family flash.bin image name.
> 
> This entire thing bugs me a bit.
> I don't really like the idea of a lot of target types just to copy files.
> Usually I know what the target file is named and what I want it installed as
> (which sometimes is a more generic name than the build name).
> I can see this disappearing in favor of a more generic "copy this" "to this" with
> the default names filled in and a help listing the typical binary target names
> as a guideline.
> 
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> Message-Id: <20220310115612.1404060-1-christian.melki@t2data.com>
> [mol: 'default y' instead of 'default true']
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index c439e9c5d60c..ba117b089098 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -170,6 +170,13 @@ endif
>  
>  comment "target install"
>  
> +config U_BOOT_INSTALL_U_BOOT_BIN
> +	prompt "install u-boot.bin"
> +	bool
> +	default y
> +	help
> +	  Installing the U-Boot default binary target.
> +
>  config U_BOOT_INSTALL_SREC
>  	prompt "install u-boot.srec"
>  	bool
> @@ -258,6 +265,12 @@ config U_BOOT_INSTALL_U_BOOT_STM32
>  	  platform image directory. Say yes if you are building for STM32MP1
>  	  SOCs.
>  
> +config U_BOOT_INSTALL_U_BOOT_FLASH_BIN
> +	prompt "install flash.bin"
> +	bool
> +	help
> +	  Installing the U-Boot image to Gateworks.
> +
>  comment "build dependencies"
>  
>  config U_BOOT_NEEDS_HOST_OPENSSL
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index d127cf1e0a68..ac5a7786bc64 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -139,7 +139,9 @@ $(STATEDIR)/u-boot.install:
>  $(STATEDIR)/u-boot.targetinstall:
>  	@$(call targetinfo)
>  	@$(call world/image-clean, U_BOOT)
> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_BIN
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.bin)
> +endif
>  ifdef PTXCONF_U_BOOT_INSTALL_SREC
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.srec)
>  endif
> @@ -176,6 +178,9 @@ endif
>  ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_STM32
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot.stm32)
>  endif
> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_FLASH_BIN
> +	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/flash.bin)
> +endif
>  ifndef PTXCONF_U_BOOT_ENV_IMAGE_NONE
>  	@$(call ptx/image-install, U_BOOT, $(U_BOOT_BUILD_DIR)/u-boot-env.img)
>  endif

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-14 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 11:56 [ptxdist] [RFC: PATCH] u-boot: Add target name options Christian Melki
2022-03-11  9:46 ` Michael Olbrich
2022-03-14 10:14 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox