GithubHelp home page GithubHelp logo

Comments (36)

Thrilleratplay avatar Thrilleratplay commented on July 24, 2024 1

@nemanjan00 It is. Other than adding in additional payloads, the changes are related to video related

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024 1

Yeah, works!

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

I did try to do this, but, with seabios, I do not get any image until linux takes over.

from skulls.

merge avatar merge commented on July 24, 2024

We can't just remove the vga bios. Native graphics init doesn't seem to work either. Did you try that? It's not all that bad having this as binary because of good coreboot integration and it seems to be identical for all X230 models. I just like to have this question open.

It'd probably be a seperate project analyzing this vga bios.

from skulls.

rectagonal avatar rectagonal commented on July 24, 2024

Dumb question as im relatively new to coreboot. (I did my first flash w/ this repo's build this weekend.) Is it possible to use native graphics int + SeaVGABios in lieu of the proprietary vendor vga rom?

from skulls.

merge avatar merge commented on July 24, 2024

I guess it's always "native graphics init" or "run a VGA Bios binary". I didn't yet try to build a VGA bios using the seabios repo, and add that as "external" in coreboot. Do you want to try this?

Also, it's been quite some time since I tried native graphics init, but last thing I heard was, to have graphics in a bootloader or payload, and also to support Windows, we need that extracted VGA bios.

from skulls.

rectagonal avatar rectagonal commented on July 24, 2024

I wasn't sure how external it actually was. Coreboot wiki makes it sound like it's in the main tree just under a non obvious option:

SeaBIOS can provide an option rom that implements legacy VGA BIOS compatibility for coreboot initialized GPUs. To use this feature select CONFIG_VGA_COREBOOT (in "make menuconfig" under "VGA ROM ---> VGA Hardware Type" select "coreboot linear framebuffer").
https://www.coreboot.org/SeaBIOS#Using_coreboot_VGA_support

I had planned on trying it unless someone told me it was a terrible idea, but it might be a few days before im ready to pop open the laptop again. I also don't know how I would test Windows compatibility. I mostly run NetBSD and sometimes dual boot Devuan.

EDIT: Would booting the Win 10 installer, without going through installation be a sufficient test?

from skulls.

tlaurion avatar tlaurion commented on July 24, 2024

x230 doesn't need vga bios and can be initiated by native VGA init code. Here is the x230 coreboot building configuration used by Heads to boot it's linux payload. Use that config and modify to use SeaBIOS.

Ho. True that, maybe you're right. Maybe Seabios needs a VGA bios. Didn't try that.

from skulls.

merge avatar merge commented on July 24, 2024

from skulls.

merge avatar merge commented on July 24, 2024

Thanks for the config link. Why do they have CONFIG_VGA_BIOS_FILE="pci8086,0166.rom" in their config? Is that a mistake?

from skulls.

tlaurion avatar tlaurion commented on July 24, 2024

You can comment it out, since not used:

# CONFIG_VGA_BIOS is not set
CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
# CONFIG_MAINBOARD_FORCE_NATIVE_VGA_INIT is not set
CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y

have you tested?

from skulls.

Thrilleratplay avatar Thrilleratplay commented on July 24, 2024

I can confirm. I just flashed coreboot using the last source and compiled libgfxinit. Here is a gist of the make file

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

Is this config based off the one in repo?

There are quite a bit of changes...

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

Ok. Thank you! Going to try it right now.

from skulls.

merge avatar merge commented on July 24, 2024

Thanks for testing this. We'll still use the blobs repo for microcode updates, but I'll test this soon and hope to be able to remove the vga file. great.

from skulls.

merge avatar merge commented on July 24, 2024

Based on what @Thrilleratplay suggests I have the following config diff to the current one in our repo:

--- a/x230/92263853ad.config
+++ b/x230/1ecec5f979.config
@@ -76,6 +76,7 @@ CONFIG_VENDOR_LENOVO=y
 # CONFIG_VENDOR_LOWRISC is not set
 # CONFIG_VENDOR_MSI is not set
 # CONFIG_VENDOR_NVIDIA is not set
+# CONFIG_VENDOR_OCP is not set
 # CONFIG_VENDOR_PACKARDBELL is not set
 # CONFIG_VENDOR_PCENGINES is not set
 # CONFIG_VENDOR_PURISM is not set
@@ -84,6 +85,7 @@ CONFIG_VENDOR_LENOVO=y
 # CONFIG_VENDOR_SAPPHIRE is not set
 # CONFIG_VENDOR_SCALEWAY is not set
 # CONFIG_VENDOR_SIEMENS is not set
+# CONFIG_VENDOR_SIFIVE is not set
 # CONFIG_VENDOR_SUNW is not set
 # CONFIG_VENDOR_SUPERMICRO is not set
 # CONFIG_VENDOR_TECHNEXION is not set
@@ -104,7 +106,7 @@ CONFIG_PAYLOAD_CONFIGFILE=""
 CONFIG_VGA_BIOS_ID="8086,0166"
 # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set
 CONFIG_DIMM_SPD_SIZE=256
-CONFIG_VGA_BIOS=y
+# CONFIG_VGA_BIOS is not set
 CONFIG_DCACHE_RAM_BASE=0xfefe0000
 CONFIG_DCACHE_RAM_SIZE=0x20000
 CONFIG_VGA_BIOS_FILE="pci8086,0166.rom"
@@ -185,7 +187,6 @@ CONFIG_SYSTEM_TYPE_LAPTOP=y
 # SoC
 #
 CONFIG_CPU_SPECIFIC_OPTIONS=y
-# CONFIG_S3_VGA_ROM_RUN is not set
 CONFIG_RAMTOP=0x200000
 CONFIG_HEAP_SIZE=0x4000
 CONFIG_RAMBASE=0x100000
@@ -296,6 +297,7 @@ CONFIG_USE_NATIVE_RAMINIT=y
 # CONFIG_NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES is not set
 # CONFIG_NATIVE_RAMINIT_IGNORE_XMP_MAX_DIMMS is not set
 CONFIG_SANDYBRIDGE_IVYBRIDGE_LVDS=y
+CONFIG_IF_NATIVE_VGA_INIT=y
 CONFIG_HPET_ADDRESS=0xfed00000
 CONFIG_HPET_MIN_TICKS=0x80
 CONFIG_MAX_PIRQ_LINKS=4
@@ -383,6 +385,7 @@ CONFIG_UDK_VERSION=2013
 # CONFIG_ARCH_ROMSTAGE_ARMV8_64 is not set
 # CONFIG_ARCH_RAMSTAGE_ARMV8_64 is not set
 CONFIG_ARCH_ARMV8_EXTENSION=0
+# CONFIG_ARM64_USE_ARCH_TIMER is not set
 # CONFIG_ARM64_A53_ERRATUM_843419 is not set
 # CONFIG_ARCH_MIPS is not set
 # CONFIG_ARCH_BOOTBLOCK_MIPS is not set
@@ -432,32 +435,28 @@ CONFIG_BOOTBLOCK_SIMPLE=y
 CONFIG_BOOTBLOCK_SOURCE="bootblock_simple.c"
 # CONFIG_COLLECT_TIMESTAMPS_NO_TSC is not set
 CONFIG_COLLECT_TIMESTAMPS_TSC=y
+# CONFIG_PAGING_IN_CACHE_AS_RAM is not set
+# CONFIG_IDT_IN_EVERY_STAGE is not set
 
 #
 # Devices
 #
 CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
+CONFIG_HAVE_LINEAR_FRAMEBUFFER=y
 CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
 # CONFIG_MAINBOARD_FORCE_NATIVE_VGA_INIT is not set
 CONFIG_MAINBOARD_HAS_LIBGFXINIT=y
-# CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT is not set
+CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
 # CONFIG_MAINBOARD_USE_LIBGFXINIT is not set
-CONFIG_VGA_ROM_RUN=y
+# CONFIG_VGA_ROM_RUN is not set
 # CONFIG_NO_GFX_INIT is not set
-# CONFIG_ALWAYS_LOAD_OPROM is not set
-# CONFIG_ON_DEVICE_ROM_LOAD is not set
-# CONFIG_PCI_OPTION_ROM_RUN_REALMODE is not set
-CONFIG_PCI_OPTION_ROM_RUN_YABEL=y
-# CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES is not set
-CONFIG_YABEL_VIRTMEM_LOCATION=0x1000000
-# CONFIG_YABEL_DIRECTHW is not set
 # CONFIG_MULTIPLE_VGA_ADAPTERS is not set
 
 #
 # Display
 #
-# CONFIG_FRAMEBUFFER_SET_VESA_MODE is not set
 CONFIG_VGA_TEXT_FRAMEBUFFER=y
+# CONFIG_GENERIC_LINEAR_FRAMEBUFFER is not set
 # CONFIG_SMBUS_HAS_AUX_CHANNELS is not set
 CONFIG_PCI=y
 CONFIG_MMCONF_SUPPORT=y
@@ -531,7 +530,7 @@ CONFIG_SMBIOS_PROVIDED_BY_MOBO=y
 # CONFIG_MAINBOARD_HAS_I2C_TPM_CR50 is not set
 # CONFIG_PLATFORM_USES_FSP2_0 is not set
 # CONFIG_INTEL_DDI is not set
-# CONFIG_INTEL_EDID is not set
+CONFIG_INTEL_EDID=y
 CONFIG_INTEL_INT15=y
 CONFIG_INTEL_GMA_ACPI=y
 # CONFIG_INTEL_GMA_SSC_ALTERNATE_REF is not set
@@ -660,7 +659,9 @@ CONFIG_SEABIOS_STABLE=y
 # CONFIG_SEABIOS_MASTER is not set
 # CONFIG_SEABIOS_REVISION is not set
 # CONFIG_SEABIOS_THREAD_OPTIONROMS is not set
+CONFIG_SEABIOS_VGA_COREBOOT=y
 CONFIG_SEABIOS_BOOTORDER_FILE=""
+CONFIG_PAYLOAD_VGABIOS_FILE="payloads/external/SeaBIOS/seabios/out/vgabios.bin"
 CONFIG_SEABIOS_DEBUG_LEVEL=-1
 
 #
@@ -695,12 +696,10 @@ CONFIG_HAVE_DEBUG_SMBUS=y
 # CONFIG_DEBUG_SMM_RELOCATION is not set
 # CONFIG_DEBUG_MALLOC is not set
 # CONFIG_DEBUG_ACPI is not set
-# CONFIG_X86EMU_DEBUG is not set
 # CONFIG_DEBUG_SPI_FLASH is not set
 # CONFIG_TRACE is not set
 # CONFIG_DEBUG_BOOT_STATE is not set
 # CONFIG_DEBUG_ADA_CODE is not set
-CONFIG_NO_EDID_FILL_FB=y
 # CONFIG_ENABLE_APIC_EXT_ID is not set
 CONFIG_WARNINGS_ARE_ERRORS=y
 # CONFIG_POWER_BUTTON_DEFAULT_ENABLE is not set

I don't have display in GRUB. SeaBIOS works though. The same goes for using CONFIG_MAINBOARD_USE_LIBGFXINIT instead of native vga init. sorry -.- Can you really confirm that you have display in your HDD's GRUB installation after SeaBIOS?

thanks

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

I do have display in GRUB. (even when using GRUB as payload)

This is my config:

.config:
https://gist.github.com/nemanjan00/14127cbaef7ed5c3e6b7410825526982

grub.cfg:
https://gist.github.com/nemanjan00/5ea1cf9e2e0bb4bcb33d1d25b758c299

from skulls.

merge avatar merge commented on July 24, 2024

you use GRUB as coreboot payload. You have display there, just like SeaBIOS has, using native vga init. What I'm talking about is GRUB on disk (or Windows on disk, which wouldn't work either, I think).

