All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 18/18] x86: samus: Add a target to boot through TPL
Date: Thu,  2 May 2019 10:52:28 -0600	[thread overview]
Message-ID: <20190502165229.203099-19-sjg@chromium.org> (raw)
In-Reply-To: <20190502165229.203099-1-sjg@chromium.org>

Add a version of samus which supports booting from TPL to SPL and then
to U-Boot. This allows TPL to select from an A or B SPL to support
verified boot with field upgrade.

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

Changes in v3: None
Changes in v2:
- Sort defconfig and adjust it to build after rebase on maste

 board/google/Kconfig                      |  8 +++
 board/google/chromebook_samus/Kconfig     | 14 +++-
 board/google/chromebook_samus/MAINTAINERS |  7 ++
 configs/chromebook_samus_tpl_defconfig    | 82 +++++++++++++++++++++++
 include/configs/chromebook_samus.h        |  2 +
 5 files changed, 111 insertions(+), 2 deletions(-)
 create mode 100644 configs/chromebook_samus_tpl_defconfig

diff --git a/board/google/Kconfig b/board/google/Kconfig
index d98a5e818fc..679a0f10239 100644
--- a/board/google/Kconfig
+++ b/board/google/Kconfig
@@ -52,6 +52,14 @@ config TARGET_CHROMEBOOK_SAMUS
 	  Chrome OS EC connected on LPC, and it provides a 2560x1700 high
 	  resolution touch-enabled LCD display.
 
+config TARGET_CHROMEBOOK_SAMUS_TPL
+	bool "Chromebook samus booting from TPL"
+	help
+	  This is a version of Samus which boots into TPL, then to SPL and
+	  U-Boot proper. This is useful where verified boot must select
+	  between different A/B versions of SPL/U-Boot, to allow upgrading of
+	  almost all U-Boot code in the field.
+
 endchoice
 
 source "board/google/chromebook_link/Kconfig"
diff --git a/board/google/chromebook_samus/Kconfig b/board/google/chromebook_samus/Kconfig
index afbfe53deb4..90c23cba1be 100644
--- a/board/google/chromebook_samus/Kconfig
+++ b/board/google/chromebook_samus/Kconfig
@@ -1,4 +1,4 @@
-if TARGET_CHROMEBOOK_SAMUS
+if TARGET_CHROMEBOOK_SAMUS || TARGET_CHROMEBOOK_SAMUS_TPL
 
 config SYS_BOARD
 	default "chromebook_samus"
@@ -10,7 +10,8 @@ config SYS_SOC
 	default "broadwell"
 
 config SYS_CONFIG_NAME
-	default "chromebook_samus"
+	default "chromebook_samus" if TARGET_CHROMEBOOK_SAMUS
+	default "chromebook_samus" if TARGET_CHROMEBOOK_SAMUS_TPL
 
 config SYS_TEXT_BASE
 	default 0xffe00000
@@ -39,3 +40,12 @@ config SYS_CAR_SIZE
 	default 0x40000
 
 endif
+
+if TARGET_CHROMEBOOK_SAMUS_TPL
+
+config BOARD_SPECIFIC_OPTIONS_TPL # dummy
+	def_bool y
+	select SPL
+	select TPL
+
+endif
diff --git a/board/google/chromebook_samus/MAINTAINERS b/board/google/chromebook_samus/MAINTAINERS
index 5500e46b408..ca4b16500af 100644
--- a/board/google/chromebook_samus/MAINTAINERS
+++ b/board/google/chromebook_samus/MAINTAINERS
@@ -4,3 +4,10 @@ S:	Maintained
 F:	board/google/chromebook_samus/
 F:	include/configs/chromebook_samus.h
 F:	configs/chromebook_samus_defconfig
