at91bootstrap3.mk 2.9 KB

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