CINXE.COM
Libreboot – Code review
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <meta name="generator" content="pandoc"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <!-- anti-social media tags --> <meta property="og:title" content="Libreboot – Code review"> <meta property="og:type" content="article" /> <meta property="og:image" content="https://av.vimuser.org/bootmenu.jpg"> <meta property="og:url" content="https://libreboot.org/git.html"> <meta name="twitter:card" content="summary_large_image"> <meta property="og:description" content="Libreboot – Code review"> <meta property="og:site_name" content="Libreboot – Code review"> <meta name="twitter:image:alt" content="Libreboot – Code review"> <title>Libreboot – Code review</title> <link rel="stylesheet" href="/global.css"> <link rel="stylesheet" href=""> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/feed.xml"/> </head> <body> <div class="page"> <header> <div class="title"> <p class="title-logo"> <img loading="lazy" class="title-logo" alt="Libreboot logo" src="/favicon.ico" /> </p> <h1 class="title">Code review</h1> </div> <ul> <li><a href="/">Home</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/download.html">Download</a></li> <li>-</li> <li style="font-size:1.3em;"><em><strong><a href="https://minifree.org/">Buy Libreboot preinstalled</a></strong></em></li> <li>-</li> <li><a href="/docs/install/">Install</a></li> <li><a href="/docs/">Docs</a></li> <li><a href="/news/">News</a></li> <li><a href="https://codeberg.org/libreboot/lbmk/issues">Bugs</a></li> <li><a href="/tasks/">TODO</a></li> <li><a href="/git.html">Send patch</a></li> <li><a href="/contact.html">Contact</a></li> <li>-</li> <li style="font-size:1.3em;"><em><strong><a href="https://www.patreon.com/libreleah">Donate</a></strong></em></li> </ul> <hr/> </header> <nav id="TOC"> <h1>Navigate this page:</h1> <ul> <li><a href="#libreboot-repositories">libreboot repositories</a> <ul> <li><a href="#lbmk-libreboot-make">lbmk (libreboot-make)</a></li> <li><a href="#lbwww-and-lbwww-img">lbwww and lbwww-img</a></li> <li><a href="#name-not-required">Name not required</a></li> <li><a href="#licenses-for-contributors">Licenses (for contributors)</a></li> <li><a href="#send-patches">Send patches</a></li> <li><a href="#mailing-list">Mailing list</a></li> </ul></li> <li><a href="#mirrors-of-lbmk.git">Mirrors of lbmk.git</a></li> <li><a href="#mirrors-of-pico-serprog.git">Mirrors of pico-serprog.git</a> <ul> <li><a href="#lbwww.git-mirror">lbwww.git mirror</a></li> </ul></li> <li><a href="#notabug-repositories">Notabug repositories</a></li> </ul> </nav> <div class="pagetext"> <p><a href="git.html">English</a> | <a href="git.de.html">Deutsch</a> | <a href="git.uk.html">українська</a></p> <p><a href="./">Return to index</a></p> <div class="h"><h1 id="libreboot-repositories">libreboot repositories</h1><a aria-hidden="true" href="#libreboot-repositories">[link]</a></div> <p>Information about who works on libreboot and who runs the project can be found on <a href="who.html">who.html</a></p> <p>The <code>libreboot</code> project has 3 main Git repositories:</p> <ul> <li>Build system: <a href="https://codeberg.org/libreboot/lbmk" class="uri">https://codeberg.org/libreboot/lbmk</a></li> <li>Website (+docs): <a href="https://codeberg.org/libreboot/lbwww" class="uri">https://codeberg.org/libreboot/lbwww</a></li> <li>Images (for website): <a href="https://codeberg.org/libreboot/lbwww-img" class="uri">https://codeberg.org/libreboot/lbwww-img</a></li> <li>Pico-serprog: <a href="https://codeberg.org/libreboot/pico-serprog" class="uri">https://codeberg.org/libreboot/pico-serprog</a></li> </ul> <p>You can also <em>browse</em> lbmk on Libreboot’s own cgit instance, though it is not intended for development (use codeberg for that):<br /> <a href="https://browse.libreboot.org/lbmk.git/" class="uri">https://browse.libreboot.org/lbmk.git/</a></p> <p>If the main Git repositories are down, mirrors of <code>lbmk</code> and <code>lbwww</code> are listed further down in this page</p> <p>Libreboot was previously using NotABug, but it had continued reliability issues due to HTTP 500 errors being returned, largely in the evenings, most likely because too many people were on it; it was decided that Libreboot needed something more stable, so now Libreboot is hosted on codeberg. See: <a href="news/codeberg.html">announcement of move to codeberg, 8 April 2023</a></p> <p>There are also these programs, hosted by the Libreboot project, and libreboot either recommends them or makes use of them:</p> <p>The <code>ich9utils</code> project is now available under <code>util/ich9utils</code> in lbmk, and lbmk uses <em>that</em>, but the old standalone repository is still available on notabug (bucts is also there):</p> <ul> <li>Bucts (utility): <a href="https://notabug.org/libreboot/bucts" class="uri">https://notabug.org/libreboot/bucts</a></li> <li>ich9utils (utility): <a href="https://notabug.org/libreboot/ich9utils" class="uri">https://notabug.org/libreboot/ich9utils</a></li> </ul> <p>You can download any of these repositories, make whatever changes you like, and then submit your changes using the instructions below.</p> <p>It is recommended that you build libreboot (all parts of it) in a Linux distribution. For example, the build system (lbmk) is untested on BSD systems. Install <code>git</code> in your Linux system, and download one of the repositories.</p> <p>Development of libreboot is done using the Git version control system. Refer to the <a href="https://git-scm.com/doc">official Git documentation</a> if you don’t know how to use Git.</p> <p>The <code>bucts</code> repository is hosted by the libreboot project, because the original repository on <code>stuge.se</code> is no longer available, last time we checked. The <code>bucts</code> program was written by Peter Stuge. You need <code>bucts</code> if you’re flashing internally an libreboot ROM onto a ThinkPad X60 or T60 that is currently running the original Lenovo BIOS. Instructions for that are available here:<br /> <a href="docs/install/">libreboot installation guides</a></p> <p>The <code>ich9utils</code> repository is used heavily, by the <code>lbmk</code> build system. However, you can also download <code>ich9utils</code> on its own and use it. It generates ICH9M descriptor+GbE images for GM45 ThinkPads that use the ICH9M southbridge. It may also work for other systems using the same platform/chipset. Documentation for <code>ich9utils</code> is available here:<br /> <a href="docs/install/ich9utils.html">ich9utils documentation</a></p> <div class="h"><h2 id="lbmk-libreboot-make">lbmk (libreboot-make)</h2><a aria-hidden="true" href="#lbmk-libreboot-make">[link]</a></div> <p>This is the core build system in libreboot. You could say that <code>lbmk</code> <em>is</em> libreboot! Download the Git repository:</p> <pre><code>git clone https://codeberg.org/libreboot/lbmk</code></pre> <p>The <code>git</code> command, seen above, will download the libreboot build system <code>lbmk</code>. You can then go into it like so:</p> <pre><code>cd lbmk</code></pre> <p>Make whatever changes you like, or simply build it. For instructions on how to build <code>lbmk</code>, refer to the <a href="docs/build/">build instructions</a>.</p> <p>Information about the build system itself, and how it works, is available in the <a href="docs/maintain/">lbmk maintenance guide</a>.</p> <div class="h"><h2 id="lbwww-and-lbwww-img">lbwww and lbwww-img</h2><a aria-hidden="true" href="#lbwww-and-lbwww-img">[link]</a></div> <p>The <em>entire</em> libreboot website and documentation is hosted in a Git repository. Download it like so:</p> <pre><code>git clone https://codeberg.org/libreboot/lbwww</code></pre> <p>Images are hosted on <a href="https://av.libreboot.org/" class="uri">https://av.libreboot.org/</a> and available in a separate repository:</p> <pre><code>git clone https://codeberg.org/libreboot/lbwww-img</code></pre> <p>Make whatever changes you like. See notes below about how to send patches.</p> <p>The entire website is written in Markdown, specifically the Pandoc version of it. The static HTML pages are generated with <a href="https://untitled.vimuser.org/">Untitled</a>. Leah Rowe, the founder of libreboot, is also the founder of the Untitled static site generator project.</p> <p>If you like, you can set up a local HTTP server and build your own local version of the website. Please note that images will still link to the ones hosted on <a href="https://av.libreboot.org/" class="uri">https://av.libreboot.org/</a>, so any images that you add to <code>lbwww-img</code> will not show up on your local <code>lbwww</code> site if you make the image links (for images that you add) link to <code>av.libreboot.org</code>. However, it is required that such images be hosted on av.libreboot.org.</p> <p>Therefore, if you wish to add images to the website, please also submit to the <code>lbwww-img</code> repository, with the links to them being <a href="https://av.libreboot.org/path/to/your/new/image/in/lbwww-img" class="uri">https://av.libreboot.org/path/to/your/new/image/in/lbwww-img</a> for each one. When it is merged on the libreboot website, your images will appear live.</p> <p>If adding a photo, compress it for web distribution. Images should be about 800px wide, and usually under 100KiB in size:</p> <p>First, scale your image down to approximately 800px width, using your favourite image manipulation program. For example, with <code>imagemagick</code> you can do the following (make sure the image isn’t already smaller or equal than preferred).</p> <pre><code>convert original.jpg -resize 600000@ -quality 70% web.jpg</code></pre> <p>You should always run <code>jpegoptim</code> on jpg images before submitting them. It strips useless metadata and <em>losslessly</em> optimises them further by cleverly rearranging the huffman tables used in them.</p> <pre><code>jpegoptim -s --all-progressive web.jpg</code></pre> <p>If the image is a (line) drawing, vector graphics are preferable to bitmaps. Therefore, if possible, save them as SVGs. Those are easy to modify, and will surely make translators’ work easier as well.</p> <p>PNG images should be optimised with <code>zopfli</code> (this is lossless as well). For example, this reduced the Libreboot boot logo from around 11k to 3k:</p> <pre><code>zopflipng -ym image.png image.png</code></pre> <p>For development purposes, you might make your images local links first, and then adjust the URLs when you submit your documentation/website patches.</p> <p>Instructions are on the Untitled website, for how to set up your local version of the website. Download untitled, and inside your <code>untitled</code> directory, create a directory named <code>www/</code> then go inside the www directory, and clone the <code>lbwww</code> repository there. Configure your local HTTP server accordingly.</p> <p>Again, instructions are available on the Untitled website for this purpose.</p> <div class="h"><h2 id="name-not-required">Name not required</h2><a aria-hidden="true" href="#name-not-required">[link]</a></div> <p>Contributions that you make are publicly recorded, in a Git repository which everyone can access. This includes the name and email address of the contributor.</p> <p>In Git, for author name and email address, you do not have to use identifying data. You can use <code>libreboot Contributor</code> and your email address could be specified as contributor@libreboot.org. You are permitted to do this, if you wish to maintain privacy. We believe in privacy. If you choose to remain anonymous, we will honour this.</p> <p>Of course, you can use whichever name and/or email address you like.</p> <p>Legally speaking, all copyright is automatic under the Berne Convention of international copyright law. It does not matter which name, or indeed whether you even declare a copyright (but we do require that certain copyright licenses are used - read more about that on this same page).</p> <p>If you use a different name and email address on your commits/patches, then you should be fairly anonymous. Use <a href="https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History">git log</a> and <a href="https://git-scm.com/docs/git-show">git show</a> to confirm that before you push changes to a public Git repository.</p> <div class="h"><h2 id="licenses-for-contributors">Licenses (for contributors)</h2><a aria-hidden="true" href="#licenses-for-contributors">[link]</a></div> <p>Make sure to freely license your work, under a libre license. Libreboot no longer sets arbitrary restrictions on what licenses are accepted, and many licenses out there already exist. We will audit your contribution and tell you if there are problems with it (e.g. no license).</p> <p><em>Always</em> declare a license on your work! Not declaring a license means that the default, restrictive copyright laws apply, which would make your work proprietary, subject to all of the same restrictions.</p> <p>The MIT license is a good one to start with, and it is the preferred license for all new works in Libreboot, but we’re not picky. Libreboot has historically used GNU licensing such as GPL; much of that remains, and is likely to remain. It’s your work; obviously, if you’re deriving from an existing work, it may make sense to use the same license on your contribution, for license compatibility.</p> <p>You can find common examples of licenses <a href="https://opensource.org/licenses">here</a>.</p> <p>If you <em>are</em> deriving from an existing work, it’s important that your license (for your contribution) be compatible with the licensing of the work from which yours was derived. The MIT license is good because it’s widely compatible with many other licenses, and permits many freedoms (such as the freedom to sublicense) that other licenses do not:</p> <p><a href="https://opensource.org/licenses/MIT" class="uri">https://opensource.org/licenses/MIT</a></p> <div class="h"><h2 id="send-patches">Send patches</h2><a aria-hidden="true" href="#send-patches">[link]</a></div> <p>Make an account on <a href="https://codeberg.org/" class="uri">https://codeberg.org/</a> and navigate (while logged in) to the repository that you wish to work on. Click <em>Fork</em> and in your account, you will have your own repository of libreboot. Clone your repository, make whatever changes you like to it and then push to your repository, in your account on Codeberg. You can also do this on a new branch, if you wish.</p> <p>In your Codeberg account, you can then navigate to the official libreboot repository and submit a Pull Request. The way it works is similar to other popular web-based Git platforms that people use these days.</p> <p>You can submit your patches there. Alternative, you can log onto the libreboot IRC channel and notify the channel of which patches you want reviewed, if you have your own Git repository with the patches.</p> <p>Once you have issued a Pull Request, the libreboot maintainers will be notified via email. If you do not receive a fast enough response from the project, then you could also notify the project via the <code>#libreboot</code> channel on Libera Chat.</p> <p>Another way to submit patches is to email Leah Rowe directly: <a href="mailto:info@minifree.org">info@minifree.org</a> is Leah’s project email address.</p> <p>However, for transparency of the code review process, it’s recommended that you use Codeberg, for the time being.</p> <div class="h"><h2 id="mailing-list">Mailing list</h2><a aria-hidden="true" href="#mailing-list">[link]</a></div> <p>Libreboot has this mailing list: <a href="https://lists.sr.ht/~libreboot/libreboot" class="uri">https://lists.sr.ht/~libreboot/libreboot</a></p> <p>The email address is <a href="mailto:~libreboot/libreboot@lists.sr.ht">~libreboot/libreboot@lists.sr.ht</a></p> <div class="h"><h1 id="mirrors-of-lbmk.git">Mirrors of lbmk.git</h1><a aria-hidden="true" href="#mirrors-of-lbmk.git">[link]</a></div> <p>The <code>lbmk</code> repository contains Libreboot’s automated build system, which produces Libreboot releases (including compiled ROM images).</p> <p>You can run <code>git clone</code> on any of these links (the links are also clickable, to view changes in your Web browser):</p> <ul> <li><a href="https://git.sr.ht/~libreboot/lbmk" class="uri">https://git.sr.ht/~libreboot/lbmk</a></li> <li><a href="https://git.disroot.org/libreboot/lbmk" class="uri">https://git.disroot.org/libreboot/lbmk</a></li> <li><a href="https://gitea.treehouse.systems/libreboot/lbmk" class="uri">https://gitea.treehouse.systems/libreboot/lbmk</a></li> <li><a href="https://git.fosscommunity.in/libreboot/lbmk" class="uri">https://git.fosscommunity.in/libreboot/lbmk</a></li> <li><a href="https://0xacab.org/libreboot/lbmk/" class="uri">https://0xacab.org/libreboot/lbmk/</a></li> <li><a href="https://framagit.org/libreboot/libreboot" class="uri">https://framagit.org/libreboot/libreboot</a></li> <li><a href="https://gitlab.com/libreboot/lbmk" class="uri">https://gitlab.com/libreboot/lbmk</a></li> <li><a href="https://pagure.io/libreboot" class="uri">https://pagure.io/libreboot</a></li> <li><a href="https://rocketgit.com/libreboot/libreboot" class="uri">https://rocketgit.com/libreboot/libreboot</a></li> </ul> <div class="h"><h1 id="mirrors-of-pico-serprog.git">Mirrors of pico-serprog.git</h1><a aria-hidden="true" href="#mirrors-of-pico-serprog.git">[link]</a></div> <ul> <li><a href="https://notabug.org/libreboot/pico-serprog" class="uri">https://notabug.org/libreboot/pico-serprog</a></li> </ul> <div class="h"><h2 id="lbwww.git-mirror">lbwww.git mirror</h2><a aria-hidden="true" href="#lbwww.git-mirror">[link]</a></div> <p>The <code>lbwww</code> repository contains Markdown files (pandoc variant), for use with the <a href="https://untitled.vimuser.org/">Untitled Static Site Generator</a>; this is what Libreboot uses to provide HTML web pages, <em>including</em> the page that you are reading right now!</p> <p>You can run <code>git clone</code> on these links, and/or click to view changes in your Web browser. See:</p> <ul> <li><a href="https://git.sr.ht/~libreboot/lbwww" class="uri">https://git.sr.ht/~libreboot/lbwww</a></li> <li><a href="https://git.disroot.org/libreboot/lbwww" class="uri">https://git.disroot.org/libreboot/lbwww</a></li> <li><a href="https://gitea.treehouse.systems/libreboot/lbwww" class="uri">https://gitea.treehouse.systems/libreboot/lbwww</a></li> <li><a href="https://git.fosscommunity.in/libreboot/lbwww" class="uri">https://git.fosscommunity.in/libreboot/lbwww</a></li> <li><a href="https://0xacab.org/libreboot/lbwww" class="uri">https://0xacab.org/libreboot/lbwww</a></li> <li><a href="https://framagit.org/libreboot/lbwww/" class="uri">https://framagit.org/libreboot/lbwww/</a></li> <li><a href="https://gitlab.com/libreboot/lbwww" class="uri">https://gitlab.com/libreboot/lbwww</a></li> <li><a href="https://rocketgit.com/libreboot/lbwww" class="uri">https://rocketgit.com/libreboot/lbwww</a></li> </ul> <p>NOTE: The <code>lbwww-img</code> repository is not generally provided, on mirrors, as those are just image files which you can find on <a href="https://av.libreboot.org" class="uri">https://av.libreboot.org</a> and it is not the intention of the Libreboot project to bog down <em>mirrors</em> with additional traffic by hosting images.</p> <div class="h"><h1 id="notabug-repositories">Notabug repositories</h1><a aria-hidden="true" href="#notabug-repositories">[link]</a></div> <p>Commits that go to codeberg are also still pushed to notabug, in addition to the other mirrors. Notabug is considered a <em>mirror</em> since 8 April 2023, when Libreboot’s main development site moved to <em>Codeberg</em>.</p> <p>OLD notabug repos are still pushed to as backup, but the codeberg mirror is considered to be main/official now, as of the <a href="news/codeberg.html">announcement on 8 April 2023</a>. See:</p> <ul> <li>Build system: <a href="https://notabug.org/libreboot/lbmk" class="uri">https://notabug.org/libreboot/lbmk</a></li> <li>Website (+docs): <a href="https://notabug.org/libreboot/lbwww" class="uri">https://notabug.org/libreboot/lbwww</a></li> <li>Images (for website): <a href="https://notabug.org/libreboot/lbwww-img" class="uri">https://notabug.org/libreboot/lbwww-img</a></li> </ul> <p>For sending patches, it is now preferred that you use <em>codeberg</em>. Technically, pull requests are still possible via Notabug. While Notabug still exists, Libreboot patches will continue be pushed there, mirroring what gets pushed on Notabug.</p> <p>Because pull requests and issues were available on notabug in the past, it makes sense to keep them open, though we ask that you send to codeberg. If they were to be closed on notabug, existing PRs and issues won’t be visible anymore either, so they have to stay open.</p> <div id="footer"> <hr /> <ul> <li><a href="/news/policy.html">Binary Blob Reduction Policy</a></li> <li><a href="/freedom-status.html">Freedom status</a></li> <li><a href="/git.html">Edit this page</a></li> <li><a href="/who.html">Who develops Libreboot?</a></li> <li><a href="/license.html">License</a></li> <li><a href="/template-license.html">Template</a></li> <li><a href="/logo-license.html">Logo</a></li> <li><a href="/contrib.html">Authors</a></li> </ul> <hr /> </div> <p>Markdown file for this page: <a href="https://libreboot.org/git.md" class="uri">https://libreboot.org/git.md</a></p> <p><a href="/feed.xml">Subscribe to RSS for this site</a></p> <p><a href="/sitemap.html">Site map</a></p> <p>This HTML page was generated by the <a href="https://untitled.vimuser.org/">Untitled Static Site Generator</a>.</p> </div> </div> </body> </html>