boot/at91bootstrap3: add BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
authorEugen Hristev <eugen.hristev@microchip.com>
Tue, 18 May 2021 21:37:48 +0000 (23:37 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 19 May 2021 09:21:00 +0000 (11:21 +0200)
Some at91bootstrap3 configurations now use Python scripts on the host
for NAND/PMEC related utilities. In order to be able to use those
scripts, this commit adds a new
BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3 which allows to express the
need for host-python3 as a dependency to build at91bootstrap3.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[Thomas: this was extracted from a patch from Eugen adding
at91bootstrap 4.x support.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
boot/at91bootstrap3/Config.in
boot/at91bootstrap3/at91bootstrap3.mk

index 18301a0dc0b165e1b30de6ec0b2e37cab37eeaf9..966e393db56e868df00ec59d0f38f5a07c6d2cf8 100644 (file)
@@ -101,3 +101,11 @@ config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
          Path to the at91bootstrap3 configuration file
 
 endif # BR2_TARGET_AT91BOOTSTRAP3
+
+config BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
+       bool "needs host-python3"
+       help
+         Enable this option if the at91bootstrap build process needs
+         Python 3.x to be available on the host. This is needed in
+         some at91bootstrap configurations to use NAND/PMECC Python
+         scripts.
index c4d7bd6106932e3511d23a36a02ce35254786f92..b253129dfb7405b5d1e6814cad9ecbbc3138df68 100644 (file)
@@ -27,6 +27,10 @@ AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
 AT91BOOTSTRAP3_INSTALL_IMAGES = YES
 AT91BOOTSTRAP3_INSTALL_TARGET = NO
 
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3),y)
+AT91BOOTSTRAP3_DEPENDENCIES += host-python3
+endif
+
 AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
        $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))