Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # linux/arch/arm/boot/compressed/Makefile
  3. #
  4. # create a compressed vmlinuz image from the original vmlinux
  5. #
  6. HEAD = head.o
  7. OBJS = misc.o
  8. FONTC = drivers/video/console/font_acorn_8x8.c
  9. FONT = $(addprefix ../../../../drivers/video/console/, font_acorn_8x8.o)
  10. #
  11. # Architecture dependencies
  12. #
  13. ifeq ($(CONFIG_ARCH_ACORN),y)
  14. OBJS += ll_char_wr.o $(FONT)
  15. endif
  16. ifeq ($(CONFIG_ARCH_SHARK),y)
  17. OBJS += head-shark.o ofw-shark.o
  18. endif
  19. ifeq ($(CONFIG_ARCH_L7200),y)
  20. OBJS += head-l7200.o
  21. endif
  22. ifeq ($(CONFIG_ARCH_CLPS7500),y)
  23. HEAD = head-clps7500.o
  24. endif
  25. ifeq ($(CONFIG_ARCH_P720T),y)
  26. # Borrow this code from SA1100
  27. OBJS += head-sa1100.o
  28. endif
  29. ifeq ($(CONFIG_ARCH_SA1100),y)
  30. OBJS += head-sa1100.o
  31. endif
  32. ifeq ($(CONFIG_CPU_XSCALE),y)
  33. OBJS += head-xscale.o
  34. endif
  35. ifeq ($(CONFIG_PXA_SHARPSL),y)
  36. OBJS += head-sharpsl.o
  37. endif
  38. ifeq ($(CONFIG_ARCH_AT91RM9200),y)
  39. OBJS += head-at91rm9200.o
  40. endif
  41. ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
  42. OBJS += big-endian.o
  43. endif
  44. #
  45. # We now have a PIC decompressor implementation. Decompressors running
  46. # from RAM should not define ZTEXTADDR. Decompressors running directly
  47. # from ROM or Flash must define ZTEXTADDR (preferably via the config)
  48. # FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
  49. ifeq ($(CONFIG_ZBOOT_ROM),y)
  50. ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
  51. ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
  52. else
  53. ZTEXTADDR := 0
  54. ZBSSADDR := ALIGN(4)
  55. endif
  56. SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
  57. targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \
  58. head.o misc.o $(OBJS)
  59. EXTRA_CFLAGS := -fpic
  60. EXTRA_AFLAGS :=
  61. # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
  62. # linker symbols. We only define initrd_phys and params_phys if the
  63. # machine class defined the corresponding makefile variable.
  64. LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR)
  65. ifneq ($(INITRD_PHYS),)
  66. LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS)
  67. endif
  68. ifneq ($(PARAMS_PHYS),)
  69. LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
  70. endif
  71. LDFLAGS_vmlinux += -p --no-undefined -X \
  72. $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
  73. # Don't allow any static data in misc.o, which
  74. # would otherwise mess up our GOT table
  75. CFLAGS_misc.o := -Dstatic=
  76. $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
  77. $(addprefix $(obj)/, $(OBJS)) FORCE
  78. $(call if_changed,ld)
  79. @:
  80. $(obj)/piggy.gz: $(obj)/../Image FORCE
  81. $(call if_changed,gzip)
  82. $(obj)/piggy.o: $(obj)/piggy.gz FORCE
  83. CFLAGS_font_acorn_8x8.o := -Dstatic=
  84. $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
  85. @sed "$(SEDFLAGS)" < $< > $@
  86. $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c