From patchwork Sun Jul 9 20:52:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 786013 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3x5VrW3B1Jz9s03 for ; Mon, 10 Jul 2017 13:22:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="rZpgWPDP"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 26C23C21EE7; Mon, 10 Jul 2017 03:22:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DATE_IN_PAST_06_12, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 017F7C21DDC; Mon, 10 Jul 2017 03:19:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 92E21C21DAD; Mon, 10 Jul 2017 03:19:16 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by lists.denx.de (Postfix) with ESMTPS id 044FCC21DAD for ; Mon, 10 Jul 2017 03:18:56 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id x187so64374642oig.3 for ; Sun, 09 Jul 2017 20:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=lZyF99+3odPSULJuSPUD2ZpJDC5m1ZMVKne+jMKDbyI=; b=rZpgWPDPbcVw4RAE/o1dfrRVAvFPgRLeTaqHWUOlDxVzOM/pMeeQUc11Q9iasYzqPy btagTKbx/b0Q5/3xRqKoCnJMj5Uf+ykIPwkeE3frH6FfgXVgsEpIReOqwGO8UOJkLtnK i5jM6/T6Zp5ema9eyrW/9d6hlE+QAXlTwOm2/BNCQq2/3v3lYmZsuiE7OOl84deWu3RU azPhBuwRnLfzfjM6ROj10f+5BiR17wbMX42pRUYJxi1DQUCUW2CmFR0liQmBxXCYuxTV G3zqFvj2FrB3s9m3HehI6mbY1ZO4LstqY1iz0iIL9zXicUeWzfXAU4CqvlzfbgoAL7gE x7bQ== 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 :in-reply-to:references; bh=lZyF99+3odPSULJuSPUD2ZpJDC5m1ZMVKne+jMKDbyI=; b=DyxJbw6rkt0MTCeFvOKayCEbxZrd0SzJ2HnEe/fr2ZR86wAZCZRvVXzn0mO9On+YIf Qca9MBRXDGfquw4lBlQnyThygB7rglH4UdIofIVFg1B4On6S+Bv4wI+osEYjc2AB5Mph OmWwtqL0kAN6aP3hkOQ00QdoGkw0hZ7rzB4XCEREW6dUBG15HyMMZSdFDDAis2XVBMPA e1F0t6kMyMJZ8jBDwc+YgrPajqRuHkGK8nJZxD34x1JD0ehdGRQbLyMEk3j1VMQdzluZ aveawpy9HhEt8m6FVJWAaeEJOSfHWzRpgRsJuulF65sn2CbcMeEpirGAtdN2KJ0YrHz7 K41g== X-Gm-Message-State: AIVw113X72O2BU7h83xDLbhOK4DluaePcUi8I5Z085TDB72ierqoZiV2 gr8KPEX1fMhzqvO9 X-Received: by 10.202.227.193 with SMTP id a184mr7887135oih.121.1499656734507; Sun, 09 Jul 2017 20:18:54 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([100.101.164.89]) by smtp.gmail.com with ESMTPSA id f137sm11608135oig.26.2017.07.09.20.18.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 20:18:54 -0700 (PDT) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 3088C14234F; Sun, 9 Jul 2017 21:18:53 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 9 Jul 2017 14:52:47 -0600 Message-Id: <20170709205313.116174-5-sjg@chromium.org> X-Mailer: git-send-email 2.13.2.725.g09c95d1e9-goog In-Reply-To: <20170709205313.116174-1-sjg@chromium.org> References: <20170709205313.116174-1-sjg@chromium.org> Cc: Tom Rini , Andreas Fenkart , Joe Hershberger Subject: [U-Boot] [PATCH 04/30] env: Move help from README to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The CONFIG_ENV_IS_IN_... options which have already been converted to Kconfig only have a small amount of help. Move the rest of it over from the README. Signed-off-by: Simon Glass --- README | 114 ------------------------------------------------------------ env/Kconfig | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 101 insertions(+), 116 deletions(-) diff --git a/README b/README index 5fe8a22686..6fd8a53ce4 100644 --- a/README +++ b/README @@ -3656,75 +3656,12 @@ BE CAREFUL! For some special cases, the local device can not use environment stored in a remote NOR flash by SRIO or PCIE link, but it can not erase, write this NOR flash by SRIO or PCIE interface. -- CONFIG_ENV_IS_IN_NAND: - - Define this if you have a NAND device which you want to use - for the environment. - - - CONFIG_ENV_OFFSET: - - CONFIG_ENV_SIZE: - - These two #defines specify the offset and size of the environment - area within the first NAND device. CONFIG_ENV_OFFSET must be - aligned to an erase block boundary. - - - CONFIG_ENV_OFFSET_REDUND (optional): - - This setting describes a second storage area of CONFIG_ENV_SIZE - size used 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. CONFIG_ENV_OFFSET_REDUND must be - aligned to an erase block boundary. - - - CONFIG_ENV_RANGE (optional): - - Specifies the length of the region in which the environment - can be written. This should be a multiple of the NAND device's - block size. Specifying a range with more erase blocks than - are needed to hold CONFIG_ENV_SIZE allows bad blocks within - the range to be avoided. - - - CONFIG_ENV_OFFSET_OOB (optional): - - Enables support for dynamically retrieving the offset of the - environment from block zero's out-of-band data. The - "nand env.oob" command can be used to record this offset. - Currently, CONFIG_ENV_OFFSET_REDUND is not supported when - using CONFIG_ENV_OFFSET_OOB. - - CONFIG_NAND_ENV_DST Defines address in RAM to which the nand_spl code should copy the environment. If redundant environment is used, it will be copied to CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE. -- CONFIG_ENV_IS_IN_UBI: - - Define this if you have an UBI volume that you want to use for the - environment. This has the benefit of wear-leveling the environment - accesses, which is important on NAND. - - - CONFIG_ENV_UBI_PART: - - Define this to a string that is the mtd partition containing the UBI. - - - CONFIG_ENV_UBI_VOLUME: - - Define this to the name of the volume that you want to store the - environment in. - - - CONFIG_ENV_UBI_VOLUME_REDUND: - - Define this to the name of another volume to store a second copy of - the environment in. This will enable redundant environments in UBI. - It is assumed that both volumes are in the same MTD partition. - - - CONFIG_UBI_SILENCE_MSG - - CONFIG_UBIFS_SILENCE_MSG - - You will probably want to define these to avoid a really noisy system - when storing the env in UBI. - - CONFIG_ENV_IS_IN_FAT: Define this if you want to use the FAT file system for the environment. @@ -3756,57 +3693,6 @@ but it can not erase, write this NOR flash by SRIO or PCIE interface. - CONFIG_FAT_WRITE: This must be enabled. Otherwise it cannot save the environment file. -- CONFIG_ENV_IS_IN_MMC: - - Define this if you have an MMC device which you want to use for the - environment. - - - CONFIG_SYS_MMC_ENV_DEV: - - Specifies which MMC device the environment is stored in. - - - CONFIG_SYS_MMC_ENV_PART (optional): - - Specifies which MMC partition the environment is stored in. If not - set, defaults to partition 0, the user area. Common values might be - 1 (first MMC boot partition), 2 (second MMC boot partition). - - - CONFIG_ENV_OFFSET: - - CONFIG_ENV_SIZE: - - These two #defines specify the offset and size of the environment - area within the specified MMC device. - - If offset is positive (the usual case), it is treated as relative to - the start of the MMC partition. If offset is negative, it is treated - as relative to the end of the MMC partition. This can be useful if - your board may be fitted with different MMC devices, which have - different sizes for the MMC partitions, and you always want the - environment placed at the very end of the partition, to leave the - maximum possible space before it, to store other data. - - These two values are in units of bytes, but must be aligned to an - MMC sector boundary. - - - CONFIG_ENV_OFFSET_REDUND (optional): - - Specifies a second storage area, of CONFIG_ENV_SIZE size, used to - hold a redundant copy of the environment data. This provides a - valid backup copy in case the other copy is corrupted, e.g. due - to a power failure during a "saveenv" operation. - - This value may also be positive or negative; this is handled in the - same way as CONFIG_ENV_OFFSET. - - This value is also in units of bytes, but must also be aligned to - an MMC sector boundary. - - - CONFIG_ENV_SIZE_REDUND (optional): - - This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is - set. If this value is set, it must be set to the same value as - CONFIG_ENV_SIZE. - Please note that the environment is read-only until the monitor has been relocated to RAM and a RAM copy of the environment has been created; also, when using EEPROM you will have to use getenv_f() diff --git a/env/Kconfig b/env/Kconfig index a555546899..5a314022ef 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -7,17 +7,116 @@ config ENV_IS_IN_MMC Define this if you have an MMC device which you want to use for the environment. + CONFIG_SYS_MMC_ENV_DEV: + + Specifies which MMC device the environment is stored in. + + CONFIG_SYS_MMC_ENV_PART (optional): + + Specifies which MMC partition the environment is stored in. If not + set, defaults to partition 0, the user area. Common values might be + 1 (first MMC boot partition), 2 (second MMC boot partition). + + CONFIG_ENV_OFFSET: + CONFIG_ENV_SIZE: + + These two #defines specify the offset and size of the environment + area within the specified MMC device. + + If offset is positive (the usual case), it is treated as relative to + the start of the MMC partition. If offset is negative, it is treated + as relative to the end of the MMC partition. This can be useful if + your board may be fitted with different MMC devices, which have + different sizes for the MMC partitions, and you always want the + environment placed at the very end of the partition, to leave the + maximum possible space before it, to store other data. + + These two values are in units of bytes, but must be aligned to an + MMC sector boundary. + + CONFIG_ENV_OFFSET_REDUND (optional): + + Specifies a second storage area, of CONFIG_ENV_SIZE size, used to + hold a redundant copy of the environment data. This provides a + valid backup copy in case the other copy is corrupted, e.g. due + to a power failure during a "saveenv" operation. + + This value may also be positive or negative; this is handled in the + same way as CONFIG_ENV_OFFSET. + + This value is also in units of bytes, but must also be aligned to + an MMC sector boundary. + + CONFIG_ENV_SIZE_REDUND (optional): + + This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is + set. If this value is set, it must be set to the same value as + CONFIG_ENV_SIZE. + config ENV_IS_IN_NAND bool "Environment in a NAND device" help Define this if you have a NAND device which you want to use for the environment. + - CONFIG_ENV_OFFSET: + - CONFIG_ENV_SIZE: + + These two #defines specify the offset and size of the environment + area within the first NAND device. CONFIG_ENV_OFFSET must be + aligned to an erase block boundary. + + - CONFIG_ENV_OFFSET_REDUND (optional): + + This setting describes a second storage area of CONFIG_ENV_SIZE + size used 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. CONFIG_ENV_OFFSET_REDUND must be + aligned to an erase block boundary. + + - CONFIG_ENV_RANGE (optional): + + Specifies the length of the region in which the environment + can be written. This should be a multiple of the NAND device's + block size. Specifying a range with more erase blocks than + are needed to hold CONFIG_ENV_SIZE allows bad blocks within + the range to be avoided. + + - CONFIG_ENV_OFFSET_OOB (optional): + + Enables support for dynamically retrieving the offset of the + environment from block zero's out-of-band data. The + "nand env.oob" command can be used to record this offset. + Currently, CONFIG_ENV_OFFSET_REDUND is not supported when + using CONFIG_ENV_OFFSET_OOB. + config ENV_IS_IN_UBI bool "Environment in a UBI volume" help - Define this if you have a UBI volume which you want to use for the - environment. + Define this if you have an UBI volume that you want to use for the + environment. This has the benefit of wear-leveling the environment + accesses, which is important on NAND. + + - CONFIG_ENV_UBI_PART: + + Define this to a string that is the mtd partition containing the UBI. + + - CONFIG_ENV_UBI_VOLUME: + + Define this to the name of the volume that you want to store the + environment in. + + - CONFIG_ENV_UBI_VOLUME_REDUND: + + Define this to the name of another volume to store a second copy of + the environment in. This will enable redundant environments in UBI. + It is assumed that both volumes are in the same MTD partition. + + - CONFIG_UBI_SILENCE_MSG + - CONFIG_UBIFS_SILENCE_MSG + + You will probably want to define these to avoid a really noisy system + when storing the env in UBI. config ENV_IS_NOWHERE bool "Environment is not stored"