All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <joe.skb7@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] env: ti: boot: Fix Android boot on AM57x EVM
Date: Wed, 19 Feb 2020 20:27:52 +0200	[thread overview]
Message-ID: <20200219182752.27392-1-joe.skb7@gmail.com> (raw)

When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM
board, there is not enough memory reserved in RAM for DTB blob. Hence,
DTBO can't be merged in DTB. It leads to inability to boot Android with
next error message:

    failed on fdt_overlay_apply(): FDT_ERR_NOSPACE

To overcome that issue let's provide 1 MiB of space to keep DTB and all
merged DTBO blobs. To do so, "length" parameter should be specified for
"fdt addr" command:

    => fdt addr $fdtaddr 0x100000

Also add size variables to 'adtimg' command invocations, to avoid
cluttering the console with DTBO blob sizes.

Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
---
 include/environment/ti/boot.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 523c8fc4fe..298c972cd0 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -103,18 +103,18 @@
 		"echo \"  Reading DTB for AM57x EVM RevA3...\"; " \
 		"abootimg get dtb --index=0 dtb_start dtb_size; " \
 		"cp.b $dtb_start $fdtaddr $dtb_size; " \
-		"fdt addr $fdtaddr; " \
+		"fdt addr $fdtaddr 0x100000; " \
 		"echo \"  Applying DTBOs for AM57x EVM RevA3...\"; " \
 		"adtimg addr $dtboaddr; " \
-		"adtimg get dt --index=0 dtbo0_addr; " \
+		"adtimg get dt --index=0 dtbo0_addr dtbo0_size; " \
 		"fdt apply $dtbo0_addr; " \
-		"adtimg get dt --index=1 dtbo1_addr; " \
+		"adtimg get dt --index=1 dtbo1_addr dtbo1_size; " \
 		"fdt apply $dtbo1_addr; " \
 	"elif test $board_name = beagle_x15_revc; then " \
 		"echo \"  Reading DTB for Beagle X15 RevC...\"; " \
 		"abootimg get dtb --index=0 dtb_start dtb_size; " \
 		"cp.b $dtb_start $fdtaddr $dtb_size; " \
-		"fdt addr $fdtaddr; " \
+		"fdt addr $fdtaddr 0x100000; " \
 	"else " \
 		"echo Error: Android boot is not supported for $board_name; " \
 		"exit; " \
-- 
2.24.1

             reply	other threads:[~2020-02-19 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 18:27 Sam Protsenko [this message]
2020-02-20 14:33 ` [PATCH] env: ti: boot: Fix Android boot on AM57x EVM Eugeniu Rosca
2020-02-20 20:31   ` Sam Protsenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200219182752.27392-1-joe.skb7@gmail.com \
    --to=joe.skb7@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.