summaryrefslogtreecommitdiffstats
path: root/rules/image-rauc.make
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2017-03-20 12:36:26 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-03-24 15:06:29 +0100
commitf571b354ee5c256d032265e9da5c9bd34a5935bb (patch)
tree24f1f05b1f2e5a78fc1ca78865a1bb24ce2da49a /rules/image-rauc.make
parent184021c6255d080579543bda7a515b28c682710d (diff)
downloadptxdist-f571b354ee5c256d032265e9da5c9bd34a5935bb.tar.gz
ptxdist-f571b354ee5c256d032265e9da5c9bd34a5935bb.tar.xz
image-rauc: new package
This adds a default image recipe for building a RAUC update Bundle out of the systems rootfs. In order to sign your update (mandatory) you need to place a valid certificate and key file in your BSP. Their location is default they are currently expected to be located at: $(PTXDIST_PLATFORMCONFIGDIR)/config/rauc/rauc.key.pem (key) $(PTXDIST_PLATFORMCONFIGDIR)/config/rauc/rauc.cert.pem (cert) PTXdist will then create the bundle during a run of `ptxdist images`. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/image-rauc.make')
-rw-r--r--rules/image-rauc.make69
1 files changed, 69 insertions, 0 deletions
diff --git a/rules/image-rauc.make b/rules/image-rauc.make
new file mode 100644
index 000000000..5f34909de
--- /dev/null
+++ b/rules/image-rauc.make
@@ -0,0 +1,69 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Enrico Joerns <e.joerns@pengutronix.de>
+# Copyright (C) 2016 by Michael Olbrich <m.olbrich@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_RAUC) += image-rauc
+
+#
+# Paths and names
+#
+IMAGE_RAUC := image-rauc
+IMAGE_RAUC_DIR := $(BUILDDIR)/$(IMAGE_RAUC)
+IMAGE_RAUC_IMAGE := $(IMAGEDIR)/update.raucb
+IMAGE_RAUC_CONFIG := rauc.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_RAUC_KEY = $(PTXDIST_PLATFORMCONFIGDIR)/config/rauc/rauc.key.pem
+IMAGE_RAUC_CERT = $(PTXDIST_PLATFORMCONFIGDIR)/config/rauc/rauc.cert.pem
+
+IMAGE_RAUC_ENV := \
+ RAUC_BUNDLE_COMPATIBLE=$(PTXCONF_RAUC_COMPATIBLE) \
+ RAUC_BUNDLE_VERSION=$(PTXDIST_BSP_AUTOVERSION) \
+ RAUC_BUNDLE_BUILD=$(shell date +%FT%T%z) \
+ RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
+ RAUC_KEY=$(IMAGE_RAUC_KEY) \
+ RAUC_CERT=$(IMAGE_RAUC_CERT)
+
+$(IMAGE_RAUC_IMAGE): $(IMAGE_RAUC_KEY) $(IMAGE_RAUC_CERT)
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_RAUC)
+ @$(call finish)
+
+$(IMAGE_RAUC_KEY):
+ @echo
+ @echo "****************************************************************************"
+ @echo "******** Please place your signing key in config/rauc/rauc.key.pem. ********"
+ @echo "* *"
+ @echo "* Note: For test-purpose you can create one by running rauc-gen-certs.sh *"
+ @echo "* from the scripts/ folder of your PTXdist installation *"
+ @echo "****************************************************************************"
+ @echo
+ @echo
+ @exit 1
+
+$(IMAGE_RAUC_CERT):
+ @echo
+ @echo "****************************************************************************"
+ @echo "**** Please place your signing certificate in config/rauc/rauc.cert.pem. ***"
+ @echo "* *"
+ @echo "* Note: For test-purpose you can create one by running rauc-gen-certs.sh *"
+ @echo "* from the scripts/ folder of your PTXdist installation *"
+ @echo "****************************************************************************"
+ @echo
+ @echo
+ @exit 1
+
+# vim: syntax=make