Hi,

On 09.02.19 23:27, Mike Banon wrote:
> I am trying to enable FRAMEBUFFER_SET_VESA_MODE for G505S at its'
> Kconfig ( ./src/mainboard/lenovo/g505s/Kconfig ) and also set the VESA
> mode to 0x118 instead of default 0x117 setting, by inserting the
> following lines to G505S Kconfig:
> 
> config FRAMEBUFFER_SET_VESA_MODE
>         bool
>         default y

overriding the default for an option with complex dependencies is
delicate. It might be a good idea to copy the dependencies over:
`depends on PCI_OPTION_ROM_RUN_YABEL || PCI_OPTION_ROM_RUN_REALMODE`.
I just tested this for the G505s and it's currently ok w/o dependencies.
But if somebody would implement native graphics init for it, you'd
spuriously show the VESA options even with native selected.

> 
> config FRAMEBUFFER_VESA_MODE_118
>         bool
>         default y

see below

> 
> config FRAMEBUFFER_VESA_MODE
>         hex
>         default 0x118

You won't need this once the choice's default is set.

> 
> However, when I'm trying to run "make menuconfig" it complains with
> "Kconfig:[line_number]:warning: defaults for choice values not
> supported" message and I could see that the default setting is still
> 0x117.
> 
> Could you please advise the working way of changing this "choice"
> setting by default?
> 
> I thought of something like
> 
> choice
>         prompt "framebuffer graphics resolution"
>         default FRAMEBUFFER_VESA_MODE_117 if !BOARD_LENOVO_G505S
>         default FRAMEBUFFER_VESA_MODE_118 if BOARD_LENOVO_G505S
>         help
>           This option sets the resolution used for the coreboot framebuffer 
> (and
>           bootsplash screen).
> 
> at ./coreboot/src/device/Kconfig, and it should work, however this
> isn't pretty (and also I prefer that board-specific options stay at
> board's Kconfig and don't spread across the tree) so it would be
> really helpful if you know a good alternative workaround

The usual workaround is to add a predicate that is selected by the
board. e.g.

    config FRAMEBUFFER_VESA_DEFAULT_118
            bool

    choice
            default FRAMEBUFFER_VESA_MODE_118 if
FRAMEBUFFER_VESA_DEFAULT_118

Not pretty either, but generally accepted. src/mainboard/Kconfig starts
with an example of this pattern.

Nico

PS. I don't understand the current 117 default. I remember it was a
    common mode in the legacy BIOS days. But for legacy boot, you
    wouldn't want to run the VGA BIOS in coreboot. It might be worth
    to test (with all currently integrated payloads) if 118 isn't a
    better default. Assuming 118 means 4-byte pixels? I would expect
    it to be more compatible.
_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org

Reply via email to