Commit graph

25 commits

Author SHA1 Message Date
Mike Frysinger
1285a2808a mkconfig: start deprecating Makefile config targets
Now that we've got boards.cfg and most people have converted over,
start warning people who have yet to so we can phase board configs
completely out of the Makefile.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05 22:22:15 +02:00
Jeroen Hofstee
2901f8891d mkconfig: also create CONFIG defines with BSD sed
Parsing of boards.cfg fails on FreeBSD with the error:

sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
of q command

BSD sed expects commands to be on seperate 'lines', hence it expects
an additional ; before the closing brackets.
BSD sed does not support \t, replaced by literal tab.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-07-28 21:18:06 +02:00
Loïc Minier
a9d8bc9806 Don't add symlink in srctree when using an objtree
When building with srctree != objtree, the build creates arch/soc/cpu
specific symlinks in the source tree.  This means that the same source
tree can't be used for multiple builds at the same time.  Also, these
symlinks in the source tree are only cleaned up if one passes the same
O= to distclean.

When srctree != objtree, mkconfig creates an $objtree/include2 directory
in the objtree to host the asm -> arch/$arch/include/asm symlink so that
"#include <asm>" can be used.  But it also creates another identical
symlink in $objtree/include.

Then, mkconfig creates two symlinks:
$objtree/include/asm/arch -> arch/$arch/include/asm/arch-$cpu (or $soc)
$objtree/include/asm/proc -> arch/$arch/include/asm/proc-armv (on arm)
but because $objtree/include/asm points at $srctree already, the two
symlinks are created under $srctree.

To fix this, create a real $objtree/include/asm directory, instead of a
symlink.  Update cleanup code accordingly.

Signed-off-by: Loc Minier <loic.minier@linaro.org>
2011-01-21 08:53:40 +01:00
Mike Frysinger
52f0aa835f config_cmd_defaults.h: new header for common u-boot command defaults
We have config_defaults.h which are random configuration settings that
everyone gets by default.  We also have config_cmd_default.h which is a
recommended list of defaults but boards have to opt into.  Now we have
config_cmd_defaults.h which is a list of defaults that everyone gets
and has to actively opt out of.

For now, we populate it with the bootm command which previously was
unable to be disabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:01:03 +01:00
Wolfgang Denk
d24f2d321d mkconfig: change CONFIG_MK_ prefix into plain CONFIG_
When planning for more generalization and Makefile cleanup it became
obvious that the introduction of a separate CONFIG_MK_ name space for
config options that were set through scripting in the Makefile was
not a good idea.

Originally the idea was to provide a script-free approach to supply
configuration options - there was no real need for a separate name
space. But when we now convert the existing Makefile entries to make
use of this approach, it would mean that we have to touch a large
number of board config files and add #ifdef / #define sequences to
"convert" from the CONFIG_MK_ to the CONFIG_ name space.

It seems much cleaner to get rid of this somewhat arbitrary _MK
string now for the few boards that actually use it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 22:01:21 +02:00
Marek Vasut
9329cdfb30 Build: Add "board options" column to boards.cfg
There are some boards where it's currently not possible to detect all
board information at runtime, therefore a new column was added to
boards.cfg .

This column can contain multiple options: a board configuration name,
optionally followed by a colon (':') and a list of options, which are
separated by comma (',').

In case of simple options like '256M_U_BOOT', these expand to
"#define CONFIG_MK_256M_U_BOOT 1" in config.h . In case of
assignments like 'RAM=8192', these expand to "#define CONFIG_MK_RAM
8192" in config.h .

Example:

	FOO:HAS_BAR,BAZ=64

means:
	- the name of the board config file is include/configs/FOO.h
	- the generated file include/config.h will contain these
	  lines:

		#define CONFIG_HAS_BAR  1
		#define CONFIG_BAZ  64

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

[wd@denx.de: edited commit message; added code to deal with an
optional board configuration name]

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-18 21:58:59 +02:00
Wolfgang Denk
a6862bc123 Makefile/mkconfig: read simple board configurations from boards.cfg
Instead of adding explicit build rules for each and every board to the
top level Makefile (which makes it grow and grow), we now provide a
simple default rule and extend the "mkconfig" script to read board
configurations from a plain text file (table), "boards.cfg".

For simple boards it is now sufficient to add a single line of text to
the "boards.cfg" file, no changes to the top level Makefile are needed
any more.

To make the table better readable, change the notation for unused
fields from "NULL" into "-".

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Mike Frysinger <vapier@gentoo.org>
2010-06-13 18:08:22 +02:00
Wolfgang Denk
ed7a196cd5 Makefile: simplify handling of build target names
Instead of stripping the "_config" part from the make target names in
each call of the "mkconfig" script let this script strip the string.

This prepares the ground for forther simplification of the top level
Makefile.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-13 18:08:18 +02:00
Peter Tyser
819833af39 Move architecture-specific includes to arch/$ARCH/include/asm
This helps to clean up the include/ directory so that it only contains
non-architecture-specific headers and also matches Linux's directory
layout which many U-Boot developers are already familiar with.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-04-13 09:13:12 +02:00
Mike Frysinger
10c32ff59f config_defaults.h: new header for common u-boot config defaults
There are a bunch of features in U-Boot that we want to enable by default,
and it's best if we centralize them in one place rather than updating all
the board files out there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18 00:04:42 +01:00
Wolfgang Denk
2a49bf3149 Merge branch 'master' into next
Conflicts:
	board/esd/plu405/plu405.c
	drivers/rtc/ftrtc010.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-05 02:11:59 +01:00
