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