bytedance: g220a: Enable ipmi interface eth1 and kcs4

Tested:now we can see ipmi-kcs4 and eth1

Signed-off-by: Lotus Xu <xuxiaohan@bytedance.com>
Change-Id: I85166e66c0b37a7b5b3f5b8387b6056afc66e1cd
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000..72d991c
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 0000000..dc37c30
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,69 @@
+{
+  "0" : {
+    "name" : "Ipmb",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "ipmb",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "1" : {
+    "name" : "eth1",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "lan-802.3",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "multi-session",
+      "is_ipmi" : true
+    }
+  },
+  "2" : {
+    "name" : "eth0",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "lan-802.3",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "multi-session",
+      "is_ipmi" : true
+    }
+  },
+  "7" : {
+    "name" : "ipmi_kcs4",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "system-interface",
+      "protocol_type" : "kcs",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "8" : {
+    "name" : "INTRABMC",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "max_transfer_size" : 256,
+    "channel_info" : {
+      "medium_type" : "oem",
+      "protocol_type" : "oem",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "15" : {
+    "name" : "ipmi_kcs3",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "system-interface",
+      "protocol_type" : "kcs",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  }
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules
new file mode 100644
index 0000000..fae7f09
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs/99-ipmi-kcs.rules
@@ -0,0 +1,3 @@
+# Replace the '-' to '_', since Dbus object/interface names do not allow '-'.
+KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3"
+KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
new file mode 100644
index 0000000..8547d9b
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+KCS_DEVICE = "ipmi_kcs3"
+SMM_DEVICE = "ipmi_kcs4"
+SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
+
+SRC_URI += "file://99-ipmi-kcs.rules"
+
+do_install_append() {
+    install -d ${D}${base_libdir}/udev/rules.d
+    install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules ${D}${base_libdir}/udev/rules.d/
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
new file mode 100644
index 0000000..ff6edc9
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -0,0 +1,5 @@
+RMCPP_EXTRA = "eth1"
+SYSTEMD_SERVICE_${PN} += " \
+        ${PN}@${RMCPP_EXTRA}.service \
+        ${PN}@${RMCPP_EXTRA}.socket \
+        "