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 F3F40C4338F for ; Wed, 28 Jul 2021 15:23:21 +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 179F360BD3 for ; Wed, 28 Jul 2021 15:23:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 179F360BD3 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 80B8B82D3C; Wed, 28 Jul 2021 17:23:19 +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="ZXmoQZmR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DCA4082D49; Wed, 28 Jul 2021 17:23:17 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (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 6B82E82D1C for ; Wed, 28 Jul 2021 17:23:14 +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-qv1-xf36.google.com with SMTP id 3so1722293qvd.2 for ; Wed, 28 Jul 2021 08:23:14 -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=fGMbbl5mvzozA8YWYZmcyb+jo6G0xOMyaNQyM91rdq4=; b=ZXmoQZmRR5nMqlDt+wTHb9Zlux8T8BQ5exELh7phkEN0oUjmhxRf9TdRyAGaCa3G1A Z1Zyfdj0LyI5pXqhZaYoaaj/2pXieNuENcKTlumytRDUyJ11T9iaTnYsMvItBGttsbNr XKp4UA75T4SPC0U/fB4O6H3vVvXqcbka0hXgM= 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=fGMbbl5mvzozA8YWYZmcyb+jo6G0xOMyaNQyM91rdq4=; b=UJC18zkV/98rnlod4kQlQ4SgZKWemM8Vb2poVK3uKIAIUZmiQ6Xano5xGdnCeO+XQA h9ufgVqWFIT5LDgM9lfodg7ttvL7LJ7nKljKQixTh3qPBLCWMvpjGw0ISF4j8p3zlTEd ql/zy2EmBXnHbT7zTzm0nYdOd9QKgdYId59DVBisy+tvCqJUXPg5qfxgnL5YtIeK8/qs ULKB7m1k1hh+B6qecDeeI3yvGlQsZLMc3euP0VM10cSbkdtnIRKHO2efOGK61SkkZKEj gY0q/cbUmd92aNWe5dd3Qyl3gG0iDD2z5i153hC9zA2dA4Vh/lpy9ku/vRqfSx2KK435 A7vw== X-Gm-Message-State: AOAM530Yrz76hbBrI70UXNqE3ZvITyGeIC4gytDl2GvufTrgzgTaogUs Pj1Iy9zPi67v+Pt8+HtQ1PB+f6nUgKdefA== X-Google-Smtp-Source: ABdhPJxNwkBz/10unee/x6cBbZsW4n6vTuNtuvN1UDiXR8B+t6FMm2Up5gnu7kVLHJiO5DdPY0GBIA== X-Received: by 2002:a05:6214:2481:: with SMTP id gi1mr452673qvb.35.1627485793249; Wed, 28 Jul 2021 08:23:13 -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 z23sm58504qts.96.2021.07.28.08.23.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jul 2021 08:23:12 -0700 (PDT) Date: Wed, 28 Jul 2021 11:23:10 -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: <20210728152310.GM9379@bill-the-cat> References: <20210728143931.GL9379@bill-the-cat> <7AD7C1DB-D23E-4D30-AFDF-799D6E00F884@getmailspring.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s2l28wc1uYKejhFF" Content-Disposition: inline In-Reply-To: <7AD7C1DB-D23E-4D30-AFDF-799D6E00F884@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 --s2l28wc1uYKejhFF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrote: > Hi Tom, >=20 > /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? >=20 > Thank you, > PA >=20 > On Jul 28 2021, at 4:39 pm, Tom Rini wrote: > > On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrot= e: > > > Hi, > > > > > > I'm trying to integrate u-boot in our project that is a custom script= ed build without yocto, for use with mender. > > > The complete discussion can be found here : https://hub.mender.io/t/p= i3-usb-boot-support/595/54?u=3Dpeac > > > The problem is that when issuing saveenv in u-boot, it responds with = "Saving Environment to FAT... OK" but then using fw_printenv in the booted = linux, does not show saved variables. > > > > > > The system currently boots because i've tricked it by getting the com= piled-in env over uart (env print -a) and made a uboot.env using mkenvimage= manually to enable fw_printenv to work. > > > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's sa= veenv does not re-create it, so it seems to me that saveenv does not write = uboot.env. > > > Here's the complete project files : https://git.iostud.io/cosmos/u-bo= ot/-/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 > > >=20 --=20 Tom --s2l28wc1uYKejhFF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEBdlcACgkQFHw5/5Y0 tywWcwv/XCKjGBMYZodlNC0r5AG9ux5xWHsCUzVArZpO24feSQb/nV1YhQKjWcDG spz9q6fANZrI6EsyeX9kz4C+gTxk5oBOrmA1a+I/KpFYsD57Kx2xOcX6puxgSjt3 aWutn63Em8zcQOKx0yhvOq6kpO9EZrgP2B2b/B/yFgZuHirLnCYk0wH761XMDIvL hRsZi7dUhmesntoOl6NQqWV3LFTApPu73ibteon/oamObfMopSdrdc8gujvHRzQo 4h5WIU2jl68jhjehMsxxX3/UchXLcEWm4tvcNAlKl3hhr9BN2ZprC4eLGde4gu0m xR3kV0Uy1Zu4gcFOGPUDB/AhnLbCgGIf+9V5osj3/P9GnU3TVELjOUuQA+kd0a+l 8ASD5CXQok5HPutjitAiJBPiYJq6cMChaavgzq2iciHdb1IyUip4IcWeJwftRP8V KoE7gNLQEgr1TZ+4Vbh57hNOQXCaFMU0YobzzCLaSRv1k7cYfoFtZzrrPUdufuUN svxrOMU8 =WCSh -----END PGP SIGNATURE----- --s2l28wc1uYKejhFF--