diff options
author | Jerry Wan <jerry.wan@quantatw.com> | 2022-01-28 04:57:37 +0300 |
---|---|---|
committer | Jerry Wan <jerry.wan@quantatw.com> | 2022-02-11 11:31:15 +0300 |
commit | 77938925cd41e5a26c99c56b6448ed44ea99bf21 (patch) | |
tree | 2a7244a4f552af18e257adb24de06f42a447c062 /meta-quanta | |
parent | f9d044c580ce039496c128de2bdeea97fd72d1ce (diff) | |
download | openbmc-77938925cd41e5a26c99c56b6448ed44ea99bf21.tar.xz |
meta-quanta: s6q: enable sync-mac and nic-ethtool
This commit enables sync-mac and nic-ethtool in the phosphor-network.
The "sync-mac" function can initialize the mac address on first boot, if it can find the object in the inventory.
When phosphor-network triggers systemd to set the mac address, it must be set together with the interface enslaved by bond.
And "nic-ethtool" provides the necessary data through network interface analysis.
Tested:
Check the network object if it worked.
~# busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/bond0
Signed-off-by: Jerry Wan <jerry.wan@quantatw.com>
Change-Id: I63d80b4491f3aa42cae401658a189acaaddb592f
Diffstat (limited to 'meta-quanta')
-rw-r--r-- | meta-quanta/meta-s6q/recipes-phosphor/network/phosphor-network_%.bbappend | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-quanta/meta-s6q/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-quanta/meta-s6q/recipes-phosphor/network/phosphor-network_%.bbappend new file mode 100644 index 0000000000..89beaa9149 --- /dev/null +++ b/meta-quanta/meta-s6q/recipes-phosphor/network/phosphor-network_%.bbappend @@ -0,0 +1,14 @@ +PACKAGECONFIG:append:s6q = " sync-mac nic-ethtool" + +FILES:${PN}:append:s6q = " ${datadir}/network/config.json" + +do_install:append:s6q() { + install -d ${D}${datadir}/network/ + if ${@bb.utils.contains('MACHINE_FEATURES', 'bonding', 'true', 'false', d)}; + then + echo '{"bond0":"bmc","eth0":"bmc","eth1":"bmc"}' \ + > ${D}${datadir}/network/config.json + else + echo '{"eth0":"bmc"}' > ${D}${datadir}/network/config.json + fi +} |