From patchwork Wed Oct 25 12:25:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 830242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yMTrm4bd4z9t38 for ; Wed, 25 Oct 2017 23:26:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3C662C21DE5; Wed, 25 Oct 2017 12:26:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EA6F3C21D8C; Wed, 25 Oct 2017 12:26:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C714FC21D8C; Wed, 25 Oct 2017 12:26:05 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 6F279C21C71 for ; Wed, 25 Oct 2017 12:26:05 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id AA2FE20848; Wed, 25 Oct 2017 14:26:03 +0200 (CEST) Received: from localhost (unknown [185.94.189.189]) by mail.free-electrons.com (Postfix) with ESMTPSA id 044AE206D8; Wed, 25 Oct 2017 14:26:02 +0200 (CEST) From: Maxime Ripard To: Tom Rini Date: Wed, 25 Oct 2017 14:25:57 +0200 Message-Id: <20171025122601.28224-1-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.2 Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [RFC 0/4] sunxi: Implement transition in environment X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hi, Here is an RFC to implement the transition from a raw environment in the MMC to a FAT file in the first bootable partition. This is based in a custom environment method that reuses the mmc and fat codes as much as possible, and just deals with the fallbacks, printing a warning when we're using the now legacy setup so that we can warn our user of the future breakage. This has just been compile tested, I'm mostly looking for feedback on the appoach at this point. Thanks! Maxime Maxime Ripard (4): env: Rework mmc environment ifdef env; fat: Allow the fat environment to be embedded by another one env: Create an environment transition method env: sunxi: Switch by default to the transition environment code cmd/nvedit.c | 1 + env/Kconfig | 14 +++++++--- env/Makefile | 1 + env/fat.c | 12 +++++++-- env/mmc.c | 24 +++++++++-------- env/sunxi-transition.c | 59 ++++++++++++++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 2 +- include/environment.h | 1 + 8 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 env/sunxi-transition.c