[PATCH v2 09/33] firmware: add ti-linux-firmware submodule

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 5 05:42:34 PDT 2025


For K3 SoCs we need several binaries from the ti-linux-firmware
repository and currently we have to copy the needed files over from the
repository to firmware/ in barebox. To simplify this expect the
ti-linux-firmware repository to be checked out or linked at
firmware/ti-linux-firmware. For further convenience create a git
submodule for it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 .gitmodules                    |  3 +++
 Documentation/boards/ti-k3.rst | 10 +++++-----
 firmware/ti-linux-firmware     |  1 +
 images/Makefile.k3             |  6 +++---
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000000000000000000000000000000000..c58f53c29f302f7610c5776d13259a373c17520c
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "ti-linux-firmware"]
+	path = firmware/ti-linux-firmware
+	url = https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
diff --git a/Documentation/boards/ti-k3.rst b/Documentation/boards/ti-k3.rst
index 3bb5103f32378d6fe7413b5f19ca29883444dc69..6cb9eb8edab93e6bf7a74bc24748f9ad11609b20 100644
--- a/Documentation/boards/ti-k3.rst
+++ b/Documentation/boards/ti-k3.rst
@@ -15,10 +15,11 @@ Prerequisites
 
 There are several binary blobs required for building barebox for TI K3 SoCs. Find them
 in git://git.ti.com/processor-firmware/ti-linux-firmware.git. The repository is assumed
-to be checked out at ``$TI_LINUX_FIRMWARE``. The K3 SoCs boot from a FAT partition on
-SD/eMMC cards. During the next steps the files are copied to ``$TI_BOOT``. This is assumed
-to be an empty directory. After the build process copy its contents to a FAT filesystem
-on an SD/eMMC card.
+to be checked out at ``firmware/ti-linux-firmware``. Alternatively the barebox repository
+has a ti-linux-firmware submodule which checks out at the correct place. The K3 SoCs boot
+from a FAT partition on SD/eMMC cards. During the next steps the files are copied to
+``$TI_BOOT``. This is assumed to be an empty directory. After the build process copy its
+contents to a FAT filesystem on an SD/eMMC card.
 
 The Cortex-R5 is a 32-bit processors whereas the Cortex-A53 are 64-bit processors, so
 both 32-bit and 64-bit toolchains are needed::
@@ -35,7 +36,6 @@ need to be adjusted for other boards.
 There's a single ``k3-r5_defconfig`` for all K3 boards. This builds the boot images
 for the Cortex-R5 processors::
 
-  cp $TI_LINUX_FIRMWARE/ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin firmware/
   export ARCH=arm CROSS_COMPILE=$CROSS_COMPILE_32
   make k3-r5_defconfig
   make
diff --git a/firmware/ti-linux-firmware b/firmware/ti-linux-firmware
new file mode 160000
index 0000000000000000000000000000000000000000..10257543a029cc608c9df1c36c83e36ac3dd5b46
--- /dev/null
+++ b/firmware/ti-linux-firmware
@@ -0,0 +1 @@
+Subproject commit 10257543a029cc608c9df1c36c83e36ac3dd5b46
diff --git a/images/Makefile.k3 b/images/Makefile.k3
index 3236a983d10a0df552392762200d8aa20fb2ea44..12db9c59a96eade62679987aedb9b5433cec3c2f 100644
--- a/images/Makefile.k3
+++ b/images/Makefile.k3
@@ -21,9 +21,9 @@ ifdef CONFIG_MACH_K3_CORTEX_R5
 
 SYSFWDATA_am625=$(objtree)/arch/arm/mach-k3/combined-sysfw-cfg-am62x.k3cfg
 DMDATA_am625=$(objtree)/arch/arm/mach-k3/combined-dm-cfg-am62x.k3cfg
-SYSFW_am625_hs_fs=$(FIRMWARE_DIR)/ti-fs-firmware-am62x-hs-fs-enc.bin
-SYSFW_am625_gp=$(FIRMWARE_DIR)/ti-fs-firmware-am62x-gp.bin
-INNERDATA_am625=$(FIRMWARE_DIR)/ti-fs-firmware-am62x-hs-fs-cert.bin
+SYSFW_am625_hs_fs=$(FIRMWARE_DIR)/ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin
+SYSFW_am625_gp=$(FIRMWARE_DIR)/ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin
+INNERDATA_am625=$(FIRMWARE_DIR)/ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin
 KEY_custmpk=$(srctree)/arch/arm/mach-k3/custMpk.pem
 KEY_degenerate=$(srctree)/arch/arm/mach-k3/ti-degenerate-key.pem
 

-- 
2.39.5




More information about the barebox mailing list