23.11.2016 00:45, L A Walsh пишет:
I found that it's the boot loader that sets the initial screen mode before the kernel is loaded.
It is often set again during boot by programs that set the console keyboard and font -- and seems to be separate from the mode one is in during a graphical boot.
I'm trying to figure out how to set that VGA mode from "userland" (running as root) just before jumping to a new kernel with kexec.
As far as I can tell - early boot (platform dependent) kernel code fills in screen_info structure describing current video mode at the time kernel is booted - later video drivers use screen_info during initialization - kexec passes original screen_info onto loaded kernel, thus making it start using whatever video mode was in effect when original kernel was booted. It also contains interesting comment /* Copying screen_info will do? */ memcpy(¶ms->screen_info, &boot_params.screen_info, sizeof(struct screen_info)); So it appears there is no way to do what you want.
If I don't, kexec starts the new kernel in a non-deterministic mode that displays mostly garbage on the screen up until the screen's mode is reset by console kbd+font progs. Alternatively -- I've also seen the screen go blank for the entire boot process until the system displays the login prompt.
Does anyone know how to do set the VGA mode from userland so kexec will start in a known state?
I don't think the method used in boot loaders would work, as I think they are making BIOS calls to detect and set modes... :-(
There are suggestions that using kexec --real-mode may work, as it makes loaded kernel to go through real-mode entry point that queries video BIOS for current modes. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org