aspeed: cleanup u-boot-fw-utils config

Move files with identical content to the base aspeed layer.
Remove unnecessary u-boot bbappends as the u-boot binary does not
depend on fw_env.config content.

Tested: Built u-boot and fw-utils recipes, validated packages
Change-Id: Iee3d3f76b93ff5f6d59ebeb18f08ad42cb6d187b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-bsp/u-boot/files/alt_fw_env.config b/common/recipes-bsp/u-boot/files/alt_fw_env.config
new file mode 100644
index 0000000..3d85f99
--- /dev/null
+++ b/common/recipes-bsp/u-boot/files/alt_fw_env.config
@@ -0,0 +1,25 @@
+# Configuration file for fw_(printenv/setenv) utility.
+# Up to two entries are valid, in this case the redundant
+# environment sector is assumed present.
+# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash.
+# Furthermore, if the Flash sector size is omitted, this value is assumed to
+# be the same as the Environment size, which is valid for NOR and SPI-dataflash
+
+# NOR example
+# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
+#/dev/mtd1		0x0000		0x20000		0x20000
+#/dev/mtd2		0x0000		0x4000		0x4000
+
+# MTD SPI-dataflash example
+# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
+#/dev/mtd2		0x00000		0x20000
+/dev/mtd/alt-u-boot-env	0x00000		0x10000
+/dev/mtd/alt-u-boot-env	0x10000		0x10000
+#/dev/mtd5		0x4200		0x4200
+#/dev/mtd6		0x4200		0x4200
+
+# NAND example
+#/dev/mtd0		0x4000		0x4000		0x20000			2
+
+# Block device example
+#/dev/mmcblk0		0xc0000		0x20000
diff --git a/common/recipes-bsp/u-boot/files/fw_env.config b/common/recipes-bsp/u-boot/files/fw_env.config
new file mode 100644
index 0000000..19ace4b
--- /dev/null
+++ b/common/recipes-bsp/u-boot/files/fw_env.config
@@ -0,0 +1,25 @@
+# Configuration file for fw_(printenv/setenv) utility.
+# Up to two entries are valid, in this case the redundant
+# environment sector is assumed present.
+# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash.
+# Furthermore, if the Flash sector size is omitted, this value is assumed to
+# be the same as the Environment size, which is valid for NOR and SPI-dataflash
+
+# NOR example
+# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
+#/dev/mtd1		0x0000		0x20000		0x20000
+#/dev/mtd2		0x0000		0x4000		0x4000
+
+# MTD SPI-dataflash example
+# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
+#/dev/mtd2		0x00000		0x20000
+/dev/mtd/u-boot-env	0x00000		0x10000
+/dev/mtd/u-boot-env	0x10000		0x10000
+#/dev/mtd5		0x4200		0x4200
+#/dev/mtd6		0x4200		0x4200
+
+# NAND example
+#/dev/mtd0		0x4000		0x4000		0x20000			2
+
+# Block device example
+#/dev/mmcblk0		0xc0000		0x20000
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 9bba67e..2b2b62c 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
@@ -1,6 +1,8 @@
 require u-boot-common_${PV}.inc
 
 SRC_URI += "file://default-gcc.patch"
+SRC_URI += "file://fw_env.config"
+SRC_URI += "file://alt_fw_env.config"
 
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
 DEPENDS = "mtd-utils"
@@ -18,10 +20,12 @@
 
 do_install () {
 	install -d ${D}${base_sbindir}
-	install -d ${D}${sysconfdir}
 	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
 	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
-	install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
+
+	install -d ${D}${sysconfdir}
+	install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
+	install -m 644 ${WORKDIR}/alt_fw_env.config ${D}${sysconfdir}/alt_fw_env.config
 }
 
 do_install_class-cross () {