From 74247d4cab2082f77883f449ad17f55bf54a93e9 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 25 May 2022 14:24:15 +0200 Subject: [PATCH] kirkstone migration: update swupdate package Signed-off-by: Javier Viguera --- ...Makefile-to-build-swupdate-library-s.patch | 31 +++---- ...the-fly-build-configuration-variable.patch | 11 ++- .../swupdate/swupdate/defconfig | 86 ++++++++++++------- ....11.bbappend => swupdate_2022.05.bbappend} | 0 4 files changed, 74 insertions(+), 54 deletions(-) rename meta-digi-dey/recipes-support/swupdate/{swupdate_2021.11.bbappend => swupdate_2022.05.bbappend} (100%) diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate/0001-Makefile-change-Makefile-to-build-swupdate-library-s.patch b/meta-digi-dey/recipes-support/swupdate/swupdate/0001-Makefile-change-Makefile-to-build-swupdate-library-s.patch index 4348db473..ec8caeebc 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate/0001-Makefile-change-Makefile-to-build-swupdate-library-s.patch +++ b/meta-digi-dey/recipes-support/swupdate/swupdate/0001-Makefile-change-Makefile-to-build-swupdate-library-s.patch @@ -1,35 +1,34 @@ From: Mike Engel Date: Mon, 28 Jun 2021 18:45:20 +0200 -Subject: [PATCH 1/2] Makefile: change Makefile to build swupdate library +Subject: [PATCH] Makefile: change Makefile to build swupdate library statically Signed-off-by: Mike Engel --- - Makefile | 5 +++-- + Makefile | 4 +++- ipc-static/Makefile | 6 ++++++ ipc-static/network_ipc-if.c | 1 + ipc-static/network_ipc.c | 1 + ipc-static/progress_ipc.c | 1 + - 5 files changed, 12 insertions(+), 2 deletions(-) + 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ipc-static/Makefile create mode 120000 ipc-static/network_ipc-if.c create mode 120000 ipc-static/network_ipc.c create mode 120000 ipc-static/progress_ipc.c diff --git a/Makefile b/Makefile -index aa7d556..f905efa 100644 +index bf534e110ac3..8b704798501f 100644 --- a/Makefile +++ b/Makefile -@@ -363,7 +363,7 @@ include $(srctree)/Makefile.flags - # Defaults to vmlinux, but the arch makefile usually adds further targets +@@ -364,6 +364,7 @@ include $(srctree)/Makefile.flags - objs-y := core handlers --libs-y := corelib mongoose parser suricatta bootloader fs -+libs-y := corelib ipc-static mongoose parser suricatta bootloader fs + objs-y := core handlers bootloader + libs-y := corelib mongoose parser suricatta fs ++libs-y += ipc-static bindings-y := bindings tools-y := tools -@@ -437,7 +437,7 @@ quiet_cmd_shared = LD $@ +@@ -437,7 +438,7 @@ quiet_cmd_shared = LD $@ "-shared -Wl,-soname,$@" \ "$(KBUILD_CFLAGS) $(CFLAGS_swupdate)" \ "$(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_swupdate) -L$(objtree)" \ @@ -38,7 +37,7 @@ index aa7d556..f905efa 100644 "" \ "$(LDLIBS)" -@@ -481,6 +481,7 @@ install: all +@@ -480,6 +481,7 @@ install: all install -m 0644 $(srctree)/include/progress_ipc.h ${DESTDIR}/${INCLUDEDIR} install -m 0755 $(objtree)/${swupdate-ipc-lib} ${DESTDIR}/${LIBDIR} ln -sfr ${DESTDIR}/${LIBDIR}/${swupdate-ipc-lib} ${DESTDIR}/${LIBDIR}/libswupdate.so @@ -48,7 +47,7 @@ index aa7d556..f905efa 100644 install -m 0755 ${lua_swupdate} $(DESTDIR)/${LIBDIR}/lua/$(LUAVER); \ diff --git a/ipc-static/Makefile b/ipc-static/Makefile new file mode 100644 -index 0000000..99cce6c +index 000000000000..99cce6cc75da --- /dev/null +++ b/ipc-static/Makefile @@ -0,0 +1,6 @@ @@ -60,7 +59,7 @@ index 0000000..99cce6c +EXTRA_CFLAGS += -fPIC diff --git a/ipc-static/network_ipc-if.c b/ipc-static/network_ipc-if.c new file mode 120000 -index 0000000..37894e2 +index 000000000000..37894e2f8207 --- /dev/null +++ b/ipc-static/network_ipc-if.c @@ -0,0 +1 @@ @@ -68,7 +67,7 @@ index 0000000..37894e2 \ No newline at end of file diff --git a/ipc-static/network_ipc.c b/ipc-static/network_ipc.c new file mode 120000 -index 0000000..0640077 +index 000000000000..0640077ec0fc --- /dev/null +++ b/ipc-static/network_ipc.c @@ -0,0 +1 @@ @@ -76,11 +75,9 @@ index 0000000..0640077 \ No newline at end of file diff --git a/ipc-static/progress_ipc.c b/ipc-static/progress_ipc.c new file mode 120000 -index 0000000..7c6622c +index 000000000000..7c6622ce0a30 --- /dev/null +++ b/ipc-static/progress_ipc.c @@ -0,0 +1 @@ +../ipc/progress_ipc.c \ No newline at end of file --- - diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate/0002-config-add-on-the-fly-build-configuration-variable.patch b/meta-digi-dey/recipes-support/swupdate/swupdate/0002-config-add-on-the-fly-build-configuration-variable.patch index 085d127c9..5370861f1 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate/0002-config-add-on-the-fly-build-configuration-variable.patch +++ b/meta-digi-dey/recipes-support/swupdate/swupdate/0002-config-add-on-the-fly-build-configuration-variable.patch @@ -1,6 +1,6 @@ From: Mike Engel Date: Wed, 23 Jun 2021 15:11:12 +0200 -Subject: [PATCH 2/2] config: add on the fly build configuration variable +Subject: [PATCH] config: add on the fly build configuration variable This commit adds on the fly configuration to the swupdate build system to correct an issue when using sw-description @@ -13,10 +13,10 @@ Signed-off-by: Mike Engel 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Kconfig b/Kconfig -index 3862285..525c157 100644 +index 85fa5fd71c4c..5ad2026c675c 100644 --- a/Kconfig +++ b/Kconfig -@@ -241,6 +241,13 @@ config FEATURE_SYSLOG +@@ -258,6 +258,13 @@ config FEATURE_SYSLOG # This option is auto-selected when you select any applet which may # send its output to syslog. You do not need to select it manually. @@ -31,10 +31,10 @@ index 3862285..525c157 100644 menu 'Build Options' diff --git a/core/network_thread.c b/core/network_thread.c -index b21d983..3edda1e 100644 +index 88042f1238cb..4bc100055e42 100644 --- a/core/network_thread.c +++ b/core/network_thread.c -@@ -97,7 +97,9 @@ static bool is_selection_allowed(const char *software_set, char *running_mode, +@@ -106,7 +106,9 @@ static bool is_selection_allowed(const char *software_set, char *running_mode, } free(swset); } @@ -45,4 +45,3 @@ index b21d983..3edda1e 100644 if (allowed) { INFO("Accepted selection %s,%s", software_set, running_mode); }else --- diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate/defconfig b/meta-digi-dey/recipes-support/swupdate/swupdate/defconfig index d0acc7dcf..f6c60bffd 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate/defconfig +++ b/meta-digi-dey/recipes-support/swupdate/swupdate/defconfig @@ -1,10 +1,10 @@ # # Automatically generated file; DO NOT EDIT. -# Swupdate Configuration +# SWUpdate Configuration # # -# Swupdate Settings +# SWUpdate Settings # # @@ -12,12 +12,12 @@ # # CONFIG_CURL is not set # CONFIG_CURL_SSL is not set +# CONFIG_DISKFORMAT is not set # CONFIG_SYSTEMD is not set CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg" CONFIG_SCRIPTS=y # CONFIG_HW_COMPATIBILITY is not set -# CONFIG_HW_COMPATIBILITY_FILE is not set -# CONFIG_SW_VERSIONS_FILE is not set +CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" # # Socket Paths @@ -43,34 +43,52 @@ CONFIG_EXTRA_LDLIBS="" # CONFIG_DEBUG is not set # CONFIG_WERROR is not set # CONFIG_NOCLEANUP is not set + +# +# Bootloader support +# + +# +# Bootloader Interfaces +# +# CONFIG_BOOTLOADER_NONE is not set # CONFIG_BOOTLOADER_EBG is not set CONFIG_UBOOT=y -# CONFIG_BOOTLOADER_NONE is not set -# CONFIG_BOOTLOADER_GRUB is not set CONFIG_UBOOT_FWENV="/etc/fw_env.config" +CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env" +# CONFIG_BOOTLOADER_GRUB is not set +CONFIG_BOOTLOADER_DEFAULT_UBOOT=y CONFIG_UPDATE_STATE_CHOICE_NONE=y # CONFIG_UPDATE_STATE_CHOICE_BOOTLOADER is not set -CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env" + +# +# Interfaces +# +# CONFIG_DOWNLOAD is not set +# CONFIG_SURICATTA is not set +# CONFIG_WEBSERVER is not set + +# +# Security +# # 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 is not set CONFIG_HASH_VERIFY=y -# CONFIG_DISABLE_CPIO_CRC is not set # CONFIG_SIGNED_IMAGES is not set -CONFIG_SIGALG_RAWRSA=y -# CONFIG_SIGALG_RSAPSS is not set -# CONFIG_SIGALG_CMS is not set # CONFIG_ENCRYPTED_IMAGES is not set -# CONFIG_SURICATTA is not set -# CONFIG_WEBSERVER is not set -# CONFIG_MONGOOSE is not set -# CONFIG_MONGOOSEIPV6 is not set -# CONFIG_MONGOOSESSL is not set -# CONFIG_GUNZIP is not set + +# +# Compressors (zlib always on) +# +CONFIG_GUNZIP=y # CONFIG_ZSTD is not set +# +# Parsers +# + # # Parser Features # @@ -79,25 +97,31 @@ CONFIG_PARSERROOT="" # CONFIG_JSON is not set # CONFIG_SETSWDESCRIPTION is not set +# +# Handlers +# + # # Image Handlers # +# CONFIG_ARCHIVE is not set +# CONFIG_BOOTLOADERHANDLER is not set +CONFIG_CFI=y +# CONFIG_CFIHAMMING1 is not set +# CONFIG_DELTA is not set +# CONFIG_DISKPART is not set +# CONFIG_DISKFORMAT_HANDLER is not set +CONFIG_RAW=y +# CONFIG_RDIFFHANDLER is not set +# CONFIG_READBACKHANDLER is not set +# CONFIG_REMOTE_HANDLER is not set +CONFIG_SHELLSCRIPTHANDLER=y +# CONFIG_SWUFORWARDER_HANDLER is not set +# CONFIG_SSBLSWITCH is not set CONFIG_UBIVOL=y CONFIG_UBIATTACH=y CONFIG_UBIBLACKLIST="" CONFIG_UBIWHITELIST="" CONFIG_UBIVIDOFFSET=0 -CONFIG_CFI=y -# CONFIG_CFIHAMMING1 is not set -# CONFIG_DISKPART is not set -# CONFIG_UNIQUEUUID is not set -CONFIG_RAW=y -# CONFIG_RDIFFHANDLER is not set -# CONFIG_READBACKHANDLER is not set -CONFIG_SHELLSCRIPTHANDLER=y -# CONFIG_ARCHIVE is not set -# CONFIG_REMOTE_HANDLER is not set -# CONFIG_SWUFORWARDER_HANDLER is not set -# CONFIG_BOOTLOADERHANDLER is not set -# CONFIG_SSBLSWITCH is not set # CONFIG_UCFWHANDLER is not set +# CONFIG_UNIQUEUUID is not set diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate_2021.11.bbappend b/meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend similarity index 100% rename from meta-digi-dey/recipes-support/swupdate/swupdate_2021.11.bbappend rename to meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend