U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting Android from eMMC
Date: Wed, 16 Aug 2017 15:55:48 +0300	[thread overview]
Message-ID: <20170816125550.26472-2-semen.protsenko@linaro.org> (raw)
In-Reply-To: <20170816125550.26472-1-semen.protsenko@linaro.org>

If SD card is present -- try to boot from it first. If no -- try to boot
Android from eMMC.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
Changes in v2:
 - Do not remove the attempt to boot regular Linux from eMMC
   (just add Android boot in the end of the cycle)

 include/environment/ti/boot.h | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 1c3ae40a99..a05f5ba9bd 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -28,7 +28,24 @@
 	"vram=16M\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"optargs=\0" \
-	"dofastboot=0\0"
+	"dofastboot=0\0" \
+	"emmc_android_boot=" \
+		"setenv eval_bootargs setenv bootargs $bootargs; " \
+		"run eval_bootargs; " \
+		"setenv mmcdev 1; " \
+		"setenv fdt_part 3; " \
+		"setenv boot_part 9; " \
+		"setenv machid fe6; " \
+		"mmc dev $mmcdev; " \
+		"mmc rescan; " \
+		"part start mmc ${mmcdev} ${fdt_part} fdt_start; " \
+		"part size mmc ${mmcdev} ${fdt_part} fdt_size; " \
+		"part start mmc ${mmcdev} ${boot_part} boot_start; " \
+		"part size mmc ${mmcdev} ${boot_part} boot_size; " \
+		"mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \
+		"mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
+		"echo Booting from eMMC ...; " \
+		"bootm $loadaddr $loadaddr $fdtaddr;\0"
 
 #ifdef CONFIG_OMAP54XX
 
@@ -76,6 +93,7 @@
 	"setenv bootpart 1:2; " \
 	"setenv mmcroot /dev/mmcblk0p2 rw; " \
 	"run mmcboot;" \
+	"run emmc_android_boot; " \
 	""
 
 #endif /* CONFIG_OMAP54XX */
-- 
2.13.2

  reply	other threads:[~2017-08-16 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 12:55 [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
2017-08-16 12:55 ` Sam Protsenko [this message]
2017-08-18 11:42   ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Jaehoon Chung
2017-08-22 15:06     ` Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-08-16 12:55 ` [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-08-16 12:55 ` [U-Boot] [PATCH v2 3/3] arm: dra7xx: " Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini

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=20170816125550.26472-2-semen.protsenko@linaro.org \
    --to=semen.protsenko@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox