2011-07-18 07:48:07 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2000-2011
|
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
|
|
|
# (C) Copyright 2011
|
|
|
|
# Daniel Schwierzeck, daniel.schwierzeck@googlemail.com.
|
|
|
|
#
|
|
|
|
# (C) Copyright 2011
|
|
|
|
# Texas Instruments Incorporated - http://www.ti.com/
|
|
|
|
# Aneesh V <aneesh@ti.com>
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2011-07-18 07:48:07 +00:00
|
|
|
#
|
|
|
|
# Based on top-level Makefile.
|
|
|
|
#
|
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
src := $(obj)
|
|
|
|
|
|
|
|
# Create output directory if not already present
|
|
|
|
_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
|
|
|
|
|
2014-02-04 08:24:18 +00:00
|
|
|
include $(srctree)/scripts/Kbuild.include
|
|
|
|
|
2011-07-18 07:48:07 +00:00
|
|
|
CONFIG_SPL_BUILD := y
|
|
|
|
export CONFIG_SPL_BUILD
|
|
|
|
|
2014-02-04 08:24:22 +00:00
|
|
|
KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
|
|
|
|
ifeq ($(CONFIG_TPL_BUILD),y)
|
|
|
|
KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Enable garbage collection of un-used sections for SPL
|
|
|
|
KBUILD_CFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
LDFLAGS_FINAL += --gc-sections
|
|
|
|
|
2013-08-16 07:16:15 +00:00
|
|
|
ifeq ($(CONFIG_TPL_BUILD),y)
|
|
|
|
export CONFIG_TPL_BUILD
|
|
|
|
SPL_BIN := u-boot-tpl
|
|
|
|
else
|
|
|
|
SPL_BIN := u-boot-spl
|
|
|
|
endif
|
|
|
|
|
2011-07-18 07:48:07 +00:00
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2012-08-14 01:44:29 +00:00
|
|
|
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n)
|
2011-07-18 07:48:07 +00:00
|
|
|
|
2011-09-11 17:56:19 +00:00
|
|
|
ifdef CONFIG_SPL_START_S_PATH
|
2013-12-05 06:08:31 +00:00
|
|
|
START_PATH := $(CONFIG_SPL_START_S_PATH:"%"=%)
|
2011-09-11 17:56:19 +00:00
|
|
|
else
|
|
|
|
START_PATH := $(CPUDIR)
|
|
|
|
endif
|
|
|
|
|
2013-11-28 03:09:59 +00:00
|
|
|
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
|
2011-07-18 07:48:07 +00:00
|
|
|
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-y += arch/$(ARCH)/lib/
|
2012-09-19 22:56:39 +00:00
|
|
|
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-y += $(CPUDIR)/
|
2012-09-19 22:56:39 +00:00
|
|
|
|
2011-07-18 07:48:07 +00:00
|
|
|
ifdef SOC
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-y += $(CPUDIR)/$(SOC)/
|
|
|
|
endif
|
|
|
|
LIBS-y += board/$(BOARDDIR)/
|
|
|
|
LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
|
|
|
|
|
|
|
|
LIBS-$(CONFIG_SPL_FRAMEWORK) += common/spl/
|
|
|
|
LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/
|
|
|
|
LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
|
|
|
|
LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/
|
|
|
|
LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/
|
|
|
|
LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/
|
2013-09-30 16:22:09 +00:00
|
|
|
LIBS-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += drivers/ddr/fsl/
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/
|
|
|
|
LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/
|
|
|
|
LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/
|
2013-11-11 05:36:09 +00:00
|
|
|
LIBS-y += fs/
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
|
|
|
|
LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \
|
|
|
|
drivers/power/pmic/
|
2013-11-28 03:22:17 +00:00
|
|
|
LIBS-$(if $(CONFIG_CMD_NAND),$(CONFIG_SPL_NAND_SUPPORT)) += drivers/mtd/nand/
|
2014-01-10 02:10:58 +00:00
|
|
|
LIBS-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += drivers/misc/
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/
|
|
|
|
LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/
|
|
|
|
LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
|
|
|
|
LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/
|
|
|
|
LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/
|
|
|
|
LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/
|
|
|
|
LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/
|
|
|
|
LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/
|
|
|
|
LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/
|
|
|
|
LIBS-$(CONFIG_SPL_WATCHDOG_SUPPORT) += drivers/watchdog/
|
2014-01-16 17:23:30 +00:00
|
|
|
LIBS-$(CONFIG_SPL_USB_HOST_SUPPORT) += drivers/usb/host/
|
|
|
|
LIBS-$(CONFIG_OMAP_USB_PHY) += drivers/usb/phy/
|
2014-02-03 12:59:01 +00:00
|
|
|
LIBS-$(CONFIG_SPL_SATA_SUPPORT) += drivers/block/
|
2011-07-13 05:11:08 +00:00
|
|
|
|
2013-12-11 01:00:08 +00:00
|
|
|
ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-y += arch/$(ARCH)/imx-common/
|
2013-04-21 05:52:25 +00:00
|
|
|
endif
|
|
|
|
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-$(CONFIG_ARM) += arch/arm/cpu/
|
|
|
|
LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/
|
2012-08-31 08:30:01 +00:00
|
|
|
|
2013-11-11 05:36:00 +00:00
|
|
|
LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y))
|
|
|
|
|
2012-08-31 08:30:14 +00:00
|
|
|
# Add GCC lib
|
|
|
|
ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a
|
2012-08-31 08:30:14 +00:00
|
|
|
endif
|
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
LIBS-y := $(sort $(LIBS-y))
|
|
|
|
|
|
|
|
__START := $(head-y)
|
|
|
|
__LIBS := $(LIBS-y)
|
2011-07-18 07:48:07 +00:00
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
START := $(addprefix $(obj)/,$(head-y))
|
|
|
|
LIBS := $(addprefix $(obj)/,$(LIBS-y))
|
2011-07-18 07:48:07 +00:00
|
|
|
|
|
|
|
# Linker Script
|
|
|
|
ifdef CONFIG_SPL_LDSCRIPT
|
|
|
|
# need to strip off double quotes
|
2013-12-05 06:08:31 +00:00
|
|
|
LDSCRIPT := $(addprefix $(SRCTREE)/,$(CONFIG_SPL_LDSCRIPT:"%"=%))
|
2011-07-18 07:48:07 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(wildcard $(LDSCRIPT)),)
|
|
|
|
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-spl.lds
|
|
|
|
endif
|
|
|
|
ifeq ($(wildcard $(LDSCRIPT)),)
|
|
|
|
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds
|
|
|
|
endif
|
2011-11-21 10:49:37 +00:00
|
|
|
ifeq ($(wildcard $(LDSCRIPT)),)
|
2013-02-25 00:58:58 +00:00
|
|
|
LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot-spl.lds
|
2011-11-21 10:49:37 +00:00
|
|
|
endif
|
2011-07-18 07:48:07 +00:00
|
|
|
ifeq ($(wildcard $(LDSCRIPT)),)
|
|
|
|
$(error could not find linker script)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Special flags for CPP when processing the linker script.
|
|
|
|
# Pass the version down so we can handle backwards compatibility
|
|
|
|
# on the fly.
|
|
|
|
LDPPFLAGS += \
|
|
|
|
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
|
|
|
|
-include $(OBJTREE)/include/config.h \
|
2011-11-21 10:49:40 +00:00
|
|
|
-DCPUDIR=$(CPUDIR) \
|
2011-07-18 07:48:07 +00:00
|
|
|
$(shell $(LD) --version | \
|
|
|
|
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
|
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
$(OBJTREE)/MLO: $(obj)/u-boot-spl.bin
|
2011-07-21 13:10:30 +00:00
|
|
|
$(OBJTREE)/tools/mkimage -T omapimage \
|
|
|
|
-a $(CONFIG_SPL_TEXT_BASE) -d $< $@
|
2012-10-16 13:06:06 +00:00
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
$(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin
|
2012-10-16 13:06:06 +00:00
|
|
|
$(OBJTREE)/tools/mkimage -T omapimage -n byteswap \
|
2012-01-09 20:38:59 +00:00
|
|
|
-a $(CONFIG_SPL_TEXT_BASE) -d $< $@
|
2011-07-21 13:10:30 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
$(objtree)/SPL : $(obj)/u-boot-spl.bin
|
2014-02-04 08:24:24 +00:00
|
|
|
$(MAKE) $(build)=spl/arch/arm/imx-common $@
|
2012-10-10 21:11:44 +00:00
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
ALL-y += $(obj)/$(SPL_BIN).bin
|
2011-07-18 07:48:07 +00:00
|
|
|
|
2011-08-18 22:37:20 +00:00
|
|
|
ifdef CONFIG_SAMSUNG
|
2014-02-04 08:24:24 +00:00
|
|
|
ALL-y += $(obj)/$(BOARD)-spl.bin
|
2011-08-18 22:37:20 +00:00
|
|
|
endif
|
|
|
|
|
2011-07-18 07:48:07 +00:00
|
|
|
all: $(ALL-y)
|
|
|
|
|
2011-08-18 22:37:20 +00:00
|
|
|
ifdef CONFIG_SAMSUNG
|
2013-12-26 04:14:27 +00:00
|
|
|
ifdef CONFIG_VAR_SIZE_SPL
|
|
|
|
VAR_SIZE_PARAM = --vs
|
|
|
|
else
|
|
|
|
VAR_SIZE_PARAM =
|
|
|
|
endif
|
2014-02-04 08:24:24 +00:00
|
|
|
$(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin
|
2014-02-04 08:24:11 +00:00
|
|
|
$(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\
|
|
|
|
$(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\
|
2014-02-04 08:24:10 +00:00
|
|
|
$(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@
|
2011-08-18 22:37:20 +00:00
|
|
|
endif
|
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)
|
2014-01-13 13:57:05 +00:00
|
|
|
$(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $< $@
|
2011-07-18 07:48:07 +00:00
|
|
|
|
2014-02-04 08:24:24 +00:00
|
|
|
LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
|
2014-02-04 08:24:22 +00:00
|
|
|
ifneq ($(CONFIG_SPL_TEXT_BASE),)
|
|
|
|
LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE)
|
|
|
|
endif
|
|
|
|
|
2011-07-18 07:48:07 +00:00
|
|
|
GEN_UBOOT = \
|
2012-08-08 16:24:13 +00:00
|
|
|
cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \
|
2011-07-18 07:48:07 +00:00
|
|
|
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
|
2013-08-16 07:16:15 +00:00
|
|
|
-Map $(SPL_BIN).map -o $(SPL_BIN)
|
2011-07-18 07:48:07 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
$(obj)/$(SPL_BIN): $(START) $(LIBS) $(obj)/u-boot-spl.lds
|
2011-07-18 07:48:07 +00:00
|
|
|
$(GEN_UBOOT)
|
|
|
|
|
2013-10-21 02:53:41 +00:00
|
|
|
$(START):
|
|
|
|
@:
|
2011-07-18 07:48:07 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
$(LIBS):
|
|
|
|
$(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@))
|
2011-07-18 07:48:07 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
# FIX ME
|
|
|
|
cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
|
2011-07-18 07:48:07 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
$(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE
|
|
|
|
$(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
|
2011-07-18 07:48:07 +00:00
|
|
|
|
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-04 08:24:28 +00:00
|
|
|
PHONY += FORCE
|
|
|
|
FORCE:
|
|
|
|
|
|
|
|
# Declare the contents of the .PHONY variable as phony. We keep that
|
|
|
|
# information in a variable so we can use it in if_changed and friends.
|
|
|
|
.PHONY: $(PHONY)
|