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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 B956CC4338F for ; Wed, 28 Jul 2021 23:06:59 +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 E55586101B for ; Wed, 28 Jul 2021 23:06:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E55586101B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ciavaldini.fr 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 2273482DD5; Thu, 29 Jul 2021 01:06:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ciavaldini.fr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ciavaldini.fr header.i=@ciavaldini.fr header.b="MYbT4lff"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 60E2D82C84; Wed, 28 Jul 2021 17:26:04 +0200 (CEST) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1711E8290A for ; Wed, 28 Jul 2021 17:26:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ciavaldini.fr Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=pierre-alexis@ciavaldini.fr Received: (Authenticated sender: pierre-alexis@ciavaldini.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 92ADB240002; Wed, 28 Jul 2021 15:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ciavaldini.fr; s=gm1; t=1627485959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZR4I3I6+ibgnMvWHQuR0qpmbIarUd9nQoxhNF3JLM+0=; b=MYbT4lff40d0n9yEpFZjv6h8zJ8t1YLDlUSP+nDwrxlp7SDZTklLfUSLXt6LVamEOCm9oj 5qR7LINNgdIqp+PbAD3zQhjKumFczmqzm7MvBYn9zW+iugbm2Gb05HyQB6+DyUaz9JBD9k aC8ldR7tjHsZzDPukvELJWxCxZ5FWfSINEqLbjI0gdtV12xmSqR5fegsLADicx0upztEFQ 9xqaZzni6G9EeOgZ8DkrKRLlWWPOb5iljTlojDJWTOYK1VCLHHY/GDHvVu6KPhNMrzi+Y3 W2yYEF8MmLtEYmFBnLQFavmzXiGZA/4tVA62siJ31OdvzGPMtAnCUe9dC36g+w== Date: Wed, 28 Jul 2021 17:25:48 +0200 From: Pierre-Alexis Ciavaldini To: Tom Rini Cc: "=?utf-8?Q?u-boot=40lists.denx.de?=" Message-ID: <58E33AE2-4B84-45E4-9F80-B85CCBFBB67B@getmailspring.com> In-Reply-To: <20210728152310.GM9379@bill-the-cat> References: <20210728152310.GM9379@bill-the-cat> Subject: Re: u-boot saveenv to redundant fat does not persist env X-Mailer: Mailspring MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 29 Jul 2021 01:05:15 +0200 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 Hi, When I did, mender complained about it : include/config_mender.h:41:3: error: #error CONFIG_SYS_REDUNDAND_ENVIRONMENT 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 work. Make sure that: 1) All the instructions at https://docs.mender.io/system-updates-yocto-project/board-integration/bootloader-support/u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-. Check also https://docs.mender.io/troubleshoot/yocto-project-build for Known Issues when upgrading. I guess I could disable the check, but even so I'm not sure it would work as uboot.env does not get written ? Thank you, PA On Jul 28 2021, at 5:23 pm, Tom Rini wrote: > On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrote: > > > 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 scripted 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=peac > > > > 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 compiled-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 saveenv 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-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 >