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: 117109 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp785319qgn; Wed, 25 Oct 2017 05:26:11 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Ru0e0/tYsltzQRfjHD2oUEqmgfc1Myu9BrHpiktSYwfTTS4aSUAZVOyafynI9qdZ92cimA X-Received: by 10.80.177.193 with SMTP id n1mr24828888edd.30.1508934370984; Wed, 25 Oct 2017 05:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508934370; cv=none; d=google.com; s=arc-20160816; b=xV6qk+jRaf2oAgm+Bn4gXnMn0qnaJuevpxVizo8m6pg/6y8hIJ9i65DunFDcbFc+0F dMT5l6SSzHKbTOb53By9ce9E7xaZN8csR59wa6mJs7KX4lxTW1jrTiJky6GVqteJqu5Y YRlzAYzpc2/I5dnI2qGX/EDwwDQOql6jeJT8qqQWNmakpNuSKzJw2hCcGEE3WAQCuLXV NFrRrFJ/ClfLA8b5fqknYr6aymJ8I9JqY9hiLMcPIqZsTUvn2WRHg4cR8hoRuVD3OQaj fYD04FMq6Fvi5cnLPzUMXKQur1W8lI3FEeNtbS8KbyD1/uWme6AsI3mPmAOVKCmt5FPJ 2deQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=TDi7sSJNgsIwi5PDSRp6T+zTne0dFDipXPS56aOWGrY=; b=ecty4GLPoWy/JS+LEHpbxN2STUGRTyck+HvO0CZDwNOWqyVjZ4EQrhqYonFdfXu0YD lGq3uurFzvq2mNDH/qd3YD3S0carZgJ30dfiT7PaGP7Y7J5J44IgfhTnb+GF/tnXnOY6 mX5HYgUSzsdTgVjHj7+ir071Mvf2lliIkqAt4A6QX8tOm3OByz6SZIHeQ3itsUmVO1W+ RV34hQ+l5YeQ22irmGzwqtoX7r4kaNgtZRRMyb3qd0My/+jgK2ea0tWhJyTTjLvnDTBj e77XMKyvwd2+nuKHEl8X68R8xcsbIFfZZltAH1bQnLtaIPHhp3+yxs0FvvYeN4UOJoBD zKPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id t18si1448929edi.64.2017.10.25.05.26.10; Wed, 25 Oct 2017 05:26:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 42DF7C21DC8; Wed, 25 Oct 2017 12:26:08 +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