Skip to content

Commit

Permalink
fix: AM335x/AM437x/AM57x: Update Directory Structure and ARM architec…
Browse files Browse the repository at this point in the history
…tural references

Signed-off-by: Telukula Jeevan Kumar Sahu <[email protected]>
  • Loading branch information
jeevantelukula committed Jan 8, 2025
1 parent 3105fdb commit 289f93f
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 50 deletions.
80 changes: 52 additions & 28 deletions source/linux/Foundational_Components/Kernel/_Users_Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Overview

This document will cover the basic steps for building the Linux kernel.

.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. rubric:: Install host dependencies

Expand Down Expand Up @@ -56,7 +56,7 @@ Compiler

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

Before compiling the kernel or kernel modules the SDK's toolchain needs
to be added to the PATH environment variable
Expand All @@ -67,7 +67,7 @@ Compiler
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. include:: Overview/GCC_ToolChain.rst
:start-after: .. start_include_yocto_toolchain_host_setup
Expand All @@ -94,15 +94,15 @@ The command to clean the kernel is:

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- distclean
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -127,15 +127,15 @@ a command of the form:

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- <defconfig>
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -150,7 +150,7 @@ as a starting point).

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

platformName is am335x-evm for AM335x, am437x-evm for AM437x, am57xx-evm for
AM57xx, k2hk-evm for K2H/K2K, k2e-evm for K2E, k2l-evm for K2L, k2g-evm for
Expand All @@ -173,7 +173,7 @@ as a starting point).
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

For example, to apply the recommended kernel configuration for K3 devices, use:

Expand Down Expand Up @@ -209,7 +209,7 @@ To invoke the kernel configuration you simply use a command like:

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -223,7 +223,7 @@ To invoke the kernel configuration you simply use a command like:
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -250,7 +250,7 @@ Compiling the Kernel

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

Once the kernel has been configured it must be compiled to generate the
bootable kernel image as well as any dynamic kernel modules that were
Expand All @@ -269,7 +269,7 @@ Compiling the Kernel

..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

By default U-boot expects to boot kernel `Image`, DTB, and DTOs found in root/boot of the
SD card if using SD/MMC boot. The exception is for HS-SE (High Security - Security Enforced)
Expand Down Expand Up @@ -297,7 +297,7 @@ Compiling the Device Tree Binaries

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

Starting with the 3.8 kernel each TI evm has an unique device tree
binary file required by the kernel. Therefore, you will need to build
Expand Down Expand Up @@ -370,7 +370,7 @@ Compiling the Device Tree Binaries
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

Each TI evm has an unique device tree
binary file required by the kernel. Therefore, you will need to build
Expand Down Expand Up @@ -439,7 +439,7 @@ Compiling the Kernel Modules

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

By default the majority of the Linux drivers used in the sdk are not
integrated into the kernel image file (zImage). These drivers are built as
Expand All @@ -451,7 +451,7 @@ Compiling the Kernel Modules
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

By default the majority of the Linux drivers used in the sdk are not
integrated into the kernel image file (Image). These drivers are built as
Expand Down Expand Up @@ -483,10 +483,19 @@ But developers may want to deploy and test new Kernel and DTB without going
through the standard build system. For the specific purpose, board specific
fitImage.its will be present in the prebuilt-images directory.

Pre-requisites ( Already part of SDK installations ):
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

- Uboot build directory for ARMV8
- Linux Image and DTB
Pre-requisites ( Already part of SDK installations ):

- Uboot build directory for ARMV7
- Linux Image and DTB

.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

Pre-requisites ( Already part of SDK installations ):

- Uboot build directory for ARMV8
- Linux Image and DTB

.. note::

Expand Down Expand Up @@ -626,9 +635,17 @@ Generating the fitImage
This step will embed the public key in the u-boot.dtb file that was already
built during the initial u-boot build.

.. code-block:: console
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
mkimage -r -f fitImage.its -k $UBOOT_PATH/board/ti/keys -K $UBOOT_PATH/build/$ARMV7/dts/dt.dtb fitImage
mkimage -r -f fitImage.its -k $UBOOT_PATH/arch/arm/mach-k3/keys -K $UBOOT_PATH/build/$ARMV8/dts/dt.dtb fitImage
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
mkimage -r -f fitImage.its -k $UBOOT_PATH/arch/arm/mach-k3/keys -K $UBOOT_PATH/build/$ARMV8/dts/dt.dtb fitImage
.. note::

