[U-Boot] [PATCH v2 0/2] config.mk: Delete unnecessary code

Masahiro Yamada yamada.m at jp.panasonic.com
Sun Sep 1 08:04:25 CEST 2013


These consecutive patches delete the following code
in the top-level config.mk


ifneq ($(CONFIG_SPL_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE)
endif

ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endif

ifneq ($(CONFIG_TPL_PAD_TO),)
CPPFLAGS += -DCONFIG_TPL_PAD_TO=$(CONFIG_TPL_PAD_TO)
endif

ifneq ($(CONFIG_UBOOT_PAD_TO),)
CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
endif

ifneq ($(RESET_VECTOR_ADDRESS),)
CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
endif


As for CONFIG_SPL_TEXT_BASE, CONFIG_UBOOT_PAD_TO,
CONFIG_RESET_VECTOR_ADDRESS, CONFIG_TPL_PAD_TO,
they are not defined in makefiles but only in config headers.
So, we can simply delete them. (This is done in 0001.)

As for CONFIG_SPL_PAD_TO, there is only one board which defines it in a makefile.
For refactoring, 0002 patch moves the definition of CONFIG_SPL_PAD_TO
from board/ait/cam_enc_4xx/config.mk to include/configs/cam_enc_4xx.h.
I added Cc Heiko Schocher, the maintainer of cam_enc_4xx board.

Heiko, a review is welcome if the refactoring in 0002 is acceptable or not.
If it is not acceptable, please apply only 0001 patch.

Note:
We have one more left in config.mk

ifneq ($(CONFIG_SYS_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
endif

But too many boards still define CONFIG_SYS_TEXT_BASE in makefiles.
So I could not touch for now.
I think board maintainers should make effort to move
the CONFIG definition from config.mk to headers.

Cc: Heiko Schocher <hs at denx.de>

Masahiro Yamada (2):
  config.mk: Delete unnecessary code
  cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header

 board/ait/cam_enc_4xx/config.mk |  2 --
 config.mk                       | 20 --------------------
 include/configs/cam_enc_4xx.h   |  2 ++
 3 files changed, 2 insertions(+), 22 deletions(-)

-- 
1.8.1.2



More information about the U-Boot mailing list