Use BB collections for Aspeed tree patches

Move the Aspeed u-boot tree patches to a directory where they can
be conditionally applied when the Aspeed layer is in the build
configuration.

This is a better way to achieve 273ec60e436 since it enables the Aspeed
BSP layer to name its u-boot/kernel recipes whatever it wants.

Remove stubbed do_configure from u-boot_%.bbappend.  It is no longer
required since the bbappend is only activated when the aspeed layer
and associated u-boot recipes are in the layer configuration.

Tested: Built u-boot recipe for witherspoon and palmetto targets
Change-Id: I52dceb65598e0cf660ad035a8f14e9894325ca71
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-aspeed.inc b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed.inc
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/u-boot-aspeed.inc
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed.inc
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
similarity index 100%
rename from meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
rename to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot_%.bbappend
similarity index 100%
copy from meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
copy to meta-phosphor/aspeed-layer/recipes-bsp/u-boot/u-boot_%.bbappend
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend
deleted file mode 100644
index f9a1e83..0000000
--- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-include u-boot-aspeed.inc
-
-python do_configure () {
-    pass
-}
diff --git a/meta-phosphor/common/recipes.txt b/meta-phosphor/common/recipes.txt
index 1a8adc7..ccd19b2 100644
--- a/meta-phosphor/common/recipes.txt
+++ b/meta-phosphor/common/recipes.txt
@@ -1,4 +1,3 @@
-recipes-bsp          - Anything with links to specific hardware or hardware configuration information
 recipes-connectivity - Libraries and applications related to communication with other devices 
 recipes-core         - What's needed to build a basic working Linux image including commonly used dependencies
 recipes-devtools     - Tools primarily used by the build system (but can also be used on targets)
diff --git a/meta-phosphor/conf/layer.conf b/meta-phosphor/conf/layer.conf
index ab0b736..2510f30 100644
--- a/meta-phosphor/conf/layer.conf
+++ b/meta-phosphor/conf/layer.conf
@@ -14,3 +14,10 @@
 
 IMAGE_FEATURES[validitems] += "tools-profile"
 
+# Let us add layer-specific bbappends which are only applied when that
+# layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
+# Add layer-specific bb files too
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bb' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"