All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@toradex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] colibri-imx6ull: use UUID for rootfs
Date: Mon, 13 May 2019 12:15:52 +0300	[thread overview]
Message-ID: <20190513091555.14037-2-igor.opaniuk@toradex.com> (raw)
In-Reply-To: <20190513091555.14037-1-igor.opaniuk@toradex.com>

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---
 include/configs/colibri-imx6ull.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index 7cf550cf9e..2ba0ce5b79 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -66,12 +66,17 @@
 		"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
 
 #define SD_BOOTCMD \
-	"sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
-	"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
+	"set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \
+	"sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+	"setenv bootargs ${defargs} ${sdargs} " \
 	"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
-	"load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
-	"load mmc 0:1 ${fdt_addr_r} " FDT_FILE " && " \
+	"load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \
+	"load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " FDT_FILE " && " \
 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+	"sdbootpart=1\0" \
+	"sddev=0\0" \
+	"sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+	"sdrootpart=2\0"
 
 #define UBI_BOOTCMD \
 	"ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \
-- 
2.17.1

  reply	other threads:[~2019-05-13  9:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13  9:15 [U-Boot] [PATCH 1/5] colibri_imx7: use UUID for rootfs Igor Opaniuk
2019-05-13  9:15 ` Igor Opaniuk [this message]
2019-05-24  7:46   ` [U-Boot] [PATCH 2/5] colibri-imx6ull: " Marcel Ziswiler
2019-05-13  9:15 ` [U-Boot] [PATCH 3/5] colibri_vf: " Igor Opaniuk
2019-05-24  7:47   ` Marcel Ziswiler
2019-05-13  9:15 ` [U-Boot] [PATCH 4/5] apalis_imx6: " Igor Opaniuk
2019-05-24  7:51   ` Marcel Ziswiler
2019-05-24  8:04     ` Marcel Ziswiler
2019-05-13  9:15 ` [U-Boot] [PATCH 5/5] apalis-tk1: " Igor Opaniuk
2019-05-24  8:01   ` Marcel Ziswiler
2019-05-24  7:46 ` [U-Boot] [PATCH 1/5] colibri_imx7: " Marcel Ziswiler

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=20190513091555.14037-2-igor.opaniuk@toradex.com \
    --to=igor.opaniuk@toradex.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.