[PATCH] x86: coreboot: Show a coreboot logo if booted from coreboot

Simon Glass sjg at chromium.org
Wed Nov 29 18:52:08 CET 2023


U-Boot shows its own logo when starting up, if a display is active. Add
a coreboot logo too, for when U-Boot is booted from coreboot.

Note that the logo's license applies:
https://coreboot.org/Logo#coreboot_Logo_License

Signed-off-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Nico Huber <nico.h at gmx.de>
---

 drivers/video/Kconfig           |  10 ++++++++++
 drivers/video/Makefile          |   2 ++
 drivers/video/coreboot_logo.bmp | Bin 0 -> 5724 bytes
 drivers/video/video-uclass.c    |  18 ++++++++++++++++++
 4 files changed, 30 insertions(+)
 create mode 100644 drivers/video/coreboot_logo.bmp

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 6f319ba0d54..f9c289e042c 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -55,6 +55,16 @@ config VIDEO_LOGO
 	  tools/logos/u-boot_logo.bmp and looks best when the display has a
 	  black background.
 
+config VIDEO_LOGO_COREBOOT
+	bool "Show the coreboot logo on the display"
+	depends on VIDEO_LOGO && (SYS_COREBOOT || SANDBOX)
+	default y if SYS_COREBOOT
+	help
+	  This enables showing the coreboot logo on the display when a video
+	  device is probed. It appears at the top right, just below the U-Boot
+	  logo. The appearance of this logo indicates that coreboot provided
+	  the first-stage system setup.
+
 config BACKLIGHT
 	bool "Enable panel backlight uclass support"
 	default y
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index fdc29376324..f7ea7fa7fa0 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -25,6 +25,8 @@ obj-$(CONFIG_PANEL_HX8238D) += hx8238d.o
 obj-$(CONFIG_$(SPL_TPL_)SIMPLE_PANEL) += simple_panel.o
 
 obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
+obj-$(CONFIG_VIDEO_LOGO_COREBOOT) += coreboot_logo.o
+
 obj-$(CONFIG_$(SPL_TPL_)BMP) += bmp.o
 
 endif
diff --git a/drivers/video/coreboot_logo.bmp b/drivers/video/coreboot_logo.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..ed74ce1de0b09a6b6a9c0d06d3f435621b82950e
GIT binary patch
literal 5724
zcmbtYd0fuf+rF>t%VYN#WD6mLh)AT7n8d_r%#4P~WH2$&SSMrOLX4e^q9J<*V;}q2
zi%O)T>`D7x&-S~{^Nio;{pbDXeSP%loO56I{k_k<pWM90X~q06q_RjbR}ugIK&lJ4
zj;}BBL}U3eAE-kyef)3UxOt2UQj358xqe*m_y4vQtN#J|xC9_pR#sA}QYEQexw2HL
zQbnp(tt!>3Rg>z~t4oa<HKb<Eno_G)Eva3*wrDgOsZ*zp)U8`r>eZ_!_3PJ{1`QfW
z!-fr|QKLrExN&3AYPHg&NfY_xlTV~+)27m_Su<(gyt!CgTT6=;Eu>}3meQ(KD{0-j
zwX|u|Mr>?sq;1=_(ym=QY2UuR*xK4khYlU2W5<rtsZ%Ghv$K=VojXgHE?uN+*REo3
zZ!g`tb(8MhyGxHAJ;cGmL3;M=DZP625=Tcz>D{}x^y$+_oSdAbZ{NPsuU|iLc6OHj
z{riiHi;D~xFhB+l94M}?t}<xQAaQeZlTSbWR0a<oEbi{^GGxdQ@$m4Fp+kqtuwldG
zv(G*gPft%7K76=%d3ni*5hG;e$dU5-=bwwWx3`QMHA+U09xY#d at r8^TGe&%TeB{e7
zzm&0K$I4e<eI;Li{k44a%{MY`+&J;|^_6eG{Z_`0A1 at OoOpx!s`%e7){AA+9iSqsT
z-;2M$zf77mNq+d at 2bny1vP_vWMW#-jDnI`CqXYy5$h2wGWcu{!^3zX0Nnl{0%$PAl
zX3m@`K|w+C^UpuatXZ>U_Uzd*XU-g%J9n<kn>SD9&z~>9{PK$g2M5c71q<ZYUw at T_
z3m3|wMT=zd;>EIL$r4$*bg3*`woH~UUoI<FtdNx}SIVkYt7P at +)e;gCB5T&Hk+o~r
z%DQ#yBs4Ts)~{bL8#Zi^-+uc|Hg4P~n>KBd&6_vN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KJeqe at la(#*uy^Vi
zr(UCpq^@Hb1%AvhEi=alFWHBToSG(%A+^8yZeewG@(9z_UmobOz0g%t65=rZE1vXK
zy58YQDXzm;{mp_t^F}(OFPkqmXJ4MsXNyo+S@|diD<<%SUW<a>O36uKd^-B^jGnXO
ejZ_~@U}bXk=NY}{guhrNf?++G`-uPNkKjL#iK^8A

literal 0
HcmV?d00001

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index f743ed74c81..a0d2627e429 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -508,6 +508,17 @@ void *video_get_u_boot_logo(void)
 	return SPLASH_START(u_boot_logo);
 }
 
+#ifdef CONFIG_VIDEO_LOGO_COREBOOT
+SPLASH_DECL(coreboot_logo);
+
+void *video_get_coreboot_logo(void)
+{
+	return SPLASH_START(coreboot_logo);
+}
+#else
+static inline void *video_get_coreboot_logo(void) { return NULL; }
+#endif
+
 static int show_splash(struct udevice *dev)
 {
 	u8 *data = SPLASH_START(u_boot_logo);
@@ -515,6 +526,13 @@ static int show_splash(struct udevice *dev)
 
 	ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
 
+	if (IS_ENABLED(CONFIG_VIDEO_LOGO_COREBOOT)) {
+		void *data_cb = video_get_coreboot_logo();
+
+		ret = video_bmp_display(dev, map_to_sysmem(data_cb), -4, 200,
+					true);
+	}
+
 	return 0;
 }
 
-- 
2.43.0.rc2.451.g8631bc7472-goog



More information about the U-Boot mailing list