From patchwork Thu Sep 21 19:37:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 113930 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2407718qgf; Thu, 21 Sep 2017 12:40:32 -0700 (PDT) X-Received: by 10.80.219.66 with SMTP id b2mr2356248edl.256.1506022832443; Thu, 21 Sep 2017 12:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506022832; cv=none; d=google.com; s=arc-20160816; b=Brg+aEcCe6m+jtVntzHaM0hDYCf87g4oSC+21pNRMowzS08E8IoYLDWzG9n52vStbw nrvtG4YOj5cUHfWVzoQvSqUp5Ro8X8EcPMgvZmgZsnc1rKiLlIxo92PjauSB2SM+v6w6 5lh25WBnMPg5JT3xxIZ2917uamgE0G+AzandlotaOrQRxttfzlGepBXORUfAHSs/Nu2d YNcjleSDfme9jI3IAEbXL/3xeUrckSoFCb70NzWpwvJafbtUA8e43yFVs0wg/286oyr+ pDkE5ez/xVGpxkoLD1qHmoVarX4BCIAS7nmGzWA3Xjw9M59D2rVuaK9dsJyV/Ig3Mlk+ 1zxA== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=PpUfMgYAGYryLw9UJF3LT+dnxPOCnx5ESNFSv5sRhA8=; b=myx6qezfOt6wQ8rDzTjRVLlAds0JUkF4b5nZ3PLZGAJCp09J98rZx0tZvrTvYrtbBO 2W6YMIrFeXM5bYFEROeB4LeEayBWbKDSsKLy8uSoKGHygfZROhBkvwrtcLBfQRGBudtm x0+IU3nkeF1MNimdpeGnKCoFT4Mw+V8qXxfKtKjIz55ydGM4Y12W3b62Ovw4kC5FQka/ chzddTt0OkmFUdwCi1F+WUNVUYjm2VP5Q9uWpNQgIpFqyVAvKmy0LBzP12jyHIoYm4zw B2So+QvvU3NLs+cFap5Zmnyhc307ZNaNeNTR9YY22JSAM05F2RBTBRB1MnTo51jw0toq +Q/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=d86hIQiA; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m26si2285902edc.113.2017.09.21.12.40.32; Thu, 21 Sep 2017 12:40:32 -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=@linaro.org header.s=google header.b=d86hIQiA; 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=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 0B1EFC21D95; Thu, 21 Sep 2017 19:39:14 +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=RCVD_IN_DNSWL_NONE, 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 8DC8DC21E0E; Thu, 21 Sep 2017 19:38:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0F1E2C21DEF; Thu, 21 Sep 2017 19:38:09 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by lists.denx.de (Postfix) with ESMTPS id 99245C21E0E for ; Thu, 21 Sep 2017 19:38:05 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id y187so6783993lfc.8 for ; Thu, 21 Sep 2017 12:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hCz/mSt16rJsnk6BEwOzrXVriZv6KlM0EdyPddLwlIk=; b=d86hIQiA8MkvS13ZQW+4TswkXX6IBli1YLwrQFwDg9Nh68OnsL3FK8qHAFqDkeyE8c 2y+VuPOmQitrfeAUlxLfHjBaIOZ6CNAD7queb9jj9kxczMQQifWu2CDLw1ikPdoxlky9 6hAGlmIaePc93H3TJUuvfriNQcXiS3uBeJkjU= 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:in-reply-to :references; bh=hCz/mSt16rJsnk6BEwOzrXVriZv6KlM0EdyPddLwlIk=; b=lMCaEDj5WNduPt8ijCNsoDFPg77mF6vq5nQ/OXcLRemLZ89MhEOZTTH+N0Z6PFqUvX OmfBBSV54tqE4p+BwT2MTWim2ARz3EA02EIhbxxm0wizEYWWB0jN9L7SWw/gN1dUgrMR 75EQfmBUyhdqfQmw57DWYViFmk5M/dA52F95GaT7xFpzAI8+PVqjF0jsxzqAj2G33Yl/ UjzG0sJs8BVKFuLstCZwa6TJhC6ZV8oHOUZXF9ouioe8cAK5cSwigpB1C6vhjZtOIl8A upHvLbu/vRtb6tnUKJDmA+w/DRQJ3ch2SfqwKBmSa97a72tW8nkPrYOK5G2gQ00NAUEN pBEw== X-Gm-Message-State: AHPjjUj43jfZMpAmIJz7GUCTEqKdfE/eEoV5+S1MeNxXK3dWfvglxSfe pO2qfKMeRbMFK6JuC26y4TSSlYxNLPc= X-Google-Smtp-Source: AOwi7QCYtDYkeX3AhDq4hIk09siVFnUUmb3T5/qFRjaYbRtFq87QTMR6nxApPfKHstKVKPHF6NmeBw== X-Received: by 10.46.20.27 with SMTP id u27mr1408245ljd.39.1506022684705; Thu, 21 Sep 2017 12:38:04 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id l28sm447145ljb.41.2017.09.21.12.38.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Sep 2017 12:38:03 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 21 Sep 2017 22:37:57 +0300 Message-Id: <20170921193759.3914-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170921193759.3914-1-semen.protsenko@linaro.org> References: <20170921193759.3914-1-semen.protsenko@linaro.org> Cc: Tom Rini , Praneeth Bajjuri Subject: [U-Boot] [PATCH 2/4] arm: dra7xx: Fix Linux boot from eMMC 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" Right now on OMAP5-based boards we have only one partition defined for Linux boot, which is rootfs. That doesn't work with bootpart=1:2 (that is defined in include/environment/ti/boot.h). To fix Linux boot we may either: 1. Change bootpart to be 1:1 2. Or add preceding partition, so that rootfs is actually 1:2 Second choice seems more reasonable, as DFU is already using similar partition table and can rely on bootpart to be 1:2. This patch adds "bootloader" partition. So now eMMC layout for Linux boot looks like this: offset content size partition (KiB) (KiB) Reviewed-by: Tom Rini ======================================================================= 0 +--------------------------------+ | MBR/GPT header | 128 - 128 +--------------------------------+ | MLO | 256 - 384 +--------------------------------+ | u-boot.img | 1792 bootloader 2176 +--------------------------------+ | //////////// hole //////////// | 256 - 2432 +--------------------------------+ | U-Boot environment | 128 - 2560 +--------------------------------+ | U-Boot environment (redundant) | 128 - 2688 +--------------------------------+ | rootfs | remaining rootfs end +--------------------------------+ ======================================================================= Guard hole appears because U-Boot environment offset was calculated for Android partition table, which has two additional partitions in place of that hole ("environment" and "misc" partitions). This patch also changes rootfs offset from 2 MiB further to 2688 KiB, so that there won't be any collisions with U-Boot environment when we flash rootfs. Signed-off-by: Sam Protsenko --- include/configs/dra7xx_evm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 6c0fc35d3a..1555fc1b50 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -51,7 +51,8 @@ #define PARTS_DEFAULT \ /* Linux partitions */ \ "uuid_disk=${uuid_gpt_disk};" \ - "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \ + "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \ + "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \ /* Android partitions */ \ "partitions_android=" \ "uuid_disk=${uuid_gpt_disk};" \