Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # linux/arch/sh64/boot/compressed/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) 2002 Stuart Menefy
  9. # Copyright (C) 2004 Paul Mundt
  10. #
  11. # create a compressed vmlinux image from the original vmlinux
  12. #
  13. targets := vmlinux vmlinux.bin vmlinux.bin.gz \
  14. head.o misc.o cache.o piggy.o vmlinux.lds
  15. EXTRA_AFLAGS := -traditional
  16. OBJECTS := $(obj)/head.o $(obj)/misc.o $(obj)/cache.o
  17. #
  18. # ZIMAGE_OFFSET is the load offset of the compression loader
  19. # (4M for the kernel plus 64K for this loader)
  20. #
  21. ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
  22. LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
  23. -T $(obj)/../../kernel/vmlinux.lds \
  24. --no-warn-mismatch
  25. $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
  26. $(call if_changed,ld)
  27. @:
  28. $(obj)/vmlinux.bin: vmlinux FORCE
  29. $(call if_changed,objcopy)
  30. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  31. $(call if_changed,gzip)
  32. LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
  33. OBJCOPYFLAGS += -R .empty_zero_page
  34. $(obj)/piggy.o: $(obj)/vmlinux.lds $(obj)/vmlinux.bin.gz FORCE
  35. $(call if_changed,ld)