From: Simon Glass <sjg@chromium.org>
Date: Mon, 9 Nov 2020 14:12:25 +0000 (-0700)
Subject: x86: coral: Update the boot script
X-Git-Tag: v2025.01-rc5-pxa1908~2097^2~6
X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=1b6314be50df11d9c07ba3c13618bac9df838d07;p=u-boot.git

x86: coral: Update the boot script

Make use of the new bootargs substitution mechanism and zboot command
syntax.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

diff --git a/include/configs/chromebook_coral.h b/include/configs/chromebook_coral.h
index d4d32758e9..6e8e8ec170 100644
--- a/include/configs/chromebook_coral.h
+++ b/include/configs/chromebook_coral.h
@@ -15,10 +15,13 @@
 	"read mmc 2:2 100000 0 80; setexpr loader *001004f0; " \
 	"setexpr size *00100518; setexpr blocks $size / 200; " \
 	"read mmc 2:2 100000 80 $blocks; setexpr setup $loader - 1000; " \
-	"setexpr cmdline $loader - 2000; " \
-	"part uuid mmc 2:2 uuid; setenv bootargs_U $uuid; " \
-	"zboot start 100000 0 0 0 $setup $cmdline; " \
-	"zboot load; zboot setup; zboot dump; zboot go"
+	"setexpr cmdline_ptr $loader - 2000; " \
+	"setexpr.s cmdline *$cmdline_ptr; " \
+	"setexpr cmdline gsub %U \\\\${uuid}; " \
+	"if part uuid mmc 2:2 uuid; then " \
+	"zboot start 100000 0 0 0 $setup cmdline; " \
+	"zboot load; zboot setup; zboot dump; zboot go;" \
+	"fi"
 
 #include <configs/x86-common.h>
 #include <configs/x86-chromebook.h>