From patchwork Wed Jun 26 07:18:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ying.zhang@freescale.com X-Patchwork-Id: 254601 X-Patchwork-Delegate: afleming@freescale.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 3DA0E2C0097 for ; Wed, 26 Jun 2013 18:09:26 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BEEDA4A049; Wed, 26 Jun 2013 10:09:22 +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 5lSp6O4TQS5H; Wed, 26 Jun 2013 10:09:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D1504A032; Wed, 26 Jun 2013 10:09:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 70C2A4A032 for ; Wed, 26 Jun 2013 10:09:07 +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 ejLktLlMX5UM for ; Wed, 26 Jun 2013 10:09:02 +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 co1outboundpool.messaging.microsoft.com (co1ehsobe004.messaging.microsoft.com [216.32.180.187]) by theia.denx.de (Postfix) with ESMTPS id 257B14A02A for ; Wed, 26 Jun 2013 10:08:55 +0200 (CEST) Received: from mail65-co1-R.bigfish.com (10.243.78.229) by CO1EHSOBE008.bigfish.com (10.243.66.71) with Microsoft SMTP Server id 14.1.225.23; Wed, 26 Jun 2013 08:08:53 +0000 Received: from mail65-co1 (localhost [127.0.0.1]) by mail65-co1-R.bigfish.com (Postfix) with ESMTP id AA68D9C0639; Wed, 26 Jun 2013 08:08:53 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 10 X-BigFish: VS10(z3197rzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e23h1155h) Received: from mail65-co1 (localhost.localdomain [127.0.0.1]) by mail65-co1 (MessageSwitch) id 1372234132473578_5120; Wed, 26 Jun 2013 08:08:52 +0000 (UTC) Received: from CO1EHSMHS025.bigfish.com (unknown [10.243.78.235]) by mail65-co1.bigfish.com (Postfix) with ESMTP id 705F3880052; Wed, 26 Jun 2013 08:08:52 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS025.bigfish.com (10.243.66.35) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 26 Jun 2013 08:08:46 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Wed, 26 Jun 2013 08:08:44 +0000 Received: from localhost.localdomain (tank.ap.freescale.net [10.193.20.104]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r5Q88cge009768; Wed, 26 Jun 2013 01:08:43 -0700 From: To: Date: Wed, 26 Jun 2013 15:18:27 +0800 Message-ID: <1372231112-25185-2-git-send-email-ying.zhang@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1372231112-25185-1-git-send-email-ying.zhang@freescale.com> References: <1372231112-25185-1-git-send-email-ying.zhang@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, afleming@gmail.com, X.Xie@freescale.com, Ying Zhang Subject: [U-Boot] [PATCH 2/7 v6] spl: env_common.c: add new symbol CONFIG_SPL_ENV_IMPORT to contain function env_import 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Ying Zhang The functionality env_import will be used in the SPL. They had been excluded by ifndef CONFIG_SPL_BUILD. Now, add new symbol CONFIG_SPL_ENV_IMPORT to contian the functionality env_import in SPL. Signed-off-by: Ying Zhang --- Compared with the original version, Changed as below: 1. Split from "boot from SD card/SPI flash with SPL". 2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality" 3. No change. 4. No change. 5. Add new symbol CONFIG_SPL_ENV_IMPORT README | 3 +++ common/env_common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/README b/README index 137e8cb..8a6c26c 100644 --- a/README +++ b/README @@ -3046,6 +3046,9 @@ FIT uImage format: It conflicts with SPL env from storage medium specified by CONFIG_ENV_IS_xxx but CONFIG_ENV_IS_NOWHERE + CONFIG_SPL_ENV_IMPORT + Support for importing the environment in SPL. + CONFIG_SPL_PAD_TO Image offset to which the SPL should be padded before appending the SPL payload. By default, this is defined as diff --git a/common/env_common.c b/common/env_common.c index 906b41f..1a36660 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -156,7 +156,7 @@ int set_default_vars(int nvars, char * const vars[]) H_NOCLEAR | H_INTERACTIVE, nvars, vars); } -#ifndef CONFIG_SPL_BUILD +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT) /* * Check if CRC is valid and (if yes) import the environment. * Note that "buf" may or may not be aligned.