Expand All @@ -639,8 +656,15 @@ built during the initial u-boot build.
Build uboot again
^^^^^^^^^^^^^^^^^

The updated u-boot.dtb needs to be packed in u-boot.img for authentication
so rebuild uboot ARMV8 without changing any parameters.
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

The updated u-boot.dtb needs to be packed in u-boot.img for authentication
so rebuild uboot ARMV7 without changing any parameters.

.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

The updated u-boot.dtb needs to be packed in u-boot.img for authentication
so rebuild uboot ARMV8 without changing any parameters.

Refer to :ref:`top-level-makefile`

Expand All @@ -658,7 +682,7 @@ Installing the Kernel Image and Device Tree Binaries

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -678,7 +702,7 @@ Installing the Kernel Image and Device Tree Binaries
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand Down Expand Up @@ -714,7 +738,7 @@ file system. The general format of the command is:

..
[comment] instructions for 32 bit processors
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand All @@ -729,7 +753,7 @@ file system. The general format of the command is:
..
[comment] instructions for 64 bit processors
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')

.. code-block:: console
Expand Down
6 changes: 2 additions & 4 deletions source/linux/Overview/GCC_ToolChain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ yourself.

.. ifconfig:: CONFIG_part_variant in ('AM335X', 'AM437X', 'AM57X')

These libraries include packages from alsa to zlib.
or a list of the
These libraries include packages from ALSA to zlib, for a list of the
libraries you can refer to the software manifest found in the **<SDK
INSTALL DIR>/manifest** directory or look at the list of libraries
available in the **<SYSROOT_32>/usr/lib** directory. You will
Expand All @@ -127,8 +126,7 @@ yourself.
.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X')

These libraries include packages from alsa to zlib.
or a list of the
These libraries include packages from ALSA to zlib, for a list of the
libraries you can refer to the software manifest found in the **<SDK
INSTALL DIR>/manifest** directory or look at the list of libraries
available in the **<SYSROOT_64>/usr/lib** directory. You will
Expand Down
67 changes: 49 additions & 18 deletions source/linux/Overview/_Processor_SDK_Linux_Directory_Structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,41 @@ directories and files

.. ifconfig:: CONFIG_sdk in ('SITARA')

.. code-block:: console
.. ifconfig:: CONFIG_part_variant in ('AM335X', 'AM437X', 'AM57X')

./
├── bin/
├── board-support/
├── example-applications/
├── filesystem/
├── k3r5-devkit/
├── licenses/
├── linux-devkit/
├── Makefile
├── makerules/
├── manifest/
├── Rules.make
└── setup.sh*
.. code-block:: console
./
├── bin/
├── board-support/
├── example-applications/
├── external-toolchain-dir/
├── filesystem/
├── licenses/
├── linux-devkit/
├── Makefile
├── makerules/
├── manifest/
├── Rules.make
└── setup.sh*
.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X')

.. code-block:: console
./
├── bin/
├── board-support/
├── example-applications/
├── filesystem/
├── k3r5-devkit/
├── licenses/
├── linux-devkit/
├── Makefile
├── makerules/
├── manifest/
├── Rules.make
└── setup.sh*
.. ifconfig:: CONFIG_sdk in ('JACINTO','j7_foundational')

Expand Down Expand Up @@ -61,10 +81,21 @@ Processor SDK devices.
- **filesystem** - Contains the reference file systems. These include
the smaller base file system as well as the full-featured SDK file
system.
- **linux-devkit** - Contains the tools and libraries to speed
development for the target device for the ARMV8 architechture
- **k3r5-devkit** - Contains the tools and libraries to speed
development for the target device for the ARMV7 architechture

.. ifconfig:: CONFIG_part_variant in ('AM335X', 'AM437X', 'AM57X')

- **linux-devkit** - Contains the tools and libraries to speed
development for the target device for the ARMV7 architechture
- **external-toolchain-dir** - Contains the external ARM GNU toolchain
to speed development for the target device for the ARMV7 architechture

.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X')

- **linux-devkit** - Contains the tools and libraries to speed
development for the target device for the ARMV8 architechture
- **k3r5-devkit** - Contains the tools and libraries to speed
development for the target device for the ARMV7 architechture

- **Makefile** - Provides build targets for many of the SDK components
from the top-level of the SDK.
- **makerules** - Make rules for all the topLevel Makefile build targets
Expand Down

0 comments on commit 289f93f

Please sign in to comment.