meta-ampere: mtmitchell: enable MCTP/PLDM

Enable MCTP in kernel support with Mt.Mitchell MCTP configuration.

Tested:
1. Check for mctpi2c3 in ifconfig command.
2. Check for mctpd.service service started and is in running state.
3. Check for pldmd.service service started and is in running state.

Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I699e9bc93ae5815b8454a8cc42ec22d4cfd735e1
diff --git a/meta-ampere/meta-common/recipes-phosphor/mctp/files/mctp-local.service b/meta-ampere/meta-common/recipes-phosphor/mctp/files/mctp-local.service
new file mode 100644
index 0000000..6dfc00e
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/mctp/files/mctp-local.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=MCTP configuration for i2c bus 3
+After=mctpd.service
+BindTo=mctpd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mctp link set mctpi2c3 up
+ExecStart=/usr/bin/mctp addr add 8 dev mctpi2c3
+ExecStart=/usr/bin/mctp neigh add 8 dev mctpi2c3 lladdr 0x10
+RemainAfterExit=true
+
+[Install]
+WantedBy=mctpd.service
diff --git a/meta-ampere/meta-common/recipes-phosphor/mctp/mctp_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/mctp/mctp_%.bbappend
new file mode 100644
index 0000000..711913b
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/mctp/mctp_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append = " \
+                  file://mctp-local.service \
+                 "
+
+SYSTEMD_SERVICE:${PN} += "mctp-local.service"
+
+do_install:append() {
+    install -m 0644 ${WORKDIR}/mctp-local.service ${D}${systemd_system_unitdir}/
+}
+