From patchwork Thu Sep 21 19:37:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 113927 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2406061qgf; Thu, 21 Sep 2017 12:38:36 -0700 (PDT) X-Received: by 10.80.169.11 with SMTP id l11mr2263297edc.126.1506022716709; Thu, 21 Sep 2017 12:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506022716; cv=none; d=google.com; s=arc-20160816; b=dGRLD3Y0IbLAGFEayKC5Pr6jOnbXG56D9EaZCXBjmp6edp6zjK3Eb4UEXezxRC/Cv8 mtY8DFvON1fViWoXVqZcsq+1x7+NPDjYio0j7F+8f4z9FTNzuXc/Vsodb51jSUNcQ/S/ a9J/yonz/b0ern6PGOAeePjv+j6xjG/zrh8vwBXPk0KgqURVk0k6FSEkmMY5BJyrF8Fn c/3Ko6NL1dvbLAQpsmG7R9m1wDr1Edz58prXrG7Lvbo9obyQJsBzz/nsZ4ZEvOfaYYh8 rI/0ABZmYLx3/KbZmhwdZQsOlLYVAGR508eSkF1krvp80wyuYGnaBthOGhfNudwAZPz5 HDkA== 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=fqQhpOYNZdhifTh6BYYpoYZpd0bwGepGWH8cNgfLPjw=; b=I0BfZSEXhahkQw0AD2iP1kxlV20azApjZBRtZ18YFMOTM+LXD1Ch/uxTsChTXkR7TC OJqigARlDVRQ4YyyDxIe+b0w+yRa1Hnt+9eIcCjyquUiED/wbAjeStRKyyGKYC5Znp5O PmrZkIJsRxyHZcvjT1sUIXE2ebqbFikogehxEw+qxgnZtEHuWLRz09nz5g+rK9V5x7IU 44+uKrozMpswEkTUhZgRMJvkXVsi4ZFqKFTS//xaqoZmQXw5UViydxwhAoTmlTX1MmET aPv/swWdmugYbd/aLaFRYiJoX2Z7PJaeXlnrBiWt/12VCT7rW/I4i2lSH2eHaPWU8GNN JMOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hhdpV7rA; 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 k35si2100796eda.24.2017.09.21.12.38.36; Thu, 21 Sep 2017 12:38:36 -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=hhdpV7rA; 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 4E3C6C21F45; Thu, 21 Sep 2017 19:38:22 +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 AA681C21F43; Thu, 21 Sep 2017 19:38:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 197EAC21E26; Thu, 21 Sep 2017 19:38:07 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.denx.de (Postfix) with ESMTPS id 25884C21C62 for ; Thu, 21 Sep 2017 19:38:04 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id d4so6784761lfj.7 for ; Thu, 21 Sep 2017 12:38:04 -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=Ez9gV4hLrE/1mVYqrhCoNodzCzCqV4uPrYKuJpKWiQY=; b=hhdpV7rAR5McsqBeZ/O5IK1paQS/VzXxEJ0DizyjJaaM9OORguRjxp2XDPUhc2XFXa HalcJOEvd7ESQDOhd9EjQ5nZeh8Q/UjjLYYPBS6BA7yJSYNMvErzLNzb/VlhQTzl2Eth HISmOv5yKtzxu+PVaVxZRQqc53v5pJQkgbqhI= 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=Ez9gV4hLrE/1mVYqrhCoNodzCzCqV4uPrYKuJpKWiQY=; b=k+qzOB186zYA5TS61hi5SeXGBzNqvEuvG9kr25wzCWJH1XLwjgSJoJU5ltaofiSl+k tPNXDJFYcMYZXi7hzgOhG6+syQ4I9c4AzDRZeVmpksN0MeXQLchN57MAI0H6eL0CDDGp YU0NQoOhlJFpvmSTnG1fuptrP/Ix5Xnznjfp/op9R2FCBN22s8ovnBRL98Rj5xj1JhYu sq2IeDrmIP+1hOMslRUS3mMRQEWQ/Vr+hCM4Iv3pHePwlwcTYk3XMcrHaVpuuclDzv5X Hwy6Gz8WFUMFZgBScB7RL1rbD4E6Kb3sSXKWcoXFDVG0T7lUUPcwiMymEMXezjeDj5Oq rzAg== X-Gm-Message-State: AHPjjUiLPZUOsA1jRFUsTKTMWTxzOqLpRjYrAlaXPC9VTgfc65kpvJSI MTirSX/4saKjXY1l3VQR/jgp0reHSco= X-Google-Smtp-Source: AOwi7QApF+vaHyXqYsKYoftjT/H094rG+AVdN70ilSShAYkwi8hmiVtd7q+6dewd6S4K9crO+pBflA== X-Received: by 10.25.40.193 with SMTP id o184mr1206738lfo.136.1506022683003; Thu, 21 Sep 2017 12:38:03 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id 37sm347883lfv.46.2017.09.21.12.38.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Sep 2017 12:38:02 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 21 Sep 2017 22:37:56 +0300 Message-Id: <20170921193759.3914-2-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 1/4] arm: am57xx: 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/am57xx_evm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 0c70c53050..bf555ccdc2 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -44,7 +44,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};" \