From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA09C4338F for ; Wed, 28 Jul 2021 15:32:56 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8070360E09 for ; Wed, 28 Jul 2021 15:32:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8070360E09 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C35D980FB4; Wed, 28 Jul 2021 17:32:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="MZFOoUen"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E7CBE8290A; Wed, 28 Jul 2021 17:32:50 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 457C280D17 for ; Wed, 28 Jul 2021 17:32:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x735.google.com with SMTP id b20so2599509qkj.3 for ; Wed, 28 Jul 2021 08:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RTimJ04Vahcnl1mIIIjvj6bb0N+L5GYaSyYq+Qcu4A4=; b=MZFOoUenrB08JpmezS8b4aL2/h1U742G3McPxoeQvK26PDI2gd/4icjCuVeHTwSHNx FEPm9N0oFpr1Op55nRlLS57qzkWwYS4oqVILXP9dqdw7zvsvcXdgGBiWAS5igcc0o7M7 KKokcK0D6bcRuGwNVmyxvjQwWtQ9gX32LyO+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RTimJ04Vahcnl1mIIIjvj6bb0N+L5GYaSyYq+Qcu4A4=; b=WcVj2BwJAY2uKLD6vjS1+uNAmOMb61gVrIrrWDcCKXLfZbLG4TtfHwgBegUuDaLRxR ru17HylvoboneAM4eWXYS707eHFMm+Fl+sML/U27ky+6cG7s+0ryXFbCq/uIIWwl9Fm2 8EWgKwR4zEV0lt3kZeiI5p2612VS3NoWc6nGVwbgO29Zti6jCOfaYUfnGhbnmdLeDhNZ CsDbHZrg1D+D0JyjQAvjfMJS/IH/ae0UkDjcdinpn5n5mgT1OxU5eknv5f9cU6f5WeqE ZbImPaNNXWuKui39jdfniwB5NetQuTcSFsvSizHj6brDlovaVmBaHPl1xbl/citPA+jw 71ng== X-Gm-Message-State: AOAM532BmW0nLHmT4+5Yg36336gbOmM9BADvb05jlKeXGzjGhs6dCKvE RfD7x5AjXSKC1KIbuyfJWMcR9A== X-Google-Smtp-Source: ABdhPJzTs/fH6oLAWbYOrLkogcnBMxcj2u1m7KVLKlFyilzDAi7pn1XyOJFkcNTZhOdGSEwhcKYyOg== X-Received: by 2002:a37:b8b:: with SMTP id 133mr257071qkl.62.1627486366019; Wed, 28 Jul 2021 08:32:46 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-9c07-e31a-fc07-a573.res6.spectrum.com. [2603:6081:7b01:cbda:9c07:e31a:fc07:a573]) by smtp.gmail.com with ESMTPSA id v5sm168929qkh.39.2021.07.28.08.32.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jul 2021 08:32:45 -0700 (PDT) Date: Wed, 28 Jul 2021 11:32:43 -0400 From: Tom Rini To: Pierre-Alexis Ciavaldini Cc: "u-boot@lists.denx.de" Subject: Re: u-boot saveenv to redundant fat does not persist env Message-ID: <20210728153243.GN9379@bill-the-cat> References: <20210728152310.GM9379@bill-the-cat> <58E33AE2-4B84-45E4-9F80-B85CCBFBB67B@getmailspring.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9b4eu16IbjLAsbt2" Content-Disposition: inline In-Reply-To: <58E33AE2-4B84-45E4-9F80-B85CCBFBB67B@getmailspring.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --9b4eu16IbjLAsbt2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2021 at 05:25:48PM +0200, Pierre-Alexis Ciavaldini wrote: > Hi, >=20 > When I did, mender complained about it : > include/config_mender.h:41:3: error: #error CONFIG_SYS_REDUNDAND_ENVIRONM= ENT is required for Mender to work. Make sure that: 1) All the instructions= at https: > 41 | # error CONFIG_SYS_REDUNDAND_ENVIRONMENT is required for Mender to w= ork. Make sure that: 1) All the instructions at https://docs.mender.io/syst= em-updates-yocto-project/board-integration/bootloader-support/u-boot have b= een followed. 2) All required layers are included in bblayers.conf, includi= ng any board specific layers such as meta-mender-. Check also https:= //docs.mender.io/troubleshoot/yocto-project-build for Known Issues when upg= rading. >=20 > I guess I could disable the check, but even so I'm not sure it would work= as uboot.env does not get written ? Yes, you should disable that check. Then you can debug the fw_printenv issue by itself. > Thank you, > PA >=20 > On Jul 28 2021, at 5:23 pm, Tom Rini wrote: > > On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrot= e: > > > > > Hi Tom, > > > > > > /etc/fw_env.config has this contents: > > > /boot/u-boot/uboot.env 0x0000 0x4000 > > > /boot/u-boot/uboot-redund.env 0x0000 0x4000 > > > > And what if you turn off redundant environment support? Mender does > > strongly recommend that, but you can just turn it off. Does that get > > you working environment from file and fw_setenv/fw_printenv working? > > > > > > > > Thank you, > > > PA > > > > > > On Jul 28 2021, at 4:39 pm, Tom Rini wrote: > > > > On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini = wrote: > > > > > Hi, > > > > > > > > > > I'm trying to integrate u-boot in our project that is a custom sc= ripted build without yocto, for use with mender. > > > > > The complete discussion can be found here : https://hub.mender.io= /t/pi3-usb-boot-support/595/54?u=3Dpeac > > > > > The problem is that when issuing saveenv in u-boot, it responds w= ith "Saving Environment to FAT... OK" but then using fw_printenv in the boo= ted linux, does not show saved variables. > > > > > > > > > > The system currently boots because i've tricked it by getting the= compiled-in env over uart (env print -a) and made a uboot.env using mkenvi= mage manually to enable fw_printenv to work. > > > > > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot'= s saveenv does not re-create it, so it seems to me that saveenv does not wr= ite uboot.env. > > > > > Here's the complete project files : https://git.iostud.io/cosmos/= u-boot/-/tree/cosmos > > > > > relevant modified files are: > > > > > - configs/rpi_4_32b_defconfig > > > > > - include/config_mender_defines.h > > > > > - include/env_mender.h > > > > > - include/configs/rpi.h > > > > > - include/env_default.h > > > > > - include/config_mender.h > > > > > > > > > > Any help or investigating direction would be greatly appreciated. > > > > > > > > What does your /etc/fw_env.config file look like? > > > > -- > > > > Tom > > > > > > > > > > > -- > > Tom > > >=20 --=20 Tom --9b4eu16IbjLAsbt2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEBeJsACgkQFHw5/5Y0 tyySJgv/Vi4ZZW5MrbTyDgxUmd/Dh7Rw74GfmhgdPLHP4IJkhATJF682TSJJzw7Z iphpoWSAH8RHLAl/mfpEUNNmRa+tE0pRPTKcLhsDUAAtEweaG4C26DOvWsKncpaz tszE5Fr25cBdvT/pYHYW2m4Q+K5Zx53660GFVU3XMgMZkHNkOAGY3IDWIVIK6Rk7 MkDvzTp8uU7sbY5vafPNkZ5HZ6s/HRrwBUapJKKBp3+AEqM47VpTzafBj31LuvKK JeLUW+oYbAp8igS1SWgc/DoDIxb7VVtTAwTluk2dcKvI+zavcxLewL6aYyth782A 0YcScUlzGy4yEfe28a+qduL8NUcS/HvsWLYqUOA0ULCt1TgR0R1K2L30yuEZca6v EuH2Wk4Y/ZcEuN+zWdtJOn7hVkZnIxf0PKbpy0RkkwDyjy+tvelDwWwOU6V3XFxV wLt2zYFN//lisHWrIfvrCp4J9rNe8gNNzY7hrMZCeXiFMG/1jnhEDadRkpYXSUbH XtibxDXM =jim2 -----END PGP SIGNATURE----- --9b4eu16IbjLAsbt2--