Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # linux/arch/sh/boot/compressed/Makefile
  3. #
  4. # create a compressed vmlinux image from the original vmlinux
  5. #
  6. targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
  7. EXTRA_AFLAGS := -traditional
  8. OBJECTS = $(obj)/head.o $(obj)/misc.o
  9. ifdef CONFIG_SH_STANDARD_BIOS
  10. OBJECTS += $(obj)/../../kernel/sh_bios.o
  11. endif
  12. #
  13. # IMAGE_OFFSET is the load offset of the compression loader
  14. # Assign dummy values if these 2 variables are not defined,
  15. # in order to suppress error message.
  16. #
  17. CONFIG_MEMORY_START ?= 0x0c000000
  18. CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
  19. IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
  20. LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
  21. $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
  22. $(call if_changed,ld)
  23. @:
  24. $(obj)/vmlinux.bin: vmlinux FORCE
  25. $(call if_changed,objcopy)
  26. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  27. $(call if_changed,gzip)
  28. LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
  29. OBJCOPYFLAGS += -R .empty_zero_page
  30. $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
  31. $(call if_changed,ld)