2017-09-13 18:51:23 +00:00
|
|
|
|
2017-10-04 23:14:40 +00:00
|
|
|
PKG_TARGETS := bin
|
|
|
|
PKG_FLAGS:=nonshared
|
|
|
|
|
2017-09-13 18:51:23 +00:00
|
|
|
export GCC_HONOUR_COPTS=s
|
|
|
|
|
2017-10-04 23:14:40 +00:00
|
|
|
define Package/at91bootstrap/install/default
|
2022-02-04 13:24:55 +00:00
|
|
|
$(CP) -avL $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(1)/
|
2017-10-04 23:14:40 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
Package/at91bootstrap/install = $(Package/at91bootstrap/install/default)
|
|
|
|
|
2017-09-13 18:51:23 +00:00
|
|
|
define AT91Bootstrap/Init
|
|
|
|
BUILD_TARGET:=
|
|
|
|
BUILD_SUBTARGET:=
|
|
|
|
BUILD_DEVICES:=
|
|
|
|
NAME:=
|
|
|
|
DEPENDS:=
|
|
|
|
HIDDEN:=
|
|
|
|
DEFAULT:=
|
|
|
|
VARIANT:=$(1)
|
|
|
|
AT91BOOTSTRAP_CONFIG:=$(1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
|
|
|
|
|
|
|
AT91BOOTSTRAP_MAKE_FLAGS = \
|
|
|
|
HOSTCC="$(HOSTCC)" \
|
2018-01-22 15:30:06 +00:00
|
|
|
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
|
2017-09-13 18:51:23 +00:00
|
|
|
HOSTLDFLAGS=""
|
|
|
|
|
|
|
|
define Build/AT91Bootstrap/Target
|
|
|
|
$(eval $(call AT91Bootstrap/Init,$(1)))
|
|
|
|
$(eval $(call AT91Bootstrap/Default,$(1)))
|
|
|
|
$(eval $(call AT91Bootstrap/$(1),$(1)))
|
|
|
|
|
2020-08-23 20:32:28 +00:00
|
|
|
define Package/at91bootstrap-$(1)
|
2017-09-13 18:51:23 +00:00
|
|
|
SECTION:=boot
|
|
|
|
CATEGORY:=Boot Loaders
|
|
|
|
TITLE:= .$(NAME)
|
|
|
|
VARIANT:=$(VARIANT)
|
|
|
|
DEPENDS:=@!IN_SDK $(DEPENDS)
|
|
|
|
HIDDEN:=$(HIDDEN)
|
|
|
|
ifneq ($(BUILD_TARGET),)
|
|
|
|
DEPENDS += @$(TARGET_DEP)
|
|
|
|
ifneq ($(BUILD_DEVICES),)
|
|
|
|
DEFAULT := y if ($(TARGET_DEP)_Default \
|
2020-08-23 20:32:28 +00:00
|
|
|
$(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \
|
|
|
|
$(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%, \
|
|
|
|
$(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES)))
|
2017-09-13 18:51:23 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
$(if $(DEFAULT),DEFAULT:=$(DEFAULT))
|
|
|
|
URL:=https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/at91bootstrap-$(1)/install
|
2017-10-04 23:14:40 +00:00
|
|
|
$$(Package/at91bootstrap/install)
|
2017-09-13 18:51:23 +00:00
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure/AT91Bootstrap
|
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2020-08-23 20:32:28 +00:00
|
|
|
$(AT91BOOTSTRAP_CONFIG)_defconfig
|
2017-09-13 18:51:23 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Build/Compile/AT91Bootstrap
|
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2020-08-23 20:32:28 +00:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
$(AT91BOOTSTRAP_MAKE_FLAGS)
|
2017-09-13 18:51:23 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define BuildPackage/AT91Bootstrap/Defaults
|
2020-08-23 20:32:28 +00:00
|
|
|
Build/Configure/Default = $$$$(Build/Configure/AT91Bootstrap)
|
|
|
|
Build/Compile/Default = $$$$(Build/Compile/AT91Bootstrap)
|
2017-09-13 18:51:23 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define BuildPackage/AT91Bootstrap
|
2020-08-23 20:32:28 +00:00
|
|
|
$(eval $(call BuildPackage/AT91Bootstrap/Defaults))
|
|
|
|
$(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \
|
|
|
|
$(eval $(call Build/AT91Bootstrap/Target,$(type)))
|
|
|
|
)
|
|
|
|
$(eval $(call Build/DefaultTargets))
|
|
|
|
$(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \
|
|
|
|
$(call BuildPackage,at91bootstrap-$(type))
|
|
|
|
)
|
2017-09-13 18:51:23 +00:00
|
|
|
endef
|