From patchwork Wed May 15 07:56:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 1935331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=O2lx6tyv; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=j1qeFoCO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13d; helo=mail-lf1-x13d.google.com; envelope-from=swupdate+bncbdnyr2ftvyebbugssgzamgqef3acvjy@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lf1-x13d.google.com (mail-lf1-x13d.google.com [IPv6:2a00:1450:4864:20::13d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VfQPy4Z23z1ymw for ; Wed, 15 May 2024 17:50:45 +1000 (AEST) Received: by mail-lf1-x13d.google.com with SMTP id 2adb3069b0e04-5206ef0d6fdsf5766814e87.3 for ; Wed, 15 May 2024 00:50:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715759442; cv=pass; d=google.com; s=arc-20160816; b=A054LcRxokbzzmaHXU35bIO7AUlkiQfRmDEzALKXvL1Ib69zcTK5OAhFuyrnb63kG4 fMNmOM+y6W1dy3h2K91Q7I/84+Z0CrxQoA0gjKS3aWYOCpIwNIB0AsM54BfIiP8+5VTc He8eKQmfq42bcjtIpfPCPs4HHTMgrfyduc8RGtjmXuK+CTzSeZHfITxrVnDjEa5w96PX jp9raDgehT6ix4xkL9R++/l4AXd/9+3pyb6h2Sdk5xfRx/IGLhGwDJXVSzLBGlQqv1um MxuYgxAQZAYoOkOdE/S2w3bC0DnpePHR+ngqpblBF4KQoNWFj6WWpCPjmTYuwhkIFD6g SpHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=WfbIDEzggwTmblin2X1HcorVBHItC8lKmrG2VMHosmU=; fh=FSpaOARi0aL5dIJDNF8qurVQUHbF6pi3zkH1OOz13Ys=; b=0fp4MqAmz7bhYeZrPKitqE5NgnkyAxvhwceqDsPORgNefmzA9Hfu0/dmcl7FZnqyaN X5Hir61iYYERPznT4t0nnWjnNXQFG7eoGvv8LcOmcnwxnxLXjqPt/ckZ9GGnVVaZ2TgR oGEf7/ChzYqRf3UISMPGHdAxki91VKiYdfT640v3vc+XC4wPhAyT9V5ceKNYpdNt2dr+ n0GWcrSh+6VWwPswcYJ5++UbdEtnTN9Fi1SwkLDRqfzrcOL98+Rr+3zKhLyFOO3rJoEx 5+jsl2dSdq+h9i6sIstgeZtAXFho1tJxcUpw780orPHHgy0o3cn/JkAzmWf7f5zaKgGh a5Dw==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AxEMrhSe; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1715759442; x=1716364242; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=WfbIDEzggwTmblin2X1HcorVBHItC8lKmrG2VMHosmU=; b=O2lx6tyvMd0spHqeQyWLrIBWbwx/taLYjzOxsPtg3TdOZP7b8ncBQUx5AZ6MKwF+Le YzGo9ZDZLZ5I2QLp9umqMmYl8ohzKy1mLHuRhzYA1mv83BfFmqeI6QkHcK6dg6lb1H5n Sa3G/UPNTRWAmea23hu6x3LqRetHtrBIPL44k2zR3BhxDzkoeDvfbqpXeXvanCIHzPNj 7X49l4ipBp0pxMcaFbXDGp3QCgxe4FUKYfHxXR55ZVxB0NOp8sb9TtpqgULo8sdESah6 TDWfqivHWzoZyoHNj4kQJEv/qd2IX/03QL2sL99HVHmtP+H4Dwy1C5Tv37OGNb9bECAp YbHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715759442; x=1716364242; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=WfbIDEzggwTmblin2X1HcorVBHItC8lKmrG2VMHosmU=; b=j1qeFoCOFmcGxbeYkfMWcNlLAAixQf/uQe4TO0JOtETIQP2S3VrDM33Ks22UQMQ7+Z 0VOWsmaPhdi66kdLGGLb/vQyRyILobnKAAuK2vA5ouYtDIH7wRIeeL68ofqrrm/aeoI0 7Hxue34hacyIdrEMqDvvlfKegHOQa42W6pLTIZGTlC2NBMt+nq7pBORCTU6t9tupfsg+ GP36yes9qjuv4wFVh5qc9L59txmohYYsaIy80eH7xQw8McBn+RXyIMgRpSsgdyIM71gE ds18YOzut2JQJTH705V8gRK1A+bHbUm5XYziQYRcfTibIZ8gmKxSjRraGXAd8XVGmRDb 4D8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715759442; x=1716364242; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=WfbIDEzggwTmblin2X1HcorVBHItC8lKmrG2VMHosmU=; b=HTce9V9zpwf1EZGn/JnD5Pqa02hctY3c/O4j3WILS3VUGVaQLriLAMjpmou8Wpf9Zq /88x2WWsYvtQ+UkS39BknTW0EC4/uQhL1O7RgTSQoEF7E5CYyGY3RHH3btkvOSJxDfjP Vi1rMTB3QADcYxMKCeOLdfz9+NHepB+OLMddHLnSNPZShTeoTSYcbRWvSqjfY8VN9kPm K2PJmT15SFo4rPEeKiguh3CQ5nz16rflsXRam5CT4vRy2e0SvjrjLYSjxpBHxfMaE20r GFApfyoIOQJ4Rj9GTsxxwlwuTWwUagOx7YlD2I3hXvQzkeO60f0EhQkSXy41eoTYC3tG zVfg== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUZJi8I4UMvG/3wJrSZvNZzSE3lpb6tYp57ZjRqvo82VnoP/nP+cj1zTyv7j4SNFtsRy9INjosbmzAMLCfh7L0j9Ue7eXOY/EEO5BC59w== X-Gm-Message-State: AOJu0YwTHPjVlDewUmZjaSss6bP18UpX/V07WMa7mVfapNEGW7Pe8oFW H6XMim21aDTwk5t4eY2iPvFo0jC6mypi0QcAvrhiAL0ZkzyIx4ml X-Google-Smtp-Source: AGHT+IGjYij9HYnI02A9SB2TLmD+LKNZX582UyQkZpmgTskE1N/yzUywI8fDExa4QwyxiOKJEjucgw== X-Received: by 2002:a05:6512:3b20:b0:51d:2eba:614 with SMTP id 2adb3069b0e04-5220fe7a025mr11860983e87.53.1715759441358; Wed, 15 May 2024 00:50:41 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:3f0a:b0:51c:17d5:cf19 with SMTP id 2adb3069b0e04-521e30332b1ls1650897e87.0.-pod-prod-04-eu; Wed, 15 May 2024 00:50:38 -0700 (PDT) X-Received: by 2002:a2e:97c3:0:b0:2e1:f253:152a with SMTP id 38308e7fff4ca-2e5204aef69mr102423221fa.51.1715759438514; Wed, 15 May 2024 00:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715759438; cv=none; d=google.com; s=arc-20160816; b=LTBVrIEnw0uPgRkAPGkdrNs3svlmPsajvNRQHE++ic5bfMvrC4FUGr+dy+xtXHhG9W JnsfCH14rNxY0+gjdnYB0uNCpkJkkgZXB7rn2tcSaosUgGNCc3RC1PuwOsObE2PQGPhP Mcs048WUqsaWm6Xvewf5oNu2NUIvtqLw4sF7nkeON3LC7sI8LBIlGKxjcs+RwXa4oTun mub0vIhrUFKXKOValEw4d6WsJwj2/XlDTfhsOPmm2M+X8P1cRRiYRDYs3IQ7+kX3OBMd V2QhDW+tzGZ6jg+Q1cF7rvsjX/1sefZ7SgIHnglUwB94/GCRmmDu/lPIyJlw/FATP3/Q J16g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=MZEnFdI2WgrRaP/7ZtiGSEeJTPTlth0/iDKrHSQDYpU=; fh=d3rZYTzcneVvSX3mhzOPj5zIKEZPLGfC1ku1Jeojs0o=; b=XzIaq9YVspVi2V1BeX6iOtnjiZ6v0kUjp2+bkjRHpKk1k/f3LHbaGqLfzE9hP9RzEd 43DNS86nFqeQuZ7Hs3TG4aBbPxdbIxSrLWxw6hNSre7AEoz8zaxoyD1Oh+4IvNRnGug1 zgd1IMMzAXMfRNg7DLLpIwjTXtE2QXIeyuV5gzirQii7dZdeXDdtAlmd4Z4r9JgfSOMi Sj2ZLejWGbRcwQRFl5iZlHfesoCMCipI3T+/6OxjORCitFpv68AyEtnRNhmNVFTB9UTp g0gzns5IQhYiomiKhkAvDkV4ClFIeE1+5HnbR0YiVige0UyJDspcALYxAhY2lfHbQqBe VQnQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AxEMrhSe; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com. [2a00:1450:4864:20::22e]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2e4d0bbe1bfsi3671131fa.2.2024.05.15.00.50.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 May 2024 00:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) client-ip=2a00:1450:4864:20::22e; Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2e52181c228so52246251fa.0 for ; Wed, 15 May 2024 00:50:38 -0700 (PDT) X-Received: by 2002:a2e:3618:0:b0:2e6:f632:5c6b with SMTP id 38308e7fff4ca-2e6f63260f4mr8491621fa.19.1715759437471; Wed, 15 May 2024 00:50:37 -0700 (PDT) Received: from localhost.localdomain (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e6d66c6276sm4164151fa.27.2024.05.15.00.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:50:36 -0700 (PDT) From: Marcus Folkesson To: swupdate@googlegroups.com Cc: marcus.folkesson@gmail.com, Stefano Babic Subject: [swupdate] [PATCH v5 1/2] Introduce --gen-swversions parameter Date: Wed, 15 May 2024 09:56:02 +0200 Message-ID: <20240515075603.1989380-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Original-Sender: Marcus.Folkesson@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AxEMrhSe; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , After a successful update, --gen-swversions generates a file with the installed software and their versions. The file is compatible with CONFIG_SW_VERSIONS_FILE and could replace that file if the end user want swupdate to maintain that file entirely. Signed-off-by: Marcus Folkesson --- Notes: v2: - reverse logic for: if (generate_swversions(sw)) { ERROR("%s cannot be opened", sw->output_swversions); } v3: - Change ERROR to WARN - Handle special cases in update_installed_image_version() - Add gen-swversions config parameter v4: - Moved back to ERROR and return failure if swversions could not be generated v5: - Check if sw_ver_list is NULL in update_installed_image_version core/installer.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ core/swupdate.c | 9 +++++- include/swupdate.h | 1 + 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/core/installer.c b/core/installer.c index 48c7fe5e..cc5ca34b 100644 --- a/core/installer.c +++ b/core/installer.c @@ -187,6 +187,24 @@ static int prepare_var_script(struct dict *dict, const char *script) return 0; } +static int generate_swversions(struct swupdate_cfg *cfg) +{ + FILE *fp; + struct sw_version *swver; + struct swver *sw_ver_list = &cfg->installed_sw_list; + + fp = fopen(cfg->output_swversions, "w"); + if (!fp) + return -EACCES; + + LIST_FOREACH(swver, sw_ver_list, next) { + fprintf(fp, "%s\t\t%s\n", swver->name, swver->version); + } + fclose(fp); + + return 0; +} + static int update_bootloader_env(struct swupdate_cfg *cfg, const char *script) { int ret = 0; @@ -279,6 +297,44 @@ int install_single_image(struct img_type *img, bool dry_run) return ret; } +static int update_installed_image_version(struct swver *sw_ver_list, + struct img_type *img) +{ + struct sw_version *swver; + struct sw_version *swcomp; + + if (!sw_ver_list) + return false; + + LIST_FOREACH(swver, sw_ver_list, next) { + /* + * If component is already installed, update the version + */ + if (!strncmp(img->id.name, swver->name, sizeof(img->id.name))) { + strncpy(swver->version, img->id.version, sizeof(img->id.version)); + return true; + } + } + + if (!strlen(img->id.version)) + return false; + + /* + * No previous version of this component is installed. Create a new entry. + */ + swcomp = (struct sw_version *)calloc(1, sizeof(struct sw_version)); + if (!swcomp) { + ERROR("Could not create new version entry."); + return false; + } + + strlcpy(swcomp->name, img->id.name, sizeof(swcomp->name)); + strlcpy(swcomp->version, img->id.version, sizeof(swcomp->version)); + LIST_INSERT_HEAD(sw_ver_list, swcomp, next); + + return true; +} + /* * streamfd: file descriptor if it is required to extract * images from the stream (update from file) @@ -370,6 +426,8 @@ int install_images(struct swupdate_cfg *sw) close(img->fdin); + update_installed_image_version(&sw->installed_sw_list, img); + if (dropimg) free_image(img); @@ -409,6 +467,16 @@ int install_images(struct swupdate_cfg *sw) ret |= run_prepost_scripts(&sw->bootscripts, POSTINSTALL); + /* + * Should we generate a list with installed software? + */ + if (strlen(sw->output_swversions)) { + ret |= generate_swversions(sw); + if (ret) { + ERROR("%s cannot be opened", sw->output_swversions); + } + } + return ret; } diff --git a/core/swupdate.c b/core/swupdate.c index a421e888..6ddff310 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -111,6 +111,7 @@ static struct option long_options[] = { {"no-state-marker", no_argument, NULL, 'm'}, {"no-transaction-marker", no_argument, NULL, 'M'}, {"output", required_argument, NULL, 'o'}, + {"gen-swversions", required_argument, NULL, 's'}, {"preupdate", required_argument, NULL, 'P'}, {"postupdate", required_argument, NULL, 'p'}, {"select", required_argument, NULL, 'e'}, @@ -173,6 +174,7 @@ static void usage(char *programname) " -M, --no-transaction-marker : disable setting bootloader transaction marker\n" " -m, --no-state-marker : disable setting update state in bootloader\n" " -o, --output : saves the incoming stream\n" + " -s, --gen-swversions : generate sw-versions file after successful installation\n" " -v, --verbose : be verbose, set maximum loglevel\n" " --version : print SWUpdate version and exit\n" #ifdef CONFIG_HW_COMPATIBILITY @@ -320,6 +322,8 @@ static int read_globals_settings(void *elem, void *data) "preupdatecmd", sw->preupdatecmd); GET_FIELD_STRING(LIBCFG_PARSER, elem, "namespace-vars", sw->namespace_for_vars); + GET_FIELD_STRING(LIBCFG_PARSER, elem, + "gen-swversions", sw->output_swversions); if (strlen(sw->namespace_for_vars)) { if (!swupdate_set_default_namespace(sw->namespace_for_vars)) WARN("Default Namaspace for SWUpdate vars cannot be set, possible side-effects"); @@ -475,7 +479,7 @@ int main(int argc, char **argv) #endif memset(main_options, 0, sizeof(main_options)); memset(image_url, 0, sizeof(image_url)); - strcpy(main_options, "vhni:e:gq:l:Lcf:p:P:o:N:R:MmB:"); + strcpy(main_options, "vhni:e:gq:l:Lcf:p:P:o:s:N:R:MmB:"); #ifdef CONFIG_MTD strcat(main_options, "b:"); #endif @@ -623,6 +627,9 @@ int main(int argc, char **argv) case 'o': strlcpy(swcfg.output, optarg, sizeof(swcfg.output)); break; + case 's': + strlcpy(swcfg.output_swversions, optarg, sizeof(swcfg.output_swversions)); + break; case 'B': if (set_bootloader(optarg) != 0) { ERROR("Bootloader interface '%s' could not be initialized.", optarg); diff --git a/include/swupdate.h b/include/swupdate.h index e18de8d3..ecad2d82 100644 --- a/include/swupdate.h +++ b/include/swupdate.h @@ -49,6 +49,7 @@ struct swupdate_cfg { bool bootloader_transaction_marker; bool bootloader_state_marker; char output[SWUPDATE_GENERAL_STRING_SIZE]; + char output_swversions[SWUPDATE_GENERAL_STRING_SIZE]; char publickeyfname[SWUPDATE_GENERAL_STRING_SIZE]; char aeskeyfname[SWUPDATE_GENERAL_STRING_SIZE]; char postupdatecmd[SWUPDATE_GENERAL_STRING_SIZE]; From patchwork Wed May 15 07:56:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 1935332 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=MWSmEV/d; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lsO8daCy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33b; helo=mail-wm1-x33b.google.com; envelope-from=swupdate+bncbdnyr2ftvyebbuwssgzamgqe7uanapi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-wm1-x33b.google.com (mail-wm1-x33b.google.com [IPv6:2a00:1450:4864:20::33b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VfQPy6Z1wz20KD for ; Wed, 15 May 2024 17:50:46 +1000 (AEST) Received: by mail-wm1-x33b.google.com with SMTP id 5b1f17b1804b1-41c025915a9sf30965585e9.3 for ; Wed, 15 May 2024 00:50:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715759443; cv=pass; d=google.com; s=arc-20160816; b=K72AId+wXBoPtGn8/RSS79U0KZfBfwd0ur8IsoWpkL2jF7S+p9pseXu1fVf+AapkVv 6CA5r14VAundMeK0cLGnSxTUQ7wqXuYp/sQG/mD3LkB3PnQ3eb0/S/+GBa0QRqbv4Piz Bqri0NV39vi946DE8tGloXxFZ1BQC5M+AOfswJ4rW5bRhb4VcOtKL6Kv5d69mptHuLVL KdftB5ATDXmK7tN6HbQDfQ92yM31kdTyr6I0BCnXxHkM4TAq9p2D4JuChXee1sGOH0HS CCQ0UtjDk0cE2TUbqu9cRLRApQt3VNPLue8tTJTXMJCGUAT6R7yxbm92gwRvayzjKotp KMqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature :dkim-signature; bh=JsjR5IJWjogwXY3pgHQciOitt07zbZyUmQCkYnHkvL0=; fh=ifvOfusQc7xaP9eQYTy5aiSg+O8VYmGWKJoZz85v65I=; b=AVauq5AHeQlpq7CkGwXSMfiCOO+23XM1tYgqxPMB8h5PY3zMzP/mmVXp/plRDQh9Vh e7tHB/SuCykKXySWcVnW7Ka0QVgNllJwKShgrV/5A6JJm2yE6XVK4jR9M+baYoMT70rX 9WmD4htwSyxxCchlXhwmvFeakWrA6GMUh5FNlL8K0uZtaPqc83aQpz6Rdy2TzMbQCrLR RvHEZpdMlfi4pOwlW1hKJQ8kmBemeBPpvVL/yPeiZ7IuFkGoReeusov33yCYtT1Jg1uY G2nMeTdvnBx7TDGqVK4bNe7/fQED3F+HIcyMWOP1vzTGvrVnTGmTvAp9dINGpcMwlZHY oQeQ==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h+9S6bO6; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1715759443; x=1716364243; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=JsjR5IJWjogwXY3pgHQciOitt07zbZyUmQCkYnHkvL0=; b=MWSmEV/dAT7gDkjsG2Ok9zgfCaAhQ10ySbZ+YfrH+Ib1bSMlJfV2psAdcuEW56QoGq hZHZjgCARGufHFR10TwWuMfaFhnmApi+aZnorI/LpiM3SX4v5xHRJYJzRnQ1IFfLnFwH yY5F4/fNo6rAwUV0v3VSJMXs3PyKfoj4IAYCzXeLZhQ/3XrzruROm8hgUtfnHorTiM0Y T33XgfC3Zgl2AcLOJo1affaEtt5KkwhEIAsKcOeKYIPl4FtSzSCvTJHO7JBK/6QiqA/4 rw5S4YTaiTFAmIat/Od9CzHkyZie5z6UAjUbVIWNC6gcii0MQEo2fsz3AleMuu8pU/Bq 8ygw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715759443; x=1716364243; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=JsjR5IJWjogwXY3pgHQciOitt07zbZyUmQCkYnHkvL0=; b=lsO8daCy8LcebxrL04oPo6Aqky6T579ossN355xK4uRu9Vti21bCk6T/LCNN1qM/uO abmRAjvDmcSP9W6oXcyq/+RmTYJUnkI9VRrJfBiSnUHnFhCLS33nwgSoLiLi2m91i79X XAqejvvXFq7eubHTvv+VNlmZzv9QJSCQp+djrwfUPzNaD13QDDDfctIYLqZE1pcRAW+w U+g3WZj3ZTFIY58+TICZBrRV9ZkuMOIqUALpMprT65MIGeK0/aWJrPgtB7QEvZgOIXEl VDEoA9T5Ng67uboufCu3qqBYliJtlsyIJe7GJNZ3d8m9HfaN53kAa8z7c77qMSMTCNqn Qmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715759443; x=1716364243; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=JsjR5IJWjogwXY3pgHQciOitt07zbZyUmQCkYnHkvL0=; b=RCD+2skt1Lq3ILhC3+vMpfT+Z935iCtIdMt6+w0+fHxsDv9pdTkjcKMZf9id3l4nP5 7F7400WuLGWQJWZJ2zsXTlenNa4u9mdVILhi8kwKDoLF9gdYkiWmfNsI/6BYq2paL2rJ PqfNlIcwh2o0qmbS/BMj/Pjrg8dBaqvr6Bgy4vL2tDBbt7fMY7HkD4+sGWyAOC95FZ7x y4cN0dyCA52uiivj2tzose2Fi4UQIT0t5x5j3hOclhqTv/IBCR9JLe3pHfj2vbQmIS3e WaYsV6vsa6DHcqS1HLInHK7rwmKLRln7r4icKrWxAjXlZJ8rl463qZXF8Lu4MtE61eL8 nwXw== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUP1yWMbJcK/MWSbfp/LgbcNWjejPo9Xi1m77YlS7V8fQVK+uYj9NoMH3rupHA9X8cVM/kR3SWoL9xhcCldvgH/Jnjidgn4sWyI9mhWww== X-Gm-Message-State: AOJu0YxNFwBNop5mQolNBPgcQXr5RReuKyQ0sEMrFqyrpzDfYeqE+KK1 bmqLtGKSjUkAjYigfrLMKvLzYfPo0TX+AxhF74IV7QBmhgEhLTHl X-Google-Smtp-Source: AGHT+IFUaobSXwP6Gb/bywD1CS+dG3H3c7clAw45ghmuWA515lUluMgXdlaEiP1YTyzML6W1c3LR6g== X-Received: by 2002:a05:600c:5487:b0:41b:851a:af43 with SMTP id 5b1f17b1804b1-41feaa38f9dmr101195745e9.11.1715759442973; Wed, 15 May 2024 00:50:42 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:5129:b0:41c:35c:4eb5 with SMTP id 5b1f17b1804b1-41fc1ff211dls28140455e9.1.-pod-prod-09-eu; Wed, 15 May 2024 00:50:40 -0700 (PDT) X-Received: by 2002:a5d:4dc5:0:b0:34d:a23c:cb4a with SMTP id ffacd0b85a97d-3504a61c8a5mr10947738f8f.7.1715759440093; Wed, 15 May 2024 00:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715759440; cv=none; d=google.com; s=arc-20160816; b=Qu+9SvqM1ooyJ+Hecbc+yRtH9JZiG45h/HkbCx+U8jcoaQ5CxrXD2IB3uCAEes/6gc N0ams6lyRUBmVm+oSfRZpNwXqZOvs4hwou6syn/PdAbmntT4NhP1R58yV4txvOMe47xL hzvVaTlR+WKIfBmJJExDqcVcIK9o50Mv4GSbM8Je7PgQEqBe1VjE64ZjmLVgq+SD1fty ovxSnM0LgMLjnJQ0wtnKKLDG9HDwt+Wpl6x+MWlfdf3AhhUyit5v/AOwy+304yfSKgoZ 03R4go0j9f3JfilOM6lA/NxFBRwM44dbUEhjSlzGI4a8Po44E3cWi5eAI0mRlX9biYuw eaeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0l0Hi8mLU1dbyYjvm2udp487ZoWUPtiNW8irYpzpL6I=; fh=d3rZYTzcneVvSX3mhzOPj5zIKEZPLGfC1ku1Jeojs0o=; b=WWNa22Zxw2G1pZ+R4MN5kEWaiagngCWQeUxYX/CTMMQ/inK5EpRzIH6dB/0stWTVqY j10r3w11MeZnsVqHZrsUOQNxWoeS01r4a+I1A8RDdiVxBD+HLoi3HJxoZ/Yic0725qmf e0T7Y0pIZEtP4oUL5fSw25Hs73dl/tvKj5Ulz2xnCaMOhw8qrKy3CFhV7DxSttlKxp+v PpxSYft7/GgtpCwtl4Y6HYHfjZO8TaS4wD5De82k1DNXbV8zbj4N6cymSHGSJ3gOeyw1 oqUm19dYivSbQz95yNc0zq6vKal4Q12JxQrFpiXxKJ5KcjPgzvwG4KmaFg/VYkWD3Q/X 9/pg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h+9S6bO6; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com. [2a00:1450:4864:20::234]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-3502b33afdbsi404480f8f.0.2024.05.15.00.50.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 May 2024 00:50:40 -0700 (PDT) Received-SPF: pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) client-ip=2a00:1450:4864:20::234; Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2dfb4ea2bbfso76315661fa.2 for ; Wed, 15 May 2024 00:50:40 -0700 (PDT) X-Received: by 2002:a2e:8255:0:b0:2df:8ce6:96ae with SMTP id 38308e7fff4ca-2e51fe52568mr85699631fa.7.1715759438862; Wed, 15 May 2024 00:50:38 -0700 (PDT) Received: from localhost.localdomain (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e6d66c6276sm4164151fa.27.2024.05.15.00.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:50:38 -0700 (PDT) From: Marcus Folkesson To: swupdate@googlegroups.com Cc: marcus.folkesson@gmail.com, Stefano Babic Subject: [swupdate] [PATCH v5 2/2] doc: document the --gen-swversions (-s) parameter Date: Wed, 15 May 2024 09:56:03 +0200 Message-ID: <20240515075603.1989380-2-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240515075603.1989380-1-marcus.folkesson@gmail.com> References: <20240515075603.1989380-1-marcus.folkesson@gmail.com> MIME-Version: 1.0 X-Original-Sender: Marcus.Folkesson@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=h+9S6bO6; spf=pass (google.com: domain of marcus.folkesson@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) smtp.mailfrom=marcus.folkesson@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Marcus Folkesson --- doc/source/swupdate.rst | 2 ++ examples/configuration/swupdate.cfg | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/source/swupdate.rst b/doc/source/swupdate.rst index ff00ca02..b8df7fea 100644 --- a/doc/source/swupdate.rst +++ b/doc/source/swupdate.rst @@ -538,6 +538,8 @@ Command line parameters +-------------+----------+--------------------------------------------+ | -o | string | Save the stream (SWU) to a file. | +-------------+----------+--------------------------------------------+ +| -s | string | Save installed version info to a file. | ++-------------+----------+--------------------------------------------+ | -v | - | Activate verbose output. | +-------------+----------+--------------------------------------------+ | -M | - | Disable setting the bootloader transaction | diff --git a/examples/configuration/swupdate.cfg b/examples/configuration/swupdate.cfg index b46c92d9..69a57e61 100644 --- a/examples/configuration/swupdate.cfg +++ b/examples/configuration/swupdate.cfg @@ -52,6 +52,7 @@ # variables. This can be overridden in sw-description. # It is one set in libubootenv configuration file. # fwenv-config-location : path of the configuration file for libubootenv +# gen-swversions : generate a version file containing all installed (versioned) images. globals : {