Linux-2.6.12-rc2
[safe/jmp/linux-2.6] / arch / arm26 / boot / Makefile
1 #
2 # arch/arm26/boot/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 # Copyright (C) 1995-2002 Russell King
9 #
10
11 # Note: the following conditions must always be true:
12 #   ZRELADDR == virt_to_phys(TEXTADDR)
13 #   PARAMS_PHYS must be with 4MB of ZRELADDR
14 #   INITRD_PHYS must be in RAM
15
16    zreladdr-y           := 0x02080000 
17 params_phys-y           := 0x0207c000
18 initrd_phys-y           := 0x02180000
19
20 ZRELADDR    := 0x02080000
21 ZTEXTADDR   := 0x0207c000
22 PARAMS_PHYS := $(params_phys-y)
23 INITRD_PHYS := 0x02180000
24
25 # We now have a PIC decompressor implementation.  Decompressors running
26 # from RAM should not define ZTEXTADDR.  Decompressors running directly
27 # from ROM or Flash must define ZTEXTADDR (preferably via the config)
28 # FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
29 ifeq ($(CONFIG_ZBOOT_ROM),y)
30 ZTEXTADDR       := $(CONFIG_ZBOOT_ROM_TEXT)
31 ZBSSADDR        := $(CONFIG_ZBOOT_ROM_BSS)
32 else
33 ZTEXTADDR       := 0
34 ZBSSADDR        := ALIGN(4)
35 endif
36
37 export  ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS
38
39 targets := Image zImage bootpImage xipImage
40
41 $(obj)/Image: vmlinux FORCE
42         $(call if_changed,objcopy)
43         @echo '  Kernel: $@ is ready'
44
45 $(obj)/zImage:  $(obj)/compressed/vmlinux FORCE
46         $(call if_changed,objcopy)
47         @echo '  Kernel: $@ is ready'
48
49 $(obj)/compressed/vmlinux: vmlinux FORCE
50         $(Q)$(MAKE) $(build)=$(obj)/compressed $@
51
52 ifeq ($(CONFIG_XIP_KERNEL),y)
53 $(obj)/xipImage: vmlinux FORCE
54 #       $(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
55 # FIXME - where has .pci_fixup crept in from?
56         $(OBJCOPY) -S -O binary -R .data -R .pci_fixup -R .comment vmlinux vmlinux-text.bin
57         $(OBJCOPY) -S -O binary -R .init -R .text -R __ex_table -R .pci_fixup -R __ksymtab -R __ksymtab_gpl -R __kcrctab -R __kcrctab_gpl -R __param -R .comment vmlinux vmlinux-data.bin
58         cat vmlinux-text.bin vmlinux-data.bin > $@
59         $(RM) -f vmlinux-text.bin vmlinux-data.bin
60         @echo '  Kernel: $@ is ready'
61 endif
62
63 .PHONY: initrd
64 initrd:
65         @test "$(INITRD_PHYS)" != "" || \
66         (echo This machine does not support INITRD; exit -1)
67         @test "$(INITRD)" != "" || \
68         (echo You must specify INITRD; exit -1)
69
70 install: $(obj)/Image
71         $(CONFIG_SHELL) $(obj)/install.sh \
72         $(KERNELRELEASE) \
73         $(obj)/Image System.map "$(INSTALL_PATH)"
74
75 zinstall: $(obj)/zImage
76         $(CONFIG_SHELL) $(obj)/install.sh \
77         $(KERNELRELEASE) \
78         $(obj)/zImage System.map "$(INSTALL_PATH)"
79
80 subdir-     := compressed