summaryrefslogtreecommitdiffstats
path: root/rules/at91bootstrap2.make
blob: 6c149d71b3793966f48c6492cc7373203a5c6477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*-makefile-*-
#
# Copyright (C) 2011 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_AT91BOOTSTRAP2) += at91bootstrap2

#
# Paths and names
#
AT91BOOTSTRAP2_VERSION	:= $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_VERSION))
AT91BOOTSTRAP2_MD5	:= $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_MD5))
AT91BOOTSTRAP2		:= at91bootstrap-$(AT91BOOTSTRAP2_VERSION)
AT91BOOTSTRAP2_SUFFIX	:= tar.gz
AT91BOOTSTRAP2_URL	:= https://github.com/linux4sam/at91bootstrap/archive/v$(AT91BOOTSTRAP2_VERSION).$(AT91BOOTSTRAP2_SUFFIX)
AT91BOOTSTRAP2_SOURCE	:= $(SRCDIR)/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
AT91BOOTSTRAP2_DIR	:= $(BUILDDIR)/$(AT91BOOTSTRAP2)
AT91BOOTSTRAP2_CONFIG	:= $(call ptx/in-platformconfigdir, \
		$(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_CONFIG)))
AT91BOOTSTRAP2_LICENSE	:= unknown

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

AT91BOOTSTRAP2_WRAPPER_BLACKLIST := \
	TARGET_HARDEN_STACKCLASH \
	TARGET_HARDEN_RELRO \
	TARGET_HARDEN_BINDNOW \
	TARGET_HARDEN_PIE \
	TARGET_DEBUG \
	TARGET_BUILD_ID

AT91BOOTSTRAP2_MAKE_OPT := \
	HOSTCC=$(HOSTCC) \
	ARCH=$(PTXCONF_BAREBOX_ARCH_STRING) \
	CROSS_COMPILE=$(COMPILER_PREFIX)

ifdef PTXCONF_AT91BOOTSTRAP2
$(AT91BOOTSTRAP2_CONFIG):
	@echo
	@echo "***********************************************************************************"
	@echo "* Please generate a at91bootstrap config with 'ptxdist menuconfig at91bootstrap2' *"
	@echo "***********************************************************************************"
	@echo
	@echo
	@exit 1
endif

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/at91bootstrap2.install:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/at91bootstrap2.targetinstall:
	@$(call targetinfo)
	@if [ -e $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin ]; then \
		install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin \
			$(IMAGEDIR)/at91bootstrap.bin; \
	else \
		install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \
			$(IMAGEDIR)/at91bootstrap.bin; \
	fi
	@$(call touch)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

$(STATEDIR)/at91bootstrap2.clean:
	@$(call targetinfo)
	@$(call clean_pkg, AT91BOOTSTRAP2)
	@rm -rf $(IMAGEDIR)/at91bootstrap.bin

# ----------------------------------------------------------------------------
# oldconfig / menuconfig
# ----------------------------------------------------------------------------

at91bootstrap2_oldconfig at91bootstrap2_menuconfig: $(STATEDIR)/at91bootstrap2.extract
	@$(call world/kconfig, AT91BOOTSTRAP2, $(subst at91bootstrap2_,,$@))

# vim: syntax=make