]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Boot coral into Chrome OS by default
authorSimon Glass <sjg@chromium.org>
Wed, 4 Nov 2020 16:57:37 +0000 (09:57 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 6 Nov 2020 01:51:32 +0000 (09:51 +0800)
Add a script to boot Chrome OS from the internal MMC. This involved adding
a few commands and options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
configs/chromebook_coral_defconfig
include/configs/chromebook_coral.h

index 827974f7fcf19781f755ecdd6797118b8a5f0acd..e5ad79dcf767151c2925950241afc3bee01a1170 100644 (file)
@@ -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
index a63c3c9eea87329f7d6a9d35d1e2a0aa26a73efb..d4d32758e990f69e101814a8ab8a57c469f1207d 100644 (file)
 #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>