arch: x86: make video init optional (expert)
PATCH v2 1/1 arch: x86: make video init optional (expert)
As x86 is becoming more widespread in embedded devices, that don't have any video adapter at all, make it possible to opt out from video init on bootup (expert option). Also useful for minimized paravirtualized kernels.
Most users want to leave this enabled and shouldn't touch it, thus defaulting to y and hiding behind CONFIG_EXPERT.
Signed-off-by Enrico Weigelt <[email protected]>
---
changes v2: fixed spelling in commit message and kconfig help text
--- arch/x86/Kconfig | 7 +++++++ arch/x86/boot/Makefile | 10 +++++----- arch/x86/boot/main.c | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-)
arch/x86/Kconfig +7 -0
@@ -916,6 +916,13 @@ config DMI affected by entries in the DMI blacklist. Required by PNP BIOS code. +config X86_BOOT_VIDEO + default y + bool "Setup video on boot" if EXPERT + help + Enable setting video mode on boot. Say Y here unless your machine + doesn't have any video adapter. (e.g., embedded systems or VMs) + config GART_IOMMU bool "Old AMD GART IOMMU support" select DMA_OPS
arch/x86/boot/Makefile +5 -5
@@ -34,17 +34,17 @@ subdir- := compressed setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpuflags.o cpucheck.o setup-y += early_serial_console.o edd.o header.o main.o memory.o -setup-y += pm.o pmjump.o printf.o regs.o string.o tty.o video.o -setup-y += video-mode.o version.o +setup-y += pm.o pmjump.o printf.o regs.o string.o tty.o version.o setup-$(CONFIG_X86_APM_BOOT) += apm.o +setup-$(CONFIG_X86_BOOT_VIDEO) += video.o video-mode.o # The link order of the video-*.o modules can matter. In particular, # video-vga.o *must* be listed first, followed by video-vesa.o. # Hardware-specific drivers should follow in the order they should be # probed, and video-bios.o should typically be last. -setup-y += video-vga.o -setup-y += video-vesa.o -setup-y += video-bios.o +setup-$(CONFIG_X86_BOOT_VIDEO) += video-vga.o +setup-$(CONFIG_X86_BOOT_VIDEO) += video-vesa.o +setup-$(CONFIG_X86_BOOT_VIDEO) += video-bios.o targets += $(setup-y) hostprogs := tools/build
arch/x86/boot/main.c +2 -0
@@ -174,7 +174,9 @@ void main(void)#endif /* Set the video mode */ +#if defined(CONFIG_X86_BOOT_VIDEO )set_video (); +#endif /* Do the last things and invoke protected mode */ go_to_protected_mode ();
Signature · 1 line
2.11.0