summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service11
-rw-r--r--meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb27
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service b/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service
new file mode 100644
index 000000000..e18d69493
--- /dev/null
+++ b/meta-quanta/meta-gsj/recipes-gsj/mac-address/files/mac-address.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Initialize MAC Address
+Before=usb_network.service network-pre.target
+Wants=network-pre.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mac-address
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb b/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb
new file mode 100644
index 000000000..8d3fbf376
--- /dev/null
+++ b/meta-quanta/meta-gsj/recipes-gsj/mac-address/mac-address.bb
@@ -0,0 +1,27 @@
+SRC_URI = "git://github.com/quanta-bmc/mac-address.git;protocol=git"
+SRCREV = "${AUTOREV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${QUANTABASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit autotools pkgconfig
+inherit systemd
+
+DEPENDS += "systemd"
+DEPENDS += "autoconf-archive-native"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " file://mac-address.service"
+
+HASHSTYLE = "gnu"
+S = "${WORKDIR}/git"
+CXXFLAGS += "-std=c++17"
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/mac-address.service \
+ ${D}${systemd_unitdir}/system
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} += "mac-address.service" \ No newline at end of file