From patchwork Thu Oct 16 03:19:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 400122 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 BF98F1400B8 for ; Thu, 16 Oct 2014 14:20:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37704A73F9; Thu, 16 Oct 2014 05:20:11 +0200 (CEST) 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 NWQxXfrIoJ2u; Thu, 16 Oct 2014 05:20:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8ADA0A73E9; Thu, 16 Oct 2014 05:20:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CC32A73E9 for ; Thu, 16 Oct 2014 05:20:06 +0200 (CEST) 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 IvKWGI3nErmJ for ; Thu, 16 Oct 2014 05:20:06 +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 mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by theia.denx.de (Postfix) with ESMTPS id 1EFC7A73E8 for ; Thu, 16 Oct 2014 05:20:02 +0200 (CEST) Received: by mail-pa0-f54.google.com with SMTP id ey11so2563792pad.27 for ; Wed, 15 Oct 2014 20:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6L1LPZsW77liyjArhu1dS5ocj7+AyBvPGB1EH2sAcTE=; b=F+fB0Lg9XEgJtMrPEJzs69Qb71LSKKgMYKjRAxKr0gRB7/4uZr0V9yQDe1v0Z9Wjiu MJEsoUVl5oBG4AwuKZmc6j0/1g86yExMS325sJnC/DEs2aS34YxqHGh3OFWPjszkk7/E nPK3IIX5udIfA8EsYqlRrMYH6NwA5EtJ84+ZeIdAY0QKlt8QAxAHfQpS7ccnNmKb0919 GmuxnUEXN/4h93wymJWyLQ6L9Wlt8tXM7r7SE7I4BGDekNtHxKn1Sty7mcd/mWmnr+UI XdAmOrB7VAisvn9LCzTrLER1wJ62i3gbBuN6C4HxbWxyAWenjYv+TNTsQJ8mTkPswSPt ufAQ== X-Received: by 10.66.120.176 with SMTP id ld16mr9905405pab.86.1413429600617; Wed, 15 Oct 2014 20:20:00 -0700 (PDT) Received: from localhost.localdomain (dns5.quantatw.com. [220.128.79.49]) by mx.google.com with ESMTPSA id wi6sm18515373pac.47.2014.10.15.20.19.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Oct 2014 20:19:59 -0700 (PDT) From: Rob Herring To: u-boot@lists.denx.de Date: Thu, 16 Oct 2014 11:19:36 +0800 Message-Id: <1413429576-15336-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Steve Rae , Rob Herring Subject: [U-Boot] [PATCH] aboot: fix block addressing for don't care chunk type X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 From: Rob Herring CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but currently fails to increment the device block address. This results in filesystem images getting written incorrectly. Add the missing block address incrementing. Cc: Steve Rae Signed-off-by: Rob Herring Reviewed-by: Steve Rae --- common/aboot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/aboot.c b/common/aboot.c index d5c464b..fba8e3e 100644 --- a/common/aboot.c +++ b/common/aboot.c @@ -208,6 +208,7 @@ void write_sparse_image(block_dev_desc_t *dev_desc, break; case CHUNK_TYPE_DONT_CARE: + blk += blkcnt; total_blocks += chunk_header->chunk_sz; break;