+
+CHROMEBOOK SAMUS TPL BOARD
+M:	Simon Glass <sjg@chromium.org>
+S:	Maintained
+F:	board/google/chromebook_samus/
+F:	include/configs/chromebook_samus.h
+F:	configs/chromebook_samus_tpl_defconfig
diff --git a/configs/chromebook_samus_tpl_defconfig b/configs/chromebook_samus_tpl_defconfig
new file mode 100644
index 00000000000..6ebfaa83a19
--- /dev/null
+++ b/configs/chromebook_samus_tpl_defconfig
@@ -0,0 +1,82 @@
+CONFIG_X86=y
+CONFIG_SYS_TEXT_BASE=0xffed0000
+CONFIG_SYS_MALLOC_F_LEN=0x1a00
+CONFIG_NR_DRAM_BANKS=8
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_BASE=0x3f8
+CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_VENDOR_GOOGLE=y
+CONFIG_TARGET_CHROMEBOOK_SAMUS_TPL=y
+CONFIG_DEBUG_UART=y
+CONFIG_HAVE_MRC=y
+CONFIG_HAVE_REFCODE=y
+CONFIG_SMP=y
+CONFIG_HAVE_VGA_BIOS=y
+CONFIG_BOOTSTAGE=y
+CONFIG_BOOTSTAGE_REPORT=y
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_MISC_INIT_R=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_LAST_STAGE_INIT=y
+CONFIG_BLOBLIST=y
+CONFIG_BLOBLIST_SIZE=0x1000
+CONFIG_BLOBLIST_ADDR=0xff7c0000
+CONFIG_HANDOFF=y
+CONFIG_SPL_TEXT_BASE=0xffe70000
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_NET_SUPPORT=y
+CONFIG_SPL_PCI=y
+CONFIG_SPL_PCH_SUPPORT=y
+CONFIG_TPL_PCI=y
+CONFIG_TPL_PCH_SUPPORT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SATA=y
+CONFIG_CMD_SF=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_TPM_TEST=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_MAC_PARTITION=y
+# CONFIG_SPL_MAC_PARTITION is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_ISO_PARTITION=y
+CONFIG_EFI_PARTITION=y
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="chromebook_samus"
+# CONFIG_NET is not set
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CPU=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_DW=y
+CONFIG_TPL_MISC=y
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_LPC=y
+CONFIG_SYS_NS16550=y
+CONFIG_SOUND=y
+CONFIG_SOUND_I8254=y
+CONFIG_SOUND_RT5677=y
+CONFIG_SPI=y
+CONFIG_TPM_TIS_LPC=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
+CONFIG_FRAMEBUFFER_VESA_MODE_11A=y
+CONFIG_CONSOLE_SCROLL_LINES=5
+CONFIG_TPM=y
diff --git a/include/configs/chromebook_samus.h b/include/configs/chromebook_samus.h
index ccb2fe8caad..2f7dd69fb82 100644
--- a/include/configs/chromebook_samus.h
+++ b/include/configs/chromebook_samus.h
@@ -23,4 +23,6 @@
 #define CONFIG_ENV_SECT_SIZE		0x1000
 #define CONFIG_ENV_OFFSET		0x003f8000
 
+#define CONFIG_TPL_TEXT_BASE		0xfffd8000
+
 #endif	/* __CONFIG_H */
-- 
2.21.0.1020.gf2820cf01a-goog

  parent reply	other threads:[~2019-05-02 16:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 16:52 [U-Boot] [PATCH v3 00/18] x86: Add support for booting from TPL Simon Glass
2019-05-02 16:52 ` [U-Boot] [PATCH v3 01/18] cros_ec: Use a hyphen in the uclass name Simon Glass
2019-05-07  9:10   ` Bin Meng
2019-05-07  9:21     ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 02/18] x86: Add a simple TPL implementation Simon Glass
2019-05-07  9:21   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 03/18] x86: sysreset: Separate out the EFI code Simon Glass
2019-05-07  9:21   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 04/18] x86: sysreset: Implement power-off if available Simon Glass
2019-05-07  9:21   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 05/18] x86: sysreset: Implement the get_last() method Simon Glass
2019-05-07  9:21   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 06/18] x86: Add documention on the samus flashmap Simon Glass
2019-05-07  9:21   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 07/18] x86: samus: Update device tree for SPL Simon Glass
2019-05-07  9:10   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 08/18] x86: samus: Update device tree for verified boot Simon Glass
2019-05-02 16:52 ` [U-Boot] [PATCH v3 09/18] x86: Update device tree for TPL Simon Glass
2019-05-07  9:10   ` Bin Meng
2019-05-07  9:26     ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 10/18] x86: Update device tree for Chromium OS verified boot Simon Glass
2019-05-07  9:26   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 11/18] x86: Fix device-tree indentation Simon Glass
2019-05-07  9:26   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 12/18] x86: samus: Increase the pre-reloc memory again Simon Glass
2019-05-07  9:26   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 13/18] Revert "pci: Scale MAX_PCI_REGIONS based on CONFIG_NR_DRAM_BANKS" Simon Glass
2019-05-02 16:52 ` [U-Boot] [PATCH v3 14/18] x86: Enable the RTC on all boards Simon Glass
2019-05-07  9:10   ` Bin Meng
2019-05-07  9:31     ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 15/18] x86: Update the memory map a little Simon Glass
2019-05-07  9:31   ` Bin Meng
2019-05-07  9:46     ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 16/18] x86: broadwell: Update PCH to work in TPL Simon Glass
2019-05-07  9:31   ` Bin Meng
2019-05-02 16:52 ` [U-Boot] [PATCH v3 17/18] x86: Add a way to jump from TPL to SPL Simon Glass
2019-05-07  9:31   ` Bin Meng
2019-05-02 16:52 ` Simon Glass [this message]
2019-05-07 10:07 ` [U-Boot] [PATCH v3 00/18] x86: Add support for booting from TPL Bin Meng
2019-05-08  3:33   ` Bin Meng
2019-05-08  3:41     ` Simon Glass
2019-05-08  4:52       ` Bin Meng

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=20190502165229.203099-19-sjg@chromium.org \
    --to=sjg@chromium.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 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.