How sbabic/swupdate works
Project type and purpose
• This is SWUpdate, an open-source C framework and agent for performing safe, atomic software updates on embedded Linux devices. It ships as a daemon/CLI (swupdate), a library, a built-in web server, language bindings, and example front-ends.
File structure
• Top-level key folders:
• core: the main update engine, parser, state machine, threads, notifier
• corelib: low-level interfaces (downloaders, channel/CMS, cryptographic verification)
• handlers: modules that perform actual installation steps (flash, partitioning, delta, Docker, shell scripts, custom Lua handlers)
• bootloader: bootloader integration back ends (U-Boot, GRUB, none, etc.)
• fs: filesystem drivers and mke2fs tooling
• parser: sw-description parsing front‐end
• mongoose: embedded HTTP server for local GUI/API
• ipc: local IPC channels (progress, network)
• bindings: language wrappers (Lua, NodeJS)
• web-app: JS/CSS/HTML front end that can talk to the embedded server or remote instance
• tools: CLI client, progress reporter, IPC client, Python wrapper
• suricatta: example integration with Suricatta bus for broadcast updates
• Build files: Makefile/Kconfig everywhere → highly configurable via build system, Yocto/Buildroot integration, optional modules, conditional compilation.
• CI, scripts, tests and examples accompany each major area.
README for additional insights
• Confirms it’s an embedded update agent supporting local storage, integrated REST server, REST client to HawkBit, OTA downloads, customizable handlers, scripting via Lua, cryptographic verification (OpenSSL, mbedTLS, WolfSSL), multiple update strategies (full, delta), fail‐safe atomic updates.
• Mentions integration points: library API, IPC progress interface, web UI, external services (hawkBit).
Be detailed
• How the testing and CI scripts fit (e.g., test harness invoking APIs or handlers).
• Don’t hesitate to display many small components—this modularity is a core architectural strength.