Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #
  2. # Copyright (C) 2006-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/image.mk
  9. KERNEL_LOADADDR := 0x20008000
  10. ifeq ($(SUBTARGET),legacy)
  11. include ./legacy.mk
  12. endif
  13. ifeq ($(SUBTARGET),sama5)
  14. include ./sama5.mk
  15. endif
  16. define Device/Default
  17. $(Device/default-nand)
  18. PROFILES := Default
  19. FILESYSTEMS := squashfs ubifs
  20. DEVICE_DTS := $(1)
  21. KERNEL_NAME := zImage
  22. KERNEL_SIZE := 4096k
  23. KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
  24. DTB_SIZE := 128k
  25. endef
  26. define Device/dtb
  27. KERNEL := kernel-bin | lzma | uImage lzma
  28. endef
  29. define Device/evaluation
  30. KERNEL_INSTALL := 1
  31. KERNEL_SUFFIX := -uImage
  32. IMAGES := root.ubi
  33. IMAGE/root.ubi := append-ubi
  34. endef
  35. define Device/evaluation-zImage
  36. IMAGES += zImage
  37. IMAGE/zImage := install-zImage
  38. endef
  39. define Device/evaluation-dtb
  40. $(Device/evaluation)
  41. $(Device/dtb)
  42. $(Device/evaluation-zImage)
  43. IMAGES += dtb
  44. IMAGE/dtb := install-dtb
  45. endef
  46. define Device/evaluation-fit
  47. $(Device/evaluation)
  48. KERNEL_SUFFIX := -fit-uImage.itb
  49. KERNEL := kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
  50. endef
  51. define Device/production
  52. UBINIZE_OPTS := -E 5
  53. IMAGES := factory.bin
  54. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
  55. endef
  56. define Device/production-dtb
  57. $(Device/production)
  58. $(Device/dtb)
  59. IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
  60. | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
  61. endef
  62. $(eval $(call BuildImage))