From patchwork Thu Mar 14 14:42:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1056563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23f; helo=mail-lj1-x23f.google.com; envelope-from=swupdate+bncbcxploxj6ikrbxwqvhsakgqeyzfx27q@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="RRoBjEns"; dkim-atps=neutral Received: from mail-lj1-x23f.google.com (mail-lj1-x23f.google.com [IPv6:2a00:1450:4864:20::23f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Krz60vSSz9s4Y for ; Fri, 15 Mar 2019 01:42:42 +1100 (AEDT) Received: by mail-lj1-x23f.google.com with SMTP id v8sf1636936ljh.20 for ; Thu, 14 Mar 2019 07:42:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1552574558; cv=pass; d=google.com; s=arc-20160816; b=NHinrKb28nqN7d/ErBvZcdS3OT6PCwQpcRz+UbDnNmHJ0QykND/fTc55k+dW/Ns9pj wFnLgQ0ej03QIIGFt+C2K8erB0ALYAwMDr/slrP9lptct4Y4wrgFVptBsIkYx/9xTmCO DF1TlW4YY3fM0zkDuq3G5mRqGcVVYw+IecshH/8dhYOCcr9PSHFVwe1cCb8NLUfGvLgt oySNvZwZGEtaMT+C04MxVCeISK073qpDhEhna+bxsT/q/OMFihsbqUzfrfJF8o++V7kw k56NYhi9llZW2G4ubtRJhl3aHYlMMK7o8iKa+ngLG0flgjxA9gCP7Y54uD9kIq9cvOBP 7HiA== 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:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature; bh=rVw5Q4ATVgW6j6cRL4QQCJkcpdyjBTFOAr7A/pzdtIE=; b=soBA03w6fGd+WXsBDcvHTM5ZXj17QWeND65RAbYPZZCYYCWnVYI7xidOuP9eE/saLk sC6ygNCo7HnM+XGqvxnbtn9Iq+/4Cu7s1LnjaFX/PwrJ+YLUsFrfbxiMJ09GzOj40ENp THWcXUlFJzfmIydLIAC1BkUx8vU5SaqQzd4HtT8Fkkfs7nHlc2ebYf2ypMb2YTWUKHkb DVdRRnWri3xH5UR/ZkBxsjgjHdnH+GirD0+JMUmzaIhCU7ctfH7g+5YN+aZMBO6La307 C8/AEtoCr6B/N4quS7DSGED8UfqnznmikS2QD3cQy2WIKh1/ahynlWS46uEGJO4H/AkD 4tvQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=rVw5Q4ATVgW6j6cRL4QQCJkcpdyjBTFOAr7A/pzdtIE=; b=RRoBjEnsuV9Xcqs7Fwnrbc37mmHmc62/asQS9PzhAvDtfrxdj/tQVxxY/1spwTes5a C697dU2x1ibgr7S+x8uHQsH2ZZR0j0Co04p4dpYFqkL9XEXjczbyYyFP62kLIttOz0kt yVDY+XcQtXrs/zKu79Sdd3wxn53zqFeNc04/IWelCmMFYeUQKJ/KlSej3UDZub2msVCI WOs6Sxi4qOL/5xLOQH/JmIqd4EQtSG4zcawfdnj46sAydCqfyjIZ155xfFB0rYN0rQSF V6ndQF+bMnEG5gE3D/yR1ykj/lvpouMfRrxDn9iYWQGHAwwfF8Ku2U91bt+33838g8KM +tbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=rVw5Q4ATVgW6j6cRL4QQCJkcpdyjBTFOAr7A/pzdtIE=; b=G0UAJUEy8jzwYsolEgzlevbv8U9a2UiEUWkrsO/BkwV5gHsep8chYT29KAkpJnA0fh qreSKbqLAbWIehnhRsUcrCRxweuORrFcBlDaraALzLq6HhqenYJ8EBcLcm5StwvjTQX2 3LwXK79c/4bIHz01iP/dEaWQMNUkk+fiYTGDUrWnslZsTs7lyIL0qw0QAV44BncFn+ZK lo6PlaADdNIPm3ilf0TYb+cyVxG1TqBW8xg8IH3uUiVAdGHILP5AwUKOcbe8WJH/0hVp svqbChP625ISkhjdevy1zkNnTEYOE+ekfWDSsWnD3l06ZLuu23Frq2LGIoSCu3wZkPWR BYFA== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAXb0AhZEOxcu0d2Snv7yVfsk/8NymR7RvQgLffezzbtauq5rhY/ kX3CF6S+7lLwrkkPwFCQKGg= X-Google-Smtp-Source: APXvYqw/cu3/X+E1pDoIvqtL/JV0HYotC46lD1iSyoydYOwKQO6qTj23WqLFC0ODwHi9v105Wp4A6g== X-Received: by 2002:a2e:3e11:: with SMTP id l17mr894296lja.172.1552574558849; Thu, 14 Mar 2019 07:42:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:4d0:: with SMTP id a77ls770249ljf.1.gmail; Thu, 14 Mar 2019 07:42:38 -0700 (PDT) X-Received: by 2002:a2e:994b:: with SMTP id r11mr3000813ljj.15.1552574558353; Thu, 14 Mar 2019 07:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574558; cv=none; d=google.com; s=arc-20160816; b=e01XD+uD5X19Jr8BhdWIS5Q+L3r6fl38KcsYmG7LkK5eAqJofvdtRYZxTbqHtuIpxy vYCusFPfb8jEP2mDhvwr5qITJ19fy1IxSewb806ux3q3YFBqIHMiLFoLyXBwEM20frqh Lu2pV4MyAEIvIJjCW393Cjc1QW/WqpBM/CZV3RzHSHBs8suUpalzHUkq3Pp7d0Am+cEd ey4um/yErub4WdPR2wpdE1uOzs4y9o2D7BvPkEvlaSTy6F9PG82YZdy2yFq8VFAelESP Ndks/kiYWwYBJZBhE4yL3p4co/s+z6I6jGNE9NIBjE4DVZ6YE0J6/thErfqLdHBevHRz FPmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=xkWYnvMCrUBcqLg6IBYNf8xFxgs0SYQXUV9pz8Q+PLc=; b=n+AMtemR+0sqWXm9rEM5IAK2P9PD0XnrCCCpcTHdVZ1OaCYnfITulwbFlLHmO5gVJl 3wlitNAc1U/mK48SU2HX0z2N20epXpS3ohLAKxsjF3rwYo0i6NjZkcs4kMLHHUpNPjOx 0bPfddi4qS7yv+iCURs5qRksBKRdjM6uvhD0HSNuixa+1qUnqUSBsEbiPBW9duY4GmOk nwEnlIaLS+ivhsnVRJbweaTwhYS6X3vcdPllIttkFs6bqYG/47XaNELwJyplrRD7ALxj T83aaOEZd9X+uJubezTPX7ifuAjq9jMt9SGXkCkmOYU05RniAbEaBunIZL/MSa1hyLpC ZpFQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id f20si531782lfc.5.2019.03.14.07.42.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:42:38 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44Krz166MKz1rWHW; Thu, 14 Mar 2019 15:42:37 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44Krz15wR8z1r2Hy; Thu, 14 Mar 2019 15:42:37 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wOL0hTs3Xs4S; Thu, 14 Mar 2019 15:42:35 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 14 Mar 2019 15:42:35 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id C42AC4540419; Thu, 14 Mar 2019 15:42:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id RuQugAhMy2NU; Thu, 14 Mar 2019 15:42:33 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 2DACE4540115; Thu, 14 Mar 2019 15:42:33 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Bootloader script must be adjusted for new API Date: Thu, 14 Mar 2019 15:42:31 +0100 Message-Id: <20190314144231.7375-1-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , Former script had the syntax: but it was changed to be confor to u-boot format, also used by U-Boot tools to generate an environment from a script: = Signed-off-by: Stefano Babic --- corelib/installer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/corelib/installer.c b/corelib/installer.c index f7809d4..a451a2a 100644 --- a/corelib/installer.c +++ b/corelib/installer.c @@ -169,7 +169,11 @@ static int update_bootloader_env(struct swupdate_cfg *cfg, const char *script) if (!key || !value) continue; +#if CONFIG_UBOOT_NEWAPI + snprintf(buf, sizeof(buf), "%s=%s\n", key, value); +#else snprintf(buf, sizeof(buf), "%s %s\n", key, value); +#endif if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) { TRACE("Error saving temporary bootloader environment file"); close(fd);