Browse Source

u-boot: Use new makefile target for u-boot-initial-env where available

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>
Jan Kiszka 4 năm trước cách đây
mục cha
commit
1fd9f5de84
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      meta/recipes-bsp/u-boot/files/debian/rules

+ 6 - 2
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: