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