Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #
  10. # IMAGE_OFFSET is the load offset of the compression loader
  11. # Assign dummy values if these 2 variables are not defined,
  12. # in order to suppress error message.
  13. #
  14. CONFIG_MEMORY_START ?= 0x00400000
  15. CONFIG_BOOT_LINK_OFFSET ?= 0x00140000
  16. IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
  17. LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds
  18. $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
  19. $(call if_changed,ld)
  20. @:
  21. $(obj)/vmlinux.bin: vmlinux FORCE
  22. $(call if_changed,objcopy)
  23. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  24. $(call if_changed,gzip)
  25. LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300 -T
  26. OBJCOPYFLAGS := -O binary
  27. $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
  28. $(call if_changed,ld)