buildroot中的swupdate支持
使用的buildroot版本
# Set and export the version string
export BR2_VERSION := 2021.11
# Actual time the release is cut (for reproducible builds)
BR2_VERSION_EPOCH = 1638734000
默认使用的swupdate版本
SWUPDATE_VERSION = 2021.04
修改swupdate config
ubuntu:~/buildroot$ git diff package/swupdate/swupdate.config
diff --git a/package/swupdate/swupdate.config b/package/swupdate/swupdate.config
index a6b7a74948..7a596b3a62 100644
--- a/package/swupdate/swupdate.config
+++ b/package/swupdate/swupdate.config
@@ -2,7 +2,6 @@
# Automatically generated file; DO NOT EDIT.
# Swupdate Configuration
#
-CONFIG_HAVE_DOT_CONFIG=y
#
# Swupdate Settings
@@ -11,12 +10,13 @@ CONFIG_HAVE_DOT_CONFIG=y
#
# General Configuration
#
-# CONFIG_CURL is not set
-# CONFIG_CURL_SSL is not set
+CONFIG_CURL=y
+CONFIG_CURL_SSL=y
# CONFIG_SYSTEMD is not set
CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg"
CONFIG_SCRIPTS=y
-# CONFIG_HW_COMPATIBILITY is not set
+CONFIG_HW_COMPATIBILITY=y
+CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
#
@@ -24,15 +24,9 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
#
CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl"
CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog"
-CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
-
-#
-# MTD support needs libmtd
-#
-
-#
-# Lua support needs a Lua interpreter
-#
+# CONFIG_MTD is not set
+CONFIG_LUA=y
+CONFIG_LUAPKG="lua"
# CONFIG_FEATURE_SYSLOG is not set
#
@@ -50,86 +44,73 @@ CONFIG_EXTRA_LDLIBS=""
# CONFIG_DEBUG is not set
# CONFIG_WERROR is not set
# CONFIG_NOCLEANUP is not set
-
-#
-# EFI Boot Guard needs libebgenv and libz
-#
-CONFIG_BOOTLOADER_NONE=y
+# CONFIG_BOOTLOADER_EBG is not set
+CONFIG_UBOOT=y
+# CONFIG_BOOTLOADER_NONE is not set
# CONFIG_BOOTLOADER_GRUB is not set
-
-#
-# U-Boot support needs libubootenv, libz
-#
-CONFIG_SSL_IMPL_NONE=y
-
-#
-# Image downloading support needs libcurl
-#
-
-#
-# Hash checking needs an SSL implementation
-#
-
-#
-# Image signature verification needs an SSL implementation
-#
-
-#
-# Image encryption needs an SSL implementation
-#
-# CONFIG_SURICATTA is not set
+CONFIG_UBOOT_FWENV="/etc/fw_env.config"
+CONFIG_UPDATE_STATE_CHOICE_NONE=y
+# CONFIG_UPDATE_STATE_CHOICE_BOOTLOADER is not set
+CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env"
+# CONFIG_SSL_IMPL_NONE is not set
+CONFIG_SSL_IMPL_OPENSSL=y
+# CONFIG_SSL_IMPL_WOLFSSL is not set
+# CONFIG_SSL_IMPL_MBEDTLS is not set
+CONFIG_DOWNLOAD=y
+CONFIG_DOWNLOAD_SSL=y
+CONFIG_CHANNEL_CURL=y
+CONFIG_CHANNEL_CURL_SSL=y
+CONFIG_HASH_VERIFY=y
+# CONFIG_DISABLE_CPIO_CRC is not set
+# CONFIG_SIGNED_IMAGES is not set
+CONFIG_ENCRYPTED_IMAGES=y
+# CONFIG_ENCRYPTED_SW_DESCRIPTION is not set
+# CONFIG_PKCS11 is not set
+CONFIG_SURICATTA=y
+
+#
+# Features
+#
+CONFIG_SURICATTA_SSL=y
+
+#
+# Server
+#
+CONFIG_SURICATTA_HAWKBIT=y
+# CONFIG_SURICATTA_GENERAL is not set
CONFIG_WEBSERVER=y
CONFIG_MONGOOSE=y
CONFIG_MONGOOSEIPV6=y
-
-#
-# SSL support needs an SSL implementation
-#
+CONFIG_MONGOOSESSL=y
+CONFIG_GUNZIP=y
+# CONFIG_ZSTD is not set
#
# Parser Features
#
CONFIG_LIBCONFIG=y
-CONFIG_PARSERROOT=""
-
-#
-# JSON config parser support needs json-c
-#
+CONFIG_PARSERROOT="software"
+CONFIG_JSON=y
+# CONFIG_LUAEXTERNAL is not set
# CONFIG_SETSWDESCRIPTION is not set
#
# Image Handlers
#
-
-#
-# ubivol support needs libubi
-#
-# CONFIG_DISKPART is not set
+CONFIG_DISKPART=y
+CONFIG_DISKFORMAT=y
+# CONFIG_FAT_FILESYSTEM is not set
+CONFIG_EXT_FILESYSTEM=y
+# CONFIG_UNIQUEUUID is not set
CONFIG_RAW=y
-# CONFIG_RDIFFHANDLER is not set
-# CONFIG_SHELLSCRIPTHANDLER is not set
-
-#
-# archive support needs libarchive
-#
-
-#
-# remote handler needs zeromq
-#
-
-#
-# swuforward handler needs json-c and curl
-#
-
-#
-# SWU forwarder requires libcurl
-#
-
-#
-# swuforward handler needs json-c and curl
-#
-# CONFIG_BOOTLOADERHANDLER is not set
-
-#
-# Microcontroller handler depends on libgpiod
-#
+CONFIG_RDIFFHANDLER=y
+# CONFIG_READBACKHANDLER is not set
+CONFIG_LUASCRIPTHANDLER=y
+CONFIG_SHELLSCRIPTHANDLER=y
+# CONFIG_HANDLER_IN_LUA is not set
+CONFIG_ARCHIVE=y
+CONFIG_LOCALE=y
+CONFIG_REMOTE_HANDLER=y
+# CONFIG_SWUFORWARDER_HANDLER is not set
+CONFIG_BOOTLOADERHANDLER=y
+# CONFIG_UCFWHANDLER is not set
swupdate启动运行参数
可在启动脚本/usr/lib/swupdate/swupdate.sh
中设置启动参数
SWUPDATE_SURICATTA_ARGS="-u swupdate-server:8080 -c 2 -p 20 -i test_id0123456789"
swupdate-server:服务器ip
root@rk3328-buildroot:~# cat /etc/hosts
127.0.0.1 localhost
192.168.1.100 swupdate-server
swupdate+hawkbit部署以及测试 一
swupdate+hawkbit部署以及测试 二