at91bootstrap3.mk 2.9 KB

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