tinnedkarma commented on code in PR #17162:
URL: https://github.com/apache/nuttx/pull/17162#discussion_r2526040145
##########
Documentation/implementation/make_build_system.rst:
##########
@@ -66,11 +66,136 @@ The ``V`` variable can be passed to ``make`` to control
the build verbosity.
# V=2: Enable bug/verbose options in tools and scripts
$ make V=2
-Build Flow
-----------
+Build Process
+-------------
+
+.. note::
+
+ Most of the configuration step documentation and adjacent tooling should be
+ documented separately. Most of what is presented here will be moved.
+
+The ``Make`` based build process starts with the NuttX tree configuration.
+This is done by running ``tools/configure.sh`` script.
+
+During configuration, some symlinks are created.
+
+- the "current" chip directory gets symlinked to ``nutt/include/arch/chip``.
+- the "current" board directory gets symlinked to ``nutt/include/arch/board``.
+- the "current" arch directory gets symlinked to ``nutt/include/arch``.
+
+Each board should also supply an ``scripts/Make.defs`` file.
+The board ``Make.defs`` file should:
+
+- include the complete .config file.
+- include the :ref:`config_mk`
+- include the arch-specific toolchain.
+- set the linker file used for linking. (``LDSCRIPT``)
+- set the compiler flags needed for the board.
+
+The board config is stored as ``defconfig`` file, which is a minimal config,
+storing only the configs that differs from default config values.
+Due to NuttX's particularity of strict dependance to the ``app``
+directory, the ``.config`` file is not generated by either ``kconfiglib`` or
+``kconfig-frontends``, but rather by the an in-tree ``tools/process_config.sh``
+script. This script take a "base" input file (the boards ``defconfig`` file),
+additional include paths (the most relevant being the ``apps`` top directory),
+and generate an output file (the ``$(TOPDIR)/.config`` file).
+
+.. code-block:: bash
+
+ # part of configure.sh shell script, starting at line 240
+ #
+ # src_config=${configpath}/defconfig
+ # dest_config="${TOPDIR}/.config"
+ # original_config="${TOPDIR}/.config.orig"
+ # backup_config="${TOPDIR}/defconfig"
+
Review Comment:
I usually do, reStructuredText is very particular about empty lines, but
everything is generated correctly.
<img width="905" height="276" alt="image"
src="https://github.com/user-attachments/assets/3de0fdd1-4c1d-4091-a046-98534cd3365f"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]