summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules/barebox-am335x-mlo.make
blob: 2056fc99b9135790fcb52e359bd433932f6ebd00 (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
98
99
# -*-makefile-*-
#
# Copyright (C) 2017 by Sascha Hauer <s.hauer@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_AM335X_MLO) += barebox-am335x-mlo

#
# Paths and names
#
BAREBOX_AM335X_MLO_VERSION	:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_VERSION))
BAREBOX_AM335X_MLO_MD5		:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_MD5))
BAREBOX_AM335X_MLO		:= barebox-$(BAREBOX_AM335X_MLO_VERSION)
BAREBOX_AM335X_MLO_SUFFIX	:= tar.bz2
BAREBOX_AM335X_MLO_DIR		:= $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION)
BAREBOX_AM335X_MLO_CONFIG	:= $(call ptx/in-platformconfigdir, barebox-am335x-mlo.config)
BAREBOX_AM335X_MLO_LICENSE	:= GPL-2.0
BAREBOX_AM335X_MLO_URL		:= $(call barebox-url, BAREBOX_AM335X_MLO)
BAREBOX_AM335X_MLO_SOURCE	:= $(SRCDIR)/$(BAREBOX_AM335X_MLO).$(BAREBOX_AM335X_MLO_SUFFIX)

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

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

BAREBOX_AM335X_MLO_CONF_ENV := KCONFIG_NOTIMESTAMP=1
BAREBOX_AM335X_MLO_CONF_OPT := $(call barebox-opts, BAREBOX_AM335X_MLO)

BAREBOX_AM335X_MLO_MAKE_ENV := $(BAREBOX_AM335X_MLO_CONF_ENV)
BAREBOX_AM335X_MLO_MAKE_OPT := $(BAREBOX_AM335X_MLO_CONF_OPT)

BAREBOX_AM335X_MLO_IMAGES := images/barebox-am33xx-afi-gf-mlo.img \
			images/barebox-am33xx-beaglebone-mlo.img
BAREBOX_AM335X_MLO_IMAGES := $(addprefix $(BAREBOX_AM335X_MLO_DIR)/,$(BAREBOX_AM335X_MLO_IMAGES))

ifdef PTXCONF_BAREBOX_AM335X_MLO
$(BAREBOX_AM335X_MLO_CONFIG):
	@echo
	@echo "****************************************************************************"
	@echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-am335x-mlo'"
	@echo "****************************************************************************"
	@echo
	@echo
	@exit 1
endif

$(STATEDIR)/barebox-am335x-mlo.prepare: $(BAREBOX_AM335X_MLO_CONFIG)

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

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

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

$(STATEDIR)/barebox-am335x-mlo.targetinstall:
	@$(call targetinfo)
	@$(foreach image, $(BAREBOX_AM335X_MLO_IMAGES), \
		install -m 644 \
			$(image) $(IMAGEDIR)/$(notdir $(image));)
	@$(call touch)

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

$(STATEDIR)/barebox-am335x-mlo.clean:
	@$(call targetinfo)
	@$(call clean_pkg, BAREBOX_AM335X_MLO)
	@$(foreach image, $(BAREBOX_AM335X_MLO_IMAGES), \
		rm -fv $(IMAGEDIR)/$(notdir $(image))-am335x-mlo;)

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

barebox-am335x-mlo_oldconfig barebox-am335x-mlo_menuconfig barebox-am335x-mlo_nconfig: $(STATEDIR)/barebox-am335x-mlo.extract
	@$(call world/kconfig, BAREBOX_AM335X_MLO, $(subst barebox-am335x-mlo_,,$@))

# vim: syntax=make