On 28.11.24 17:48, Peter Polgar wrote:
This commit adds info about the needed package to cross compile
U-Boot to ARMv7 (32 bit) architecture on Debian based distros.
---
  doc/build/gcc.rst | 12 ++++++++++++
  1 file changed, 12 insertions(+)

diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst
index d8fcfdc4bf..c552e7b590 100644
--- a/doc/build/gcc.rst
+++ b/doc/build/gcc.rst
@@ -19,6 +19,12 @@ You could install GCC and the GCC cross compiler
for the ARMv8 architecture with

      sudo apt-get install gcc gcc-aarch64-linux-gnu

+For the ARMv7 architecture (32 bit)  use the below command instead
+
+.. code-block:: bash
+
+    sudo apt-get install gcc crossbuild-essential-armhf

crossbuild-essential-armhf depends on
gcc-arm-linux-gnueabihf gcc:armhf, g++-arm-linux-gnueabihf, g++:armhf, dpkg-cross

But gcc-arm-linux-gnueabi is all you need for cross-compiling 32-bit ARM U-Boot.

Adding an example for every architecture seems too much to me.

Can't we simply update this sentence pointing out the the arm cross-compiler has a suffix.

"On Debian based systems the cross compiler packages are named
gcc-<architecture>-linux-gnu".

E.g. add

"gcc-arm-linux-gnueabi is the 32-bit ARM cross-compiler package."

+
  Depending on the build targets further packages maybe needed

  .. code-block:: bash
@@ -118,6 +124,12 @@ Assuming cross compiling on Debian for ARMv8 this would be

      CROSS_COMPILE=aarch64-linux-gnu- make

+Also on Debian but for ARMv7 it would be
+
+.. code-block:: bash
+
+    CROSS_COMPILE=arm-linux-gnueabihf- make

U-Boot supports ARM SoCs prior to ARMv7. U-Boot doesn't use floating point. So arm-linux-gnueabi is the right choice for all 32-bit ARM boards.

Best regards

Heinrich

+
  Out-of-tree building
  ~~~~~~~~~~~~~~~~~~~~


Reply via email to