summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--projectroot/etc/rauc/ca.cert.pem7
-rw-r--r--projectroot/etc/rauc/system.conf36
-rw-r--r--projectroot/lib/systemd/system/rauc-mark-good.service10
-rw-r--r--rules/host-rauc.in9
-rw-r--r--rules/host-rauc.make32
-rw-r--r--rules/rauc.in34
-rw-r--r--rules/rauc.make90
7 files changed, 218 insertions, 0 deletions
diff --git a/projectroot/etc/rauc/ca.cert.pem b/projectroot/etc/rauc/ca.cert.pem
new file mode 100644
index 000000000..be1aa7c30
--- /dev/null
+++ b/projectroot/etc/rauc/ca.cert.pem
@@ -0,0 +1,7 @@
+# This is a dummy keyring file. Please overwrite this with one that matches
+# your X.509 infrastructure if you intend to use RAUC for secure updates!
+#
+# If you really do not intend to actively use the security features (or for
+# testing purpose) you may create a development certificate by executing the
+# script `rauc-gen-test-certs.sh` from the `scripts` folder in your PTXdist
+# installation.
diff --git a/projectroot/etc/rauc/system.conf b/projectroot/etc/rauc/system.conf
new file mode 100644
index 000000000..2881ab2f8
--- /dev/null
+++ b/projectroot/etc/rauc/system.conf
@@ -0,0 +1,36 @@
+## This is an example RAUC system configuration. This file will be installed
+## into /etc/rauc/system.conf on your target and describes your system from the
+## perspective of the RAUC update service.
+##
+## If you find this file in your build rootfs, your have not set up a
+## system.conf for your platform, yet.
+## Create one according to this dummy template from
+## `projectroot/etc/rauc/system.conf` in your PTXdist installation and place it
+## in the platform directory of you project under
+## `projectroot/etc/rauc/system.conf`.
+##
+## ---
+##
+# [system]
+# compatible=@RAUC_BUNDLE_COMPATIBLE@
+# bootloader=<barebox|uboot|grub>
+#
+# [slot.rootfs.0]
+# device=/dev/mmcblkXp1
+# type=ext4
+# bootname=system0
+#
+# [slot.rootfs.1]
+# device=/dev/mmcblkXp2
+# type=ext4
+# bootname=system1
+#
+# [slot.appfs.0]
+# device=/dev/mmcblkXp3
+# type=ext4
+# parent=rootfs.0
+#
+# [slot.appfs.1]
+# device=/dev/mmcblkXp4
+# type=ext4
+# parent=rootfs.1
diff --git a/projectroot/lib/systemd/system/rauc-mark-good.service b/projectroot/lib/systemd/system/rauc-mark-good.service
new file mode 100644
index 000000000..af4daab9f
--- /dev/null
+++ b/projectroot/lib/systemd/system/rauc-mark-good.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=RAUC Good-marking Service
+ConditionKernelCommandLine=|bootchooser.active
+ConditionKernelCommandLine=|rauc.slot
+
+[Service]
+ExecStart=/usr/bin/rauc status mark-good
+
+[Install]
+WantedBy=multi-user.target
diff --git a/rules/host-rauc.in b/rules/host-rauc.in
new file mode 100644
index 000000000..322deb14f
--- /dev/null
+++ b/rules/host-rauc.in
@@ -0,0 +1,9 @@
+## SECTION=hosttools_noprompt
+## SECTION=hosttools_platform
+
+config HOST_RAUC
+ tristate
+ default ALLYES
+ select HOST_GLIB
+ select HOST_OPENSSL
+ select HOST_SQUASHFS_TOOLS
diff --git a/rules/host-rauc.make b/rules/host-rauc.make
new file mode 100644
index 000000000..4345ae8f5
--- /dev/null
+++ b/rules/host-rauc.make
@@ -0,0 +1,32 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Grzeschik <mgr@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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_RAUC) += host-rauc
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+HOST_RAUC_CONF_TOOL := autoconf
+HOST_RAUC_CONF_OPT := \
+ $(HOST_AUTOCONF) \
+ --disable-code-coverage \
+ --disable-valgrind \
+ --disable-service \
+ --disable-network \
+ --disable-json
+
+# vim: syntax=make
diff --git a/rules/rauc.in b/rules/rauc.in
new file mode 100644
index 000000000..263a67bf1
--- /dev/null
+++ b/rules/rauc.in
@@ -0,0 +1,34 @@
+## SECTION=applications
+
+menuconfig RAUC
+ tristate
+ prompt "Rauc Update Tool "
+ select OPENSSL
+ select GLIB
+ select LIBCURL if RAUC_NETWORK
+ select JSON_GLIB if RAUC_JSON
+ help
+ Robust Auto-Update Controller. RAUC controls the update process on embedded linux systems.
+
+if RAUC
+
+config RAUC_NETWORK
+ bool
+ prompt "network support"
+
+config RAUC_JSON
+ bool
+ prompt "JSON support"
+
+config RAUC_COMPATIBLE
+ prompt "RAUC Compatible"
+ string
+ default "${PTXCONF_PROJECT_VENDOR}\ ${PTXCONF_PROJECT}"
+ help
+ An explicit identification string that RAUC uses to assure an update
+ bundle matches with the correct root filesystem on the target.
+
+ Only if the compatible in the targets RAUC system.conf file and those
+ in the Bundle's manifest match exactly, an update will be performed
+
+endif
diff --git a/rules/rauc.make b/rules/rauc.make
new file mode 100644
index 000000000..ba7152bbd
--- /dev/null
+++ b/rules/rauc.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Enrico Joerns <e.joerns@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
+#
+PACKAGES-$(PTXCONF_RAUC) += rauc
+
+#
+# Paths and names
+#
+RAUC_VERSION := v0.1
+RAUC_MD5 := 33c6f45b71f9b9c082fa852c3d5915d9
+RAUC := rauc-$(RAUC_VERSION)
+RAUC_SUFFIX := tar.xz
+RAUC_URL := https://github.com/rauc/rauc/releases/download/v0.1/rauc-0.1.tar.xz
+RAUC_SOURCE := $(SRCDIR)/$(RAUC).$(RAUC_SUFFIX)
+RAUC_DIR := $(BUILDDIR)/$(RAUC)
+RAUC_LICENSE := LGPL-2.1
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#RAUC_CONF_ENV := $(CROSS_ENV)
+
+#
+# autoconf
+#
+RAUC_CONF_TOOL := autoconf
+RAUC_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --enable-debug=info \
+ $(GLOBAL_LARGE_FILE_OPTION) \
+ --disable-code-coverage \
+ --disable-valgrind \
+ --enable-service \
+ --$(call ptx/endis,PTXCONF_RAUC_NETWORK)-network \
+ --$(call ptx/endis,PTXCONF_RAUC_JSON)-json \
+ --with-systemdunitdir=/lib/systemd/system \
+ --with-dbuspolicydir=/usr/share/dbus-1/system.d \
+ --with-dbussystemservicedir=/usr/share/dbus-1/system-services
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/rauc.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, rauc)
+ @$(call install_fixup, rauc,PRIORITY,optional)
+ @$(call install_fixup, rauc,SECTION,base)
+ @$(call install_fixup, rauc,AUTHOR,"Enrico Joerns <e.joerns@pengutronix.de>")
+ @$(call install_fixup, rauc,DESCRIPTION,missing)
+
+ @$(call install_copy, rauc, 0, 0, 0755, -, /usr/bin/rauc)
+ @$(call install_alternative, rauc, 0, 0, 0644, /etc/rauc/system.conf)
+ @$(call install_replace, rauc, /etc/rauc/system.conf, \
+ @RAUC_BUNDLE_COMPATIBLE@, \
+ $(PTXCONF_RAUC_COMPATIBLE))
+ @$(call install_alternative, rauc, 0, 0, 0644, /etc/rauc/ca.cert.pem)
+
+ @$(call install_copy, rauc, 0, 0, 0644, -, \
+ /usr/share/dbus-1/system-services/de.pengutronix.rauc.service)
+ @$(call install_copy, rauc, 0, 0, 0644, -, \
+ /usr/share/dbus-1/system.d/de.pengutronix.rauc.conf)
+
+ifdef PTXCONF_INITMETHOD_SYSTEMD
+ @$(call install_alternative, rauc, 0, 0, 0644, \
+ /lib/systemd/system/rauc.service)
+
+ @$(call install_alternative, rauc, 0, 0, 0644, \
+ /lib/systemd/system/rauc-mark-good.service)
+ @$(call install_link, rauc, ../rauc-mark-good.service, \
+ /lib/systemd/system/multi-user.target.wants/rauc-mark-good.service)
+endif
+
+ @$(call install_finish, rauc)
+
+ @$(call touch)
+
+# vim: syntax=make