Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # arch/sh/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) 1999 Stuart Menefy
  9. #
  10. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  11. #
  12. # Assign safe dummy values if these variables are not defined,
  13. # in order to suppress error message.
  14. #
  15. CONFIG_PAGE_OFFSET ?= 0x80000000
  16. CONFIG_MEMORY_START ?= 0x0c000000
  17. CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
  18. CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000
  19. export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
  20. CONFIG_ZERO_PAGE_OFFSET
  21. targets := zImage vmlinux.srec uImage uImage.srec
  22. subdir- := compressed
  23. $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
  24. $(call if_changed,objcopy)
  25. @echo ' Kernel: $@ is ready'
  26. $(obj)/compressed/vmlinux: FORCE
  27. $(Q)$(MAKE) $(build)=$(obj)/compressed $@
  28. KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%8x" \
  29. $$[$(CONFIG_PAGE_OFFSET) + \
  30. $(CONFIG_MEMORY_START) + \
  31. $(CONFIG_ZERO_PAGE_OFFSET)+0x1000]')
  32. quiet_cmd_uimage = UIMAGE $@
  33. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
  34. -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
  35. -n 'Linux-$(KERNELRELEASE)' -d $< $@
  36. $(obj)/uImage: $(obj)/zImage FORCE
  37. $(call if_changed,uimage)
  38. @echo ' Image $@ is ready'
  39. OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
  40. $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
  41. $(call if_changed,objcopy)
  42. OBJCOPYFLAGS_uImage.srec := -I binary -O srec
  43. $(obj)/uImage.srec: $(obj)/uImage
  44. $(call if_changed,objcopy)
  45. clean-files += uImage uImage.srec vmlinux.srec