aspeed: move MTD partition rules
Move the MTD partition rules to their own recipe under
udev rather than appending u-boot-fw-utils. Additionally
the rules are an artifact of the aspeed u-boot-fw-utils
configuration, so place the new recipe in the aspeed layer.
Tested: Built a witherspoon image
Change-Id: I1fec995dd75543b2630db29d78bfb29a1a5949d5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
index 2631499..9bba67e 100644
--- a/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
+++ b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.07.bb
@@ -34,3 +34,5 @@
PACKAGE_ARCH = "${MACHINE_ARCH}"
BBCLASSEXTEND = "cross"
+
+RDEPENDS_${PN} = "udev-aspeed-mtd-partitions"
diff --git a/common/recipes-core/udev/udev-aspeed-mtd-partitions.bb b/common/recipes-core/udev/udev-aspeed-mtd-partitions.bb
new file mode 100644
index 0000000..9e85308
--- /dev/null
+++ b/common/recipes-core/udev/udev-aspeed-mtd-partitions.bb
@@ -0,0 +1,15 @@
+SUMMARY = "udev rules for MTD partitions"
+DESCRIPTION = "udev rules for MTD partitions"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+S = "${WORKDIR}"
+SRC_URI += "file://76-aspeed-mtd-partitions.rules"
+
+RDEPENDS_${PN} += "udev"
+
+do_install() {
+ install -d ${D}/${base_libdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/76-aspeed-mtd-partitions.rules ${D}/${base_libdir}/udev/rules.d
+}
diff --git a/common/recipes-core/udev/udev-aspeed-mtd-partitions/76-aspeed-mtd-partitions.rules b/common/recipes-core/udev/udev-aspeed-mtd-partitions/76-aspeed-mtd-partitions.rules
new file mode 100644
index 0000000..28e4586
--- /dev/null
+++ b/common/recipes-core/udev/udev-aspeed-mtd-partitions/76-aspeed-mtd-partitions.rules
@@ -0,0 +1 @@
+ENV{DEVTYPE}=="mtd", SYMLINK+="mtd/%s{name}"