[ipxe-devel] 答复: VGA resolution issue ---IPXE.EFI PXE boot

dangdehua dangdehua at huawei.com
Thu Jul 6 02:29:27 UTC 2017


Hi Christian,
Use console command and FB is enabled, then input command as below:
IPXE>console --x 800 --y 600 --depth 16 --keep
The resolution is valid, and change from 1024x768 to 800x600 at once in IPXE environment.
But the resolution is restored to 1024X768 by kernel boot later, how to keep 800x600 after kernel boot? To keep the resolution as IPXE environment, is there other parameters for the "console" command?

By the way, if use the video= kernel cmdline option, what's the kernel cmdline parameters? Could you list the example? 

Thank you very much!

-----邮件原件-----
发件人: Christian Nilsson [mailto:nikize at gmail.com] 
发送时间: 2017年7月5日 18:51
收件人: dangdehua <dangdehua at huawei.com>
抄送: ipxe-devel at lists.ipxe.org; Zhangzhaobin <zhangzhaobin at huawei.com>; Michael Brown <mcb30 at ipxe.org>
主题: Re: [ipxe-devel] VGA resolution issue ---IPXE.EFI PXE boot

On Wed, Jul 5, 2017 at 12:07 PM, Michael Brown <mcb30 at ipxe.org> wrote:
> On 05/07/17 10:27, dangdehua wrote:
>>
>> Recently came across this problem: the resolution is not valid in OS 
>> when I set “vga=0x314” in kernel cmdline with ipxe.efi boot.
>>
>> In EFI BIOS platform, Although I set “vga=0x314” in kernel cmdline, 
>> the actual resolution is 0x317(1024*768) when boot in OS.
>>
>> Is there any method/command to set VGA resolution? Which code will be 
>> changed to support the feature?
>
>
> In a BIOS boot, the "vga=..." parameter is interpreted by the 
> bootloader (i.e. iPXE) and used to modify the vid_mode field within the bzImage header.
>
> In a UEFI boot, iPXE treats the kernel as being a generic UEFI 
> executable, and just passes along the "vga=..." parameter together 
> with all other parameters as part of the kernel command line.  It 
> would then be the responsibility of the kernel's EFI stub to interpret 
> this.  There is no dedicated method equivalent to the vid_mode field 
> for iPXE to express the concept of "desired video mode".
>
> From a very quick look at the kernel, it seems that the EFI stub 
> doesn't currently have any handling for a "vga=" parameter.  There may 
> be some UEFI-specific equivalent kernel command line parameter that I 
> am not aware of.
>
> Michael

Best way to handle this in EFI land is probably to use the kernels EFIFB implementation which reads the native EFI resolution, I believe that this resolution can be changed by iPXE if the console command and FB is enabled on compile time.

Another option is to use the video= kernel cmdline option instead with uvesa_fb or similar.

/Christian


More information about the ipxe-devel mailing list