From patchwork Tue Jan 28 10:51:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keerthy X-Patchwork-Id: 1230284 X-Patchwork-Delegate: lokeshvutla@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; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=yZ5U33s7; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 486Nhl4dJqz9sNx for ; Tue, 28 Jan 2020 21:51:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C400381AB8; Tue, 28 Jan 2020 11:51:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="yZ5U33s7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 590BC81A96; Tue, 28 Jan 2020 11:51:20 +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=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 42F7B81A96 for ; Tue, 28 Jan 2020 11:51:17 +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=j-keerthy@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00SApBjw075511; Tue, 28 Jan 2020 04:51:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1580208671; bh=6btz706zA8T83kB2DTjkKUVUJ19IipVusyO+EUBpcEE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yZ5U33s7Kw01NAo6p8kDXoIa705FQkA5JTbQcJ1MStyWHa2T8GyO2QShMDhvFNfx4 EQV5HagShofIUXn5gQWHj+8IOU62y8Gyiukh9YFoUE0GRVkJM2UgaqM0ByxUI5IGYD 77kaNf0xXvvOuKZ0daDrPF6ZjaoDkMT/55fdjYGg= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 00SApBPq036219 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Jan 2020 04:51:11 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 28 Jan 2020 04:51:11 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 28 Jan 2020 04:51:11 -0600 Received: from a0393675ula.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00SAp3w4013788; Tue, 28 Jan 2020 04:51:08 -0600 From: Keerthy To: , , Subject: [PATCH v5 01/10] env: nowhere: set default enviroment Date: Tue, 28 Jan 2020 16:21:06 +0530 Message-ID: <20200128105115.21604-2-j-keerthy@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200128105115.21604-1-j-keerthy@ti.com> References: <20200128105115.21604-1-j-keerthy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, t-kristo@ti.com, joe.hershberger@ni.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean In case only CONFIG_ENV_IS_NOWHERE without any of the memory based configs like CONFIG_ENV_IS_IN_MMC the env_set function fails as the gd->flags & GD_FLG_ENV_READY check fails. Set default enviroment so that set_env calls succeed when only ENV_IS_NOWHERE set. Signed-off-by: Keerthy Reviewed-by: Tom Rini --- env/nowhere.c | 1 + 1 file changed, 1 insertion(+) diff --git a/env/nowhere.c b/env/nowhere.c index f5b0a17652..70c3b3e011 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -23,6 +23,7 @@ static int env_nowhere_init(void) { gd->env_addr = (ulong)&default_environment[0]; gd->env_valid = ENV_INVALID; + env_set_default(NULL, 0); return 0; }