2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2007-07-17 14:19:56 +02:00
|
|
|
#
|
|
|
|
# at91bootstrap
|
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2011-07-05 21:54:00 +02:00
|
|
|
AT91BOOTSTRAP_VERSION = 1.16
|
2014-07-31 10:46:58 +02:00
|
|
|
AT91BOOTSTRAP_SITE = ftp://www.at91.com/pub/at91bootstrap
|
2011-07-05 21:54:00 +02:00
|
|
|
AT91BOOTSTRAP_SOURCE = AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip
|
2021-04-05 17:32:48 +02:00
|
|
|
AT91BOOTSTRAP_LICENSE = BSD-Source-Code
|
|
|
|
AT91BOOTSTRAP_LICENSE_FILES = include/sdramc.h
|
2007-07-17 14:19:56 +02:00
|
|
|
|
2011-07-05 21:54:00 +02:00
|
|
|
AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
|
|
|
|
AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
|
|
|
|
AT91BOOTSTRAP_MAKE_SUBDIR = board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
|
|
|
|
AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
|
2008-04-10 23:05:30 +02:00
|
|
|
|
2011-07-05 21:54:00 +02:00
|
|
|
AT91BOOTSTRAP_INSTALL_IMAGES = YES
|
|
|
|
AT91BOOTSTRAP_INSTALL_TARGET = NO
|
2007-07-17 14:19:56 +02:00
|
|
|
|
2011-07-05 21:54:00 +02:00
|
|
|
define AT91BOOTSTRAP_EXTRACT_CMDS
|
2018-04-02 15:09:24 +02:00
|
|
|
$(UNZIP) -d $(BUILD_DIR) $(AT91BOOTSTRAP_DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
|
2011-07-05 21:54:00 +02:00
|
|
|
mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D)
|
|
|
|
rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)
|
|
|
|
endef
|
2007-07-17 14:19:56 +02:00
|
|
|
|
2012-02-02 23:29:26 +01:00
|
|
|
ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
|
|
|
|
define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
2015-03-29 19:33:22 +02:00
|
|
|
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \*.patch
|
2012-02-02 23:29:26 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
|
|
|
endif
|
|
|
|
|
2022-10-04 14:52:41 +02:00
|
|
|
# The at91bootstrap Makefile doesn't support customizing
|
|
|
|
# CFLAGS/LDFLAGS, so we cheat and pass our custom flags through CC and
|
|
|
|
# LD.
|
2011-07-05 21:54:00 +02:00
|
|
|
define AT91BOOTSTRAP_BUILD_CMDS
|
2022-10-04 14:52:41 +02:00
|
|
|
$(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CC="$(TARGET_CC) -fno-stack-protector" \
|
|
|
|
LD="$(TARGET_CC) -fno-PIE" \
|
|
|
|
-C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
|
2011-07-05 21:54:00 +02:00
|
|
|
endef
|
2009-01-03 01:07:25 +01:00
|
|
|
|
2011-07-05 21:54:00 +02:00
|
|
|
define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS
|
|
|
|
cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR)
|
|
|
|
endef
|
2008-04-10 23:05:30 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2007-07-17 14:19:56 +02:00
|
|
|
|
2015-04-26 11:51:15 +02:00
|
|
|
ifeq ($(BR2_TARGET_AT91BOOTSTRAP)$(BR_BUILDING),yy)
|
2010-03-17 08:46:56 +01:00
|
|
|
ifeq ($(AT91BOOTSTRAP_BOARD),)
|
|
|
|
$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
|
|
|
|
endif
|
|
|
|
endif
|