linux/arch/blackfin/Makefile
<<
>>
Prefs
   1#
   2# arch/blackfin/Makefile
   3#
   4# This file is subject to the terms and conditions of the GNU General Public
   5# License.  See the file "COPYING" in the main directory of this archive
   6# for more details.
   7#
   8
   9ifeq ($(CROSS_COMPILE),)
  10CROSS_COMPILE    := bfin-uclinux-
  11endif
  12LDFLAGS_vmlinux  := -X
  13OBJCOPYFLAGS     := -O binary -R .note -R .comment -S
  14GZFLAGS          := -9
  15
  16KBUILD_CFLAGS           += $(call cc-option,-mno-fdpic)
  17KBUILD_AFLAGS           += $(call cc-option,-mno-fdpic)
  18CFLAGS_MODULE    += -mlong-calls
  19KALLSYMS         += --symbol-prefix=_
  20
  21KBUILD_DEFCONFIG := BF537-STAMP_defconfig
  22
  23# setup the machine name and the machine dependent settings
  24machine-$(CONFIG_BF522) := bf527
  25machine-$(CONFIG_BF523) := bf527
  26machine-$(CONFIG_BF524) := bf527
  27machine-$(CONFIG_BF525) := bf527
  28machine-$(CONFIG_BF526) := bf527
  29machine-$(CONFIG_BF527) := bf527
  30machine-$(CONFIG_BF531) := bf533
  31machine-$(CONFIG_BF532) := bf533
  32machine-$(CONFIG_BF533) := bf533
  33machine-$(CONFIG_BF534) := bf537
  34machine-$(CONFIG_BF536) := bf537
  35machine-$(CONFIG_BF537) := bf537
  36machine-$(CONFIG_BF542) := bf548
  37machine-$(CONFIG_BF544) := bf548
  38machine-$(CONFIG_BF547) := bf548
  39machine-$(CONFIG_BF548) := bf548
  40machine-$(CONFIG_BF549) := bf548
  41machine-$(CONFIG_BF561) := bf561
  42MACHINE := $(machine-y)
  43export MACHINE
  44
  45cpu-$(CONFIG_BF522) := bf522
  46cpu-$(CONFIG_BF523) := bf523
  47cpu-$(CONFIG_BF524) := bf524
  48cpu-$(CONFIG_BF525) := bf525
  49cpu-$(CONFIG_BF526) := bf526
  50cpu-$(CONFIG_BF527) := bf527
  51cpu-$(CONFIG_BF531) := bf531
  52cpu-$(CONFIG_BF532) := bf532
  53cpu-$(CONFIG_BF533) := bf533
  54cpu-$(CONFIG_BF534) := bf534
  55cpu-$(CONFIG_BF536) := bf536
  56cpu-$(CONFIG_BF537) := bf537
  57cpu-$(CONFIG_BF542) := bf542
  58cpu-$(CONFIG_BF544) := bf544
  59cpu-$(CONFIG_BF547) := bf547
  60cpu-$(CONFIG_BF548) := bf548
  61cpu-$(CONFIG_BF549) := bf549
  62cpu-$(CONFIG_BF561) := bf561
  63
  64rev-$(CONFIG_BF_REV_0_0)  := 0.0
  65rev-$(CONFIG_BF_REV_0_1)  := 0.1
  66rev-$(CONFIG_BF_REV_0_2)  := 0.2
  67rev-$(CONFIG_BF_REV_0_3)  := 0.3
  68rev-$(CONFIG_BF_REV_0_4)  := 0.4
  69rev-$(CONFIG_BF_REV_0_5)  := 0.5
  70rev-$(CONFIG_BF_REV_NONE) := none
  71rev-$(CONFIG_BF_REV_ANY)  := any
  72
  73KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  74KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  75
  76# - we utilize the silicon rev from the toolchain, so move it over to the checkflags
  77# - the l1_text attribute is Blackfin specific, so fake it out as used to kill warnings
  78CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }')
  79CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -Dl1_text=__used__
  80
  81head-y   := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
  82
  83core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
  84
  85# If we have a machine-specific directory, then include it in the build.
  86ifneq ($(machine-y),)
  87core-y   += arch/$(ARCH)/mach-$(MACHINE)/
  88core-y   += arch/$(ARCH)/mach-$(MACHINE)/boards/
  89endif
  90
  91ifeq ($(CONFIG_MPU),y)
  92core-y  += arch/$(ARCH)/kernel/cplb-mpu/
  93else
  94core-y  += arch/$(ARCH)/kernel/cplb-nompu/
  95endif
  96
  97libs-y   += arch/$(ARCH)/lib/
  98
  99drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
 100
 101machdirs        := $(patsubst %,arch/blackfin/mach-%/, $(machine-y))
 102
 103KBUILD_CFLAGS += -Iarch/$(ARCH)/include/
 104KBUILD_CFLAGS += -Iarch/$(ARCH)/mach-$(MACHINE)/include
 105
 106KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
 107
 108CLEAN_FILES += \
 109        arch/$(ARCH)/include/asm/asm-offsets.h \
 110        arch/$(ARCH)/kernel/asm-offsets.s \
 111
 112archclean:
 113        $(Q)$(MAKE) $(clean)=$(boot)
 114
 115INSTALL_PATH ?= /tftpboot
 116boot := arch/$(ARCH)/boot
 117BOOT_TARGETS = vmImage
 118PHONY += $(BOOT_TARGETS) install
 119KBUILD_IMAGE := $(boot)/vmImage
 120
 121all: vmImage
 122
 123$(BOOT_TARGETS): vmlinux
 124        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 125
 126install:
 127        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
 128
 129define archhelp
 130  echo  '* vmImage         - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
 131  echo  '  install         - Install kernel using'
 132  echo  '                     (your) ~/bin/$(CROSS_COMPILE)installkernel or'
 133  echo  '                     (distribution) PATH: $(CROSS_COMPILE)installkernel or'
 134  echo  '                     install to $$(INSTALL_PATH)'
 135endef
 136