summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules/image-rpi3.make
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven@czerwinskis.de>2018-11-29 11:58:34 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2018-12-17 10:55:00 +0100
commit98626f8441add596486b5fd176a5ea6fa16609c8 (patch)
treeba3224ffb9cd1e7ef4bef0a275248f91428613ff /configs/platform-v7a/rules/image-rpi3.make
parent660295cc078adaf3d7b743406eff73461aea9062 (diff)
downloadDistroKit-98626f8441add596486b5fd176a5ea6fa16609c8.tar.gz
DistroKit-98626f8441add596486b5fd176a5ea6fa16609c8.tar.xz
add RPI3 Support
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Diffstat (limited to 'configs/platform-v7a/rules/image-rpi3.make')
-rw-r--r--configs/platform-v7a/rules/image-rpi3.make51
1 files changed, 51 insertions, 0 deletions
diff --git a/configs/platform-v7a/rules/image-rpi3.make b/configs/platform-v7a/rules/image-rpi3.make
new file mode 100644
index 0000000..600c406
--- /dev/null
+++ b/configs/platform-v7a/rules/image-rpi3.make
@@ -0,0 +1,51 @@
+# -*-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_RPI3) += image-rpi3
+
+#
+# Paths and names
+#
+IMAGE_RPI3 := image-rpi3
+IMAGE_RPI3_DIR := $(BUILDDIR)/$(IMAGE_RPI3)
+IMAGE_RPI3_IMAGE := $(IMAGEDIR)/rpi3.hdimg
+IMAGE_RPI3_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_RPI3_CONFIG := rpi3.config
+IMAGE_RPI3_DATA_DIR := $(call ptx/in-platformconfigdir, rpi-firmware)
+IMAGE_RPI3_DATA := \
+ $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.bin) \
+ $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.elf) \
+ $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.dat) \
+ $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.dtb) \
+ $(wildcard $(IMAGE_RPI3_DATA_DIR)/config.txt)
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+define squote_and_comma
+$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1))))
+endef
+
+IMAGE_RPI3_ENV := \
+ FIRMWARE_RPI3="$(call squote_and_comma,$(IMAGE_RPI3_DATA))"
+
+$(IMAGE_RPI3_IMAGE):
+ @$(call targetinfo)
+ @GPU_MEM=$(PTXCONF_IMAGE_RPI3_GPU_MEM) \
+ ptxd_replace_magic "$(IMAGE_RPI3_DATA_DIR)/config.txt" > \
+ "$(PTXDIST_TEMPDIR)/config.txt"
+ @$(call image/genimage, IMAGE_RPI3)
+ @$(call finish)
+
+# vim: syntax=make