diff --git a/.gitcheck b/.gitcheck deleted file mode 100755 index 7b77c1bc..00000000 --- a/.gitcheck +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2022 Caleb La Grange -# SPDX-License-Identifier: GPL-3.0-only - -Set_placeholder(){ - git config user.name || git config user.name 'osbmkplaceholder' - git config user.email || git config user.email 'placeholder@osbmkplaceholder.com' -} - -Clean(){ - if [ "$(git config user.name)" = "osbmkplaceholder" ]; then - git config --unset user.name - fi - - if [ "$(git config user.email)" = "placeholder@osbmkplaceholder.com" ]; then - git config --unset user.email - fi -} - -Run(){ -if [ "${1}" = "clean" ]; then - Clean -else - # Check if username and or email is set. - if ! git config user.name || git config user.email ; then - Set_placeholder - fi -fi -} - -Run >/dev/null diff --git a/.gitignore b/.gitignore index fa154b55..4979e1f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,15 @@ *~ +*.o +/cache/ +/lbmk.err.log +/repo/ +/docs/ +/pciroms/ +/util/dell-flash-unlock/dell_flash_unlock /TODO -/ich9utils/ +/ec/ /tmp/ -/payload/ -/me_cleaner/ +/elf/ *.s[a-w]? *.vim /*.elf @@ -11,20 +17,30 @@ /*.rom /build_error /TODO/ -/docs/version -/bucts/ -/coreboot/ -/crossgcc/ -/depthcharge/ -/flashrom/ -/resources/coreboot/*/seen -/grub/ -/memtest86plus/ -/seabios/ +/config/*/*/seen /bin/ /release/ -/descriptors/ /*.bin /push /version /versiondate +/.version +/.versiondate +/vendorfiles/ +*me.bin +*sch5545ec.bin +/mrc/ +/util/nvmutil/nvm +/src/ +/CHANGELOG +/todo.txt +/lock +/hash/ +/dump/ +/qrun*.sh +*.tar.* +/m +/f +/r +/e +/xbmkpath/ diff --git a/Makefile b/Makefile deleted file mode 100644 index 2fcb7553..00000000 --- a/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# Makefile for compatibility purposes -# You can use this, but it's recommended to run build system commands directly -# -# See docs/maintain/ and docs/git/ for information about the build system -# -# Copyright (C) 2020, 2021 Leah Rowe -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -.PHONY: all check download modules ich9m-descriptors payloads roms release \ - clean crossgcc-clean install-dependencies-ubuntu \ - install-dependencies-debian install-dependencies-arch \ - install-dependencies-void - -all: roms - -download: - ./download all - -modules: - ./build module all - -ich9m-descriptors: - ./build descriptors ich9m - -payloads: - ./build payload all - -roms: - ./build boot roms all - -release: - ./build release src - ./build release roms - -clean: - ./build clean cbutils - ./build clean flashrom - ./build clean ich9utils - ./build clean payloads - ./build clean seabios - ./build clean grub - ./build clean memtest86plus - ./build clean rom_images - -crossgcc-clean: - ./build clean crossgcc - -install-dependencies-ubuntu: - ./build dependencies ubuntu2004 - -install-dependencies-debian: - ./build dependencies debian - -install-dependencies-arch: - ./build dependencies arch - -install-dependencies-void: - ./build dependencies void -check: - ./tests/u-boot-libre diff --git a/README.md b/README.md index eef85190..e6452dbd 100644 --- a/README.md +++ b/README.md @@ -1,152 +1,57 @@ -Free your BIOS today! GNU GPL style -=================================== +Libreboot +========= -Find libreboot documentation at +Documentation: [libreboot.org](https://libreboot.org)\ +Support: [\#libreboot](https://web.libera.chat/#libreboot) on + [Libera](https://libera.chat/) IRC -Libreboot is -[freedom-respecting](https://www.gnu.org/philosophy/free-sw.html) -*boot firmware* that initializes the hardware (e.g. -memory controller, CPU, peripherals) in your computer so that software can run. -Libreboot then starts a bootloader to load your operating system. It replaces the -proprietary BIOS/UEFI firmware typically found on a computer. Libreboot is -compatible with specific computer models that use the Intel/AMD x86 -architecture. Libreboot works well with GNU+Linux and BSD -operating systems. User support is available -at [\#libreboot](https://webchat.freenode.net/?channels=libreboot) on Freenode -IRC. +Libreboot provides +[libre](https://libreboot.org/freedom-status.html) +boot firmware on +[supported motherboards](https://libreboot.org/docs/install/#which-systems-are-supported-by-libreboot). It replaces proprietary vendor BIOS/UEFI implementations, by +* Using coreboot to initialize the hardware (e.g. memory controller, CPU, etc.) while + minimizing unwanted functionality (e.g. backdoors such as the Intel Management Engine) +* ... which runs a payload such as SeaBIOS, GRUB, or U-Boot +* ... which loads your operating system's boot loader (BSD and Linux-based + [systems](systems) are supported). -Libreboot is a *Free Software* project, but can be considered Open Source. -[The GNU website](https://www.gnu.org/philosophy/open-source-misses-the-point.en.html) -teaches why you should call it Free Software instead; alternatively, you may -call it libre software. +Why use Libreboot, and what is coreboot? +---------------------------------------- -Libreboot uses [coreboot](https://www.coreboot.org/) for hardware initialization. -However, *coreboot* is notoriously difficult to compile and install for most -non-technical users. There are many complicated configuration steps required, -and coreboot by itself is useless; coreboot only handles basic hardware -initialization, and then jumps to a separate *payload* program. The payload -program can be anything, for example a Linux kernel, bootloader (such as -GNU GRUB), UEFI implementation (such as Tianocore) or BIOS implementation -(such as SeaBIOS). While not quite as complicated as building a GNU+Linux -distribution from scratch, it may aswell be as far as most non-technical users -are concerned. +A lot of users who use libre operating systems still use proprietary boot +firmware, which often contain backdoors and bugs, hampering +[user freedom](https://writefreesoftware.org) and +[right to repair](https://www.eff.org/issues/right-to-repair). -Libreboot solves this problem in a novel way: -Libreboot is a *coreboot distribution* much like Debian is a *GNU+Linux -distribution*. Libreboot provides an *automated build system* that downloads, -patches (where necessary) and compiles coreboot, GNU GRUB, various payloads and -all other software components needed to build a complete, working *ROM image* -that you can install to replace your current BIOS/UEFI firmware, much like a -GNU+Linux distribution (e.g. Debian) provides an ISO image that you can use to -replace your current operating system (e.g. Windows). +[coreboot](https://coreboot.org) provides libre boot firmware by initializing +the hardware then running a payload. However, coreboot is notoriously difficult +to configure and install for most non-technical users, requiring detailed +technical knowledge of hardware. -Information about who works on Libreboot, and who runs the project, can be -found on the [who page](https://libreboot.org/who.html) page. +Libreboot solves this by being **a coreboot distribution** (in the same way +that Alpine Linux is a Linux distribution). It provides a fully automated build +system that downloads and compiles pre-configured ROM images for supported +motherboards, so end-users could easily fetch images to flash onto their +devices. -Why use Libreboot? -================== +Libreboot also produces documentation aimed at non-technical users and +excellent user support via IRC. -[Free software](https://www.gnu.org/philosophy/free-sw.html) is important for -the same reason that education is important. -All children and adults alike should be entitled to a good education. -Knowledge begs to be free! In the context of computing, this means that the -source code should be fully available to study, and use in whatever way you -see fit. In the context of computer hardware, this means that -[Right to Repair](https://yewtu.be/watch?v=Npd_xDuNi9k) -should be universal, with full access to documents such as the schematics and -boardview files. +Contribute +---------- -**[The four freedoms are paramount!](https://www.gnu.org/philosophy/free-sw.html)** +You can check bugs listed on +the [bug tracker](https://codeberg.org/libreboot/lbmk/issues). -You have rights. The right to privacy, freedom of thought, freedom -of speech and the right to read. In the context of computing, that means anyone -can use [free software](https://www.gnu.org/philosophy/free-sw.html). Simply -speaking, free software is software that is under the direct sovereignty of the -user and, more importantly, the collective that is the *community*. Libreboot -is dedicated to the Free Software community, with the aim of making free software -at a *low level* more accessible to non-technical people. +You may use Codeberg pull requests to send patches with bug fixes or other +improvements. This repository hosts the code for the main build system. +The website lives in [a separate repository](https://codeberg.org/libreboot/lbwww). -Many people use [proprietary](https://www.gnu.org/philosophy/proprietary.html) -boot firmware, even if they use GNU+Linux. Non-free boot firmware often -contains backdoors, can be slow and have severe -bugs. Development and support can be abandoned at any time. By contrast, -Libreboot is a free software project, where anyone can contribute or inspect -its code. +Development is also done on the IRC channel. -Libreboot is faster, more secure and more reliable than most non-free -firmware. Libreboot provides many advanced features, like encrypted -/boot/, GPG signature checking before booting a Linux kernel and more! -Libreboot gives *you* control over *your* computing. +License for this README +----------------------- -Project goals -------------- +It's just a README file. It is released under +[Creative Commons Zero, version 1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt). -- *Recommend and distribute only free software*. Coreboot - distributes certain pieces of proprietary software which is needed - on some systems. Examples can include things like CPU microcode - updates, memory initialization blobs and so on. The coreboot project - sometimes recommends adding more blobs which it does not distribute, - such as the Video BIOS or Intel's *Management Engine*. However, a - lot of dedicated and talented individuals in coreboot work hard to - replace these blobs whenever possible. -- *Support as much hardware as possible!* Libreboot supports less - hardware than coreboot, because most systems from coreboot still - require certain proprietary software to work properly. Libreboot is - an attempt to support as much hardware as possible, without any - proprietary software. -- *Make coreboot easy to use*. Coreboot is notoriously difficult - to install, due to an overall lack of user-focused documentation - and support. Most people will simply give up before attempting to - install coreboot. - -Libreboot attempts to bridge this divide by providing a build system -automating much of the coreboot image creation and customization. -Secondly, the project produces documentation aimed at non-technical users. -Thirdly, the project attempts to provide excellent user support via mailing -lists and IRC. - -Libreboot already comes with a payload (GRUB), flashrom and other -needed parts. Everything is fully integrated, in a way where most of -the complicated steps that are otherwise required, are instead done -for the user in advance. - -You can download ROM images for your libreboot system and install -them without having to build anything from source. If, however, you are -interested in building your own image, the build system makes it relatively -easy to do so. - -Not a coreboot fork! --------------------- - -Libreboot is not a fork of coreboot. Every so often, the project -re-bases on the latest version of coreboot, with the number of custom -patches in use minimized. Tested, *stable* (static) releases are then provided -in Libreboot, based on specific coreboot revisions. - -Coreboot is not entirely free software. It has binary blobs in it for some -platforms. What Libreboot does is download several revisions of coreboot, for -different boards, and *de-blob* those coreboot revisions. This is done using -the *linux-libre* deblob scripts, to find binary blobs in coreboot. - -All new coreboot development should be done in coreboot (upstream), not -libreboot! Libreboot is about deblobbing and packaging coreboot in a -user-friendly way, where most work is already done for the user. - -For example, if you wanted to add a new board to libreboot, you should -add it to coreboot first. Libreboot will automatically receive your code -at a later date, when it updates itself. - -The deblobbed coreboot tree used in libreboot is referred to as -*coreboot-libre*, to distinguish it as a component of *libreboot*. - -LICENSE FOR THIS README: -GNU Free Documentation License 1.3 as published by the Free Software Foundation, -with no invariant sections, no front cover texts and no back cover texts. If -you wish it, you may use a later version of the GNU Free Documentation License -as published by the Free Software Foundation. - -Copy of the GNU Free Documentation License v1.3 here: - - -Info about Free Software Foundation: - diff --git a/build b/build deleted file mode 100755 index 3539f726..00000000 --- a/build +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash - -# generic build script, for building components (all of them) -# -# Copyright (C) 2014, 2015, 2020, 2021 Leah Rowe -# Copyright (C) 2015 Patrick "P. J." McDermott -# Copyright (C) 2015, 2016 Klemens Nanni -# Copyright (C) 2022, Caleb La Grange -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -./.gitcheck - -[ "x${DEBUG+set}" = 'xset' ] && set -v -set -u -e - -projectname="$(cat projectname)" - -build=./resources/scripts/build - -listmodes() { - for mode in "${build}"/*; do - printf '%s\n' "${mode##*/}" - done -} - -# Takes exactly one mode as parameter -listoptions() { - for option in "${build}"/"${1}"/*; do - printf '%s\n' "${option##*/}" - done -} - -help() { - cat <<- EOF - USAGE: ./build