From patchwork Thu Apr 17 19:05:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 28589 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5A28D2188F for ; Thu, 17 Apr 2014 19:06:08 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d49sf507391eek.11 for ; Thu, 17 Apr 2014 12:06:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=LurvrgEjTkbc2j7W4HcjK/NYLXH4GwuIKiRNCr7VqPE=; b=XvBd8mFXA59eiG2xXNY+JKcMVaB0DzzsMwYgExTSMTUdSvUY3C2fI45/IfEjxUCtz0 xWtbPhE7LjzXV1FBB3PTWVJ68U6r+xrAb187cnuw11HVSDANg3l6DcroBnbsbarGSxAq WwXPuVlPKW5D1soJu1nkt3JuwmNJZLMJkb+x6Z8d/vQGUrMsY7wS6sIfJc4U5DxltV9o lVrLF0NBsYbCYiqA5etJMCU80DGAbYQF6ZCBtmrch0+K0iYZaurc6ZBhJWe06RlHEqDY XoPiej3fnTV3M34woLLVHyye2M7YTe7NpyKamn35cWjp1RW+4IGj0SbNoEVn4pQBn8cG stuw== X-Gm-Message-State: ALoCoQnLKdzok/n1JidHpb67AsB+FBNUFsVcyG/EkNA4gjnWNqjQvFIVp39utK1hyAVON0sRfUQ6 X-Received: by 10.112.85.108 with SMTP id g12mr397586lbz.13.1397761567119; Thu, 17 Apr 2014 12:06:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.48 with SMTP id a45ls230471qge.72.gmail; Thu, 17 Apr 2014 12:06:06 -0700 (PDT) X-Received: by 10.58.23.6 with SMTP id i6mr12900341vef.12.1397761566565; Thu, 17 Apr 2014 12:06:06 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id f17si4610181vcq.93.2014.04.17.12.06.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 12:06:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so992704veb.21 for ; Thu, 17 Apr 2014 12:06:06 -0700 (PDT) X-Received: by 10.58.49.10 with SMTP id q10mr12835586ven.5.1397761566164; Thu, 17 Apr 2014 12:06:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp58693vcb; Thu, 17 Apr 2014 12:06:05 -0700 (PDT) X-Received: by 10.67.24.1 with SMTP id ie1mr17301791pad.133.1397761565267; Thu, 17 Apr 2014 12:06:05 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id iw3si15058843pac.383.2014.04.17.12.06.04 for ; Thu, 17 Apr 2014 12:06:05 -0700 (PDT) Received-SPF: pass (google.com: domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 2FE1465E1A; Thu, 17 Apr 2014 19:05:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from vms173023pub.verizon.net (vms173023pub.verizon.net [206.46.173.23]) by mail.openembedded.org (Postfix) with ESMTP id 8FDB665D4B for ; Thu, 17 Apr 2014 19:05:46 +0000 (UTC) Received: from gandalf.denix.org ([unknown] [71.191.205.189]) by vms173023.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0N460082RVPMBE40@vms173023.mailsrvcs.net> for openembedded-core@lists.openembedded.org; Thu, 17 Apr 2014 14:05:47 -0500 (CDT) Received: from localhost.localdomain (elrond [192.168.0.7]) by gandalf.denix.org (Postfix) with ESMTP id A066220091; Thu, 17 Apr 2014 15:05:46 -0400 (EDT) From: Denys Dmytriyenko To: openembedded-core@lists.openembedded.org, yocto@yoctoproject.org Date: Thu, 17 Apr 2014 15:05:33 -0400 Message-id: <1397761533-10634-1-git-send-email-denis@denix.org> X-Mailer: git-send-email 1.9.2 Cc: Denys Dmytriyenko Subject: [OE-core] [PATCH] u-boot: fix beaglebone boot issue with large kernel images X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: denis@denix.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Denys Dmytriyenko Fix beaglebone boot issue with large kernel images overwriting Device Tree. See very detailed comments inside the patch. The original patch is being reviewed upstream and is targeting mainline U-boot version 2014.07. This is the adaptation of the patch for 2013.07 version we use Signed-off-by: Denys Dmytriyenko --- ...h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch | 74 ++++++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2013.07.bb | 4 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch diff --git a/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch b/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch new file mode 100644 index 0000000..77e35bb --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch @@ -0,0 +1,74 @@ +From 5701384cea4a829b772bf7a96a74825b58c22385 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Thu, 17 Apr 2014 12:25:40 -0400 +Subject: [PATCH] am335x_evm.h: Add, use DEFAULT_LINUX_BOOT_ENV environment + string + +Modified version of the patch currently being reviewed for mainline: +http://patchwork.ozlabs.org/patch/334861/ + +To deal with a reoccurring problem properly we need to specify addresses +for the Linux kernel, Flatted Device Tree and ramdisk that obey the +constraints within the kernel's Documentation/arm/Booting file but also +make sure that we relocate things within a valid address range. + +Signed-off-by: Denys Dmytriyenko +Signed-off-by: Tom Rini + +Upstream-Status: Pending +--- + include/configs/am335x_evm.h | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h +index c5a6d4b..01e32b3 100644 +--- a/include/configs/am335x_evm.h ++++ b/include/configs/am335x_evm.h +@@ -54,10 +54,7 @@ + #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + #ifndef CONFIG_SPL_BUILD + #define CONFIG_EXTRA_ENV_SETTINGS \ +- "loadaddr=0x80200000\0" \ +- "fdtaddr=0x80F80000\0" \ +- "fdt_high=0xffffffff\0" \ +- "rdaddr=0x81000000\0" \ ++ DEFAULT_LINUX_BOOT_ENV \ + "bootdir=/boot\0" \ + "bootfile=uImage\0" \ + "fdtfile=undefined\0" \ +@@ -197,7 +194,31 @@ + #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ + + (8 * 1024 * 1024)) + +-#define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */ ++/* ++ * Our DDR memory always starts at 0x80000000 and U-Boot shall have ++ * relocated itself to higher in memory by the time this value is used. ++ * However, set this to a 32MB offset to allow for easier Linux kernel ++ * booting as the default is often used as the kernel load address. ++ */ ++#define CONFIG_SYS_LOAD_ADDR 0x82000000 /* Default load address */ ++ ++/* ++ * We setup defaults based on constraints from the Linux kernel, which should ++ * also be safe elsewhere. We have the default load at 32MB into DDR (for ++ * the kernel), FDT above 128MB (the maximum location for the end of the ++ * kernel), and the ramdisk 512KB above that (allowing for hopefully never ++ * seen large trees). We say all of this must be within the first 256MB ++ * as that will normally be within the kernel lowmem and thus visible via ++ * bootm_size and we only run on platforms with 256MB or more of memory. ++ */ ++#define DEFAULT_LINUX_BOOT_ENV \ ++ "loadaddr=0x82000000\0" \ ++ "kernel_addr_r=0x82000000\0" \ ++ "fdtaddr=0x88000000\0" \ ++ "fdt_addr_r=0x88000000\0" \ ++ "rdaddr=0x88080000\0" \ ++ "ramdisk_addr_r=0x88080000\0" \ ++ "bootm_size=0x10000000\0" + + #define CONFIG_MMC + #define CONFIG_GENERIC_MMC +-- +1.9.2 + diff --git a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot_2013.07.bb index 3141a2d..f8a8856 100644 --- a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb +++ b/meta/recipes-bsp/u-boot/u-boot_2013.07.bb @@ -16,7 +16,9 @@ SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c" PV = "v2013.07+git${SRCPV}" -SRC_URI = "git://git.denx.de/u-boot.git;branch=master" +SRC_URI = "git://git.denx.de/u-boot.git;branch=master \ + file://0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch \ +" S = "${WORKDIR}/git"