Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
From 3244ea140c1b5b07ebb30f3d17e467d853b0db0f Mon Sep 17 00:00:00 2001
From: James Hilliard <james.hilliard1@gmail.com>
Date: Tue, 13 Aug 2024 11:41:28 -0600
Subject: [PATCH] futility/platform_csme: add missing USE_FLASHROM guards
Fixes:
build/futility/platform_csme.o: in function `find_fmba':
futility/platform_csme.c:42: undefined reference to `find_firmware_section'
build/futility/platform_csme.o: in function `unlock_csme':
futility/platform_csme.c:200: undefined reference to `get_firmware_image_temp_file'
futility/platform_csme.c:230: undefined reference to `reload_firmware_image'
Change-Id: I74140d38d119f2a0e6b8cf8eef3f9f05cd43bbd7
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Upstream: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5785792
---
futility/platform_csme.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/futility/platform_csme.c b/futility/platform_csme.c
index 2eb3ffcf..3829fe7b 100644
--- a/futility/platform_csme.c
+++ b/futility/platform_csme.c
@@ -33,6 +33,7 @@ struct fmba {
} __attribute__((packed));
static struct fmba * const find_fmba(const struct firmware_image *image) {
+#ifdef USE_FLASHROM
struct firmware_section section;
const uint32_t signature = 0x0FF0A55A;
const struct fdbar *fd;
@@ -54,6 +55,9 @@ static struct fmba * const find_fmba(const struct firmware_image *image) {
return NULL;
return (struct fmba * const)(section.data + offset);
+#else
+ return NULL;
+#endif /* USE_FLASHROM */
}
static bool is_flmstr1_locked(const struct fmba * const fmba)
@@ -132,6 +136,7 @@ int unlock_csme_eve(struct firmware_image *image)
return unlock_flmstrs(image, 0xffffff00, 0xffffff00, 0xffffff00);
}
+#ifdef USE_FLASHROM
/*
* Determine the platform to pass to ifdtool (e.g. 'adl') by extracting
* CONFIG_IFD_CHIPSET from the config file in CBFS. However, old nissa firmware
@@ -183,6 +188,7 @@ static int run_ifdtool(const char *image_path, char *platform, const char *extra
free(command);
return ret;
}
+#endif /* USE_FLASHROM */
/*
* Unlock the CSME for recent Intel platforms (CML onwards).
@@ -193,6 +199,7 @@ static int run_ifdtool(const char *image_path, char *platform, const char *extra
*/
int unlock_csme(struct updater_config *cfg)
{
+#ifdef USE_FLASHROM
const char *temp_path;
char *platform;
int ret = -1;
@@ -245,4 +252,7 @@ cleanup:
free(platform);
return ret;
+#else
+ return -1;
+#endif /* USE_FLASHROM */
}
--
2.34.1

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_HOST_VBOOT_UTILS
bool "host vboot utils"
select BR2_PACKAGE_HOST_UTIL_LINUX
help
Chromium OS verified boot utilities: futility and cgpt.
https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot

View File

@@ -0,0 +1,3 @@
# Locally computed
sha256 da9ad5ccbd6873904fa52dd0134e4c0ab8cdbacfb6c3407add3b4da0c8b62c15 vboot-utils-042312c6e7fce9dd106b329be0ecb51a8a347337-git4.tar.gz
sha256 cb9dc8e96aedf9120b6757a60387db10f3c1a8e3fd97bb9d0f11327be5a7ed4d LICENSE

View File

@@ -0,0 +1,46 @@
################################################################################
#
# vboot-utils
#
################################################################################
VBOOT_UTILS_VERSION = 042312c6e7fce9dd106b329be0ecb51a8a347337
VBOOT_UTILS_SITE = https://chromium.googlesource.com/chromiumos/platform/vboot_reference
VBOOT_UTILS_SITE_METHOD = git
VBOOT_UTILS_LICENSE = BSD-3-Clause
VBOOT_UTILS_LICENSE_FILES = LICENSE
HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf
# vboot_reference contains code that goes into bootloaders,
# utilities intended for the target system, and a bunch of scripts
# for Chromium OS build system. Most of that does not make sense
# in a buildroot host-package.
#
# We only need futility for signing images, the keys, and cgpt for boot
# media partitioning.
#
# make target for futility is "futil".
#
# The value of ARCH is only relevant for crossystem (a target tool) and
# does not affect futil or cgpt in any way as long as it is one of the
# supported targets.
HOST_VBOOT_UTILS_MAKE_OPTS = USE_FLASHROM=0
define HOST_VBOOT_UTILS_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) $(HOST_VBOOT_UTILS_MAKE_OPTS) -C $(@D) \
CC="$(HOSTCC)" \
CPPFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
LDFLAGS="$(HOST_LDFLAGS)" \
ARCH=arm \
futil cgpt
endef
define HOST_VBOOT_UTILS_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) $(HOST_VBOOT_UTILS_MAKE_OPTS) -C $(@D) \
DESTDIR=$(HOST_DIR) \
futil_install cgpt_install devkeys_install
endef
$(eval $(host-generic-package))