<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/config.mk, branch v2016.03</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Allow objcopy to work without filling gaps with 0xff</title>
<updated>2015-08-05T14:42:40+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-07-31T15:31:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e020c88a3cd7018112af18a7d3f73fca8a3beb1e'/>
<id>e020c88a3cd7018112af18a7d3f73fca8a3beb1e</id>
<content type='text'>
This is currently done for all targets, since 0xff is the default erased
value for most flash devices. In some cases this is not what we want (e.g.
for EFI images) so provide a command to do a vanilla objcopy.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is currently done for all targets, since 0xff is the default erased
value for most flash devices. In some cases this is not what we want (e.g.
for EFI images) so provide a command to do a vanilla objcopy.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: switch to single .config configuration</title>
<updated>2015-02-24T22:06:23+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2015-02-24T13:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e02ee2548afe22f7d197b89df2ae7bd72f1df630'/>
<id>e02ee2548afe22f7d197b89df2ae7bd72f1df630</id>
<content type='text'>
When Kconfig for U-boot was examined, one of the biggest issues was
how to support multiple images (Normal, SPL, TPL).  There were
actually two options, "single .config" and "multiple .config".
After some discussions and thought experiments, I chose the latter,
i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the
maximum flexibility and helped to avoid duplicating CONFIGs among
Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images.
  If you change the configuration of Main image, you often have to
  adjust some SPL configurations correspondingly.  Currently, we
  cannot handle the dependencies between them.  It means one of the
  biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config".
  Sunxi guys started to work around this problem by creating a new
  configuration target.  Commit cbdd9a9737cc (sunxi: kconfig: Add
  %_felconfig rule to enable FEL build of sunxi platforms.) added
  "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
  Changing the configuration of multiple images in one command is a
  generic demand.  The current implementation cannot propose any
  good solution about this.

[3] Kconfig files are getting ugly and difficult to understand.
  Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
  Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be.
  To adjust Linux-originated Kconfig to U-Boot, the helper script
  "scripts/multiconfig.sh" was introduced.  Writing a complicated
  text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better.  With it,
all the problems above would go away.  Instead, we will have to add
some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
but we will not have much.  Anyway, this is what we do now in
scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the
single .config configuration.

It is not so difficult to do that:

 - Remove unnecessary processings from scripts/multiconfig.sh
  This file will remain for a while to support the current defconfig
  format.  It will be removed after more cleanups are done.

 - Adjust some makefiles and Kconfigs

 - Add some entries to include/config_uncmd_spl.h and the new file
   scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
   supported on SPL must be disabled because one .config is shared
   between SPL and U-Boot proper going forward.  I know this is not
   a beautiful solution and I think we can do better, but let's see
   how much we will have to describe them.

 - update doc/README.kconfig

More cleaning up patches will follow this.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When Kconfig for U-boot was examined, one of the biggest issues was
how to support multiple images (Normal, SPL, TPL).  There were
actually two options, "single .config" and "multiple .config".
After some discussions and thought experiments, I chose the latter,
i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the
maximum flexibility and helped to avoid duplicating CONFIGs among
Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images.
  If you change the configuration of Main image, you often have to
  adjust some SPL configurations correspondingly.  Currently, we
  cannot handle the dependencies between them.  It means one of the
  biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config".
  Sunxi guys started to work around this problem by creating a new
  configuration target.  Commit cbdd9a9737cc (sunxi: kconfig: Add
  %_felconfig rule to enable FEL build of sunxi platforms.) added
  "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
  Changing the configuration of multiple images in one command is a
  generic demand.  The current implementation cannot propose any
  good solution about this.

[3] Kconfig files are getting ugly and difficult to understand.
  Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
  Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be.
  To adjust Linux-originated Kconfig to U-Boot, the helper script
  "scripts/multiconfig.sh" was introduced.  Writing a complicated
  text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better.  With it,
all the problems above would go away.  Instead, we will have to add
some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
but we will not have much.  Anyway, this is what we do now in
scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the
single .config configuration.

