From patchwork Thu Jun 25 07:59:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1316783 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.a=rsa-sha256 header.s=STMicroelectronics header.b=VPz4WR9t; dkim-atps=neutral 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49sstK00yTz9sSn for ; Thu, 25 Jun 2020 18:02:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 569A982117; Thu, 25 Jun 2020 10:01:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="VPz4WR9t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7F955820F6; Thu, 25 Jun 2020 10:00:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,T_SPF_HELO_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) (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 C41E6820EE for ; Thu, 25 Jun 2020 10:00:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@st.com Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05P7w0Bf027761; Thu, 25 Jun 2020 10:00:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=fvGK1+53vnuAcPS7njvCcwTBDCU1MOdTX6UMM8RLmXM=; b=VPz4WR9tbb10aJ6/pjWMUhdlgtxiD9zOQGFKg+/hD+k8/YR7FQzFL5M1kKwndwyzo5ZE JrilxeNlwNBE4ExbpsoRRur7wSTMT20ZI35cQ4VHrnEJVBqqX675qBP8gGSlZP6hEjFW y4+DfN02IfhNWRvEvRx9g2GKHlfnLJubLplcr+u+F9IQN5pfulphkYKYENQwc3sc1IwY buwzJPAiuyDB2dlp3rV5DG0lsz4FrkA9+/e3iZgLG6Cvpk2bxce3TcU6NzNNGKWyHAc7 P2frIAQZCpnZhNfVZmgBGAfTEv+ySE683E2zEmS50j7HIE3IwRYz81opV99s8ynIOHTR lw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 31uuus0psf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 10:00:23 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 638EA100034; Thu, 25 Jun 2020 10:00:22 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2AF7C2A991B; Thu, 25 Jun 2020 10:00:22 +0200 (CEST) Received: from localhost (10.75.127.47) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 25 Jun 2020 10:00:21 +0200 From: Patrick Delaunay To: CC: Simon Glass , Patrick Delaunay , AKASHI Takahiro , Anup Patel , Eugeniu Rosca , Frank Wunderlich , Heinrich Schuchardt , Joe Hershberger , Joel Johnson , Leo Ruan , Lukasz Majewski , Mario Six , Miquel Raynal , Patrice Chotard , Ramon Fried , Sam Protsenko , Simon Goldschmidt , Stephen Warren , Wolfgang Denk , U-Boot STM32 Subject: [PATCH v3 00/14] env: ext4: corrections and add test for env in ext4 Date: Thu, 25 Jun 2020 09:59:44 +0200 Message-ID: <20200625075958.9868-1-patrick.delaunay@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG5NODE3.st.com (10.75.127.15) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_03:2020-06-25, 2020-06-25 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean Hi, V3 of the serie [1]. In this serie, I add sandbox test with CONFIG_ENV_IS_NOWHERE activated with EXT4 location: load, save and erase. To test this feature, I add 2 new commands to change the ENV location: - env select [target] - env load This serie depends on previous env test introduced in [2] "cmd: env: add option for quiet output on env info" To be able to test invalid file (bad CRC), I also add the support of the command "env erase" for EXT4 env location. [1] http://patchwork.ozlabs.org/project/uboot/list/?series=183620 [2] http://patchwork.ozlabs.org/project/uboot/list/?series=184539 Regards Patrick Changes in v3: - new - new - new: add ?load ops in nowhere - new: load operation becomes mandatory - new: add 'env load' command - new: add 'env select' command - change env_get_location to avoid gd->env_load_prio modification - replace specific sandbox command by generic command 'env select' and 'env load' - change title "sandbox: support the change of env location" - replace specific sandbox command by generic command 'env select' and 'env load' - update after Stephen Warren comments - replace sandbox command by generic command 'env load' in test_env Changes in v2: - change cmd_tbl_t to struct cmd_tbl - use CONFIG_IS_ENABLED to set .erase (same as .save) Patrick Delaunay (14): env: add absolute path at CONFIG_ENV_EXT4_FILE env: ext4: set gd->env_valid env: sf: avoid space in backend name env: correctly handle env_load_prio env: nowhere: add .load ops env: the ops driver load becomes mandatory in struct env_driver cmd: env: add env load command cmd: env: add env select command configs: sandbox: activate env in ext4 support configs: sandbox: activate command env select and env load test: environment in ext4 env: ext4: introduce new function env_ext4_save_buffer env: ext4: add support of command env erase test: sandbox: add test for erase command board/sandbox/sandbox.c | 15 ++++ cmd/Kconfig | 11 +++ cmd/nvedit.c | 29 ++++++++ configs/sandbox64_defconfig | 7 ++ configs/sandbox_defconfig | 7 ++ configs/sandbox_flattree_defconfig | 7 ++ configs/sandbox_spl_defconfig | 7 ++ env/Kconfig | 2 +- env/env.c | 80 ++++++++++++++++++-- env/ext4.c | 54 ++++++++++++-- env/nowhere.c | 9 +++ env/sf.c | 2 +- include/env.h | 15 +++- include/env_internal.h | 3 +- test/py/tests/test_env.py | 113 ++++++++++++++++++++++++++++- 15 files changed, 341 insertions(+), 20 deletions(-)