From patchwork Fri Apr 6 06:34:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 132931 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1198514ljb; Fri, 6 Apr 2018 12:57:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx49SXRX3xMJzMiarOKHLfgP4w++5cOQ5uqeIHrYFnPP2n8Vt2QAPHgMz17NwTgkPsNvggE3g X-Received: by 10.80.243.136 with SMTP id g8mr8320541edm.133.1523044645114; Fri, 06 Apr 2018 12:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523044645; cv=none; d=google.com; s=arc-20160816; b=P7L6P5c5DJ4yBSt98FGYkb8TMQxDsElYxmN8vXx9ro60V+T0H+qUzpCq3JNOQ/4Ryh M2l7KiXC2j7UKOAdRrHgxFl6I5kU9id+FXF/8edrdJ61pFzQHyIu6sZ9EOzL0TIau+tM FHTzsIT6aLNG4SvAtsEsHNYIb26sqW/zbnZFQeLJjfkJKah+VyG+SaUW4dtwcBn8rg+K Vm13bjNUbWDQR3PePbGo5b2ljZ+e2TVHq0d0D8ZgtV1shoBONXx/7am8YDRpkdfMluZZ 7fCDNtZE2VZ65EbWo0DaSUIOzibXa0LaewZvnB6/PJA6zLNibtjGaglMzWJpc5b1Giie sEsA== 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 :dkim-signature:arc-authentication-results; bh=cLr8oShYoCxDbVmfPkGhWcakWf9+zCKenjlmDq+oZFE=; b=h98oEV5x9ThNXEofCbYkxAuLn7nWCZ5P6K0TI57QmOAl1/SHZ6N6bh1cDTyD7KIWKQ 2pRHwJ8wfurWcNuPytTpKuZERbt7QtHGm9PjEcyb36cnsNHaaJEpx3m2wd0ibuY6Y6Zf qLbqxlSUvwCDeCUK7dP6+CFpKx6/1rY6k/ZMQBqHIJBGje4f9lLKDSs/rH26vJUNoYBs QHXYfaFZeTOSgt5qT4KZqhAQYGulD41nHcO045nmd66QQJPhuVZE6oM0p3duAW98ga2t qXHAII7ymGrYP/LCBRuJlN9CrxhlJnspklK2ftNdDpsuB0RvxaYDRQnU07+H034AxzpU 1N8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=brVP5zrr; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 35si487071edh.523.2018.04.06.12.57.24; Fri, 06 Apr 2018 12:57:25 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=brVP5zrr; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by lists.denx.de (Postfix, from userid 105) id B9AFBC21E36; Fri, 6 Apr 2018 19:57:16 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 00A49C21C57; Fri, 6 Apr 2018 19:57:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 37D42C21C29; Fri, 6 Apr 2018 06:34:44 +0000 (UTC) Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by lists.denx.de (Postfix) with ESMTPS id 6D592C21C8B for ; Fri, 6 Apr 2018 06:34:43 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id x4-v6so68416pln.7 for ; Thu, 05 Apr 2018 23:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wf7yPvrzxNGvWk1mvqf2bewxY4vhgVByR8b3RmwiBMI=; b=brVP5zrrTTMAO1gbv0P1SUjaTWwgEUSwr7PWkLdP1gpZRuAIGyOj0rV8UBsHWNVL/s UDVnYIFVMY85FXB01iNPqkOfNmNUDtkytWxNtgdKC2U7CR6NZzOIMjheQZf8Mjz9NuNi 6kgNVUmhPK+CADqzwdvUFl1a2DBP5rBoJ2NCPNCIrBAvRWWF31g2nYQtRLmXeMCljktE i8Vj0aNONVrw6Mw+VjjNpMqPfbA3u1pDvqDdGWQKi9gDr1OcmAAZa3YS6NVDbKN9gxSy 67VW+BlFALHZtkuQvbOn8o3UO9eCIukidfp+sSpbGePvyVRFsaPpLfdToc6effvAuI3l kTGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wf7yPvrzxNGvWk1mvqf2bewxY4vhgVByR8b3RmwiBMI=; b=bXqlyFUUtbE14EQeK5WcLdKIOhzroQH4Aza+/FnAkEZtcdUFWv/F41PkdoyVgdb2tb JuytzbpMKfYEODU8UqUDmEtaX3PNrFMi7/73hXqytlDuZAsVwH2+Z3UlHdN10bNKLLzW Q695ulAiohGiWf2bT/gwDNMfmk61iz6PRCD/se/Lj7v/oZdSgEFRI3iM7X5jmuZtPDpC GMgAoQPHia7ttHIBgTMqCMPZG2bay1myga49eeEEAFG4soRTapq6i3+i+cEZS2Ao6nLT JUosseqI9JMCMGEAo07Qerp/1S86UQwfeE6orY7d+q/itRxF6LlmJBOr6XtS6KwdfjNh wVkQ== X-Gm-Message-State: AElRT7FDtf5WeY7aNGNJsneBryP8YsPSrOxacZTdIcyty9trhk9GSmDh tNqlqqlj/fDIAYsSmhyfQ9CwNwKn X-Received: by 2002:a17:902:b494:: with SMTP id y20-v6mr24169556plr.234.1522996481487; Thu, 05 Apr 2018 23:34:41 -0700 (PDT) Received: from localhost.localdomain ([112.196.109.116]) by smtp.gmail.com with ESMTPSA id l90sm20518585pfb.96.2018.04.05.23.34.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Apr 2018 23:34:40 -0700 (PDT) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de, trini@konsulko.com Date: Fri, 6 Apr 2018 12:04:17 +0530 Message-Id: <1522996457-23191-1-git-send-email-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Fri, 06 Apr 2018 19:57:12 +0000 Cc: srae@broadcom.com, masami.hiramatsu@linaro.org, Jassi Brar Subject: [U-Boot] [PATCH 0/3] Enable mmc to write sparse images 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" From: Jassi Brar Hi, Having capability to flash sparse images from mmc subsystem could be useful. For example, non-android/fastboot platforms could leverage the concept. Or some platforms that need to 'pull' updates (get images over tftp and flash using mmc). Or when we want to flash image at some non-zero offset from the start of a partition. Or simply when USB-Device has issues for fastboot to work (my itch). This patchset first cleans and makes write_sparse_image agnostic of fastboot and then adds a new 'swrite' command to 'mmc'. Jassi Brar (3): fastboot: sparse: remove redundant argument to write_sparse_image fastboot: sparse: make write_sparse_image useable for non-fastboot mmc: support writing sparse images cmd/mmc.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ common/fb_mmc.c | 7 +++-- common/fb_nand.c | 6 +++-- common/image-sparse.c | 69 +++++++++++++++++++++++--------------------------- include/image-sparse.h | 6 +++-- 5 files changed, 112 insertions(+), 43 deletions(-)