Add a script to boot Chrome OS from the internal MMC. This involved adding
a few commands and options.

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

(no changes since v1)

 configs/chromebook_coral_defconfig | 10 +++++++---
 include/configs/chromebook_coral.h |  9 ++++++++-
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/configs/chromebook_coral_defconfig 
b/configs/chromebook_coral_defconfig
index e1907a0b7bc..d960793d9a9 100644
--- a/configs/chromebook_coral_defconfig
+++ b/configs/chromebook_coral_defconfig
@@ -29,8 +29,10 @@ CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_SPL_BOOTSTAGE_RECORD_COUNT=10
 CONFIG_BOOTSTAGE_STASH=y
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS2,115200n8 cros_legacy loglevel=9 init=/sbin/init 
oops=panic panic=-1 
root=PARTUUID=35c775e7-3735-d745-93e5-d9e0238f7ed0/PARTNROFF=1 rootwait rw 
noinitrd vt.global_cursor_default=0 add_efi_memmap boot=local noresume noswap 
i915.modeset=1 nmi_watchdog=panic,lapic disablevmx=off"
+CONFIG_BOOTARGS=""
+CONFIG_BOOTARGS_SUBST=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_LOGF_FUNC=y
 CONFIG_SPL_LOG=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_LAST_STAGE_INIT=y
@@ -55,11 +57,11 @@ CONFIG_CMD_READ=y
 CONFIG_CMD_SATA=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
-# CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_CMD_SOUND=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_CMD_TPM=y
+CONFIG_CMD_CBFS=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
@@ -72,7 +74,6 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_ENV_OVERWRITE=y
-# CONFIG_NET is not set
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_SPL_OF_TRANSLATE=y
@@ -106,10 +107,13 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_VIDEO_COPY=y
+CONFIG_FS_CBFS=y
 CONFIG_SPL_FS_CBFS=y
+CONFIG_FAT_WRITE=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
 CONFIG_TPL_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 # CONFIG_GZIP is not set
+CONFIG_BLOBLIST_TABLES=y
 # CONFIG_EFI_LOADER is not set
diff --git a/include/configs/chromebook_coral.h 
b/include/configs/chromebook_coral.h
index a63c3c9eea8..d4d32758e99 100644
--- a/include/configs/chromebook_coral.h
+++ b/include/configs/chromebook_coral.h
@@ -11,7 +11,14 @@
 #define __CONFIG_H
 
 #define CONFIG_BOOTCOMMAND     \
-       "fatload mmc 1:c 1000000 syslinux/vmlinuz.A; zboot 1000000"
+       "tpm init; tpm startup TPM2_SU_CLEAR; " \
+       "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"
 
 #include <configs/x86-common.h>
 #include <configs/x86-chromebook.h>
-- 
2.29.1.341.ge80a0c044ae-goog

Reply via email to