diff mbox series

[3/7] package/qoriq-mc-binary: new package

Message ID 20241102152106.2153747-4-olteanv@gmail.com
State New
Headers show
Series Initial support for SolidRun LX2160A-CEX7 | expand

Commit Message

Vladimir Oltean Nov. 2, 2024, 3:21 p.m. UTC
Add a package which deploys the NXP MC (Management Complex) firmware
to the target. This is necessary for NXP DPAA2 SoCs (LS1088A, LS2080A,
LS2088A, LX2160A).

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 DEVELOPERS                                   |  1 +
 package/Config.in                            |  1 +
 package/qoriq-mc-binary/Config.in            | 48 ++++++++++++++++++++
 package/qoriq-mc-binary/qoriq-mc-binary.hash |  3 ++
 package/qoriq-mc-binary/qoriq-mc-binary.mk   | 22 +++++++++
 5 files changed, 75 insertions(+)
 create mode 100644 package/qoriq-mc-binary/Config.in
 create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.hash
 create mode 100644 package/qoriq-mc-binary/qoriq-mc-binary.mk
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index ffe2d053efd0..adfdd97a044a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3307,6 +3307,7 @@  F:	configs/ts5500_defconfig
 
 N:	Vladimir Oltean <olteanv@gmail.com>
 F:	package/qoriq-ddr-phy-binary/
+F:	package/qoriq-mc-binary/
 
 N:	Volkov Viacheslav <sv99@inbox.ru>
 F:	package/v4l2grab/
diff --git a/package/Config.in b/package/Config.in
index a23d12c40247..92f2f43a0bb1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -456,6 +456,7 @@  menu "Firmware"
 	source "package/qcom-db410c-firmware/Config.in"
 	source "package/qoriq-ddr-phy-binary/Config.in"
 	source "package/qoriq-fm-ucode/Config.in"
+	source "package/qoriq-mc-binary/Config.in"
 	source "package/rcw-smarc-sal28/Config.in"
 	source "package/rpi-firmware/Config.in"
 	source "package/sunxi-boards/Config.in"
diff --git a/package/qoriq-mc-binary/Config.in b/package/qoriq-mc-binary/Config.in
new file mode 100644
index 000000000000..fa0983759082
--- /dev/null
+++ b/package/qoriq-mc-binary/Config.in
@@ -0,0 +1,48 @@ 
+config BR2_PACKAGE_QORIQ_MC_BINARY
+	bool "qoriq-mc-binary"
+	help
+	  The Management Complex (MC) is a key component of the networking
+	  subsystem named DPAA2 (Data Path Acceleration Architecture, second
+	  version) in some NXP Layerscape SoCs.
+
+	  The MC coprocessor runs a closed-source, NXP-supplied firmware image
+	  that abstracts and simplifies the allocation and configuration of the
+	  networking hardware primitives into DPAA2 "objects". The MC firmware
+	  exclusively manages the networking control path, and not the data path.
+
+	  https://github.com/nxp-qoriq/qoriq-mc-binary
+	  https://www.nxp.com/webapp/Download?colCode=DPAA2UM # sign in required
+
+if BR2_PACKAGE_QORIQ_MC_BINARY
+choice
+	prompt "QorIQ MC Target"
+	help
+	  Select the target for the QorIQ MC firmware.
+
+config BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A
+	bool "ls1088a"
+
+config BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A
+	bool "ls2080a"
+
+config BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A
+	bool "ls2088a"
+
+config BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A
+	bool "lx2160a"
+
+endchoice
+
+config BR2_QORIQ_MC_PLATFORM
+	string
+	default "ls1088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS1088A
+	default "ls2080a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2080A
+	default "ls2088a" if BR2_PACKAGE_QORIQ_MC_TARGET_LS2088A
+	default "lx2160a" if BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A
+
+config BR2_QORIQ_MC_DIR
+	string
+	default "lx216xa" if BR2_PACKAGE_QORIQ_MC_TARGET_LX2160A
+	default BR2_QORIQ_MC_PLATFORM
+
+endif
diff --git a/package/qoriq-mc-binary/qoriq-mc-binary.hash b/package/qoriq-mc-binary/qoriq-mc-binary.hash
new file mode 100644
index 000000000000..7afa62183c6c
--- /dev/null
+++ b/package/qoriq-mc-binary/qoriq-mc-binary.hash
@@ -0,0 +1,3 @@ 
+# Locally calculated
+sha256  912ad8effd5c7b08eb277719b1e021b8b1fe4022dc3d961b419562e1d2d7a860  qoriq-mc-binary-10.39.0.tar.gz
+sha256  7a223031d76339df0e4e5a94d193a270fb9963d42b577aa42fe130a4657f3e17  LICENSE
diff --git a/package/qoriq-mc-binary/qoriq-mc-binary.mk b/package/qoriq-mc-binary/qoriq-mc-binary.mk
new file mode 100644
index 000000000000..21f9468e7c45
--- /dev/null
+++ b/package/qoriq-mc-binary/qoriq-mc-binary.mk
@@ -0,0 +1,22 @@ 
+################################################################################
+#
+# qoriq-mc-binary
+#
+################################################################################
+
+QORIQ_MC_BINARY_VERSION = 10.39.0
+QORIQ_MC_BINARY_SITE = $(call github,nxp-qoriq,qoriq-mc-binary,mc_release_$(QORIQ_MC_BINARY_VERSION))
+QORIQ_MC_BINARY_LICENSE = NXP Binary EULA
+QORIQ_MC_BINARY_LICENSE_FILES = LICENSE
+QORIQ_MC_BINARY_INSTALL_IMAGES = YES
+QORIQ_MC_BINARY_INSTALL_TARGET = NO
+
+MC_PLATFORM = $(call qstrip,$(BR2_QORIQ_MC_PLATFORM))
+MC_DIR = $(call qstrip,$(BR2_QORIQ_MC_DIR))
+MC_BIN = mc_$(MC_PLATFORM)_$(QORIQ_MC_BINARY_VERSION).itb
+
+define QORIQ_MC_BINARY_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D $(@D)/${MC_DIR}/${MC_BIN} $(BINARIES_DIR)/mc.itb
+endef
+
+$(eval $(generic-package))