diff options
author | Chris Zankel <czankel@tensilica.com> | 2005-06-24 01:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:05:21 -0400 |
commit | 8e1a6dd2fddcc73c9e933758361e3d9c076c688a (patch) | |
tree | 30d6c0cdc7f21d1357917517351a1c259f3eba4b /arch/xtensa/Makefile | |
parent | 48b415ca13bac91f83db3b9d362fd5ae0ce275cb (diff) |
[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 1
The attached patches provides part 1 of an architecture implementation for the
Tensilica Xtensa CPU series.
Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r-- | arch/xtensa/Makefile | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile new file mode 100644 index 00000000000..4fa27453b1f --- /dev/null +++ b/arch/xtensa/Makefile | |||
@@ -0,0 +1,102 @@ | |||
1 | # | ||
2 | # This file is subject to the terms and conditions of the GNU General Public | ||
3 | # License. See the file "COPYING" in the main directory of this archive | ||
4 | # for more details. | ||
5 | # | ||
6 | # Copyright (C) 2001 - 2005 Tensilica Inc. | ||
7 | # | ||
8 | # This file is included by the global makefile so that you can add your own | ||
9 | # architecture-specific flags and dependencies. Remember to do have actions | ||
10 | # for "archclean" and "archdep" for cleaning up and making dependencies for | ||
11 | # this architecture | ||
12 | |||
13 | # Core configuration. | ||
14 | # (Use CPU=<xtensa_config> to use another default compiler.) | ||
15 | |||
16 | cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be | ||
17 | cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom | ||
18 | |||
19 | CPU = $(cpu-y) | ||
20 | export CPU | ||
21 | |||
22 | # Platform configuration | ||
23 | |||
24 | platform-y := common | ||
25 | platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 | ||
26 | platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | ||
27 | |||
28 | PLATFORM = $(platform-y) | ||
29 | export PLATFORM | ||
30 | |||
31 | #LDFLAGS_vmlinux := -T$(word 1,$(LINKSCRIPT)) | ||
32 | AFLAGS_vmlinux.lds.o := -Uxtensa | ||
33 | CPPFLAGS += -Iarch/xtensa -Iinclude/asm -mlongcalls -g | ||
34 | AFLAGS += -Iarch/xtensa -Iinclude/asm | ||
35 | CPP = $(CC) -E $(CFLAGS) | ||
36 | |||
37 | cflags-y += -Iarch/xtensa -pipe -mlongcalls | ||
38 | |||
39 | |||
40 | KBUILD_DEFCONFIG := common_defconfig | ||
41 | |||
42 | # ramdisk/initrd support | ||
43 | # You need a compressed ramdisk image, named ramdisk.gz in | ||
44 | # arch/xtensa/boot/ramdisk | ||
45 | |||
46 | core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | ||
47 | |||
48 | # Test for cross compiling | ||
49 | |||
50 | ifneq ($(CPU),) | ||
51 | COMPILE_ARCH = $(shell uname -m) | ||
52 | |||
53 | ifneq ($(COMPILE_ARCH), xtensa) | ||
54 | ifndef CROSS_COMPILE | ||
55 | CROSS_COMPILE = xtensa_$(CPU)- | ||
56 | endif | ||
57 | endif | ||
58 | endif | ||
59 | |||
60 | # | ||
61 | |||
62 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | ||
63 | |||
64 | head-y := arch/xtensa/kernel/head.o | ||
65 | core-y += arch/xtensa/kernel/ \ | ||
66 | arch/xtensa/mm/ arch/xtensa/platform-$(PLATFORM)/ | ||
67 | libs-y += arch/xtensa/lib/ $(LIBGCC) | ||
68 | |||
69 | boot := arch/xtensa/boot | ||
70 | |||
71 | arch/xtensa/kernel/asm-offsets.s: \ | ||
72 | arch/xtensa/kernel/asm-offsets.c \ | ||
73 | include/asm-xtensa/.platform | ||
74 | |||
75 | include/asm-xtensa/offsets.h: arch/xtensa/kernel/asm-offsets.s | ||
76 | $(call filechk,gen-asm-offsets) | ||
77 | |||
78 | prepare: include/asm-xtensa/.platform include/asm-xtensa/offsets.h | ||
79 | |||
80 | # Update machine cpu and platform symlinks if something which affects | ||
81 | # them changed. | ||
82 | |||
83 | include/asm-xtensa/.platform: $(wildcard include/config/arch/*.h) | ||
84 | @echo ' Setting up cpu ($(CPU)) and platform ($(PLATFORM)) symlinks' | ||
85 | $(Q)rm -f include/asm-xtensa/platform | ||
86 | $(Q)rm -f include/asm-xtensa/xtensa/config | ||
87 | $(Q)(cd include/asm-xtensa/; ln -sf platform-$(PLATFORM) platform) | ||
88 | $(Q)(cd include/asm-xtensa/xtensa; ln -sf config-$(CPU) config) | ||
89 | |||
90 | all: zImage | ||
91 | |||
92 | bzImage : zImage | ||
93 | |||
94 | zImage zImage.initrd: vmlinux | ||
95 | $(Q)$(MAKE) $(build)=$(boot) $@ | ||
96 | |||
97 | CLEAN_FILES += arch/xtensa/vmlinux.lds include/asm-xtensa/offset.h | ||
98 | |||
99 | define archhelp | ||
100 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' | ||
101 | endef | ||
102 | |||