Can you confirm having video in GRUB on disk?

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

I am 80% sure I did. I will try it again later.

You are using Grub 2.2?

Do you have graphics module?

Did you maybe set different graphics mode in grub.cfg?

from skulls.

merge avatar merge commented on July 24, 2024

I use GRUB 2.0, a Debian stable default installation.

from skulls.

merge avatar merge commented on July 24, 2024

As a reminder: my own tests reflect what is documented in the coreboot wiki: https://www.coreboot.org/Board:lenovo/x230#Proprietary_components.27_status

So if any of you see this change, the page would need an update too.

from skulls.

merge avatar merge commented on July 24, 2024

FWIW, the Video BIOS is owned by Intel, and they have some information on it

but in order to improve the situation, we'd have to get a statement from Intel about being allowed to distribute this.

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

I can confirm I have GRUB working without VGA BIOS binary.

from skulls.

Thrilleratplay avatar Thrilleratplay commented on July 24, 2024

I do as well using GRUB but I have only booted into Linux. Based on the how the Coreboot wikis for the x220 and x230 are worded, Windows or Windows bootloader may still require the VGA binary.

from skulls.

merge avatar merge commented on July 24, 2024

Please post your coreboot config file. I've never found a configuration that worked, but I'd love to find one.

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

https://gist.github.com/nemanjan00/b7e63adc48514f13f8f536c855757b91

