diff options
author | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2014-11-21 23:51:33 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-12-08 09:35:45 -0500 |
commit | e19db555b4ac79dafa04cc5ff98bdbff01e19388 (patch) | |
tree | 37b107cf8d2a3e6f25c07cd481a0868ecd9e391c /scripts | |
parent | eb8a4fe0dc5db5f586ae26d04aa132c76535b27c (diff) | |
download | u-boot-imx-e19db555b4ac79dafa04cc5ff98bdbff01e19388.zip u-boot-imx-e19db555b4ac79dafa04cc5ff98bdbff01e19388.tar.gz u-boot-imx-e19db555b4ac79dafa04cc5ff98bdbff01e19388.tar.bz2 |
Kbuild: introduce Makefile in arch/$ARCH/
Introduce a Makefile under arch/$ARCH/ and include it in the
top Makefile (similar to Linux kernel). This allows further
refactoringi like moving architecture-specific code out of global
makefiles, deprecating config variables (CPU, CPUDIR, SOC) or
deprecating arch/$ARCH/config.mk.
In contrary to Linux kernel, U-Boot defines the ARCH variable by
Kconfig, thus the arch Makefile can only included conditionally
after the top config.mk.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 1905446..ecf3037 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -34,6 +34,7 @@ SPL_BIN := u-boot-spl endif include $(srctree)/config.mk +include $(srctree)/arch/$(ARCH)/Makefile # Enable garbage collection of un-used sections for SPL KBUILD_CFLAGS += -ffunction-sections -fdata-sections @@ -45,21 +46,6 @@ cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) -ifdef CONFIG_SPL_START_S_PATH -START_PATH := $(CONFIG_SPL_START_S_PATH:"%"=%) -else -START_PATH := $(CPUDIR) -endif - -head-y := $(START_PATH)/start.o -head-$(CONFIG_X86) += $(START_PATH)/start16.o $(START_PATH)/resetvec.o -head-$(CONFIG_4xx) += $(START_PATH)/resetvec.o -head-$(CONFIG_MPC85xx) += $(START_PATH)/resetvec.o - -libs-y += arch/$(ARCH)/lib/ - -libs-y += $(CPUDIR)/ - libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ @@ -94,13 +80,6 @@ libs-$(CONFIG_SPL_USB_HOST_SUPPORT) += drivers/usb/host/ libs-$(CONFIG_OMAP_USB_PHY) += drivers/usb/phy/ libs-$(CONFIG_SPL_SATA_SUPPORT) += drivers/block/ -ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) -libs-y += arch/$(ARCH)/imx-common/ -endif - -libs-$(CONFIG_ARM) += arch/arm/cpu/ -libs-$(CONFIG_PPC) += arch/powerpc/cpu/ - head-y := $(addprefix $(obj)/,$(head-y)) libs-y := $(addprefix $(obj)/,$(libs-y)) u-boot-spl-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) |