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 <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/170922 Reviewed-by: Gabe Black <gabeblack@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
8db03c387a
commit
3ae44178b7
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue