Skip to content

config.mk: Delete unnecessary code

Masahiro Yamada u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v11 patch 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2config.mk: Delete unnecessary codeconfig.mk+0 -161 reply
2/2cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config headerboard/ait/cam_enc_4xx/config.mk config.mk include/configs/cam_enc_4xx.h+2 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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 <[email protected]>

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(-)
Signature · 1 line
1.8.1.2