at91bootstrap3.mk 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ################################################################################
  2. #
  3. # at91bootstrap3
  4. #
  5. ################################################################################
  6. AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
  7. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
  8. AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION))
  9. AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL)))
  10. AT91BOOTSTRAP3_SOURCE = $(notdir $(AT91BOOTSTRAP3_TARBALL))
  11. BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
  12. else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
  13. AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
  14. AT91BOOTSTRAP3_SITE_METHOD = git
  15. BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
  16. else
  17. AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
  18. endif
  19. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y)
  20. AT91BOOTSTRAP3_LICENSE = MIT
  21. AT91BOOTSTRAP3_LICENSE_FILES = LICENSES/MIT.txt
  22. else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X),y)
  23. AT91BOOTSTRAP3_LICENSE = Atmel License
  24. endif
  25. AT91BOOTSTRAP3_CPE_ID_VENDOR = linux4sam
  26. AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
  27. AT91BOOTSTRAP3_INSTALL_IMAGES = YES
  28. AT91BOOTSTRAP3_INSTALL_TARGET = NO
  29. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3),y)
  30. AT91BOOTSTRAP3_DEPENDENCIES += host-python3
  31. endif
  32. AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
  33. $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))
  34. AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
  35. ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
  36. define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
  37. $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
  38. endef
  39. AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
  40. endif
  41. define AT91BOOTSTRAP3_BUILD_CMDS
  42. $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D)
  43. endef
  44. define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
  45. cp $(wildcard $(@D)/build/binaries/*.bin $(@D)/binaries/*.bin) $(BINARIES_DIR)
  46. endef
  47. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
  48. AT91BOOTSTRAP3_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig
  49. else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
  50. AT91BOOTSTRAP3_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))
  51. endif
  52. AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig
  53. AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS)
  54. # Checks to give errors that the user can understand
  55. # Must be before we call to kconfig-package
  56. ifeq ($(BR_BUILDING),y)
  57. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
  58. # We must use the user-supplied kconfig value, because
  59. # AT91BOOTSTRAP3_KCONFIG_DEFCONFIG will at least contain
  60. # the trailing _defconfig
  61. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),)
  62. $(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting)
  63. endif
  64. endif
  65. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
  66. ifeq ($(AT91BOOTSTRAP3_KCONFIG_FILE),)
  67. $(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting)
  68. endif
  69. endif
  70. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
  71. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)),)
  72. $(error No custom at91bootstrap3 repository URL specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL setting)
  73. endif
  74. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION)),)
  75. $(error No custom at91bootstrap3 repository version specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION setting)
  76. endif
  77. endif
  78. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
  79. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)),)
  80. $(error No custom AT91Bootstrap3 tarball specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION setting)
  81. endif # qstrip BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
  82. endif # BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
  83. endif # BR_BUILDING
  84. $(eval $(kconfig-package))