It is not so difficult to do that:

 - Remove unnecessary processings from scripts/multiconfig.sh
  This file will remain for a while to support the current defconfig
  format.  It will be removed after more cleanups are done.

 - Adjust some makefiles and Kconfigs

 - Add some entries to include/config_uncmd_spl.h and the new file
   scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
   supported on SPL must be disabled because one .config is shared
   between SPL and U-Boot proper going forward.  I know this is not
   a beautiful solution and I think we can do better, but let's see
   how much we will have to describe them.

 - update doc/README.kconfig

More cleaning up patches will follow this.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide option to avoid defining a custom version of uintptr_t.</title>
<updated>2014-10-27T15:04:01+00:00</updated>
<author>
<name>Gabe Black</name>
<email>gabeblack@chromium.org</email>
</author>
<published>2014-10-15T10:38:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504'/>
<id>0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504</id>
<content type='text'>
There's a definition in stdint.h (provided by gcc) which will be more correct
if available.

Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make'
commmand.

This adjusts the settings for x86 and sandbox, with both have 64-bit options.

Signed-off-by: Gabe Black &lt;gabeblack@google.com&gt;
Reviewed-by: Gabe Black &lt;gabeblack@chromium.org&gt;
Tested-by: Gabe Black &lt;gabeblack@chromium.org&gt;
Reviewed-by: Bill Richardson &lt;wfrichar@google.com&gt;
Rewritten to be an option, since stdint.h is often available only in glibc.
Changed to preserve a clear boundary between stdint and non-stdint
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's a definition in stdint.h (provided by gcc) which will be more correct
if available.

Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make'
commmand.

This adjusts the settings for x86 and sandbox, with both have 64-bit options.

Signed-off-by: Gabe Black &lt;gabeblack@google.com&gt;
Reviewed-by: Gabe Black &lt;gabeblack@chromium.org&gt;
Tested-by: Gabe Black &lt;gabeblack@chromium.org&gt;
Reviewed-by: Bill Richardson &lt;wfrichar@google.com&gt;
Rewritten to be an option, since stdint.h is often available only in glibc.
Changed to preserve a clear boundary between stdint and non-stdint
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: clear VENDOR variable to fix build error on tcsh</title>
<updated>2014-10-23T20:35:12+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-10-21T04:18:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5b3ee386fde82a1ba42ff09b95247842c9a1585e'/>
<id>5b3ee386fde82a1ba42ff09b95247842c9a1585e</id>
<content type='text'>
Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile.  Otherwise, boards without CONFIG_SYS_VENDOR fail to build:

  &gt; make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
    [ snip ]
    AR      arch/arm/lib/lib.a
    CC      arch/arm/lib/eabi_compat.o
  scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
  Makefile: No such file or directory
  make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
  wandboard/Makefile'.  Stop.
  make[1]: *** [board/unknown/wandboard] Error 2
  make: *** [__build_one_by_one] Error 2

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reported-by: Tom Everett &lt;tom@khubla.com&gt;
Reported-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile.  Otherwise, boards without CONFIG_SYS_VENDOR fail to build:

  &gt; make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
    [ snip ]
    AR      arch/arm/lib/lib.a
    CC      arch/arm/lib/eabi_compat.o
  scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
  Makefile: No such file or directory
  make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
  wandboard/Makefile'.  Stop.
  make[1]: *** [board/unknown/wandboard] Error 2
  make: *** [__build_one_by_one] Error 2

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reported-by: Tom Everett &lt;tom@khubla.com&gt;
Reported-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Reactivate the tracing feature</title>
<updated>2014-09-24T22:30:28+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2014-09-14T18:40:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b84505210367d152a456a2adeba90e13626ad104'/>
<id>b84505210367d152a456a2adeba90e13626ad104</id>
<content type='text'>
This was lost sometime in the Kbuild conversion. Add it back.

Check that the trace test now passes:

