summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules/barebox-vexpress.make
blob: 8dea4daa552fc7e399d64a952ab507421c5fdcd8 (plain) (blame)
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
98
99
100
# -*-makefile-*-
#
# Copyright (C) 2017 by Robert Schwebel <r.schwebel@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_BAREBOX_VEXPRESS) += barebox-vexpress

#
# Paths and names
#
BAREBOX_VEXPRESS_VERSION	:= 2018.05.0
BAREBOX_VEXPRESS_MD5		:= 8286a8ea2cdd88104e5c6762d93d81db
BAREBOX_VEXPRESS		:= barebox-$(BAREBOX_VEXPRESS_VERSION)
BAREBOX_VEXPRESS_SUFFIX		:= tar.bz2
BAREBOX_VEXPRESS_DIR		:= $(BUILDDIR)/barebox-vexpress-$(BAREBOX_VEXPRESS_VERSION)
BAREBOX_VEXPRESS_CONFIG		:= $(PTXDIST_PLATFORMCONFIGDIR)/barebox-vexpress.config
BAREBOX_VEXPRESS_LICENSE	:= GPL-2.0
BAREBOX_VEXPRESS_URL		:= $(call barebox-url, BAREBOX_VEXPRESS)
BAREBOX_VEXPRESS_SOURCE		:= $(SRCDIR)/$(BAREBOX_VEXPRESS).$(BAREBOX_VEXPRESS_SUFFIX)

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

BAREBOX_VEXPRESS_WRAPPER_BLACKLIST := \
	TARGET_HARDEN_RELRO \
	TARGET_HARDEN_BINDNOW \
	TARGET_HARDEN_PIE \
	TARGET_DEBUG \
	TARGET_BUILD_ID

BAREBOX_VEXPRESS_CONF_ENV := KCONFIG_NOTIMESTAMP=1
BAREBOX_VEXPRESS_CONF_OPT := $(call barebox-opts, BAREBOX_VEXPRESS)

BAREBOX_VEXPRESS_MAKE_ENV := $(BAREBOX_VEXPRESS_CONF_ENV)
BAREBOX_VEXPRESS_MAKE_OPT := $(BAREBOX_VEXPRESS_CONF_OPT)

BAREBOX_VEXPRESS_IMAGES := images/barebox-vexpress-ca9.img
BAREBOX_VEXPRESS_IMAGES := $(addprefix $(BAREBOX_VEXPRESS_DIR)/,$(BAREBOX_VEXPRESS_IMAGES))

ifdef PTXCONF_BAREBOX_VEXPRESS
$(BAREBOX_VEXPRESS_CONFIG):
	@echo
	@echo "****************************************************************************"
	@echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-vexpress'"
	@echo "****************************************************************************"
	@echo
	@echo
	@exit 1
endif

$(STATEDIR)/barebox-vexpress.prepare: $(BAREBOX_VEXPRESS_CONFIG)

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

$(STATEDIR)/barebox-vexpress.install:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Targetinstall
# ----------------------------------------------------------------------------

$(STATEDIR)/barebox-vexpress.targetinstall:
	@$(call targetinfo)
	@$(foreach image, $(BAREBOX_VEXPRESS_IMAGES), \
		install -m 644 \
			$(image) $(IMAGEDIR)/$(notdir $(image));)
	@install -D -m644 $(BAREBOX_VEXPRESS_DIR)/defaultenv/barebox_zero_env $(IMAGEDIR)/barebox-zero-env-vexpress
	@install -D -m644 $(BAREBOX_VEXPRESS_DIR)/arch/arm/dts/vexpress-v2p-ca9.dtb $(IMAGEDIR)/vexpress-v2p-ca9.dtb-bb
	@$(call touch)

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

$(STATEDIR)/barebox-vexpress.clean:
	@$(call targetinfo)
	@$(call clean_pkg, BAREBOX_VEXPRESS)
	@$(foreach image, $(BAREBOX_VEXPRESS_IMAGES), \
		rm -fv $(IMAGEDIR)/$(notdir $(image));)

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

barebox-vexpress_oldconfig barebox-vexpress_menuconfig barebox-vexpress_nconfig: $(STATEDIR)/barebox-vexpress.extract
	@$(call world/kconfig, BAREBOX_VEXPRESS, $(subst barebox-vexpress_,,$@))

# vim: syntax=make