from skulls.

merge avatar merge commented on July 24, 2024

I can confirm that this does not work for me. I don't see my GRUB menu with that config -.- what could I am be doing wrong? Did you install GRUB after flashing maybe?

from skulls.

Thrilleratplay avatar Thrilleratplay commented on July 24, 2024

@merge If you using SeaBIOS, do you see the SeaBIOS output but not the GRUB menu?

I mostly use GRUB to handle the disk encryption and hide the menu. Use the basic console but did not disable the graphical console.

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=1 vga=current"

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

These are the relevant lines from my grub config. If this does not provide enough information, I can post the whole thing in a gist.

@nemanjan00 Are you using console output or graphical output for GRUB?

from skulls.

merge avatar merge commented on July 24, 2024

I see seabios, but not GRUB, yes. I use Debian's default installation, which is what I always want to have supported, so trying to change grub configs doesn't really help for now.

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

Part of my grub.cfg I think you are asking about:

terminal_input console
terminal_output gfxterm

from skulls.

merge avatar merge commented on July 24, 2024

thanks for your help! Indeed also Debian puts this in it's /etc/default/grub:

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

and when applying this (disabling the graphical terminal), seavgabios works, and shows my GRUB menu!

So where to go from here? Of course we want a more free version. I don't know if this handles booting for Windows though. Also, we'd have to document the GRUB config visibly if we want to use this.

I'd suggest maintaining a second configuration, and release 2 built images, one named "x230_coreboot_...._free.rom". Would this confuse people?

from skulls.

merge avatar merge commented on July 24, 2024

when configuring a linear "high resolution" framebuffer in coreboot, even the graphical GRUB console works. I don't see Linux' boot log afterwards though, so that's not yet a possible config. But still, we should find a way to add a text-based image, with a dependency on GRUB_TERMINAL=console.

from skulls.

Thrilleratplay avatar Thrilleratplay commented on July 24, 2024

Glad you were able to get GRUB working without the VGA binary, even with the graphical menu.

Not seeing the kernel boot messages is interesting. I do not see there either and thought it was because of the Nitrocaster mod in my x230. I noticed there have been updates in Coreboot lately that include the vbt.bin which may fix this. Although given how finicky the i915 can be, this is probably something that either a GRUB kernel parameter fix or will correct itself as libgfxinit matures

from skulls.

nemanjan00 avatar nemanjan00 commented on July 24, 2024

from skulls.

merge avatar merge commented on July 24, 2024

I simply don't see early kernel log messages, when using CONFIG_GENERIC_LINEAR_FRAMEBUFFER (which you don't have enabled in your posted config). Without this (in text mode), all is fine.

from skulls.

merge avatar merge commented on July 24, 2024

going forward, there's #46 with the remaining problem I see

from skulls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.