blob: fe91eda98a94bd1f4266e0cac8f8129bba57d874 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# arch/arm26/Makefile
3#
Paul Smith4f193362006-03-05 17:14:10 -05004# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies.
6#
Linus Torvalds1da177e2005-04-16 15:20:36 -07007# This file is subject to the terms and conditions of the GNU General Public
8# License. See the file "COPYING" in the main directory of this archive
9# for more details.
10#
11# Copyright (C) 1995-2001 by Russell King
12# Copyright (c) 2004 Ian Molton
13
14LDFLAGS_vmlinux :=-p -X
15CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
16OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
17GZFLAGS :=-9
18
19ifeq ($(CONFIG_FRAME_POINTER),y)
20CFLAGS +=-fno-omit-frame-pointer -mno-sched-prolog
21endif
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
24CFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
25AFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float
26
27ifeq ($(CONFIG_XIP_KERNEL),y)
28 TEXTADDR := 0x03880000
29 DATAADDR := 0x02080000
30else
31 TEXTADDR := 0x02080000
32 DATAADDR := .
33endif
34
35head-y := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o
36
37ifeq ($(incdir-y),)
38incdir-y :=
39endif
40INCDIR :=
41
42export MACHINE TEXTADDR GZFLAGS CFLAGS_BOOT
43
44# If we have a machine-specific directory, then include it in the build.
45core-y += arch/arm26/kernel/ arch/arm26/mm/ arch/arm26/machine/
46core-$(CONFIG_FPE_NWFPE) += arch/arm26/nwfpe/
47
48libs-y += arch/arm26/lib/
49
50# Default target when executing plain make
51all: zImage
52
53boot := arch/arm26/boot
54
Paul Smith4f193362006-03-05 17:14:10 -050055PHONY += maketools FORCE
Linus Torvalds1da177e2005-04-16 15:20:36 -070056maketools: FORCE
Paul Smith4f193362006-03-05 17:14:10 -050057
Linus Torvalds1da177e2005-04-16 15:20:36 -070058
59# Convert bzImage to zImage
60bzImage: vmlinux
61 $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
62
63zImage Image bootpImage xipImage: vmlinux
64 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
65
66zinstall install: vmlinux
67 $(Q)$(MAKE) $(build)=$(boot) $@
68
69# We use MRPROPER_FILES and CLEAN_FILES now
70archclean:
71 $(Q)$(MAKE) $(clean)=$(boot)
72
73# My testing targets (that short circuit a few dependencies)
74zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
75Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
76bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
77i:; $(Q)$(MAKE) $(build)=$(boot) install
78zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
79
80#
81# Configuration targets. Use these to select a
82# configuration for your architecture
83%_config:
84 @( \
85 CFG=$(@:_config=); \
86 if [ -f arch/arm26/def-configs/$$CFG ]; then \
87 [ -f .config ] && mv -f .config .config.old; \
88 cp arch/arm26/def-configs/$$CFG .config; \
89 echo "*** Default configuration for $$CFG installed"; \
90 echo "*** Next, you may run 'make oldconfig'"; \
91 else \
92 echo "$$CFG does not exist"; \
93 fi; \
94 )
95
Linus Torvalds1da177e2005-04-16 15:20:36 -070096define archhelp
97 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
98 echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
99 echo ' bootpImage - Combined zImage and initial RAM disk'
100 echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
101 echo ' initrd - Create an initial image'
102 echo ' install - Install uncompressed kernel'
103 echo ' zinstall - Install compressed kernel'
104 echo ' Install using (your) ~/bin/installkernel or'
105 echo ' (distribution) /sbin/installkernel or'
106 echo ' install to $$(INSTALL_PATH) and run lilo'
107endef