Signed-off-by: Alejandro Benete <abenete@somdevices.com>
--- /dev/null
+SUMMARY = "Change ethernet interface names"
+DESCRIPTION = "Change order and interface names eth0 to eno2 and eth1 to eno1"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI += "\
+ file://20-ethernet.rules \
+"
+
+S = "${WORKDIR}"
+
+SYSTEMD_PACKAGES = "${PN}"
+
+FILES_${PN} += " 20-ethernet.rules \
+"
+
+do_install () {
+ install -d ${D}/etc/udev/rules.d
+ install -m 0644 ${WORKDIR}/20-ethernet.rules ${D}/etc/udev/rules.d
+}
+
--- /dev/null
+# Ethernet network device rules file
+#
+
+
+# Do not assign ethX names, since they might be already in use.
+# Use udevadm to get possible selectors.
+# udevadm info -a -p /sys/class/net/eth0
+
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="20b4000.ethernet", NAME="eno2"
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="2188000.ethernet", NAME="eno1"