On 11/24/2016 12:37 PM, Enrico Jorns wrote:
From: Michael Olbrich <m.olbr...@pengutronix.de>
This adds a default image recipe for building a rauc bundle out of the
systems rootfs.
You need to place a valid certificate and key file in your BSP. By
default they are currently expected to be located at:
$(PTXDIST_WORKSPACE)/config/rauc/ca.key.pem (key)
$(PTXDIST_WORKSPACE)/projectroot/etc/rauc/ca.cert.pem (cert)
Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de>
---
config/images/rauc.config | 15 +++++++++++++++
platforms/image-rauc.in | 9 +++++++++
rules/image-rauc.make | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 63 insertions(+)
create mode 100644 config/images/rauc.config
create mode 100644 platforms/image-rauc.in
create mode 100644 rules/image-rauc.make
diff --git a/config/images/rauc.config b/config/images/rauc.config
new file mode 100644
index 0000000..cdb6e39
--- /dev/null
+++ b/config/images/rauc.config
@@ -0,0 +1,15 @@
+image update.raucb {
+ rauc {
+ file root.tar.gz { image = "root.tgz" }
+ manifest = "
+ [update]
+ compatible=@RAUC_BUNDLE_COMPATIBLE@
+ version=@RAUC_BUNDLE_VERSION@
+
+ [image.rootfs]
+ filename=root.tar.gz
+ "
+ cert = "@RAUC_CERT@"
+ key = "@RAUC_KEY@"
+ }
+}
diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
new file mode 100644
index 0000000..15bc8fd
--- /dev/null
+++ b/platforms/image-rauc.in
@@ -0,0 +1,9 @@
+## SECTION=image2
+
+config IMAGE_RAUC
+ tristate
+ prompt "Generate rauc update bundle"
+ select HOST_RAUC
+ select IMAGE_ROOT_TGZ
select HOST_GENIMAGE is missing here.
+ help
+ FIXME
diff --git a/rules/image-rauc.make b/rules/image-rauc.make
new file mode 100644
index 0000000..428bb29
--- /dev/null
+++ b/rules/image-rauc.make
@@ -0,0 +1,39 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Michael Olbrich <m.olbr...@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_ENV := \
+ RAUC_BUNDLE_COMPATIBLE=$(PTXCONF_PROJECT_VENDOR)\ $(PTXCONF_PROJECT) \
+ RAUC_BUNDLE_VERSION=$(PTXCONF_PROJECT_VERSION) \
+ RAUC_KEY=$(PTXDIST_WORKSPACE)/config/rauc/ca.key.pem \
+ RAUC_CERT=$(PTXDIST_WORKSPACE)/projectroot/etc/rauc/ca.cert.pem
+
+$(IMAGE_RAUC_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_RAUC)
+ @$(call finish)
+
+# vim: syntax=make
Regards,
Bastian Stender
--
Pengutronix e.K.
Industrial Linux Solutions
http://www.pengutronix.de/
Peiner Str. 6-8, 31137 Hildesheim, Germany
Amtsgericht Hildesheim, HRA 2686
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de