From patchwork Mon Jan 18 08:11:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1428042 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=Yhp7cmzP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DK4J71vb7z9sVR for ; Mon, 18 Jan 2021 19:11:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF5F28270D; Mon, 18 Jan 2021 09:11:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com 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=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="Yhp7cmzP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D56B82736; Mon, 18 Jan 2021 09:11:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 2E81D826A6 for ; Mon, 18 Jan 2021 09:11:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x52b.google.com with SMTP id g1so15851143edu.4 for ; Mon, 18 Jan 2021 00:11:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rsOZvasFKMEp3ezaaMkQWYD94te/pzJY+DLdURUAkY4=; b=Yhp7cmzPBdAx9oFszN8W0kJp2FNxlh3gyGXdY5SookDo/Mh69E0S5/defnsj/XpaSk J3l49pJgUmci4V7suHoTOAiVzXQDeY9uRH5LeeDe90Vb8JccQkRoMBqJK8CctDoWnSm5 ieAbjaLGxX/3OjaSY7lDbhqVi/79wTMaWdBunnWsUEID7ewVa56MKn3MH8jPKQ5B5xSz LhP8UN3Pim3tIizCQbWRo+9KwKTvz/4PVAU+ToNsJL7PYOtwLL82a7+oUfY1zg6Yx+h6 R9JjJYPXLDIXv22rxQVKa5btKw3PIhyrYGKJ5IX8goBGexJGk240JY6aPXE8rNNrvF/M qisw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=rsOZvasFKMEp3ezaaMkQWYD94te/pzJY+DLdURUAkY4=; b=jOc9XylaABIzW0Rtl5VmHvoHswhzNDKSTJcUjisO9sxJSGN6cCT/tRcNwsoqC5Saq2 kW/k01sxrxuZna+sqKGK0L6iT2oxcblZOb5spNAsk+i+tWAtB/a2pvge85E6u5ZHPURX G1gJ9YU3JEYqPuACRDb7QRzZbyeLR0JR4dE7lU2xU14abPu1Xi9MPaZviwlO3ud/Al8e miAJ8VQwxafC0sFaa4i8SmzD8SKe78BHnIdYKasqZwMH1d+KqS+eIWFgj5zDZX6d4pya wF26tDvdMQkYhuBIO8pq7AVpfrgQVJS6rCkT3SlkFeA3pOyWZDjc5OeG9J0f4wOQt0H/ wEZA== X-Gm-Message-State: AOAM53146NLgBW25++ZjMmtd/bWA3hzT2qY7PijV3uhe3aaZFJ5j5V2R w58e7mRn8ttTLhbVymQRcpGCBg== X-Google-Smtp-Source: ABdhPJyDpv8tRVfC0mGAJW4cyVCiR3S3cuteilVOvYDJeSMtLqdHjD0AN7O7vPZnc0MCtQHatxyweA== X-Received: by 2002:a05:6402:1c8b:: with SMTP id cy11mr18961163edb.256.1610957490838; Mon, 18 Jan 2021 00:11:30 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id v9sm296030ejd.92.2021.01.18.00.11.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jan 2021 00:11:30 -0800 (PST) From: Michal Simek To: Tom Rini , u-boot@lists.denx.de, git@xilinx.com, alfonso.sanchez-beato@canonical.com Cc: Joe Hershberger , Wolfgang Denk Subject: [PATCH v2] env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT Date: Mon, 18 Jan 2021 09:11:26 +0100 Message-Id: <0327c772937aaa2162faf7c53a53d005fc2bb399.1610957483.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot works with variables. struct environment_s has one byte flags property which also affects ENV_SIZE macro. I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup but custom scripts can be designed in a way that u-boot is asked to import/export variables from/to file which can be in certain format. That's why also for this configuration make sense to enable CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file format. The patch is removing dependency on this configuration to support selecting environment file format without any specific dependency where variables are stored. Signed-off-by: Michal Simek Reviewed-by: Tom Rini --- Changes in v2: - Extend Kconfig help message to cover binary environment handling env/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/env/Kconfig b/env/Kconfig index 67ce93061b7d..b473d7cfe1e9 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -411,13 +411,14 @@ config ENV_IS_IN_UBI config SYS_REDUNDAND_ENVIRONMENT bool "Enable redundant environment support" - depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || \ - ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI help Normally, the environemt is stored in a single location. By selecting this option, you can then define where to hold a redundant copy of the environment data, so that there is a valid backup copy in case there is a power failure during a "saveenv" operation. + Also this config changes the binary environment structure handling + which is used by env import/export commands which are independent of + storing variables to redundant location on a non volatile device. config ENV_FAT_INTERFACE string "Name of the block device for the environment"