$ ./test/trace/test-trace.sh
Simple trace test / sanity check using sandbox

/tmp/filemHKPGw
Build sandbox
O=sandbox FTRACE=1
  GEN     /home/sjg/c/src/third_party/u-boot/files/sandbox/Makefile
Configuring for sandbox board...
Check results
Test passed

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was lost sometime in the Kbuild conversion. Add it back.

Check that the trace test now passes:

$ ./test/trace/test-trace.sh
Simple trace test / sanity check using sandbox

/tmp/filemHKPGw
Build sandbox
O=sandbox FTRACE=1
  GEN     /home/sjg/c/src/third_party/u-boot/files/sandbox/Makefile
Configuring for sandbox board...
Check results
Test passed

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: switch to Kconfig</title>
<updated>2014-07-30T12:48:03+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-07-30T05:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=51148790f26e42ef1fd4a1a8d056bf0252539525'/>
<id>51148790f26e42ef1fd4a1a8d056bf0252539525</id>
<content type='text'>
This commit enables Kconfig.
Going forward, we use Kconfig for the board configuration.
mkconfig will never be used. Nor will include/config.mk be generated.

Kconfig must be adjusted for U-Boot because our situation is
a little more complicated than Linux Kernel.
We have to generate multiple boot images (Normal, SPL, TPL)
from one source tree.
Each image needs its own configuration input.

Usage:

Run "make &lt;board&gt;_defconfig" to do the board configuration.

It will create the .config file and additionally spl/.config, tpl/.config
if SPL, TPL is enabled, respectively.

You can use "make config", "make menuconfig" etc. to create
a new .config or modify the existing one.

Use "make spl/config", "make spl/menuconfig" etc. for spl/.config
and do likewise for tpl/.config file.

The generic syntax of configuration targets for SPL, TPL is:

  &lt;target_image&gt;/&lt;config_command&gt;

Here, &lt;target_image&gt; is either 'spl' or 'tpl'
      &lt;config_command&gt; is 'config', 'menuconfig', 'xconfig', etc.

When the configuration is done, run "make".
(Or "make &lt;board&gt;_defconfig all" will do the configuration and build
in one time.)

For futher information of how Kconfig works in U-Boot,
please read the comment block of scripts/multiconfig.py.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define a set of configs.

We expect a very long term to migrate from C headers to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for use in makefiles.
It is still generated under include/, spl/include/, tpl/include/ directory
for the Normal, SPL, TPL image, respectively.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit enables Kconfig.
Going forward, we use Kconfig for the board configuration.
mkconfig will never be used. Nor will include/config.mk be generated.

Kconfig must be adjusted for U-Boot because our situation is
a little more complicated than Linux Kernel.
We have to generate multiple boot images (Normal, SPL, TPL)
from one source tree.
Each image needs its own configuration input.

Usage:

Run "make &lt;board&gt;_defconfig" to do the board configuration.

It will create the .config file and additionally spl/.config, tpl/.config
if SPL, TPL is enabled, respectively.

You can use "make config", "make menuconfig" etc. to create
a new .config or modify the existing one.

Use "make spl/config", "make spl/menuconfig" etc. for spl/.config
and do likewise for tpl/.config file.

The generic syntax of configuration targets for SPL, TPL is:

  &lt;target_image&gt;/&lt;config_command&gt;

Here, &lt;target_image&gt; is either 'spl' or 'tpl'
      &lt;config_command&gt; is 'config', 'menuconfig', 'xconfig', etc.

When the configuration is done, run "make".
(Or "make &lt;board&gt;_defconfig all" will do the configuration and build
in one time.)

For futher information of how Kconfig works in U-Boot,
please read the comment block of scripts/multiconfig.py.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define a set of configs.

