From patchwork Wed Apr 20 09:05:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 66207 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2328822qge; Wed, 20 Apr 2016 02:06:12 -0700 (PDT) X-Received: by 10.28.111.217 with SMTP id c86mr27774314wmi.81.1461143172468; Wed, 20 Apr 2016 02:06:12 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id el5si4928868wjd.31.2016.04.20.02.06.12; Wed, 20 Apr 2016 02:06:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20F7FA7660; Wed, 20 Apr 2016 11:06: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 TmTrAb-pilEC; Wed, 20 Apr 2016 11:06:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AF81A7647; Wed, 20 Apr 2016 11:06:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4C7FDA7647 for ; Wed, 20 Apr 2016 11:06:07 +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 YCZi23xY8wnW for ; Wed, 20 Apr 2016 11:06:07 +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-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by theia.denx.de (Postfix) with ESMTPS id 0DCB5A74A8 for ; Wed, 20 Apr 2016 11:06:02 +0200 (CEST) Received: by mail-lf0-f49.google.com with SMTP id c126so36853839lfb.2 for ; Wed, 20 Apr 2016 02:06:02 -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; bh=sWpRDaOg2vjfcSqxGhMY3spHWx16GGdWSD2Uy3qgvVY=; b=jXbj2btmGYtAVIp6VrUF+5AKtE+fjsCPsKdwV5WXIeyUIustwltAMY3cknwEXeq4BU WOSI2YLoF8UpXEL/Q/QOXqKxgDPcnNBfXI2yn4aiZhzT5aOz14rLmick1HBLciMGjUHj tjaaSr0ZMoKVqNA2Wicyl3309gcyMNNQcX3MI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sWpRDaOg2vjfcSqxGhMY3spHWx16GGdWSD2Uy3qgvVY=; b=gzV0O1aWQQOX4622k47GTsVwCL2z6kH0Une6mhq9nRxnN66R+2oKoy5SIaLo+PoZaT Bq/oN2HP65TGklk81zacAx3fGQXMHSReKNHIcnOfHbaCCLb54bBI5/uIX/v9tz8RFFvT DyAcxDl7m28K6B/DSjNk9N26gXvBuIfe6lMMpVZHZ6NBVH9nszCrtf7J0a41ethBkPA9 uflcDEgWDX1+oEHm31ydJuv+4VZ/HJQ+TisojZ9phEcXdTjeUUTkxIFKEpXfDtgMMLjw W8X5lAUWL4i22khcF8EltawqJ1AidVXJcCXTeKDP8ZtosRknB2xzYDEvPLkxHzjLXldH zA4g== X-Gm-Message-State: AOPr4FV4hPZFH960R6P47bSeT1lD3XVfYqqBS2PKdRdCGc/2S41JskNJq45qsNa1E1fwtPHJ X-Received: by 10.25.145.149 with SMTP id t143mr3151632lfd.37.1461143162159; Wed, 20 Apr 2016 02:06:02 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id a134sm912552lfb.1.2016.04.20.02.06.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Apr 2016 02:06:01 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Wed, 20 Apr 2016 12:05:59 +0300 Message-Id: <1461143159-3500-1-git-send-email-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.8.0.rc3 Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH v3] ti_armv7_common.h: Fix U-Boot location on eMMC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" According to common eMMC partition table for Android boot (see PARTS_DEFAULT definition in include/configs/dra7xx_evm.h), "bootloader" partition (where u-boot.img is stored) starts at 256 KiB. Which is equal to 512 sectors (as 1 MMC sector size is 512 bytes). This patch fixes CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR constant so that it points to correct address of "bootloader" partition and SPL is able to read, parse and run u-boot.img correctly. This change was originally done as part of patch [1] in omapzoom u-boot. Without this patch, SPL fails to parse U-Boot header with next error: mkimage signature not found - ih_magic = 4814325a While at it, also fix U-Boot partition size, which is 384 KiB (as stated in include/configs/dra7xx_evm.h). [1] http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=742b82d0c0aa0ed8096c2225a00e9f350212efa9 Signed-off-by: Sam Protsenko --- Changes for v2: - adjust also partition size to be 384 KiB Changes for v3: - keep U_BOOT_SECTOR value in hex for consistency include/configs/ti_armv7_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.8.0.rc3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 787d04a..0725d79 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -229,8 +229,8 @@ #endif /* RAW SD card / eMMC locations. */ -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* address 0x40000 */ +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300 /* 384 KB */ /* FAT sd card locations. */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1