.. _sec-integration: Integration =========== .. contents:: :local: :depth: 2 If you intend to prepare your platform for using RAUC as an update framework, this chapter will guide you through the required steps and show the different ways you can choose. To integrate RAUC, you first need to be able to build RAUC as both a host and a target application. The host application is needed for generating update bundles while the target application or service performs the core task of RAUC: updating your device. In an update system, a lot of components have to play together and have to be configured appropriately to interact correctly. In principle, these are: * Hardware setup, devices, partitions, etc. * The bootloader * The Linux kernel * The init system * System utilities (mount, mkfs, ...) * The update tool, RAUC itself .. note:: When integrating RAUC into your embedded Linux system, and in general, we highly recommend using a Linux system build system like Yocto / OpenEmbedded or PTXdist that allows you to have well defined software states while easing integration of the different components involved. For information about how to integrate RAUC using these tools, refer to the sections :ref:`sec_int_yocto` or :ref:`sec_int_ptxdist`. .. _sec-int-system-config: Partitioning Your Device ------------------------ A basic requirement for a redundant update system is to have your storage set up properly. In a simple case, this means having two redundant partitions of equal size for an A/B setup, or a tiny and a larger partition for a recovery/A setup. Partitioning the storage is part of the bootstrap process and **not** in the scope of an update tool like RAUC. Additionally, you may also need to reserve space for your bootloader, boot state information (such as the state backend for barebox or environment partition for U-Boot), :ref:`data partition(s) ` or similar. Since changing the partition layout is hard or even impossible to change in the field, make sure it meets both current and possible future requirements. .. note:: The ``/etc/fstab`` in your system's root FS (and RAUC's ``system.conf``) should normally use stable paths to refer to partitions or devices. Especially filesystem UUIDs (``UUID=`` or ``/dev/disk/by-uuid/``) or labels (``/dev/disk/by-label/