Nishanth Menon
a8fa379d47 mkconfig: deny messed up ARCH definition
Refuse to setup a platform if the command line ARCH= is not the same
as the one required for the board. This prevents any user with
prehistoric aliases from messing up their builds.

Reported in thread:
http://old.nabble.com/-U-Boot--Build-breaks-on-some-OMAP3-configs-to26132721.html

Inputs from: Mike Frysinger and Wolfgang Denk:
http://lists.denx.de/pipermail/u-boot/2009-November/063642.html

Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2009-11-24 23:37:00 +01:00
Stefan Roese
7ec1fedda6 mkconfig: Create board directory (CONFIG_BOARDDIR) in include/config.h
This patch extends the mkconfig script to automatically create a define
for the board directory in include/config.h:

#define CONFIG_BOARDDIR board/amcc/canyonlands

This is needed for the upcoming PPC4xx linker script consolidation,
where the PPC440 platforms need to include a board specific file in
the common linker script.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-11-02 16:29:03 +01:00
Wolfgang Denk
804d83a563 mkconfig: split the board make target to multiple config targets
To simplify the top level makefile it useful to be able to parse
the top level makefile target to multiple individual target, then
put them to the config.h, leave the board config file to handle
the different targets.

Note that this method uses the '_'(underline) as the delimiter when
splits the board make target.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>

This also reverts commit 511c02f611.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-15 22:14:18 +02:00
Mingkai Hu
511c02f611 mkconfig: pass the board name to board config file
Then we can handle different config targets in the board file, which
simplifies the top level Makefile for boards that have multiple
config targets.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
2009-09-10 22:56:55 +02:00
Kim Phillips
7b0bc0219d mkconfig: include board config.h before asm/config.h
swapping the include order suppresses warnings for board configs
that define their own CONFIG_MAX_MEM_MAPPED:

In file included from /home/r1aaha/git/u-boot/include/config.h:5,
                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:
/home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning:
"CONFIG_MAX_MEM_MAPPED" redefined
In file included from /home/r1aaha/git/u-boot/include/config.h:4,
                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:
/home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is
the location of the previous definition

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-02-19 00:23:19 +01:00
Kumar Gala
47d41cc3a1 Add an architecture specific config.h for common defines
We have common defines that we duplicate in various ways.  Having an
arch specific config.h gives us a common location for those defines.

Eventually we should be able to replace this when we have proper
Kconfig support.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-10 00:43:54 +01:00
Marian Balakowicz
f93286397e Add support for a saving build objects in a separate directory.
Modifications are based on the linux kernel approach and
support two use cases:

  1) Add O= to the make command line
  'make O=/tmp/build all'

  2) Set environement variable BUILD_DIR to point to the desired location
  'export BUILD_DIR=/tmp/build'
  'make'

The second approach can also be used with a MAKEALL script
'export BUILD_DIR=/tmp/build'
'./MAKEALL'

Command line 'O=' setting overrides BUILD_DIR environent variable.

When none of the above methods is used the local build is performed and
the object files are placed in the source directory.
2006-09-01 19:49:50 +02:00
Wolfgang Denk
5078cce81c * Cleanup TQM5200 board configurations:
- make highboot configurations use environment at high end, too,
    to avoid flash fragmentation
  - always use redundand environment
  - don't enable video code for modules without graphics controller
  - provide useful (though different) mtdparts settings
  - get rid of CONFIG_CS_AUTOCONF which was always set anyway

* Extend mkconfig tool to print more useful target name
2006-07-21 11:16:34 +02:00
Wolfgang Denk
507d3b0cde Fix typo in mkconfig script (used == instead of =)
Patch by Murray Jensen, 18 Jul 2005
2005-08-03 22:58:55 +02:00
Wolfgang Denk
3bb9cec962 Fix file permissions 2005-07-21 11:22:21 +02:00
wdenk
86c9888207 Patch by Steven Scholz, 03 Apr 2005:
- create SoC specific directories include/asm-arm/arch-imx and
  include/asm-arm/arch-s3c24x0
2005-04-03 14:26:46 +00:00
wdenk
1d9f410500 Patch by Steven Scholz, 16 Aug 2004:
- Introducing the concept of SoCs "./cpu/$(CPU)/$(SOC)"
- creating subdirs for SoCs ./cpu/arm920t/imx and ./cpu/arm920t/s3c24x0
- moving SoC specific code out of cpu/arm920t/ into cpu/arm920t/$(SOC)/
- moving drivers/s3c24x0_i2c.c and drivers/serial_imx.c out of drivers/
  into cpu/arm920t/$(SOC)/
2004-10-09 22:21:29 +00:00
wdenk
b783edaee8 * Header file cleanup for ARM
* Patch by Murray Jensen, 24 Jun 2003:
  - make sure to use only U-boot provided header files
  - fix problems with ".rodata.str1.4" section as used by GCC-3.x
2003-06-25 22:26:29 +00:00
wdenk
7ebf7443ad Initial revision 2002-11-02 23:17:16 +00:00