Hello, i'm trying to run GRUB2 in graphic mode as coreboot payload on a Thinkpad x220, attached are the relevant coreboot/grub config.
When on GRUB2 console i run 'videoinfo' it returns an empty list so i guess it actually doesn't start in video mode (so it also doesn't set the background image) Still i can't figure out what i'm missing.
Here's the relevant grub part
set prefix=(memdisk)/boot/grub
insmod nativedisk insmod ehci insmod ohci insmod uhci insmod usb insmod usbms insmod chain
terminal_input --append at_keyboard terminal_output --append cbmemc
set menu_color_normal=white/black set menu_color_highlight=white/cyan
gfxpayload=keep terminal_output --append gfxterm
set gfxmode=1366x768x32 load_video insmod gfxterm
set default="0>0" set timeout=1
set pager=1 insmod jpeg
background_image (cbfsdisk)/bg.jpg
loadfont (memdisk)/dejavusansmono.pf2
keymap usqwerty
Hello Giulio,
On 25.03.2018 12:35, G wrote:
Hello, i'm trying to run GRUB2 in graphic mode as coreboot payload on a Thinkpad x220, attached are the relevant coreboot/grub config.
unlike legacy firmware (e.g. BIOS, UEFI) coreboot doesn't have persis- tent drivers in the background that GRUB could call back to ask to switch a video mode. So you have to configure coreboot to already start in a video mode. What you are looking for is
CONFIG_GENERIC_LINEAR_FRAMEBUFFER
as opposed to the
CONFIG_VGA_TEXT_FRAMEBUFFER=y
that you have currently selected.
I'm not sure if you have to configure anything in GRUB too, to get the background image to work. I would guess that it just works, though.
Nico
On 2018-03-25 12:15, Nico Huber wrote:
Hello Giulio,
CONFIG_GENERIC_LINEAR_FRAMEBUFFER
as opposed to the
CONFIG_VGA_TEXT_FRAMEBUFFER=y
that you have currently selected.
I'm not sure if you have to configure anything in GRUB too, to get the background image to work. I would guess that it just works, though.
Nico
Hello, thanks for your help.
I have made the change you told me and rebuilt coreboot but it sill looks like Grub is not in graphic mode. If i use the 'videoinfo' command the list is still empty wich should mean that Grub can't find any display/graphic info.
The update section in .config: # # Display # # CONFIG_VGA_TEXT_FRAMEBUFFER is not set CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y CONFIG_LINEAR_FRAMEBUFFER=y # CONFIG_SMBUS_HAS_AUX_CHANNELS is not set CONFIG_PCI=y CONFIG_MMCONF_SUPPORT=y # CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT is not set CONFIG_PCIX_PLUGIN_SUPPORT=y CONFIG_CARDBUS_PLUGIN_SUPPORT=y # CONFIG_AZALIA_PLUGIN_SUPPORT is not set CONFIG_PCIEXP_PLUGIN_SUPPORT=y # CONFIG_EARLY_PCI_BRIDGE is not set CONFIG_SUBSYSTEM_VENDOR_ID=0x0000 CONFIG_SUBSYSTEM_DEVICE_ID=0x0000 # CONFIG_INTEL_GMA_ADD_VBT_DATA_FILE is not set # CONFIG_SOFTWARE_I2C is not set
Giulio
On 25.03.2018 14:49, G wrote:
On 2018-03-25 12:15, Nico Huber wrote:
Hello Giulio,
CONFIG_GENERIC_LINEAR_FRAMEBUFFER
as opposed to the
CONFIG_VGA_TEXT_FRAMEBUFFER=y
that you have currently selected.
I'm not sure if you have to configure anything in GRUB too, to get the background image to work. I would guess that it just works, though.
Nico
Hello, thanks for your help.
I have made the change you told me and rebuilt coreboot but it sill looks like Grub is not in graphic mode. If i use the 'videoinfo' command the list is still empty wich should mean that Grub can't find any display/graphic info.
Sorry, I'm not an expert for GRUB. But what I reckon from the code is that you shouldn't be able to see an empty list (even in VGA text mode videoinfo should report just that). Unless you are watching the output from a debug console and your screen is blank, ofc.
Nico
On 2018-03-25 12:15, Nico Huber wrote:
Hello Giulio,
CONFIG_GENERIC_LINEAR_FRAMEBUFFER
as opposed to the
CONFIG_VGA_TEXT_FRAMEBUFFER=y
Hello again, i started with a clean coreboot config and a clean grub2 config just configuring the minimum required. It now seems to work as grub is loading correctly the font specified and also the resolution look like to be the correct 1366x768. The 'videoinfo' command now shows "Coreboot Video Adapter" and the an empty list (no resolution and/or other infos). I still can't get the background image to work but this look like a big improvment.
I'm attaching the new coreboot and grub config in case anyone has similar problems.
Thanks Giulio
Problem solved: i was missing the gfxterm_background grub module which contains the background_image command.
Giulio