From 3ae44178b7084037a75e16ce161b1432abf4246a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 27 Sep 2013 02:35:12 -0700 Subject: [PATCH] nyan: Add a "special-class" for aggregating BCT files into bct.cfg. The config file which cbootimage processes to create a BCT could come from multiple different files, individually selected based on config options, and/or split up into different files for organizational purposes. This change adds a special-class which collects those files and concatenates them all together in a bct.cfg which can be processed more easily by other parts of the build. While the BCT files themselves are potentially very board specific, for instance ones that hold memory timing information, this bit of code which collects them is not. It has to be in each board file instead of alongside the CPU, however, to ensure that the special class is set up before another Makefile tries to use it. If we end up with lots of Tegra based boards which duplicate this code over and over, we might want to revisit how this works. BUG=None TEST=Built for nyan while forcing the bct.cfg rule to be executed. Verified that the bct.cfg was created successfully. With other changes, used the bct.cfg in an image. BRANCH=None Change-Id: I58e1373434f89e69298990ea4643a19d8afdc309 Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/170922 Reviewed-by: Gabe Black Commit-Queue: Gabe Black Tested-by: Gabe Black --- src/mainboard/google/nyan/Makefile.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mainboard/google/nyan/Makefile.inc b/src/mainboard/google/nyan/Makefile.inc index e72e27944a..3cf7dd249c 100644 --- a/src/mainboard/google/nyan/Makefile.inc +++ b/src/mainboard/google/nyan/Makefile.inc @@ -17,6 +17,16 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +# Add a handler for BCT config files +$(call add-special-class,bct-cfg) +bct-cfg-handler= $(eval $(obj)/generated/bct.cfg: $(1)$(2)) + +$(obj)/generated/bct.cfg: + @printf " CAT $(subst $(obj)/,,$(@))\n" + cat $^ > $@ + +subdirs-y += bct + romstage-y += romstage.c ramstage-y += mainboard.c