at91bootstrap3.mk 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ################################################################################
  2. #
  3. # at91bootstrap3
  4. #
  5. ################################################################################
  6. AT91BOOTSTRAP3_VERSION = v3.7.1
  7. AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
  8. AT91BOOTSTRAP3_INSTALL_IMAGES = YES
  9. AT91BOOTSTRAP3_INSTALL_TARGET = NO
  10. AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
  11. $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))
  12. AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
  13. ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
  14. define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
  15. $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
  16. endef
  17. AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
  18. endif
  19. define AT91BOOTSTRAP3_BUILD_CMDS
  20. $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D)
  21. endef
  22. define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
  23. cp $(@D)/binaries/*.bin $(BINARIES_DIR)
  24. endef
  25. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
  26. AT91BOOTSTRAP3_SOURCE_CONFIG = $(AT91BOOTSTRAP3_DIR)/board/*/$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig
  27. else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
  28. AT91BOOTSTRAP3_SOURCE_CONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))
  29. endif
  30. AT91BOOTSTRAP3_KCONFIG_FILE = $(AT91BOOTSTRAP3_SOURCE_CONFIG)
  31. AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig
  32. AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS)
  33. $(eval $(kconfig-package))
  34. # Checks to give errors that the user can understand
  35. ifeq ($(BR_BUILDING),y)
  36. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
  37. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),)
  38. $(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting)
  39. endif
  40. endif
  41. ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
  42. ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)),)
  43. $(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting)
  44. endif
  45. endif
  46. endif