{"id":19094588,"url":"https://github.com/coreboot/libgfxinit","last_synced_at":"2026-03-27T02:42:42.026Z","repository":{"id":78928338,"uuid":"74671932","full_name":"coreboot/libgfxinit","owner":"coreboot","description":"mirror of https://review.coreboot.org/libgfxinit.git","archived":false,"fork":false,"pushed_at":"2024-07-27T16:16:29.000Z","size":686,"stargazers_count":22,"open_issues_count":1,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-02T23:46:23.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://review.coreboot.org/cgit/libgfxinit.git","language":"Ada","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coreboot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-24T12:37:28.000Z","updated_at":"2024-08-05T06:24:42.000Z","dependencies_parsed_at":"2024-02-29T16:32:35.050Z","dependency_job_id":"c774d75f-12ba-4702-b724-dc538238cb29","html_url":"https://github.com/coreboot/libgfxinit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreboot%2Flibgfxinit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreboot%2Flibgfxinit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreboot%2Flibgfxinit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreboot%2Flibgfxinit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreboot","download_url":"https://codeload.github.com/coreboot/libgfxinit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240144181,"owners_count":19754869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:30:18.401Z","updated_at":"2026-03-27T02:42:37.000Z","avatar_url":"https://github.com/coreboot.png","language":"Ada","readme":"libgfxinit\n==========\n\n*libgfxinit* is a graphics initialization (aka modesetting) library\nfor embedded environments. It currently supports only Intel hardware,\nmore specifically the Intel Core processor line.\n\nIt can query and set up most kinds of displays based on their EDID\ninformation. You can, however, also specify particular mode lines.\n\n*libgfxinit* is written in SPARK, an Ada subset with formal\nverification aspects. Absence of runtime errors can be proved\nautomatically with SPARK GPL 2016.\n\n\nBuilding on Linux\n=================\n\nPrerequisites\n-------------\n\nFor compilation, the GNAT Ada compiler is required. Usual package\nnames in Linux distributions are `gcc-ada` and `gnat`.\n\nGrab the Sources\n----------------\n\nYou'll need *libhwbase* and *libgfxinit*. Best is to clone the\nrepositories into a common parent directory (this way *libgfxinit*\nwill know where to find *libhwbase*).\n\n    $ mkdir gfxfun \u0026\u0026 cd gfxfun\n    $ git clone https://review.coreboot.org/p/libhwbase.git\n    $ git clone https://review.coreboot.org/p/libgfxinit.git\n\nConfigure and Install libhwbase\n-------------------------------\n\nBoth libraries are currently configured by hand-written config files.\nYou can either write your own `.config`, link one of the shipped files\nin `configs/`, e.g.:\n\n    $ ln -s configs/linux libhwbase/.config\n\nor overwrite the config filename by specifying `cnf=\u003cconfigfile\u003e` on\nthe make command line.\n\nBy default most debug messages won't be compiled into the binary. To\ninclude them into the build, set `DEBUG=1` on the command line or in\nyour `.config`.\n\nLet's install *libhwbase*. We'll need `configs/linux` to build regular\nLinux executables:\n\n    $ cd libhwbase\n    $ make DEBUG=1 cnf=configs/linux install\n\nBy default this installs into a new subdirectory `dest`. You can however\noverwrite this decision by specifying `DESTDIR=`.\n\nBuild libgfxinit/`gfx_test`\n---------------------------\n\n*libgfxinit* is configured and installed in the same manner as\ndescribed above. You will have to select a configuration matching your\nhardware.\n\nThe makefile knows an additional target `gfx_test` to build a small\nLinux test application:\n\n    $ cd ../libgfxinit\n    $ make DEBUG=1 cnf=configs/sandybridge gfx_test\n\nThe resulting binary is `build/gfx_test`.\n\n\nTesting libgfxinit on Linux\n===========================\n\n`gfx_test` sets up its own framebuffer in the *stolen memory*. It\nbacks any current framebuffer mapping and contents up first and\nrestores it before exiting. This works somehow even while the *i915*\ndriver is running. A wrapper script `gfxtest/gfx_test.sh` is\nprovided to help with the setup. It switches to a text console first\nand tries to unload the *i915* driver. But ignores failures to do\nso (it won't work if you still have any application running that\nuses the gfx driver, e.g. an X server).\n\n    # gfxtest/gfx_test.sh\n\nIf you chose the right config above, you should be presented with a\nnice test image. But please be prepared that your console might be\nstuck in that state afterwards. You can try to run it with *i915*\ndeactivated then (e.g. when booting with `nomodeset` in the kernel\ncommand line or with *i915* blacklisted) and loading it afterwards.\n","funding_links":[],"categories":["Hardware and Embedded"],"sub_categories":["Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreboot%2Flibgfxinit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreboot%2Flibgfxinit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreboot%2Flibgfxinit/lists"}