Makefile 2.4 KB

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