summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules/barebox-at91.make
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-10-12 21:35:59 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2020-11-01 09:44:21 +0100
commit5af3a22b87cf8a248da7ca70f56dbe8fab108734 (patch)
tree790dd3edd6c54e3e771257ca29310fab0281dd50 /configs/platform-v7a/rules/barebox-at91.make
parentb3a7bb132f4dbaf60cf98eaa5cab677eb7801e0f (diff)
downloadDistroKit-5af3a22b87cf8a248da7ca70f56dbe8fab108734.tar.gz
DistroKit-5af3a22b87cf8a248da7ca70f56dbe8fab108734.tar.xz
v7a: barebox: add new rule for sama5d2 support
Later commits will have the v7a platform generate an image for Cortex-A5 based sama5d2 as well. Import here a new barebox-at91 rule that extends the barebox-common rule to provide support for the two sama5d27 boards supported by barebox: barebox-sama5d27-som1-ek.img barebox-sama5d27-som1-ek-xload-mmc.img barebox-groboards-sama5d27-giantboard.img barebox-groboards-sama5d27-giantboard-xload-mmc.img Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/rules/barebox-at91.make')
-rw-r--r--configs/platform-v7a/rules/barebox-at91.make108
1 files changed, 108 insertions, 0 deletions
diff --git a/configs/platform-v7a/rules/barebox-at91.make b/configs/platform-v7a/rules/barebox-at91.make
new file mode 100644
index 0000000..25d6c3f
--- /dev/null
+++ b/configs/platform-v7a/rules/barebox-at91.make
@@ -0,0 +1,108 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BAREBOX_AT91) += barebox-at91
+
+#
+# Paths and names
+#
+BAREBOX_AT91_VERSION := $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_VERSION))
+BAREBOX_AT91_MD5 := $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_MD5))
+BAREBOX_AT91 := barebox-$(BAREBOX_AT91_VERSION)
+BAREBOX_AT91_SUFFIX := tar.bz2
+BAREBOX_AT91_DIR := $(BUILDDIR)/barebox-at91-$(BAREBOX_AT91_VERSION)
+BAREBOX_AT91_CONFIG := $(call ptx/in-platformconfigdir, barebox-at91.config)
+BAREBOX_AT91_REF_CONFIG := $(call ptx/in-platformconfigdir, barebox.config)
+BAREBOX_AT91_LICENSE := GPL-2.0
+BAREBOX_AT91_URL := $(call barebox-url, BAREBOX_AT91)
+BAREBOX_AT91_SOURCE := $(SRCDIR)/$(BAREBOX_AT91).$(BAREBOX_AT91_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+BAREBOX_AT91_WRAPPER_BLACKLIST := \
+ TARGET_HARDEN_RELRO \
+ TARGET_HARDEN_BINDNOW \
+ TARGET_HARDEN_PIE \
+ TARGET_DEBUG \
+ TARGET_BUILD_ID
+
+BAREBOX_AT91_CONF_ENV := KCONFIG_NOTIMESTAMP=1
+BAREBOX_AT91_CONF_OPT := $(call barebox-opts, BAREBOX_AT91)
+
+BAREBOX_AT91_MAKE_ENV := $(BAREBOX_AT91_CONF_ENV)
+BAREBOX_AT91_MAKE_OPT := $(BAREBOX_AT91_CONF_OPT)
+
+BAREBOX_AT91_IMAGES := \
+ images/barebox-sama5d27-som1-ek.img \
+ images/barebox-sama5d27-som1-ek-xload-mmc.img \
+ images/barebox-groboards-sama5d27-giantboard.img \
+ images/barebox-groboards-sama5d27-giantboard-xload-mmc.img
+
+BAREBOX_AT91_IMAGES := $(addprefix $(BAREBOX_AT91_DIR)/,$(BAREBOX_AT91_IMAGES))
+
+ifdef PTXCONF_BAREBOX_AT91
+$(BAREBOX_AT91_CONFIG):
+ @echo
+ @echo "****************************************************************************"
+ @echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-at91'"
+ @echo "****************************************************************************"
+ @echo
+ @echo
+ @exit 1
+endif
+
+$(STATEDIR)/barebox-at91.prepare: $(BAREBOX_AT91_CONFIG)
+ @$(call targetinfo)
+ @rm -f "$(BAREBOX_AT91_DIR)/.ptxdist-defaultenv"
+ @ln -s "$(call ptx/in-platformconfigdir, barebox-at91-defaultenv)" \
+ "$(BAREBOX_AT91_DIR)/.ptxdist-defaultenv"
+ @$(call world/prepare, BAREBOX_AT91)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-at91.install:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Targetinstall
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-at91.targetinstall:
+ @$(call targetinfo)
+ @$(foreach image, $(BAREBOX_AT91_IMAGES), \
+ install -m 644 \
+ $(image) $(IMAGEDIR)/$(notdir $(image));)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-at91.clean:
+ @$(call targetinfo)
+ @$(call clean_pkg, BAREBOX_AT91)
+ @$(foreach image, $(BAREBOX_AT91_IMAGES), \
+ rm -fv $(IMAGEDIR)/$(notdir $(image))-at91;)
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+barebox-at91_oldconfig barebox-at91_menuconfig barebox-at91_nconfig: $(STATEDIR)/barebox-at91.extract
+ @$(call world/kconfig, BAREBOX_AT91, $(subst barebox-at91_,,$@))
+
+# vim: syntax=make