From patchwork Wed Jan 24 07:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manorit Chawdhry X-Patchwork-Id: 1890061 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=DD1kYeS2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TKbBF43Hsz23dy for ; Wed, 24 Jan 2024 18:27:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E5A487BF0; Wed, 24 Jan 2024 08:26:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="DD1kYeS2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6C54587613; Wed, 24 Jan 2024 08:26:39 +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=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 6503887BBA for ; Wed, 24 Jan 2024 08:26:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m-chawdhry@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40O7QZs1035752 for ; Wed, 24 Jan 2024 01:26:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706081195; bh=HzWtKdcVXBC1Y7UM5bvWG04LIixHubqWnXa/gZrQPp8=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=DD1kYeS28NOLJyl8VVhcya5vGhOmC6g5ODooXLvpvmo7tbTNJrKnSF0ZMAlzzpjjq EARuYIlR2ePSUC7CNZJj3TyTemSope6w9tR46NiLfGue2wCvYO/p6O40DtmxZb2Pgv fJZbofVONULYyd44NGmQxU/XoodylLGcc0eV/1Ek= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40O7QZk4010943 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 24 Jan 2024 01:26:35 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 24 Jan 2024 01:26:34 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 24 Jan 2024 01:26:35 -0600 Received: from [127.0.1.1] (uda0497581.dhcp.ti.com [10.24.68.185]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40O7QTGi015268; Wed, 24 Jan 2024 01:26:32 -0600 From: Manorit Chawdhry Date: Wed, 24 Jan 2024 12:56:25 +0530 Subject: [PATCH 1/2] env: ti: mmc: add save_uenv command MIME-Version: 1.0 Message-ID: <20240124-b4-upstream-save_uenv-v1-1-4a4dfbd3eca9@ti.com> References: <20240124-b4-upstream-save_uenv-v1-0-4a4dfbd3eca9@ti.com> In-Reply-To: <20240124-b4-upstream-save_uenv-v1-0-4a4dfbd3eca9@ti.com> To: Udit Kumar , Neha Malcom Francis , Andrew Davis , Nishanth Menon CC: , Vignesh Raghavendra , Keerthy J , Aniket Limaye , Manorit Chawdhry X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1706081189; l=737; i=m-chawdhry@ti.com; s=20231127; h=from:subject:message-id; bh=9HrQWhIVrTlnEVJ73RpS9KsroLBIVJ9NINusFpCtmNc=; b=60Fe1Lz1ZPhxaCed/ODotTAP8cyJgxlWWoGfOTLng9M1zZXi5WuZc7DmWRUWGOn2VWGxdtTZi IndvZ6H6E/ZBxcHVyoGl8GOlty6chi3JyZHYF6ruRbQ4EB416uKKstB X-Developer-Key: i=m-chawdhry@ti.com; a=ed25519; pk=fsr6Tm39TvsTgfyfFQLk+nnqIz2sBA1PthfqqfiiYSs= X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean This is to make easier development with uEnv.txt to update from the board on the fly from u-boot to MMC boot media. Signed-off-by: Manorit Chawdhry --- include/env/ti/mmc.env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env index 0256a2d2aaca..886e4cab36fe 100644 --- a/include/env/ti/mmc.env +++ b/include/env/ti/mmc.env @@ -34,6 +34,9 @@ envboot=if mmc dev ${mmcdev}; then fi; fi; fi; +save_uenv= + env export -t $loadaddr $save_to_env save_to_env; + fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize}; mmcloados= if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run get_fdt_mmc; then From patchwork Wed Jan 24 07:26:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manorit Chawdhry X-Patchwork-Id: 1890062 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=gEvyQAg9; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TKbBP0FKPz23dy for ; Wed, 24 Jan 2024 18:27:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CED987BE7; Wed, 24 Jan 2024 08:26:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="gEvyQAg9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 989B687BE7; Wed, 24 Jan 2024 08:26:43 +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=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 D268887613 for ; Wed, 24 Jan 2024 08:26:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m-chawdhry@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40O7Qc6c054982 for ; Wed, 24 Jan 2024 01:26:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706081198; bh=2BOrv03jvY0jQfhDNcvubHfbiKN3DvYOGQgUU9Jd5B0=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=gEvyQAg9w0neyT0+MT2HoU3TcOSdgB5T8L0IgnxmOsUI/zanfoPRr+U50IewInA/3 hroVu8FoQu5BgTOZHeSxgzzfgILH7HYldSTakKrg4yT+IQxWtqy1Md0AeM9gcSzuQu Ic8w+pS5AMqqnnTPLphcg6PDEiuyV4SYIIpKWvpE= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40O7QcAG010973 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 24 Jan 2024 01:26:38 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 24 Jan 2024 01:26:38 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 24 Jan 2024 01:26:38 -0600 Received: from [127.0.1.1] (uda0497581.dhcp.ti.com [10.24.68.185]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40O7QTGj015268; Wed, 24 Jan 2024 01:26:35 -0600 From: Manorit Chawdhry Date: Wed, 24 Jan 2024 12:56:26 +0530 Subject: [PATCH 2/2] doc: k3: update documentation for uEnv.txt MIME-Version: 1.0 Message-ID: <20240124-b4-upstream-save_uenv-v1-2-4a4dfbd3eca9@ti.com> References: <20240124-b4-upstream-save_uenv-v1-0-4a4dfbd3eca9@ti.com> In-Reply-To: <20240124-b4-upstream-save_uenv-v1-0-4a4dfbd3eca9@ti.com> To: Udit Kumar , Neha Malcom Francis , Andrew Davis , Nishanth Menon CC: , Vignesh Raghavendra , Keerthy J , Aniket Limaye , Manorit Chawdhry X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1706081189; l=2085; i=m-chawdhry@ti.com; s=20231127; h=from:subject:message-id; bh=+aE3O9XdnIXHzdNG7VxLIyD/UoJelk4O5uQRxE53wUA=; b=FOZtn6G+keK5m5REldMCBjc/W3Sn41EIhpzmb7yGbCV7gUjd1Inx6IFOdgmmFZnP2s5FZidY3 wX1Ydkbf+tYCdmFcwREpMLkq5xeLV7/xVgyYtQytpNB6eqYHvnyS8Eu X-Developer-Key: i=m-chawdhry@ti.com; a=ed25519; pk=fsr6Tm39TvsTgfyfFQLk+nnqIz2sBA1PthfqqfiiYSs= X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add the information for the save_uenv command and refactor the documentation to remove the eMMC information that was wrong. Signed-off-by: Manorit Chawdhry --- doc/board/ti/k3.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 7dfe39c5fa57..e95779e32566 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -594,20 +594,21 @@ Refer (:ref:`U-boot ARMV8 build `) Saving environment ------------------ -SAVEENV is disabled by default and for the new flow uses Uenv.txt as the default -way for saving the environments. This has been done as Uenv.txt is more granular -then the saveenv command and can be used across various bootmodes too. +CONFIG_CMD_SAVEENV is disabled by default and for the new flow uses +uEnv.txt as the default way for saving the environments. This has been done +as uEnv.txt is more granular then the saveenv command and can be used +across various bootmodes too. -**Writing to MMC/EMMC** +**Writing to MMC** .. prompt:: bash => - env export -t $loadaddr - fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize} + setenv save_to_env + run save_uenv -**Reading from MMC/EMMC** +**Reading from MMC** -By default run envboot will read it from the MMC/EMMC partition ( based on +By default run envboot will read it from the MMC partition ( based on mmcdev) and set the environments. If manually needs to be done then the environment can be read from the @@ -615,8 +616,11 @@ filesystem and then imported .. prompt:: bash => - fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} - env import -t ${loadaddr} ${filesize} + run envboot + +To read from eMMC, the save_uenv and envboot commands would need to be +changed to pickup the bootenvfile from eMMC. Mainly the write and read +commands would change to eMMC. .. _k3_rst_refer_openocd: