Page 1 of 1

Grub2: How to obtain screen resolution?

Posted: Sun Nov 11, 2018 11:51 am
by nintyfan
I need to properly handle newlinie character in my text console module and don't know how. I tried to read information from multiboot structure passed by bootloader, but it won't works. Do I have set some flag in my kernel multiboot header? Can you put here correct bootloader header with request for surch information as an example? My bootloader is Grub2.

That's my multiboot header:

Code: Select all

mboot: 
dd 0x1BADB002 ; Signature 
dd 0 ; Flags
dd -(0x1BADB002+0) ;Control sum
dd mboot

Re: Grub2: How to obtain screen resolution?

Posted: Mon Nov 12, 2018 3:00 am
by FusT
You should set the correct flags in your multiboot header so GRUB will pass the video mode information.
See https://www.gnu.org/software/grub/manua ... ields.html