]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Allow Python packages to be dropped
authorSimon Glass <sjg@chromium.org>
Thu, 31 Aug 2023 17:20:52 +0000 (11:20 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:03:46 +0000 (06:03 +0800)
When building in a portage chroot, we do not have the environment needed
to build pylibfdt. It is instead build as a separate package.

Provide a build option to tell U-Boot to skip this part of the build. We
still need it to use binman, etc. but don't need it to build its
dependencies.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
[s/build bytes/builds bytes in tools.rst]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Makefile
doc/build/tools.rst
scripts/dtc/Makefile

index 9be24c4ec6138a6e614bca84beca897dd8d4607c..efbaf434df48d2641d5538d7d6fbd07a14b511dd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -485,6 +485,15 @@ export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
 export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
                         --exclude CVS --exclude .pc --exclude .hg --exclude .git
 
+export PYTHON_ENABLE
+
+# This is y if U-Boot should not build any Python tools or libraries. Typically
+# you would need to set this if those tools/libraries (typically binman and
+# pylibfdt) cannot be built by your environment and are provided separately.
+ifeq ($(NO_PYTHON),)
+PYTHON_ENABLE=y
+endif
+
 # ===========================================================================
 # Rules shared between *config targets and build targets
 
index ec0172292585e55bf0620bcc717b46ae17a8b0f3..5bfa05b232531bc1bd801bc433ec837b359cd5f0 100644 (file)
@@ -45,3 +45,12 @@ Launch the MSYS2 shell of the MSYS2 environment, and do the following::
 
    $ make tools-only_defconfig
    $ make tools-only
+
+
+Building without Python
+-----------------------
+
+The tools-only builds bytes pylibfdt by default. To disable this, use the
+NO_PYTHON variable::
+
+   NO_PYTHON=1 make tools-only_defconfig tools-only
index 58d879dd11f5212eaeaed3408d2f063211576180..faa72d95e28e36c3490cb95b45d53693ed5f5a1b 100644 (file)
@@ -19,4 +19,6 @@ HOSTCFLAGS_dtc-parser.tab.o := -I$(src)
 $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
 
 # Added for U-Boot
+ifeq ($(PYTHON_ENABLE),y)
 subdir-$(CONFIG_PYLIBFDT) += pylibfdt
+endif