* [ptxdist] [PATCH 2/2] templates: barebox: use ptx/image-install
2024-08-02 10:25 [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Roland Hieber
@ 2024-08-02 10:25 ` Roland Hieber
2024-09-12 12:11 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-08-08 9:36 ` [ptxdist] [PATCH 3/2] templates: kernel: use ptx/image-install and fix clean stage Roland Hieber
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Roland Hieber @ 2024-08-02 10:25 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
The images installed by ptx/image-install are automatically cleaned up
by the default clean stage.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
rules/templates/template-barebox-make | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/rules/templates/template-barebox-make b/rules/templates/template-barebox-make
index 84f15d91dc28..6821d65b9ab6 100644
--- a/rules/templates/template-barebox-make
+++ b/rules/templates/template-barebox-make
@@ -75,20 +75,10 @@ $(STATEDIR)/barebox-@package@.install:
$(STATEDIR)/barebox-@package@.targetinstall:
@$(call targetinfo)
@$(foreach image, $(BAREBOX_@PACKAGE@_IMAGES), \
- install -m 644 \
- $(image) $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
+ $(call ptx/image-install, BAREBOX_@PACKAGE@, $(image), \
+ $(notdir $(image))-@package@)$(ptx/nl))
@$(call touch)
-# ----------------------------------------------------------------------------
-# Clean
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/barebox-@package@.clean:
- @$(call targetinfo)
- @$(call clean_pkg, BAREBOX_@PACKAGE@)
- @$(foreach image, $(BAREBOX_@PACKAGE@_IMAGES), \
- rm -fv $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
-
# ----------------------------------------------------------------------------
# oldconfig / menuconfig
# ----------------------------------------------------------------------------
--
2.39.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [APPLIED] templates: barebox: use ptx/image-install
2024-08-02 10:25 ` [ptxdist] [PATCH 2/2] templates: barebox: use ptx/image-install Roland Hieber
@ 2024-09-12 12:11 ` Michael Olbrich
0 siblings, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2024-09-12 12:11 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
Thanks, applied as a9aa020cddf0278e95136eccb58af40f8e7178c3.
Michael
[sent from post-receive hook]
On Thu, 12 Sep 2024 14:11:35 +0200, Roland Hieber <rhi@pengutronix.de> wrote:
> The images installed by ptx/image-install are automatically cleaned up
> by the default clean stage.
>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20240802102529.1411407-2-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/templates/template-barebox-make b/rules/templates/template-barebox-make
> index 84f15d91dc28..6821d65b9ab6 100644
> --- a/rules/templates/template-barebox-make
> +++ b/rules/templates/template-barebox-make
> @@ -75,20 +75,10 @@ $(STATEDIR)/barebox-@package@.install:
> $(STATEDIR)/barebox-@package@.targetinstall:
> @$(call targetinfo)
> @$(foreach image, $(BAREBOX_@PACKAGE@_IMAGES), \
> - install -m 644 \
> - $(image) $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
> + $(call ptx/image-install, BAREBOX_@PACKAGE@, $(image), \
> + $(notdir $(image))-@package@)$(ptx/nl))
> @$(call touch)
>
> -# ----------------------------------------------------------------------------
> -# Clean
> -# ----------------------------------------------------------------------------
> -
> -$(STATEDIR)/barebox-@package@.clean:
> - @$(call targetinfo)
> - @$(call clean_pkg, BAREBOX_@PACKAGE@)
> - @$(foreach image, $(BAREBOX_@PACKAGE@_IMAGES), \
> - rm -fv $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
> -
> # ----------------------------------------------------------------------------
> # oldconfig / menuconfig
> # ----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* [ptxdist] [PATCH 3/2] templates: kernel: use ptx/image-install and fix clean stage
2024-08-02 10:25 [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Roland Hieber
2024-08-02 10:25 ` [ptxdist] [PATCH 2/2] templates: barebox: use ptx/image-install Roland Hieber
@ 2024-08-08 9:36 ` Roland Hieber
2024-09-12 12:11 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-08-08 14:14 ` [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Michael Olbrich
2024-09-06 14:03 ` Michael Olbrich
3 siblings, 1 reply; 9+ messages in thread
From: Roland Hieber @ 2024-08-08 9:36 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
The clean stage did not clean up the installed kernel images from the
image directory, but if we use ptx/image-install to install them, this
can all be done by PTXdist's default clean stage. That macro now also
prints the installed images, so we don't need to echo them.
While at it, fix a misplaced space in the "foreach dtb" statement.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
… oops, forgot to send this with the first series…
rules/templates/template-kernel-make | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
index cd1b717c51ba..1497a0c2177a 100644
--- a/rules/templates/template-kernel-make
+++ b/rules/templates/template-kernel-make
@@ -114,13 +114,14 @@ $(STATEDIR)/kernel-@package@.targetinstall:
@$(call targetinfo)
@$(foreach image, $(KERNEL_@PACKAGE@_IMAGES), \
- install -v -m 644 $(image) \
- $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
+ $(call ptx/image-install, KERNEL_@PACKAGE@, \
+ $(image), \
+ $(notdir $(image))-@package@$(ptx/nl)))
- @$(foreach dtb ,$(KERNEL_@PACKAGE@_DTB_FILES), \
- echo -e "Installing $(dtb) ...\n"$(ptx/nl) \
- install -D -m0644 $(KERNEL_@PACKAGE@_PKGDIR)/boot/$(dtb) \
- $(IMAGEDIR)/$(dtb)$(ptx/nl))
+ @$(foreach dtb, $(KERNEL_@PACKAGE@_DTB_FILES), \
+ $(call ptx/image-install, KERNEL_@PACKAGE@, \
+ $(KERNEL_@PACKAGE@_PKGDIR)/boot/$(dtb), \
+ $(dtb)$(ptx/nl)))
@$(call install_init, kernel-@package@)
@$(call install_fixup, kernel-@package@, PRIORITY,optional)
@@ -142,16 +143,6 @@ $(STATEDIR)/kernel-@package@.targetinstall:
@$(call touch)
-# ----------------------------------------------------------------------------
-# Clean
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/kernel-@package@.clean:
- @$(call targetinfo)
- @$(call clean_pkg, KERNEL_@PACKAGE@)
- @$(foreach dtb,$(KERNEL_@PACKAGE@_DTB_FILES), \
- rm -vf $(IMAGEDIR)/$(dtb)$(ptx/nl))
-
# ----------------------------------------------------------------------------
# oldconfig / menuconfig
# ----------------------------------------------------------------------------
--
2.39.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [APPLIED] templates: kernel: use ptx/image-install and fix clean stage
2024-08-08 9:36 ` [ptxdist] [PATCH 3/2] templates: kernel: use ptx/image-install and fix clean stage Roland Hieber
@ 2024-09-12 12:11 ` Michael Olbrich
0 siblings, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2024-09-12 12:11 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
Thanks, applied as 2fe596d29d2de78e20e7c3d1ddda9f839133e288.
Michael
[sent from post-receive hook]
On Thu, 12 Sep 2024 14:11:36 +0200, Roland Hieber <rhi@pengutronix.de> wrote:
> The clean stage did not clean up the installed kernel images from the
> image directory, but if we use ptx/image-install to install them, this
> can all be done by PTXdist's default clean stage. That macro now also
> prints the installed images, so we don't need to echo them.
>
> While at it, fix a misplaced space in the "foreach dtb" statement.
>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20240808093643.1634147-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
> index cd1b717c51ba..1497a0c2177a 100644
> --- a/rules/templates/template-kernel-make
> +++ b/rules/templates/template-kernel-make
> @@ -114,13 +114,14 @@ $(STATEDIR)/kernel-@package@.targetinstall:
> @$(call targetinfo)
>
> @$(foreach image, $(KERNEL_@PACKAGE@_IMAGES), \
> - install -v -m 644 $(image) \
> - $(IMAGEDIR)/$(notdir $(image))-@package@$(ptx/nl))
> + $(call ptx/image-install, KERNEL_@PACKAGE@, \
> + $(image), \
> + $(notdir $(image))-@package@$(ptx/nl)))
>
> - @$(foreach dtb ,$(KERNEL_@PACKAGE@_DTB_FILES), \
> - echo -e "Installing $(dtb) ...\n"$(ptx/nl) \
> - install -D -m0644 $(KERNEL_@PACKAGE@_PKGDIR)/boot/$(dtb) \
> - $(IMAGEDIR)/$(dtb)$(ptx/nl))
> + @$(foreach dtb, $(KERNEL_@PACKAGE@_DTB_FILES), \
> + $(call ptx/image-install, KERNEL_@PACKAGE@, \
> + $(KERNEL_@PACKAGE@_PKGDIR)/boot/$(dtb), \
> + $(dtb)$(ptx/nl)))
>
> @$(call install_init, kernel-@package@)
> @$(call install_fixup, kernel-@package@, PRIORITY,optional)
> @@ -142,16 +143,6 @@ $(STATEDIR)/kernel-@package@.targetinstall:
>
> @$(call touch)
>
> -# ----------------------------------------------------------------------------
> -# Clean
> -# ----------------------------------------------------------------------------
> -
> -$(STATEDIR)/kernel-@package@.clean:
> - @$(call targetinfo)
> - @$(call clean_pkg, KERNEL_@PACKAGE@)
> - @$(foreach dtb,$(KERNEL_@PACKAGE@_DTB_FILES), \
> - rm -vf $(IMAGEDIR)/$(dtb)$(ptx/nl))
> -
> # ----------------------------------------------------------------------------
> # oldconfig / menuconfig
> # ----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls
2024-08-02 10:25 [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Roland Hieber
2024-08-02 10:25 ` [ptxdist] [PATCH 2/2] templates: barebox: use ptx/image-install Roland Hieber
2024-08-08 9:36 ` [ptxdist] [PATCH 3/2] templates: kernel: use ptx/image-install and fix clean stage Roland Hieber
@ 2024-08-08 14:14 ` Michael Olbrich
2024-08-26 12:09 ` Roland Hieber
2024-09-06 14:03 ` Michael Olbrich
3 siblings, 1 reply; 9+ messages in thread
From: Michael Olbrich @ 2024-08-08 14:14 UTC (permalink / raw)
To: Roland Hieber, ptxdist
On Fri, Aug 02, 2024 at 12:25:28PM +0200, Roland Hieber wrote:
> These calls make the PTXCONF_* variables from the ptxconfig and the
> platformconfig available in the local shell environment, but no PTXCONF_
> variable is used later in the shell call. This is probably a left-over
> from when the defaultenv preparation was made layer-aware in commit
> 41cb4d9f9287d85ae11b (2018-07-24, Michael Olbrich: "barebox: support
> layers with BAREBOX_EXTRA_ENV_PATH").
No, this is wrong. ptxd_filter_dir will replace and @VARIABLE@ and the
files can come from the BSP and can contain @PTXCONF_*@ patterns that
should be replaces.
Michael
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
> rules/barebox.make | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/rules/barebox.make b/rules/barebox.make
> index c0d9c5744e4a..bcb96e607b91 100644
> --- a/rules/barebox.make
> +++ b/rules/barebox.make
> @@ -87,9 +87,7 @@ endif
>
> ifdef PTXCONF_BAREBOX_EXTRA_ENV
> @rm -rf $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv
> - @ptxd_source_kconfig "${PTXDIST_PTXCONFIG}" && \
> - ptxd_source_kconfig "${PTXDIST_PLATFORMCONFIG}" && \
> - $(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> + @$(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> if [ -d "$(path)" ]; then \
> ptxd_filter_dir "$(path)" \
> $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv; \
> --
> 2.39.2
>
>
>
--
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] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls
2024-08-08 14:14 ` [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Michael Olbrich
@ 2024-08-26 12:09 ` Roland Hieber
0 siblings, 0 replies; 9+ messages in thread
From: Roland Hieber @ 2024-08-26 12:09 UTC (permalink / raw)
To: ptxdist
On Thu, Aug 08, 2024 at 04:14:41PM +0200, Michael Olbrich wrote:
> On Fri, Aug 02, 2024 at 12:25:28PM +0200, Roland Hieber wrote:
> > These calls make the PTXCONF_* variables from the ptxconfig and the
> > platformconfig available in the local shell environment, but no PTXCONF_
> > variable is used later in the shell call. This is probably a left-over
> > from when the defaultenv preparation was made layer-aware in commit
> > 41cb4d9f9287d85ae11b (2018-07-24, Michael Olbrich: "barebox: support
> > layers with BAREBOX_EXTRA_ENV_PATH").
>
> No, this is wrong. ptxd_filter_dir will replace and @VARIABLE@ and the
> files can come from the BSP and can contain @PTXCONF_*@ patterns that
> should be replaces.
Okay. The two other patches should still apply without this one.
- Roland
>
> Michael
>
> > Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> > ---
> > rules/barebox.make | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/rules/barebox.make b/rules/barebox.make
> > index c0d9c5744e4a..bcb96e607b91 100644
> > --- a/rules/barebox.make
> > +++ b/rules/barebox.make
> > @@ -87,9 +87,7 @@ endif
> >
> > ifdef PTXCONF_BAREBOX_EXTRA_ENV
> > @rm -rf $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv
> > - @ptxd_source_kconfig "${PTXDIST_PTXCONFIG}" && \
> > - ptxd_source_kconfig "${PTXDIST_PLATFORMCONFIG}" && \
> > - $(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> > + @$(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> > if [ -d "$(path)" ]; then \
> > ptxd_filter_dir "$(path)" \
> > $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv; \
> > --
> > 2.39.2
> >
> >
> >
>
> --
> 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 |
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://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] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls
2024-08-02 10:25 [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Roland Hieber
` (2 preceding siblings ...)
2024-08-08 14:14 ` [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls Michael Olbrich
@ 2024-09-06 14:03 ` Michael Olbrich
2024-09-06 14:05 ` Michael Olbrich
3 siblings, 1 reply; 9+ messages in thread
From: Michael Olbrich @ 2024-09-06 14:03 UTC (permalink / raw)
To: Roland Hieber, ptxdist
On Fri, Aug 02, 2024 at 12:25:28PM +0200, Roland Hieber wrote:
> These calls make the PTXCONF_* variables from the ptxconfig and the
> platformconfig available in the local shell environment, but no PTXCONF_
> variable is used later in the shell call. This is probably a left-over
> from when the defaultenv preparation was made layer-aware in commit
> 41cb4d9f9287d85ae11b (2018-07-24, Michael Olbrich: "barebox: support
> layers with BAREBOX_EXTRA_ENV_PATH").
This is incorrect. ptxd_filter_dir will replace any @VARIABLE@ if the
variable is exported and ptxd_source_kconfig will export the PTXCONF_
variables. So a BSP can provided a barebox environment that contains
@PTXCONF_<SOMETHING>@ variables.
Michael
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
> rules/barebox.make | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/rules/barebox.make b/rules/barebox.make
> index c0d9c5744e4a..bcb96e607b91 100644
> --- a/rules/barebox.make
> +++ b/rules/barebox.make
> @@ -87,9 +87,7 @@ endif
>
> ifdef PTXCONF_BAREBOX_EXTRA_ENV
> @rm -rf $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv
> - @ptxd_source_kconfig "${PTXDIST_PTXCONFIG}" && \
> - ptxd_source_kconfig "${PTXDIST_PLATFORMCONFIG}" && \
> - $(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> + @$(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> if [ -d "$(path)" ]; then \
> ptxd_filter_dir "$(path)" \
> $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv; \
> --
> 2.39.2
>
>
>
--
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] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/2] barebox: remove superfluous ptxd_source_kconfig calls
2024-09-06 14:03 ` Michael Olbrich
@ 2024-09-06 14:05 ` Michael Olbrich
0 siblings, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2024-09-06 14:05 UTC (permalink / raw)
To: Roland Hieber, ptxdist
On Fri, Sep 06, 2024 at 04:03:05PM +0200, Michael Olbrich wrote:
> On Fri, Aug 02, 2024 at 12:25:28PM +0200, Roland Hieber wrote:
> > These calls make the PTXCONF_* variables from the ptxconfig and the
> > platformconfig available in the local shell environment, but no PTXCONF_
> > variable is used later in the shell call. This is probably a left-over
> > from when the defaultenv preparation was made layer-aware in commit
> > 41cb4d9f9287d85ae11b (2018-07-24, Michael Olbrich: "barebox: support
> > layers with BAREBOX_EXTRA_ENV_PATH").
>
> This is incorrect. ptxd_filter_dir will replace any @VARIABLE@ if the
> variable is exported and ptxd_source_kconfig will export the PTXCONF_
> variables. So a BSP can provided a barebox environment that contains
> @PTXCONF_<SOMETHING>@ variables.
Ignore this, I answered without seeing my first reply....
Michael
>
> > Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> > ---
> > rules/barebox.make | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/rules/barebox.make b/rules/barebox.make
> > index c0d9c5744e4a..bcb96e607b91 100644
> > --- a/rules/barebox.make
> > +++ b/rules/barebox.make
> > @@ -87,9 +87,7 @@ endif
> >
> > ifdef PTXCONF_BAREBOX_EXTRA_ENV
> > @rm -rf $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv
> > - @ptxd_source_kconfig "${PTXDIST_PTXCONFIG}" && \
> > - ptxd_source_kconfig "${PTXDIST_PLATFORMCONFIG}" && \
> > - $(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> > + @$(foreach path, $(BAREBOX_EXTRA_ENV_PATH), \
> > if [ -d "$(path)" ]; then \
> > ptxd_filter_dir "$(path)" \
> > $(BAREBOX_BUILD_DIR)/.ptxdist-defaultenv; \
> > --
> > 2.39.2
> >
> >
> >
>
> --
> 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 |
>
>
--
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] 9+ messages in thread