Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. UBIFS_OPTS := -m 2048 -e 126KiB -c 2048
  13. endif
  14. ifeq ($(SUBTARGET),sama5)
  15. include ./sama5.mk
  16. ifeq ($(TARGET_DEVICES),at91-sama5d4_xplained)
  17. UBIFS_OPTS := -e 0x3e000 -c 2082 -m 0x1000 -x lzo
  18. UBINIZE_OPTS := -m 0x1000 -p 0x40000
  19. else
  20. UBIFS_OPTS := -m 2048 -e 124KiB -c 2048
  21. endif
  22. endif
  23. define Device/Default
  24. PROFILES := Default
  25. FILESYSTEMS := squashfs ubifs
  26. DEVICE_DTS := $(1)
  27. KERNEL_NAME := zImage
  28. KERNEL_SIZE := 4096k
  29. KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
  30. BLOCKSIZE := 128k
  31. PAGESIZE := 2048
  32. SUBPAGESIZE := 512
  33. DTB_SIZE :=
  34. endef
  35. define Device/dtb
  36. KERNEL := kernel-bin | lzma | uImage lzma
  37. endef
  38. define Device/evaluation
  39. KERNEL_INSTALL := 1
  40. KERNEL_SUFFIX := -uImage
  41. IMAGES := root.ubi
  42. IMAGE/root.ubi := append-ubi
  43. endef
  44. define Device/evaluation-zImage
  45. IMAGES += zImage
  46. IMAGE/zImage := install-zImage
  47. endef
  48. define Device/evaluation-dtb
  49. $(Device/evaluation)
  50. $(Device/dtb)
  51. $(Device/evaluation-zImage)
  52. IMAGES += dtb
  53. IMAGE/dtb := install-dtb
  54. endef
  55. define Device/production
  56. UBINIZE_OPTS := -E 5
  57. IMAGES := factory.bin
  58. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
  59. endef
  60. define Device/production-dtb
  61. $(Device/production)
  62. $(Device/dtb)
  63. DTB_SIZE := 128k
  64. IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
  65. | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
  66. endef
  67. $(eval $(call BuildImage))