PortaboomHide minor edits - Show changes to markup
In case you don't have a scientific calculator handy, I've created a page that explains about using the GNU bc command when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexadecimal number.
In case you don't have a scientific calculator handy, I've created a page that explains about using the GNU bc command when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexadecimal number.
Sources for this page:\\
Sources of documentation used to create this page:\\
The following content was culled from the Linux kernel documentation; the kernel source and documentation is always considered authorative, this guide is just a collection of information that I put together for people to use.
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel wants VGA values in hexadecimal. The bootloaders do the conversion of the vga parameter from decimal to hexadecimal for you when they load the kernel. So how do you know which decimal or hexadecimal numbers to use for which video mode?
When you use the vga=parameter in GRUB, LILO, or syslinux, use the decimal number listed below that represents the video mode you want to use; for example, to obtain a framebuffer screen from the kernel that is 640x480 in size with 16 bits for color (64k colors), the tables below say 0x311 hexadecimal, so the vga parameter should be vga=785.
The video mode to be used is selected by a kernel parameter which can be specified in the kernel Makefile (the SVGA_MODE=... line) or by the vga=... option of LILO (or another boot loader). You can hardcode the video mode into the kernel by using the 'vidmode' utility (also known as 'rdev -v') which is present in standard Linux utility packages).
In case you don't have a scientific calculator handy, I've created a page that explains about using the GNU bc command when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexadecimal number.
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel wants VGA values in hexadecimal. The bootloaders do the conversion of the vga parameter from decimal to hexadecimal automatically when they load the kernel.
So how do you know which decimal or hexadecimal numbers to use for which video mode?
When you use the vga=### in GRUB, LILO, or syslinux, use the decimal number listed below that represents the video mode you want to use; for example, to obtain a framebuffer screen from the kernel that is 640x480 in size with 16 bits for color (64k colors), the tables below say 0x311 hexadecimal, so the vga parameter should be vga=785.
If you would like to hardcode this value into the kernel, there are a few ways you can do it:
$KERNEL_SOURCE/arch/i386/boot/Makefile, and the parameter to set is SVGA_MODE=.... When you compile your kernel, this value gets built into the kernel, and no other settings need to be made. This value needs to be set in hexdecimal (according to $KERNEL_SOURCE/Documentation/svga.txt)
rdev utility:
man rdev on your Linux system for more info. I'm not sure if you should be using a decimal or hexdecimal number here.
In case you don't have a scientific calculator handy, I've created a page that explains about using the GNU bc command when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexadecimal number.
Table 1: Listing of Video Modes and codes
VESA mode numbers:
Table 2: listing of VESA mode numbers
Table 3: Kernel VESA mode codes
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel wants VGA values in hexdecimal. The bootloaders do the conversion of the vga parameter from decimal to hexidecimal for you when they load the kernel. So how do you know which decimal or hexidecimal numbers to use for which video mode?
When you use the vga=parameter in GRUB, LILO, or syslinux, use the decmimal number listed below that represents the video mode you want to use; for example, 640x480x16 is 0x311 hexdecimal, so the vga parameter should be vga=785.
I've created a page that explains about using bc when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
To give you a starting point for conversion, 785 decimal is 0x311 hexdecimal, or a 640x480 16 bit color framebuffer.
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel wants VGA values in hexadecimal. The bootloaders do the conversion of the vga parameter from decimal to hexadecimal for you when they load the kernel. So how do you know which decimal or hexadecimal numbers to use for which video mode?
When you use the vga=parameter in GRUB, LILO, or syslinux, use the decimal number listed below that represents the video mode you want to use; for example, to obtain a framebuffer screen from the kernel that is 640x480 in size with 16 bits for color (64k colors), the tables below say 0x311 hexadecimal, so the vga parameter should be vga=785.
The video mode to be used is selected by a kernel parameter which can be specified in the kernel Makefile (the SVGA_MODE=... line) or by the vga=... option of LILO (or another boot loader). You can hardcode the video mode into the kernel by using the 'vidmode' utility (also known as 'rdev -v') which is present in standard Linux utility packages).
In case you don't have a scientific calculator handy, I've created a page that explains about using the GNU bc command when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexadecimal number.
From /usr/src/linux/Documentation/svga.txt:
The video mode to be used is selected by a kernel parameter which can be specified in the kernel Makefile (the SVGA_MODE=... line) or by the vga=... option of LILO (or some other boot loader you use) or by the vidmode utility (present in standard Linux utility packages).
Sources for this page:$LINUX_KERNEL_SOURCE/Documentation/svga.txt
$LINUX_KERNEL_SOURCE/Documentation/fb/vesafb.txt
I've created a page that explains about using =bc= when HowTos.ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
I've created a page that explains about using bc when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
See also KernelBuildNotes?
See also AntLinux.KernelBuildNotes
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel vga boot parameter wants VGA values in hexdecimal. To give you a starting point for conversion, 785 decimal is 0x311 hexdecimal, or a 640x480 16 bit color framebuffer.
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel wants VGA values in hexdecimal. The bootloaders do the conversion of the vga parameter from decimal to hexidecimal for you when they load the kernel. So how do you know which decimal or hexidecimal numbers to use for which video mode?
To give you a starting point for conversion, 785 decimal is 0x311 hexdecimal, or a 640x480 16 bit color framebuffer.
I've created a page that explains about using =bc= when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
I've created a page that explains about using =bc= when HowTos.ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
I've created a page that explains about using =bc= when ConvertingToHexdecimal?. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
I've created a page that explains about using =bc= when ConvertingToHexadecimal. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
The contents of this website are Copyright (c)2004 by Brian Manning <brian at antlinux dot com>. Please do not reuse any of the content on this website without permission from the author.
See also KernelBuildNotes?
LILO, GRUB, and syslinux (Linux bootloaders) all want their VGA values in decimal. The Linux kernel vga boot parameter wants VGA values in hexdecimal. To give you a starting point for conversion, 785 decimal is 0x311 hexdecimal, or a 640x480 16 bit color framebuffer.
When you use the vga=parameter in GRUB, LILO, or syslinux, use the decmimal number listed below that represents the video mode you want to use; for example, 640x480x16 is 0x311 hexdecimal, so the vga parameter should be vga=785.
I've created a page that explains about using =bc= when ConvertingToHexdecimal?. You feed bc the decimal number you want to use for the VGA mode, and it spits out a hexdecimal number.
Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200 -------+-------------------------------------------------------------- 4 bits | ? ? 0x302 ? ? ? ? 8 bits | 0x300 0x301 0x303 0x305 0x161 0x307 0x31C 15 bits | ? 0x310 0x313 0x316 0x162 0x319 0x31D 16 bits | ? 0x311 0x314 0x317 0x163 0x31A 0x31E decimal | d785 d788 d791 24 bits | ? 0x312 0x315 0x318 ? 0x31B 0x31F decimal | d786 d789 d792 32 bits | ? ? ? ? 0x164 ?
Here is a better explanation of VESA framebuffer (from Documentation/fb/vesafb.txt):
VESA mode numbers:
| 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- 256 | 0x101 0x103 0x105 0x107 32k | 0x110 0x113 0x116 0x119 64k | 0x111 0x114 0x117 0x11A 16M | 0x112 0x115 0x118 0x11B
The video mode number of the Linux kernel is the VESA mode number plus 0x200. So the table for the Kernel mode numbers are:
| 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- 256 | 0x301 0x303 0x305 0x307 32k | 0x310 0x313 0x316 0x319 64k | 0x311 0x314 0x317 0x31A 16M | 0x312 0x315 0x318 0x31B
From /usr/src/linux/Documentation/svga.txt:
The video mode to be used is selected by a kernel parameter which can be specified in the kernel Makefile (the SVGA_MODE=... line) or by the vga=... option of LILO (or some other boot loader you use) or by the vidmode utility (present in standard Linux utility packages).