summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-06-16 08:57:45 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2017-07-04 09:25:24 +0200
commit1db122202276b9f343ebdb386df961b2a8cb14a5 (patch)
tree3ebece2bdff32bb11941186b33bd7f4ca82d92d0 /configs/platform-v7a/rules
parent966f675d7d9b9c2f7efd4fa25a50e8758884bf71 (diff)
downloadDistroKit-1db122202276b9f343ebdb386df961b2a8cb14a5.tar.gz
DistroKit-1db122202276b9f343ebdb386df961b2a8cb14a5.tar.xz
platform-v7a: rpi2: add board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/rules')
-rw-r--r--configs/platform-v7a/rules/image-rpi2.make49
1 files changed, 49 insertions, 0 deletions
diff --git a/configs/platform-v7a/rules/image-rpi2.make b/configs/platform-v7a/rules/image-rpi2.make
new file mode 100644
index 0000000..43d2e34
--- /dev/null
+++ b/configs/platform-v7a/rules/image-rpi2.make
@@ -0,0 +1,49 @@
+# -*-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
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_RPI2) += image-rpi2
+
+#
+# Paths and names
+#
+IMAGE_RPI2 := image-rpi2
+IMAGE_RPI2_DIR := $(BUILDDIR)/$(IMAGE_RPI2)
+IMAGE_RPI2_IMAGE := $(IMAGEDIR)/rpi2.hdimg
+IMAGE_RPI2_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_RPI2_CONFIG := rpi2.config
+IMAGE_RPI2_DATA := \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.bin) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.elf) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.dat) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt)
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+define squote_and_comma
+$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1))))
+endef
+
+IMAGE_RPI2_ENV := \
+ FIRMWARE_RPI2="$(call squote_and_comma,$(IMAGE_RPI2_DATA))"
+
+$(IMAGE_RPI2_IMAGE):
+ @$(call targetinfo)
+ @GPU_MEM=$(PTXCONF_IMAGE_RPI2_GPU_MEM) \
+ ptxd_replace_magic "$(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt" > \
+ "$(PTXDIST_TEMPDIR)/config.txt"
+ @$(call image/genimage, IMAGE_RPI2)
+ @$(call finish)
+
+# vim: syntax=make