[U-Boot] [PATCH 0/4 v2] Makefile: rework / cleanup

Wolfgang Denk wd at denx.de
Thu May 27 23:18:32 CEST 2010


The top level Makefile is growing and growing. Once, when we
supported only a few tens of boards, it was possible to implement
board configuration logic in the Makefile, but it quickly turned out
that this doesn't scale. Also, it is not really needed (at least not
any more) - we now have mechanisnms in place, that allow for more
efficient code.

The following patch series is an attempt to start some cleanup and
reduce the size of the top level Makefile.  The solution is neither
perfect nor complete - there are quite a lot of boards that resist
such a cleanup and need more thorough rework.  But it's an initial
step, showing what could and should be done, which boards have
problems, and why this is the case.  Eventually this paves the ground
for a more friendly way to add new board configurations.

The idea is to have all "board descriptions" in a single data base
in form of a plain text file - no need to add anything to the top
level Makefile, and eventually also tools like the "MAKEALL" script
can be replaced / simplified because they can fetch all needed board
information from that data base.

1/4:

    Fix printing of make targets, simplify Makefile

 Makefile |  740 ++++++++++++++++++++-----------------------------------------
 1 files changed, 243 insertions(+), 497 deletions(-)

2/4:

    Makefile: simplify handling of build target names

 Makefile |  774 ++++++++++++++++++++++++++++++--------------------------------
 mkconfig |    6 +-
 2 files changed, 380 insertions(+), 400 deletions(-)

3/4:

    Makefile: simplify handling of common board configurations

 Makefile | 1436 ++++++++++++++++++++++++++------------------------------------
 1 files changed, 607 insertions(+), 829 deletions(-)

4/4:

    Makefile/mkconfig: read simple board configurations from boards.cfg

 Makefile   |  823 ++----------------------------------------------------------
 boards.cfg |  356 ++++++++++++++++++++++++++
 mkconfig   |   72 ++++--
 3 files changed, 431 insertions(+), 820 deletions(-)
 create mode 100644 boards.cfg


More information about the U-Boot mailing list