From d32e206d7f262e688bcc9c83b67a58278735618f Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Wed, 11 Oct 2023 18:15:18 +0200 Subject: [PATCH] patches(submodules): kill more vboot --- .../patches/0006-remove-submodules.patch | 185 +++++++++++------- 1 file changed, 110 insertions(+), 75 deletions(-) diff --git a/src/coreboot/patches/0006-remove-submodules.patch b/src/coreboot/patches/0006-remove-submodules.patch index 99ef8ab..8e2da21 100644 --- a/src/coreboot/patches/0006-remove-submodules.patch +++ b/src/coreboot/patches/0006-remove-submodules.patch @@ -1,40 +1,7 @@ -From 7ea793321cb8ce671fd9f1708a90b8fff12432fe Mon Sep 17 00:00:00 2001 -Subject: [PATCH 06/22] remove submodules - ---- - .gitmodules | 28 ----------------------- - 3rdparty/arm-trusted-firmware | 1 - - 3rdparty/blobs | 1 - - 3rdparty/chromeec | 1 - - 3rdparty/fsp | 1 - - 3rdparty/libgfxinit | 1 - - 3rdparty/libhwbase | 1 - - 3rdparty/vboot | 1 - - src/commonlib/cbfs.c | 2 ++ - src/commonlib/include/commonlib/cbfs.h | 4 ++++ - src/ec/google/chromeec/ec.c | 4 ++++ - src/lib/bootmode.c | 4 ++++ - src/mainboard/google/gru/bootblock.c | 3 +++ - src/security/tpm/tss/tcg-1.2/tss.c | 5 ++++ - src/vendorcode/google/chromeos/chromeos.h | 2 ++ - util/cbfstool/Makefile.inc | 8 +++---- - util/cbfstool/cbfs.h | 4 ++++ - util/cbfstool/cbfs_image.c | 8 +++++++ - util/cbfstool/cbfs_image.h | 2 ++ - util/cbfstool/cbfstool.c | 12 ++++++++++ - 21 files changed, 54 insertions(+), 40 deletions(-) - delete mode 160000 3rdparty/arm-trusted-firmware - delete mode 160000 3rdparty/blobs - delete mode 160000 3rdparty/chromeec - delete mode 160000 3rdparty/fsp - delete mode 160000 3rdparty/libgfxinit - delete mode 160000 3rdparty/libhwbase - delete mode 160000 3rdparty/vboot - -diff --git a/.gitmodules b/.gitmodules +diff --git c/.gitmodules i/.gitmodules index f4f7c4ff27..e69de29bb2 100644 ---- a/.gitmodules -+++ b/.gitmodules +--- c/.gitmodules ++++ i/.gitmodules @@ -1,28 +0,0 @@ -[submodule "3rdparty/blobs"] - path = 3rdparty/blobs @@ -64,10 +31,10 @@ index f4f7c4ff27..e69de29bb2 100644 - url = ../fsp.git - update = none - ignore = dirty -diff --git a/src/commonlib/cbfs.c b/src/commonlib/cbfs.c +diff --git c/src/commonlib/cbfs.c i/src/commonlib/cbfs.c index 0210a92202..aa83ff759d 100644 ---- a/src/commonlib/cbfs.c -+++ b/src/commonlib/cbfs.c +--- c/src/commonlib/cbfs.c ++++ i/src/commonlib/cbfs.c @@ -238,6 +238,7 @@ int cbfs_locate(struct cbfsf *fh, const struct region_device *cbfs, return -1; } @@ -81,10 +48,10 @@ index 0210a92202..aa83ff759d 100644 return vb2_digest_finalize(&ctx, digest, digest_sz); } +#endif -diff --git a/src/commonlib/include/commonlib/cbfs.h b/src/commonlib/include/commonlib/cbfs.h +diff --git c/src/commonlib/include/commonlib/cbfs.h i/src/commonlib/include/commonlib/cbfs.h index c31df51263..e3b7af6f50 100644 ---- a/src/commonlib/include/commonlib/cbfs.h -+++ b/src/commonlib/include/commonlib/cbfs.h +--- c/src/commonlib/include/commonlib/cbfs.h ++++ i/src/commonlib/include/commonlib/cbfs.h @@ -18,7 +18,9 @@ #include @@ -110,10 +77,54 @@ index c31df51263..e3b7af6f50 100644 +#endif #endif -diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c +diff --git c/src/drivers/mrc_cache/mrc_cache.c i/src/drivers/mrc_cache/mrc_cache.c +index 4dd0dbc434..27aed95320 100644 +--- c/src/drivers/mrc_cache/mrc_cache.c ++++ i/src/drivers/mrc_cache/mrc_cache.c +@@ -23,7 +23,9 @@ + #include + #include + #include ++#if 0 + #include ++#endif + #include + + #include "mrc_cache.h" +@@ -106,11 +108,14 @@ static const struct cache_region *lookup_region_type(int type) + { + int i; + int flags; +- ++#if 0 + if (vboot_recovery_mode_enabled()) + flags = RECOVERY_FLAG; + else + flags = NORMAL_FLAG; ++#else ++ flags = NORMAL_FLAG; ++#endif + + for (i = 0; i < ARRAY_SIZE(cache_regions); i++) { + if (cache_regions[i]->type != type) +@@ -518,11 +523,13 @@ static void invalidate_normal_cache(void) + const char *name = DEFAULT_MRC_CACHE; + const uint32_t invalid = ~MRC_DATA_SIGNATURE; + ++#if 0 + /* Invalidate only on recovery mode with retraining enabled. */ + if (!vboot_recovery_mode_enabled()) + return; + if (!vboot_recovery_mode_memory_retrain()) + return; ++#endif + + if (fmap_locate_area_as_rdev_rw(name, &rdev) < 0) { + printk(BIOS_ERR, "MRC: Couldn't find '%s' region. Invalidation failed\n", +diff --git c/src/ec/google/chromeec/ec.c i/src/ec/google/chromeec/ec.c index d2a0849dc9..bcfbc17397 100644 ---- a/src/ec/google/chromeec/ec.c -+++ b/src/ec/google/chromeec/ec.c +--- c/src/ec/google/chromeec/ec.c ++++ i/src/ec/google/chromeec/ec.c @@ -28,7 +28,9 @@ #include #include @@ -140,10 +151,10 @@ index d2a0849dc9..bcfbc17397 100644 #ifndef __PRE_RAM__ -diff --git a/src/lib/bootmode.c b/src/lib/bootmode.c +diff --git c/src/lib/bootmode.c i/src/lib/bootmode.c index dcee2d175c..89601be4f3 100644 ---- a/src/lib/bootmode.c -+++ b/src/lib/bootmode.c +--- c/src/lib/bootmode.c ++++ i/src/lib/bootmode.c @@ -15,7 +15,9 @@ #include @@ -166,10 +177,10 @@ index dcee2d175c..89601be4f3 100644 /* By default always initialize display. */ return 1; -diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c +diff --git c/src/mainboard/google/gru/bootblock.c i/src/mainboard/google/gru/bootblock.c index b2f7d57691..133974c797 100644 ---- a/src/mainboard/google/gru/bootblock.c -+++ b/src/mainboard/google/gru/bootblock.c +--- c/src/mainboard/google/gru/bootblock.c ++++ i/src/mainboard/google/gru/bootblock.c @@ -24,7 +24,10 @@ #include #include @@ -181,10 +192,10 @@ index b2f7d57691..133974c797 100644 #include "board.h" #include "pwm_regulator.h" -diff --git a/src/security/tpm/tss/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c +diff --git c/src/security/tpm/tss/tcg-1.2/tss.c i/src/security/tpm/tss/tcg-1.2/tss.c index b11d6a3d16..154cb05fe2 100644 ---- a/src/security/tpm/tss/tcg-1.2/tss.c -+++ b/src/security/tpm/tss/tcg-1.2/tss.c +--- c/src/security/tpm/tss/tcg-1.2/tss.c ++++ i/src/security/tpm/tss/tcg-1.2/tss.c @@ -18,7 +18,12 @@ #include #include @@ -198,10 +209,37 @@ index b11d6a3d16..154cb05fe2 100644 #include #include "tss_internal.h" -diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h +diff --git c/src/southbridge/intel/common/pmbase.c i/src/southbridge/intel/common/pmbase.c +index 2de57d6da4..ff990b3a49 100644 +--- c/src/southbridge/intel/common/pmbase.c ++++ i/src/southbridge/intel/common/pmbase.c +@@ -20,7 +20,9 @@ + #include + #include + #include ++#if 0 + #include ++#endif + + #include "pmbase.h" + #include "pmutil.h" +@@ -95,6 +97,7 @@ u8 read_pmbase8(const u8 addr) + return inb(lpc_get_pmbase() + addr); + } + ++#if 0 + int vboot_platform_is_resuming(void) + { + u16 reg16 = read_pmbase16(PM1_STS); +@@ -104,3 +107,4 @@ int vboot_platform_is_resuming(void) + + return acpi_sleep_from_pm1(reg16) == ACPI_S3; + } ++#endif +diff --git c/src/vendorcode/google/chromeos/chromeos.h i/src/vendorcode/google/chromeos/chromeos.h index df61596684..64873f97d8 100644 ---- a/src/vendorcode/google/chromeos/chromeos.h -+++ b/src/vendorcode/google/chromeos/chromeos.h +--- c/src/vendorcode/google/chromeos/chromeos.h ++++ i/src/vendorcode/google/chromeos/chromeos.h @@ -21,8 +21,10 @@ #include #include @@ -213,10 +251,10 @@ index df61596684..64873f97d8 100644 #if IS_ENABLED(CONFIG_CHROMEOS) /* functions implemented in watchdog.c */ -diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc +diff --git c/util/cbfstool/Makefile.inc i/util/cbfstool/Makefile.inc index 1787eb14c0..3c55ca947e 100644 ---- a/util/cbfstool/Makefile.inc -+++ b/util/cbfstool/Makefile.inc +--- c/util/cbfstool/Makefile.inc ++++ i/util/cbfstool/Makefile.inc @@ -29,10 +29,10 @@ cbfsobj += fsp_relocate.o cbfsobj += mem_pool.o cbfsobj += region.o @@ -232,10 +270,10 @@ index 1787eb14c0..3c55ca947e 100644 # FMAP cbfsobj += fmap.o cbfsobj += kv_pair.o -diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h +diff --git c/util/cbfstool/cbfs.h i/util/cbfstool/cbfs.h index b082d8c783..8be2c92f2f 100644 ---- a/util/cbfstool/cbfs.h -+++ b/util/cbfstool/cbfs.h +--- c/util/cbfstool/cbfs.h ++++ i/util/cbfstool/cbfs.h @@ -19,7 +19,9 @@ #include "common.h" #include @@ -262,10 +300,10 @@ index b082d8c783..8be2c92f2f 100644 #define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + ntohl((_p)->offset))) ) -diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c +diff --git c/util/cbfstool/cbfs_image.c i/util/cbfstool/cbfs_image.c index 6ccc4f904e..cc35c3c9c6 100644 ---- a/util/cbfstool/cbfs_image.c -+++ b/util/cbfstool/cbfs_image.c +--- c/util/cbfstool/cbfs_image.c ++++ i/util/cbfstool/cbfs_image.c @@ -77,6 +77,7 @@ int cbfs_parse_comp_algo(const char *name) return lookup_type_by_name(types_cbfs_compression, name); } @@ -330,10 +368,10 @@ index 6ccc4f904e..cc35c3c9c6 100644 /* Finds a place to hold whole data in same memory page. */ static int is_in_same_page(uint32_t start, uint32_t size, uint32_t page) -diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h +diff --git c/util/cbfstool/cbfs_image.h i/util/cbfstool/cbfs_image.h index 1f8b162d7c..648c83431b 100644 ---- a/util/cbfstool/cbfs_image.h -+++ b/util/cbfstool/cbfs_image.h +--- c/util/cbfstool/cbfs_image.h ++++ i/util/cbfstool/cbfs_image.h @@ -199,9 +199,11 @@ struct cbfs_file_attribute *cbfs_add_file_attr(struct cbfs_file *header, uint32_t tag, uint32_t size); @@ -346,10 +384,10 @@ index 1f8b162d7c..648c83431b 100644 enum vb2_hash_algorithm hash_type); #endif +#endif -diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c +diff --git c/util/cbfstool/cbfstool.c i/util/cbfstool/cbfstool.c index f0fbf5ae4f..3556631410 100644 ---- a/util/cbfstool/cbfstool.c -+++ b/util/cbfstool/cbfstool.c +--- c/util/cbfstool/cbfstool.c ++++ i/util/cbfstool/cbfstool.c @@ -87,7 +87,9 @@ static struct param { int fit_empty_entries; enum comp_algo compression; @@ -424,6 +462,3 @@ index f0fbf5ae4f..3556631410 100644 case 'M': param.fmap = optarg; break; --- -2.36.1 -