Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 printf "0x%8x" $$[$(CONFIG_PAGE_OFFSET) + \
  29. $(CONFIG_MEMORY_START) + \
  30. $(CONFIG_ZERO_PAGE_OFFSET)+0x1000])
  31. quiet_cmd_uimage = UIMAGE $@
  32. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
  33. -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
  34. -n 'Linux-$(KERNELRELEASE)' -d $< $@
  35. $(obj)/uImage: $(obj)/zImage FORCE
  36. $(call if_changed,uimage)
  37. @echo ' Image $@ is ready'
  38. OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
  39. $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
  40. $(call if_changed,objcopy)
  41. OBJCOPYFLAGS_uImage.srec := -I binary -O srec
  42. $(obj)/uImage.srec: $(obj)/uImage
  43. $(call if_changed,objcopy)
  44. clean-files += uImage uImage.srec vmlinux.srec