summaryrefslogtreecommitdiff
path: root/meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb
diff options
context:
space:
mode:
authorLotus Xu <xuxiaohan@bytedance.com>2020-10-27 10:00:31 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-12-31 19:41:08 +0300
commit58c4886c6077d6b1e70be7ae38b25537963ae781 (patch)
treef69e39d1754356a0107cf2007ca1be3eed0a3703 /meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb
parentbad8d82c5c28a2dcda255807ac0f617ba7ab7a97 (diff)
downloadopenbmc-58c4886c6077d6b1e70be7ae38b25537963ae781.tar.xz
bytedance: g220a:read eeprom mac addr
read a byte at one time eg: for the first byte i2cset -y 1 0x50 0x00 0x00 i2cget -y 1 0x50 (From meta-bytedance rev: 6389a4f03a518e49241d13843cf005f4a85d7cc8) Tested: Verify the eeprom mac addr can be read use `fw_printenv`,`ip a` can read device mac addr Signed-off-by: Lotus Xu <xuxiaohan@bytedance.com> Change-Id: I5fbf28e5bb3bb2ccc2a074388f4166e35da48afc Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb')
-rw-r--r--meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb b/meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb
new file mode 100644
index 000000000..130187dd8
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Enforce static MAC addresses"
+DESCRIPTION = "Set a priority on MAC addresses to run with: \
+ factory-specified > u-boot-specified > random"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+SRC_URI = "\
+ file://mac-check \
+ file://${PN}.service \
+ "
+
+inherit obmc-phosphor-systemd
+
+SYSTEMD_SERVICE_${PN} += "${PN}.service"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/mac-check ${D}${bindir}
+}