Back to home page

LXR

 
 

    


0001 #
0002 # arch/blackfin/Makefile
0003 #
0004 # This file is subject to the terms and conditions of the GNU General Public
0005 # License.  See the file "COPYING" in the main directory of this archive
0006 # for more details.
0007 #
0008 
0009 ifeq ($(CROSS_COMPILE),)
0010 CROSS_COMPILE    := bfin-uclinux-
0011 endif
0012 LDFLAGS_vmlinux  := -X
0013 OBJCOPYFLAGS     := -O binary -R .note -R .comment -S
0014 GZFLAGS          := -9
0015 
0016 KBUILD_CFLAGS           += $(call cc-option,-mno-fdpic)
0017 ifeq ($(CONFIG_ROMKERNEL),y)
0018 KBUILD_CFLAGS           += -mlong-calls
0019 endif
0020 KBUILD_AFLAGS           += $(call cc-option,-mno-fdpic)
0021 KBUILD_CFLAGS_MODULE    += -mlong-calls
0022 LDFLAGS                 += -m elf32bfin
0023 
0024 KBUILD_DEFCONFIG := BF537-STAMP_defconfig
0025 
0026 # setup the machine name and the machine dependent settings
0027 machine-$(CONFIG_BF512)  := bf518
0028 machine-$(CONFIG_BF514)  := bf518
0029 machine-$(CONFIG_BF516)  := bf518
0030 machine-$(CONFIG_BF518)  := bf518
0031 machine-$(CONFIG_BF522)  := bf527
0032 machine-$(CONFIG_BF523)  := bf527
0033 machine-$(CONFIG_BF524)  := bf527
0034 machine-$(CONFIG_BF525)  := bf527
0035 machine-$(CONFIG_BF526)  := bf527
0036 machine-$(CONFIG_BF527)  := bf527
0037 machine-$(CONFIG_BF531)  := bf533
0038 machine-$(CONFIG_BF532)  := bf533
0039 machine-$(CONFIG_BF533)  := bf533
0040 machine-$(CONFIG_BF534)  := bf537
0041 machine-$(CONFIG_BF536)  := bf537
0042 machine-$(CONFIG_BF537)  := bf537
0043 machine-$(CONFIG_BF538)  := bf538
0044 machine-$(CONFIG_BF539)  := bf538
0045 machine-$(CONFIG_BF542)  := bf548
0046 machine-$(CONFIG_BF542M) := bf548
0047 machine-$(CONFIG_BF544)  := bf548
0048 machine-$(CONFIG_BF544M) := bf548
0049 machine-$(CONFIG_BF547)  := bf548
0050 machine-$(CONFIG_BF547M) := bf548
0051 machine-$(CONFIG_BF548)  := bf548
0052 machine-$(CONFIG_BF548M) := bf548
0053 machine-$(CONFIG_BF549)  := bf548
0054 machine-$(CONFIG_BF549M) := bf548
0055 machine-$(CONFIG_BF561)  := bf561
0056 machine-$(CONFIG_BF609)  := bf609
0057 MACHINE := $(machine-y)
0058 export MACHINE
0059 
0060 cpu-$(CONFIG_BF512)  := bf512
0061 cpu-$(CONFIG_BF514)  := bf514
0062 cpu-$(CONFIG_BF516)  := bf516
0063 cpu-$(CONFIG_BF518)  := bf518
0064 cpu-$(CONFIG_BF522)  := bf522
0065 cpu-$(CONFIG_BF523)  := bf523
0066 cpu-$(CONFIG_BF524)  := bf524
0067 cpu-$(CONFIG_BF525)  := bf525
0068 cpu-$(CONFIG_BF526)  := bf526
0069 cpu-$(CONFIG_BF527)  := bf527
0070 cpu-$(CONFIG_BF531)  := bf531
0071 cpu-$(CONFIG_BF532)  := bf532
0072 cpu-$(CONFIG_BF533)  := bf533
0073 cpu-$(CONFIG_BF534)  := bf534
0074 cpu-$(CONFIG_BF536)  := bf536
0075 cpu-$(CONFIG_BF537)  := bf537
0076 cpu-$(CONFIG_BF538)  := bf538
0077 cpu-$(CONFIG_BF539)  := bf539
0078 cpu-$(CONFIG_BF542)  := bf542
0079 cpu-$(CONFIG_BF542M) := bf542m
0080 cpu-$(CONFIG_BF544)  := bf544
0081 cpu-$(CONFIG_BF544M) := bf544m
0082 cpu-$(CONFIG_BF547)  := bf547
0083 cpu-$(CONFIG_BF547M) := bf547m
0084 cpu-$(CONFIG_BF548)  := bf548
0085 cpu-$(CONFIG_BF548M) := bf548m
0086 cpu-$(CONFIG_BF549)  := bf549
0087 cpu-$(CONFIG_BF549M) := bf549m
0088 cpu-$(CONFIG_BF561)  := bf561
0089 cpu-$(CONFIG_BF609)  := bf609
0090 
0091 rev-$(CONFIG_BF_REV_0_0)  := 0.0
0092 rev-$(CONFIG_BF_REV_0_1)  := 0.1
0093 rev-$(CONFIG_BF_REV_0_2)  := 0.2
0094 rev-$(CONFIG_BF_REV_0_3)  := 0.3
0095 rev-$(CONFIG_BF_REV_0_4)  := 0.4
0096 rev-$(CONFIG_BF_REV_0_5)  := 0.5
0097 rev-$(CONFIG_BF_REV_0_6)  := 0.6
0098 rev-$(CONFIG_BF_REV_NONE) := none
0099 rev-$(CONFIG_BF_REV_ANY)  := any
0100 
0101 CPU_REV := $(cpu-y)-$(rev-y)
0102 export CPU_REV
0103 
0104 KBUILD_CFLAGS += -mcpu=$(CPU_REV)
0105 KBUILD_AFLAGS += -mcpu=$(CPU_REV)
0106 
0107 # - we utilize the silicon rev from the toolchain, so move it over to the checkflags
0108 CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }')
0109 CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -D__bfin__
0110 
0111 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
0112 
0113 # If we have a machine-specific directory, then include it in the build.
0114 ifneq ($(machine-y),)
0115 core-y   += arch/$(ARCH)/mach-$(MACHINE)/
0116 core-y   += arch/$(ARCH)/mach-$(MACHINE)/boards/
0117 endif
0118 
0119 ifeq ($(CONFIG_MPU),y)
0120 core-y  += arch/$(ARCH)/kernel/cplb-mpu/
0121 else
0122 core-y  += arch/$(ARCH)/kernel/cplb-nompu/
0123 endif
0124 
0125 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
0126 
0127 libs-y   += arch/$(ARCH)/lib/
0128 
0129 machdirs        := $(patsubst %,arch/blackfin/mach-%/, $(machine-y))
0130 
0131 KBUILD_CFLAGS += -Iarch/$(ARCH)/include/
0132 KBUILD_CFLAGS += -Iarch/$(ARCH)/mach-$(MACHINE)/include
0133 
0134 KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
0135 
0136 CLEAN_FILES += \
0137         arch/$(ARCH)/kernel/asm-offsets.s \
0138 
0139 archclean:
0140         $(Q)$(MAKE) $(clean)=$(boot)
0141 
0142 INSTALL_PATH ?= /tftpboot
0143 boot := arch/$(ARCH)/boot
0144 BOOT_TARGETS = uImage uImage.bin uImage.bz2 uImage.gz uImage.lzma uImage.lzo uImage.xip
0145 PHONY += $(BOOT_TARGETS) install
0146 KBUILD_IMAGE := $(boot)/uImage
0147 
0148 all: uImage
0149 
0150 $(BOOT_TARGETS): vmlinux
0151         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
0152 
0153 install:
0154         $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
0155 
0156 define archhelp
0157   echo  '* vmImage         - Alias to selected kernel format (vmImage.gz by default)'
0158   echo  '  vmImage.bin     - Uncompressed Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bin)'
0159   echo  '  vmImage.bz2     - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bz2)'
0160   echo  '* vmImage.gz      - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
0161   echo  '  vmImage.lzma    - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
0162   echo  '  vmImage.lzo     - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzo)'
0163   echo  '  vmImage.xip     - XIP Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.xip)'
0164   echo  '  install         - Install kernel using'
0165   echo  '                     (your) ~/bin/$(INSTALLKERNEL) or'
0166   echo  '                     (distribution) PATH: $(INSTALLKERNEL) or'
0167   echo  '                     install to $$(INSTALL_PATH)'
0168 endef