Merge tag 'efi-2022-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
[platform/kernel/u-boot.git] / doc / build / gcc.rst
index 0cdc307..b883cf7 100644 (file)
@@ -27,9 +27,9 @@ Depending on the build targets further packages maybe needed
       device-tree-compiler dfu-util efitools flex gdisk graphviz imagemagick \
       liblz4-tool libguestfs-tools libncurses-dev libpython3-dev libsdl2-dev \
       libssl-dev lz4 lzma lzma-alone openssl pkg-config python3 \
-      python3-coverage python3-pycryptodome python3-pyelftools python3-pytest \
-      python3-sphinxcontrib.apidoc python3-sphinx-rtd-theme python3-virtualenv \
-      swig
+      python3-coverage python3-pkg-resources python3-pycryptodome \
+      python3-pyelftools python3-pytest python3-sphinxcontrib.apidoc \
+      python3-sphinx-rtd-theme python3-virtualenv swig
 
 SUSE based
 ~~~~~~~~~~
@@ -51,6 +51,16 @@ Depending on the build targets further packages maybe needed.
     zypper install bc bison flex gcc libopenssl-devel libSDL2-devel make \
       ncurses-devel python3-devel python3-pytest swig
 
+Alpine Linux
+~~~~~~~~~~~~
+
+For building U-Boot on Alpine Linux at least the following packages are needed:
+
+.. code-block:: bash
+
+    apk add alpine-sdk bc bison dtc flex linux-headers ncurses-dev \
+      openssl-dev perl python3 py3-setuptools python3-dev sdl2-dev
+
 Prerequisites
 -------------
 
@@ -120,6 +130,27 @@ Further important build parameters are
 * O=<dir> - generate all output files in directory <dir>, including .config
 * V=1 - verbose build
 
+Devicetree compiler
+~~~~~~~~~~~~~~~~~~~
+
+Boards that use `CONFIG_OF_CONTROL` (i.e. almost all of them) need the
+devicetree compiler (dtc). Those with `CONFIG_PYLIBFDT` need pylibfdt, a Python
+library for accessing devicetree data. Suitable versions of these are included
+in the U-Boot tree in `scripts/dtc` and built automatically as needed.
+
+To use the system versions of these, use the DTC parameter, for example
+
+.. code-block:: bash
+
+    DTC=/usr/bin/dtc make
+
+In this case, dtc and pylibfdt are not built. The build checks that the version
+of dtc is new enough. It also makes sure that pylibfdt is present, if needed
+(see `scripts_dtc` in the Makefile).
+
+Note that the :doc:`tools` are always built with the included version of libfdt
+so it is not possible to build U-Boot tools with a system libfdt, at present.
+
 Other build targets
 ~~~~~~~~~~~~~~~~~~~