mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] imx-usb-loader: fixes in displaying version number
@ 2023-05-26 16:59 Johannes Zink
  2023-05-26 16:59 ` [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before Johannes Zink
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Johannes Zink @ 2023-05-26 16:59 UTC (permalink / raw)
  To: barebox; +Cc: kernel, ahmad, afa, patchwork-jzi

As Ahmad pointed out in [1], compilation failed if the prepare make
target was not called before compiling the imx-usb-loader, which caused
the generated file not to exist when building for the sandbox target and
broke the build.

Instead of continuing to pursue the approach discussed in [2], a rather
straight-foreward approach of adding utsrelease.h as a dependency to
scripts has been chosen, as now the already-existing infrastucture can
be used instead of duplicating code in the Makefile.

Also, the version number was only set for the Host Tool, but not in the
target tool, which the second patch of this series fixes.

As the original patch was accidentaly sent out as a fixup, and as this
series chooses a slightly different approach, I decided to open a new
series.

Best regards
Johannes

[1] https://lore.barebox.org/barebox/20230525181320.2277320-1-ahmad@a3f.at/
[2] https://lore.barebox.org/barebox/20230526070847.52738-1-j.zink@pengutronix.de/

Johannes Zink (2):
  imx-usb-loader: fix compilation if prepare make target was not called
    before
  imx-usb-loader: also add version information on target tool

 Makefile             | 2 +-
 scripts/imx/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.39.2




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

* [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before
  2023-05-26 16:59 [PATCH 0/2] imx-usb-loader: fixes in displaying version number Johannes Zink
@ 2023-05-26 16:59 ` Johannes Zink
  2023-05-26 18:42   ` Ahmad Fatoum
  2023-05-26 16:59 ` [PATCH 2/2] imx-usb-loader: also add version information on target tool Johannes Zink
  2023-05-30  6:27 ` [PATCH 0/2] imx-usb-loader: fixes in displaying version number Sascha Hauer
  2 siblings, 1 reply; 5+ messages in thread
From: Johannes Zink @ 2023-05-26 16:59 UTC (permalink / raw)
  To: barebox; +Cc: kernel, ahmad, afa, patchwork-jzi, Ahmad Fatoum, Johannes Zink

As pointed out in [1], compilation failed if the prepare make
target was not called before compiling the imx-usb-loader, which caused
the generated file not to exist when building for the sandbox target and
broke the build.

After a discussion on the original thread, a different approach has been pursued
by simply adding utsrelease.h as a dependency to scripts.

[1] https://lore.barebox.org/barebox/20230525181320.2277320-1-ahmad@a3f.at/

Fixes: c1b50061f4b3 ("imx-usb-loader: add commandline option for displaying version number")
Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>

---
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 471bbc2679c8..711cba7bed29 100644
--- a/Makefile
+++ b/Makefile
@@ -972,7 +972,7 @@ include/config/kernel.release: FORCE
 # Carefully list dependencies so we do not try to build scripts twice
 # in parallel
 PHONY += scripts
-scripts: scripts_basic
+scripts: scripts_basic include/generated/utsrelease.h
 	$(Q)$(MAKE) $(build)=$(@)
 
 # Things we need to do before we recursively start building the kernel
-- 
2.39.2




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

* [PATCH 2/2] imx-usb-loader: also add version information on target tool
  2023-05-26 16:59 [PATCH 0/2] imx-usb-loader: fixes in displaying version number Johannes Zink
  2023-05-26 16:59 ` [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before Johannes Zink
@ 2023-05-26 16:59 ` Johannes Zink
  2023-05-30  6:27 ` [PATCH 0/2] imx-usb-loader: fixes in displaying version number Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Zink @ 2023-05-26 16:59 UTC (permalink / raw)
  To: barebox; +Cc: kernel, ahmad, afa, patchwork-jzi, Johannes Zink

The version information was not added to the target tool, which then
always showed "undefined" as version string. Fixed.

Fixes: c1b50061f4b3 ("imx-usb-loader: add commandline option for displaying version number")
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
---
 scripts/imx/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/imx/Makefile b/scripts/imx/Makefile
index b3be3886d8eb..d0d1f17e10bd 100644
--- a/scripts/imx/Makefile
+++ b/scripts/imx/Makefile
@@ -6,7 +6,7 @@ hostprogs-always-$(CONFIG_ARCH_IMX_USBLOADER)	+= imx-usb-loader
 HOSTCFLAGS_imx-usb-loader.o = `pkg-config --cflags libusb-1.0` -include $(objtree)/include/generated/utsrelease.h
 HOSTLDLIBS_imx-usb-loader  = `pkg-config --libs libusb-1.0`
 
-imx-usb-loader-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0`
+imx-usb-loader-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0` -include $(objtree)/include/generated/utsrelease.h
 imx-usb-loader-target-userldlibs += `$(CROSS_PKG_CONFIG) --libs libusb-1.0`
 
 HOSTCFLAGS_imx.o = -I$(srctree)/include/mach
-- 
2.39.2




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

* Re: [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before
  2023-05-26 16:59 ` [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before Johannes Zink
@ 2023-05-26 18:42   ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2023-05-26 18:42 UTC (permalink / raw)
  To: Johannes Zink, barebox; +Cc: kernel, ahmad, afa, patchwork-jzi

On 26.05.23 18:59, Johannes Zink wrote:
> As pointed out in [1], compilation failed if the prepare make
> target was not called before compiling the imx-usb-loader, which caused
> the generated file not to exist when building for the sandbox target and
> broke the build.
> 
> After a discussion on the original thread, a different approach has been pursued
> by simply adding utsrelease.h as a dependency to scripts.
> 
> [1] https://lore.barebox.org/barebox/20230525181320.2277320-1-ahmad@a3f.at/
> 
> Fixes: c1b50061f4b3 ("imx-usb-loader: add commandline option for displaying version number")
> Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
> 
> ---
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 471bbc2679c8..711cba7bed29 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -972,7 +972,7 @@ include/config/kernel.release: FORCE
>  # Carefully list dependencies so we do not try to build scripts twice
>  # in parallel
>  PHONY += scripts
> -scripts: scripts_basic
> +scripts: scripts_basic include/generated/utsrelease.h
>  	$(Q)$(MAKE) $(build)=$(@)
>  
>  # Things we need to do before we recursively start building the kernel

-- 
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 |




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

* Re: [PATCH 0/2] imx-usb-loader: fixes in displaying version number
  2023-05-26 16:59 [PATCH 0/2] imx-usb-loader: fixes in displaying version number Johannes Zink
  2023-05-26 16:59 ` [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before Johannes Zink
  2023-05-26 16:59 ` [PATCH 2/2] imx-usb-loader: also add version information on target tool Johannes Zink
@ 2023-05-30  6:27 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2023-05-30  6:27 UTC (permalink / raw)
  To: Johannes Zink; +Cc: barebox, ahmad, afa, kernel, patchwork-jzi

On Fri, May 26, 2023 at 06:59:46PM +0200, Johannes Zink wrote:
> As Ahmad pointed out in [1], compilation failed if the prepare make
> target was not called before compiling the imx-usb-loader, which caused
> the generated file not to exist when building for the sandbox target and
> broke the build.
> 
> Instead of continuing to pursue the approach discussed in [2], a rather
> straight-foreward approach of adding utsrelease.h as a dependency to
> scripts has been chosen, as now the already-existing infrastucture can
> be used instead of duplicating code in the Makefile.
> 
> Also, the version number was only set for the Host Tool, but not in the
> target tool, which the second patch of this series fixes.
> 
> As the original patch was accidentaly sent out as a fixup, and as this
> series chooses a slightly different approach, I decided to open a new
> series.
> 
> Best regards
> Johannes
> 
> [1] https://lore.barebox.org/barebox/20230525181320.2277320-1-ahmad@a3f.at/
> [2] https://lore.barebox.org/barebox/20230526070847.52738-1-j.zink@pengutronix.de/
> 
> Johannes Zink (2):
>   imx-usb-loader: fix compilation if prepare make target was not called
>     before
>   imx-usb-loader: also add version information on target tool
> 
>  Makefile             | 2 +-
>  scripts/imx/Makefile | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha


-- 
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 |



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

end of thread, other threads:[~2023-05-30  6:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 16:59 [PATCH 0/2] imx-usb-loader: fixes in displaying version number Johannes Zink
2023-05-26 16:59 ` [PATCH 1/2] imx-usb-loader: fix compilation if prepare make target was not called before Johannes Zink
2023-05-26 18:42   ` Ahmad Fatoum
2023-05-26 16:59 ` [PATCH 2/2] imx-usb-loader: also add version information on target tool Johannes Zink
2023-05-30  6:27 ` [PATCH 0/2] imx-usb-loader: fixes in displaying version number Sascha Hauer

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