nicole: Add predefined network settings

This brings the default network settings for Tatlin as a part of
`systemd-conf` package.
These settings contain a predefined IPv4 address for eth0 interface,
keep the possibility of getting an additional IP address from DHCP.
VALN4004 with predefined IPv6 address is also kept.

(From meta-yadro rev: 56e7efa11a0b281f39d160cd99c84b7a95632205)

Change-Id: Ibb025a1ae519f0843bfcb8ec71e009e2bc97141f
End-User-Impact: - BMC now has predefined IPv4 address on the eth0.
 - VLAN4004 also present and has predefined IPv6 address
 - BMC is able to get a dynamic IP address on eth0.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.0.network b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.0.network
new file mode 100644
index 0000000..64a1436
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.0.network
@@ -0,0 +1,11 @@
+[Match]
+Name=eth0
+KernelCommandLine=bmcposition=0
+[Network]
+VLAN=eth0.4004
+DHCP=true
+LinkLocalAddressing=yes
+IPv6AcceptRA=false
+Address=10.9.0.1/24
+[DHCP]
+ClientIdentifier=mac
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.1.network b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.1.network
new file mode 100644
index 0000000..aaaa520
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.1.network
@@ -0,0 +1,11 @@
+[Match]
+Name=eth0
+KernelCommandLine=bmcposition=1
+[Network]
+VLAN=eth0.4004
+DHCP=true
+LinkLocalAddressing=yes
+IPv6AcceptRA=false
+Address=10.9.0.2/24
+[DHCP]
+ClientIdentifier=mac
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.0.network b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.0.network
new file mode 100644
index 0000000..534cbe9
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.0.network
@@ -0,0 +1,8 @@
+[Match]
+Name=eth0.4004
+KernelCommandLine=bmcposition=0
+[Network]
+LinkLocalAddressing=yes
+IPv6AcceptRA=true
+DHCP=no
+Address=fd59:4144:524f:5441:544c:494e:3:1/122
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.1.network b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.1.network
new file mode 100644
index 0000000..83a48ee
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/00-bmc-eth0.4004.1.network
@@ -0,0 +1,8 @@
+[Match]
+Name=eth0.4004
+KernelCommandLine=bmcposition=1
+[Network]
+LinkLocalAddressing=yes
+IPv6AcceptRA=true
+DHCP=no
+Address=fd59:4144:524f:5441:544c:494e:3:2/122
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/eth0.4004.netdev b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/eth0.4004.netdev
new file mode 100644
index 0000000..e315f5e
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf/eth0.4004.netdev
@@ -0,0 +1,5 @@
+[NetDev]
+Name=eth0.4004
+Kind=vlan
+[VLAN]
+Id=4004
diff --git a/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf_%.bbappend b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf_%.bbappend
new file mode 100644
index 0000000..48d4a4a
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-core/systemd/systemd-conf_%.bbappend
@@ -0,0 +1,27 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = " \
+    file://00-bmc-eth0.4004.0.network \
+    file://00-bmc-eth0.4004.1.network \
+    file://00-bmc-eth0.0.network \
+    file://00-bmc-eth0.1.network \
+    file://eth0.4004.netdev \
+"
+
+do_install_append() {
+    install -m 0644 \
+        ${WORKDIR}/00-bmc-eth0.4004.0.network \
+        ${WORKDIR}/00-bmc-eth0.4004.1.network \
+        ${WORKDIR}/00-bmc-eth0.0.network \
+        ${WORKDIR}/00-bmc-eth0.1.network \
+        ${WORKDIR}/eth0.4004.netdev \
+        -D -t ${D}${sysconfdir}/systemd/network
+}
+
+FILES_${PN}_append = " \
+    ${sysconfdir}/systemd/network/00-bmc-eth0.4004.0.network \
+    ${sysconfdir}/systemd/network/00-bmc-eth0.4004.1.network \
+    ${sysconfdir}/systemd/network/00-bmc-eth0.0.network \
+    ${sysconfdir}/systemd/network/00-bmc-eth0.1.network \
+    ${sysconfdir}/systemd/network/eth0.4004.netdev \
+"
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
index 20ed5af..e71ba71 100644
--- a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1,7 +1,5 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-RDEPENDS_${PN}_append = " vlan-4004"
-
 EXTRA_OECONF_append = " --enable-sync-mac "
 SRC_URI_append = " file://config.json "
 FILES_${PN} += "${datadir}/network/*.json"