Grub2: How to obtain screen resolution?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nintyfan
Posts: 23
Joined: Wed Nov 07, 2018 10:15 am

Grub2: How to obtain screen resolution?

Post 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
FusT
Member
Member
Posts: 91
Joined: Wed Sep 19, 2012 3:43 am
Location: The Netherlands

Re: Grub2: How to obtain screen resolution?

Post 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
Post Reply