summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ercean Dima <robert3@meta.com>2025-08-25 02:37:47 +0300
committerAmithash Prasad <amithash@meta.com>2025-08-29 19:27:27 +0300
commit612c6cd004070f2f2edb08a33b548d32ff922cc5 (patch)
treeeb2f0c45851df37b1db3f71c3d63455d1a9860a5
parente697aef9aca665e531d17c1feb6fea4f86fa73a0 (diff)
downloadopenbmc-612c6cd004070f2f2edb08a33b548d32ff922cc5.tar.xz
meta-facebook: phosphor-network: Add network switches specific configuration
Network switches need different networking configuration than compute switches. Introduce FBOSS generic network configuration and add compute and fboss yocto overrides. Change-Id: Ib5464003dc972894535c9ed7435e02b925cfcb21 Signed-off-by: Robert Ercean Dima <robert3@meta.com>
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network/fb-compute/01-bmc-eth.network (renamed from meta-facebook/recipes-phosphor/network/phosphor-network/01-bmc-eth.network)0
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/10-eth0.network39
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.netdev24
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.network25
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/30-usb0.network24
-rw-r--r--meta-facebook/recipes-phosphor/network/phosphor-network_%.bbappend30
6 files changed, 139 insertions, 3 deletions
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network/01-bmc-eth.network b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-compute/01-bmc-eth.network
index ed262c6f63..ed262c6f63 100644
--- a/meta-facebook/recipes-phosphor/network/phosphor-network/01-bmc-eth.network
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-compute/01-bmc-eth.network
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/10-eth0.network b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/10-eth0.network
new file mode 100644
index 0000000000..cdf5220a27
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/10-eth0.network
@@ -0,0 +1,39 @@
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+[Match]
+Name=eth0
+
+[Network]
+IPv6AcceptRA=yes
+DHCP=ipv6
+VLAN=eth0.4088
+
+[DHCP]
+UseDomains=yes
+UseNTP=yes
+# We've been seeing units not able to renew the lease after it expires
+# Set CriticalConnection=yes so we maintain the ip address even after
+# expiration. This might be a bug with systemd v234
+# XXX Try removing this after systemd gets updated >=234
+CriticalConnection=yes
+VendorClassIdentifier=OpenBMC:VENDOR_SERIAL_HERE
+
+[DHCPv6]
+UseDomains=yes
+UseNTP=yes
+SendVendorOption=40981:1:string:OpenBMC:VENDOR_SERIAL_HERE
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.netdev b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.netdev
new file mode 100644
index 0000000000..45438762e6
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.netdev
@@ -0,0 +1,24 @@
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+
+[NetDev]
+Name=eth0.4088
+Kind=vlan
+
+[VLAN]
+Id=4088
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.network b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.network
new file mode 100644
index 0000000000..36fc8b82cd
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/20-eth0.4088.network
@@ -0,0 +1,25 @@
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+
+[Match]
+Name=eth0.4088
+
+[Network]
+IPv6AcceptRA=no
+DHCP=no
+Address=fe80::1/64
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/30-usb0.network b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/30-usb0.network
new file mode 100644
index 0000000000..9530a87253
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network/fb-fboss/30-usb0.network
@@ -0,0 +1,24 @@
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+
+[Match]
+Name=usb0
+
+[Network]
+DHCP=no
+Address=fe80::1/64
diff --git a/meta-facebook/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-facebook/recipes-phosphor/network/phosphor-network_%.bbappend
index 7b121679bf..1f5809bec3 100644
--- a/meta-facebook/recipes-phosphor/network/phosphor-network_%.bbappend
+++ b/meta-facebook/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -1,12 +1,36 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append = " \
+SRC_URI:append:fb-compute = " \
file://01-bmc-eth.network \
"
-FILES:${PN}:append = " ${systemd_unitdir}/network/01-bmc-eth.network"
+SRC_URI:append:fb-fboss = " \
+ file://10-eth0.network \
+ file://20-eth0.4088.network \
+ file://20-eth0.4088.netdev \
+ file://30-usb0.network \
+"
-do_install:append() {
+do_install:append:fb-compute() {
install -d ${D}${systemd_unitdir}/network/
install -m 0644 ${UNPACKDIR}/01-bmc-eth.network ${D}${systemd_unitdir}/network/01-bmc-eth.network
}
+
+do_install:append:fb-fboss() {
+ install -d ${D}${systemd_unitdir}/network
+ install -d ${D}${sysconfdir}/systemd/network
+
+ install -m 0644 ${UNPACKDIR}/10-eth0.network ${D}${sysconfdir}/systemd/network
+ install -m 0644 ${UNPACKDIR}/20-eth0.4088.network ${D}${systemd_unitdir}/network/
+ install -m 0644 ${UNPACKDIR}/20-eth0.4088.netdev ${D}${systemd_unitdir}/network/
+ install -m 0644 ${UNPACKDIR}/30-usb0.network ${D}${systemd_unitdir}/network/
+}
+
+FILES:${PN}:append:fb-compute = " ${systemd_unitdir}/network/01-bmc-eth.network"
+
+FILES:${PN}:append:fb-fboss = " \
+ ${sysconfdir}/systemd/network/10-eth0.network \
+ ${systemd_unitdir}/network/20-eth0.4088.network \
+ ${systemd_unitdir}/network/20-eth0.4088.netdev \
+ ${systemd_unitdir}/network/30-usb0.network \
+"