public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available
@ 2021-06-21 16:00 Jan Kiszka
  2021-06-22  8:26 ` Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jan Kiszka @ 2021-06-21 16:00 UTC (permalink / raw)
  To: isar-users; +Cc: Harald Seiler

From: Jan Kiszka <jan.kiszka@siemens.com>

Since 2019.07, u-boot-initial-env is available as build target. Latest
U-Boot has troubles running the get_default_envs.sh script, so better 
switch to the official target where available.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-bsp/u-boot/files/debian/rules | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules
index 85bda91..a5c2cd2 100755
--- a/meta/recipes-bsp/u-boot/files/debian/rules
+++ b/meta/recipes-bsp/u-boot/files/debian/rules
@@ -3,7 +3,7 @@
 # Debian rules for custom U-Boot build
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2018
+# Copyright (c) Siemens AG, 2018-2021
 #
 # SPDX-License-Identifier: MIT
 
@@ -15,7 +15,11 @@ endif
 override_dh_auto_build:
 	$(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG)
 	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
-	./scripts/get_default_envs.sh >u-boot-initial-env
+	$(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \
+		$(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \
+	else \
+		./scripts/get_default_envs.sh >u-boot-initial-env; \
+	fi
 	$(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
 
 override_dh_auto_install:
-- 
2.26.2

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

* Re: [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available
  2021-06-21 16:00 [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available Jan Kiszka
@ 2021-06-22  8:26 ` Jan Kiszka
  2021-06-22 12:09 ` Harald Seiler
  2021-07-26 14:56 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2021-06-22  8:26 UTC (permalink / raw)
  To: isar-users; +Cc: Harald Seiler

On 21.06.21 18:00, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Since 2019.07, u-boot-initial-env is available as build target. Latest
> U-Boot has troubles running the get_default_envs.sh script, so better 
> switch to the official target where available.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/recipes-bsp/u-boot/files/debian/rules | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules
> index 85bda91..a5c2cd2 100755
> --- a/meta/recipes-bsp/u-boot/files/debian/rules
> +++ b/meta/recipes-bsp/u-boot/files/debian/rules
> @@ -3,7 +3,7 @@
>  # Debian rules for custom U-Boot build
>  #
>  # This software is a part of ISAR.
> -# Copyright (c) Siemens AG, 2018
> +# Copyright (c) Siemens AG, 2018-2021
>  #
>  # SPDX-License-Identifier: MIT
>  
> @@ -15,7 +15,11 @@ endif
>  override_dh_auto_build:
>  	$(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG)
>  	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
> -	./scripts/get_default_envs.sh >u-boot-initial-env
> +	$(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \
> +		$(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \
> +	else \
> +		./scripts/get_default_envs.sh >u-boot-initial-env; \
> +	fi
>  	$(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
>  
>  override_dh_auto_install:
> 

Meanwhile, the u-boot issue is being fixed [1], but I still think we
should go this way.

Jan

[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg409446.html

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

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

* Re: [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available
  2021-06-21 16:00 [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available Jan Kiszka
  2021-06-22  8:26 ` Jan Kiszka
@ 2021-06-22 12:09 ` Harald Seiler
  2021-07-26 14:56 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: Harald Seiler @ 2021-06-22 12:09 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

Hi,

On Mon, 2021-06-21 at 18:00 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Since 2019.07, u-boot-initial-env is available as build target. Latest
> U-Boot has troubles running the get_default_envs.sh script, so better 
> switch to the official target where available.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/recipes-bsp/u-boot/files/debian/rules | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules
> index 85bda91..a5c2cd2 100755
> --- a/meta/recipes-bsp/u-boot/files/debian/rules
> +++ b/meta/recipes-bsp/u-boot/files/debian/rules
> @@ -3,7 +3,7 @@
>  # Debian rules for custom U-Boot build
>  #
>  # This software is a part of ISAR.
> -# Copyright (c) Siemens AG, 2018
> +# Copyright (c) Siemens AG, 2018-2021
>  #
>  # SPDX-License-Identifier: MIT
>  
> 
> @@ -15,7 +15,11 @@ endif
>  override_dh_auto_build:
>  	$(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG)
>  	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
> -	./scripts/get_default_envs.sh >u-boot-initial-env
> +	$(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \
> +		$(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \
> +	else \
> +		./scripts/get_default_envs.sh >u-boot-initial-env; \
> +	fi
>  	$(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
>  
> 
>  override_dh_auto_install:
> -- 
> 2.26.2

There is a slight difference between the two versions (why are there
two?!), where get_default_envs.sh sorts the env entries while the make
target does not.  I do not think this should matter here, though.

Reviewed-by: Harald Seiler <hws@denx.de>


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

* Re: [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available
  2021-06-21 16:00 [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available Jan Kiszka
  2021-06-22  8:26 ` Jan Kiszka
  2021-06-22 12:09 ` Harald Seiler
@ 2021-07-26 14:56 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-07-26 14:56 UTC (permalink / raw)
  To: Jan Kiszka, isar-users; +Cc: Harald Seiler

21.06.2021 19:00, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Since 2019.07, u-boot-initial-env is available as build target. Latest
> U-Boot has troubles running the get_default_envs.sh script, so better
> switch to the official target where available.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Applied to next, thanks.

-- 
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov


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

end of thread, other threads:[~2021-07-26 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 16:00 [PATCH] u-boot: Use new makefile target for u-boot-initial-env where available Jan Kiszka
2021-06-22  8:26 ` Jan Kiszka
2021-06-22 12:09 ` Harald Seiler
2021-07-26 14:56 ` Anton Mikanovich

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