Commit 01072b44db66d31dc397ccccd1bf8ccf98e39094
Committed by
Tom Rini
1 parent
47f1571115
Exists in
master
and in
49 other branches
kbuild: move include directives of board configuration files
This commit changes the location of include directives of board configuration files. The purpose of this change is: - Slim down $(TOPDIR)/config.mk - Prevent $(TOPDIR)/Makefile from including the same configuration file twice - Do not include include/config.mk multiple times because ARCH, CPU, BOARD, VENDOR, SOC are exported Before this commit: - include/autoconf.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/autoconf.mk twice) - include/{spl,tpl}-autoconf.mk was included from $(TOPDIR)/config.mk - include/config.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/config.mk twice) After this commit: - include/autoconf.mk is included from $(TOPDIR)/Makefile and $(TOPDIR)/scripts/Makefile.build - include/{spl,tpl}-autoconf.mk is included from $(TOPDIR)/spl/Makefile and $(TOPDIR)/scripts/Makefile.build - include/config.mk is included from $(TOPDIR)/config.mk and $(TOPDIR)/spl/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing 3 changed files with 19 additions and 15 deletions Side-by-side Diff
config.mk
... | ... | @@ -13,21 +13,6 @@ |
13 | 13 | |
14 | 14 | ######################################################################### |
15 | 15 | |
16 | -# Load generated board configuration | |
17 | -ifeq ($(CONFIG_TPL_BUILD),y) | |
18 | -# Include TPL autoconf | |
19 | -sinclude include/tpl-autoconf.mk | |
20 | -else | |
21 | -ifeq ($(CONFIG_SPL_BUILD),y) | |
22 | -# Include SPL autoconf | |
23 | -sinclude include/spl-autoconf.mk | |
24 | -else | |
25 | -# Include normal autoconf | |
26 | -sinclude include/autoconf.mk | |
27 | -endif | |
28 | -endif | |
29 | -sinclude $(OBJTREE)/include/config.mk | |
30 | - | |
31 | 16 | # Some architecture config.mk files need to know what CPUDIR is set to, |
32 | 17 | # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. |
33 | 18 | # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains |
scripts/Makefile.build
... | ... | @@ -42,6 +42,17 @@ |
42 | 42 | # Read auto.conf if it exists, otherwise ignore |
43 | 43 | -include include/config/auto.conf |
44 | 44 | |
45 | +# Added for U-Boot: Load U-Boot configuration | |
46 | +ifeq ($(CONFIG_TPL_BUILD),y) | |
47 | + -include include/tpl-autoconf.mk | |
48 | +else | |
49 | + ifeq ($(CONFIG_SPL_BUILD),y) | |
50 | + -include include/spl-autoconf.mk | |
51 | + else | |
52 | + -include include/autoconf.mk | |
53 | + endif | |
54 | +endif | |
55 | + | |
45 | 56 | include scripts/Kbuild.include |
46 | 57 | |
47 | 58 | # Added for U-Boot |
spl/Makefile
... | ... | @@ -40,6 +40,14 @@ |
40 | 40 | SPL_BIN := u-boot-spl |
41 | 41 | endif |
42 | 42 | |
43 | +include include/config.mk | |
44 | + | |
45 | +ifeq ($(CONFIG_TPL_BUILD),y) | |
46 | + -include include/tpl-autoconf.mk | |
47 | +else | |
48 | + -include include/spl-autoconf.mk | |
49 | +endif | |
50 | + | |
43 | 51 | include $(TOPDIR)/config.mk |
44 | 52 | |
45 | 53 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) |