We expect a very long term to migrate from C headers to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for use in makefiles.
It is still generated under include/, spl/include/, tpl/include/ directory
for the Normal, SPL, TPL image, respectively.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: define CPU only when arch/${ARCH}/cpu/${CPU} exists</title>
<updated>2014-07-07T23:42:34+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-06-24T13:10:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a8b0f9b685072e1d3acd01741e7db6833b445b2a'/>
<id>a8b0f9b685072e1d3acd01741e7db6833b445b2a</id>
<content type='text'>
The directory arch/${ARCH}/cpu/${CPU} does not exist
in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86.

These architectures have only one CPU type.
Defining CPU should not be required for such architectures.

This commit allows cpu field (= the 3rd field of boards.cfg)
to be kept blank.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Sonic Zhang &lt;sonic.zhang@analog.com&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: Thomas Chou &lt;thomas@wytron.com.tw&gt;
Cc: Stefan Kristiansson &lt;stefan.kristiansson@saunalahti.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The directory arch/${ARCH}/cpu/${CPU} does not exist
in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86.

These architectures have only one CPU type.
Defining CPU should not be required for such architectures.

This commit allows cpu field (= the 3rd field of boards.cfg)
to be kept blank.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Sonic Zhang &lt;sonic.zhang@analog.com&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: Thomas Chou &lt;thomas@wytron.com.tw&gt;
Cc: Stefan Kristiansson &lt;stefan.kristiansson@saunalahti.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: rename SRCTREE to srctree</title>
<updated>2014-03-12T21:04:57+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-03-11T02:05:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=01286329b27b27eaeda045b469d41b1d9fce545a'/>
<id>01286329b27b27eaeda045b469d41b1d9fce545a</id>
<content type='text'>
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used for instead.
This commit renames SRCTREE to srctree and deletes the
defition of SRCTREE.

Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c,
doc/DocBook/Makefile should be keep.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used for instead.
This commit renames SRCTREE to srctree and deletes the
defition of SRCTREE.

Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c,
doc/DocBook/Makefile should be keep.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: rename TOPDIR to stctree</title>
<updated>2014-03-12T21:04:55+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-03-11T02:05:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4379ac614809da2128f8bc1f62e3dde4daaf7deb'/>
<id>4379ac614809da2128f8bc1f62e3dde4daaf7deb</id>
<content type='text'>
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used instead.
This commit renames TOPDIR to srctree and delete the
defition of TOPDIR.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used instead.
This commit renames TOPDIR to srctree and delete the
defition of TOPDIR.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: improve Kbuild speed</title>
<updated>2014-03-07T15:59:06+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-03-05T07:59:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=026f9cf24f3c9d30c47c42bac622a64338caf596'/>
<id>026f9cf24f3c9d30c47c42bac622a64338caf596</id>
<content type='text'>
Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.

After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).

Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.

$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.

This commit changes the build system as follows:

  - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

  - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
      PLATFORM_CPPFLAGS
      CPUDIR
      BOARDDIR
      OBJCOPYFLAGS
      LDFLAGS
      LDFLAGS_FINAL
        (used in nand_spl/board/*/*/Makefile)
      CONFIG_STANDALONE_LOAD_ADDR
        (used in examples/standalone/Makefile)
      SYM_PREFIX
        (used in examples/standalone/Makefile)
      RELFLAGS
        (used in examples/standalone/Makefile)

  - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

  - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reported-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on Sandbox]
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt; [on Tegra]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.

After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).

Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.

$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.

This commit changes the build system as follows:

  - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

  - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
      PLATFORM_CPPFLAGS
      CPUDIR
      BOARDDIR
      OBJCOPYFLAGS
      LDFLAGS
      LDFLAGS_FINAL
        (used in nand_spl/board/*/*/Makefile)
      CONFIG_STANDALONE_LOAD_ADDR
        (used in examples/standalone/Makefile)
      SYM_PREFIX
        (used in examples/standalone/Makefile)
      RELFLAGS
        (used in examples/standalone/Makefile)

  - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

  - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Reported-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on Sandbox]
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt; [on Tegra]
</pre>
</div>
</content>
</entry>
</feed>
