From patchwork Tue Oct 23 08:28:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 193392 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id ECA692C0168 for ; Tue, 23 Oct 2012 19:29:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BF114A2E7; Tue, 23 Oct 2012 10:29:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P05llFhvh2PQ; Tue, 23 Oct 2012 10:29:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE0DF4A2E9; Tue, 23 Oct 2012 10:29:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8DC234A29D for ; Tue, 23 Oct 2012 10:28:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9KreI40gRb-N for ; Tue, 23 Oct 2012 10:28:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.180]) by theia.denx.de (Postfix) with ESMTPS id 25B7C4A27B for ; Tue, 23 Oct 2012 10:28:51 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mCPYMropUgQ== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B94BDF.dip.t-dialin.net [87.185.75.223]) by smtp.strato.de (jored mo43) (RZmta 30.20 DYNA|AUTH) with ESMTPA id Q06cd0o9N86KTt ; Tue, 23 Oct 2012 10:28:46 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 23 Oct 2012 10:28:31 +0200 Message-Id: <1350980915-27940-4-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1350980915-27940-1-git-send-email-sr@denx.de> References: <1350980915-27940-1-git-send-email-sr@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v5 3/7] env: Enable getenv_f() for SPL_BUILD X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de With this patch, getenv_f() can be included easily into the SPL binary. With this, SPL boards can now use getenv_f() to read environment variables (e.g. to detect if the OS or U-Boot shall be executed). In the approach this is done for env stored in NOR flash, as this will be used by an upcoming MPC5200 board port. Signed-off-by: Stefan Roese --- Changes in v4: - getenv_f not extracted into separate file. Only Makefile additions for SPL_BUILD needed. Changes in v3: - Rebased on current master plus SPL framework v7 common/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/Makefile b/common/Makefile index eac6360..e76f2e1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -199,6 +199,9 @@ COBJS-$(CONFIG_CMD_DFU) += cmd_dfu.o endif ifdef CONFIG_SPL_BUILD +COBJS-y += cmd_nvedit.o +COBJS-y += env_common.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o