diff --git a/.gitcheck b/.gitcheck deleted file mode 100755 index 4593f3a5..00000000 --- a/.gitcheck +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2022 Caleb La Grange -# SPDX-License-Identifier: GPL-3.0-only - -Set_placeholder(){ - # Check if username and or email is set. - if ! git config user.name || git config user.email ; then - git config user.name || git config user.name 'lbmkplaceholder' - git config user.email || git config user.email 'placeholder@lbmkplaceholder.com' - fi -} - -Clean(){ - if [ "$(git config user.name)" = "lbmkplaceholder" ]; then - git config --unset user.name - fi - - if [ "$(git config user.email)" = "placeholder@lbmkplaceholder.com" ]; then - git config --unset user.email - fi -} - -Run(){ -if [ "${1}" = "clean" ]; then - Clean -else - Set_placeholder - - # Check coreboot as well to prevent errors during building - if [ -d coreboot ]; then - cd coreboot - Set_placeholder - cd - - fi -fi -} - -Run >/dev/null diff --git a/.gitignore b/.gitignore index 8fab89ad..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,28 +17,30 @@ /*.rom /build_error /TODO/ -/docs/version -/bucts/ -/coreboot/ -/crossgcc/ -/depthcharge/ -/flashrom/ -/resources/coreboot/*/seen -/grub/ -/memtest86plus/ -/seabios/ -/u-boot/ +/config/*/*/seen /bin/ /release/ -/descriptors/ /*.bin /push /version /versiondate -/blobs/app/ -/blobs/me.exe -/blobs/t440p/me.bin -/blobs/xx20/me.bin -/blobs/xx30/me.bin +/.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 4a283fd4..00000000 --- a/Makefile +++ /dev/null @@ -1,72 +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 diff --git a/README.md b/README.md index 1ee78daa..e6452dbd 100644 --- a/README.md +++ b/README.md @@ -1,123 +1,57 @@ Libreboot ========= -Find libreboot documentation at +Documentation: [libreboot.org](https://libreboot.org)\ +Support: [\#libreboot](https://web.libera.chat/#libreboot) on + [Libera](https://libera.chat/) IRC -The `libreboot` project provides -[libre](https://en.wikipedia.org/wiki/Open_source) *boot -firmware* that initializes the hardware (e.g. memory controller, CPU, -peripherals) on specific Intel/AMD x86 and ARM targets, which -then starts a bootloader for your operating system. Linux/BSD are -well-supported. It replaces proprietary BIOS/UEFI firmware. Help is available -via [\#libreboot IRC](https://web.libera.chat/#libreboot) -on [Libera](https://libera.chat/) 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). -Why use Libreboot? -================== +Why use Libreboot, and what is coreboot? +---------------------------------------- -Why should you use *libreboot*? ----------------------------- +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 gives you freedoms that you otherwise can't get with most other -boot firmware. It's extremely powerful and configurable for many use cases. +[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. -You have rights. The right to privacy, freedom of thought, freedom of speech -and the right to read. In this context, Libreboot gives you these rights. -Your freedom matters. -[Right to repair](https://vid.puffyan.us/watch?v=Npd_xDuNi9k) matters. -Many people use proprietary (non-libre) -boot firmware, even if they use [a libre OS](https://www.openbsd.org/). -Proprietary firmware often contains backdoors (more info on the FAQ), and it -and can be buggy. The libreboot project was founded in in December 2013, -with the express purpose of making coreboot firmware accessible for -non-technical users. +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. -The `libreboot` project uses [coreboot](https://www.coreboot.org/) for [hardware -initialisation](https://doc.coreboot.org/getting_started/architecture.html). -Coreboot is notoriously difficult to install for most non-technical users; it -handles only basic initialization and jumps to a separate -[payload](https://doc.coreboot.org/payloads.html) program (e.g. -[GRUB](https://www.gnu.org/software/grub/), -[Tianocore](https://www.tianocore.org/)), which must also be configured. -*The libreboot software solves this problem*; it is a *coreboot distribution* with -an automated build system (named *lbmk*) that builds complete *ROM images*, for -more robust installation. Documentation is provided. +Libreboot also produces documentation aimed at non-technical users and +excellent user support via IRC. -How does Libreboot differ from coreboot? -======================================== - -In the same way that *Debian* is a GNU+Linux distribution, `libreboot` is -a *coreboot distribution*. If you want to build a ROM image from scratch, you -otherwise have to perform expert-level configuration of coreboot, GRUB and -whatever other software you need, to prepare the ROM image. With *libreboot*, -you can literally download from Git or a source archive, and run `make`, and it -will build entire ROM images. An automated build system, named `lbmk` -(Libreboot MaKe), builds these ROM images automatically, without any user input -or intervention required. Configuration has already been performed in advance. - -If you were to build regular coreboot, without using libreboot's automated -build system, it would require a lot more intervention and decent technical -knowledge to produce a working configuration. - -Regular binary releases of `libreboot` provide these -ROM images pre-compiled, and you can simply install them, with no special -knowledge or skill except the ability to follow installation instructions -and run commands BSD/Linux. - -Project goals -============= - -- *Support as much hardware as possible!* Libreboot aims to eventually - have *maintainers* for every board supported by coreboot, at every - point in time. -- *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's automated build system and user-friendly - installation instructions solves this problem. - -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 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. - -How to help -=========== +Contribute +---------- You can check bugs listed on -the [bug tracker](https://notabug.org/libreboot/lbmk/issues). +the [bug tracker](https://codeberg.org/libreboot/lbmk/issues). -If you spot a bug and have a fix, the website has instructions for how to send -patches, and you can also report it. Also, this entire website is -written in Markdown and hosted in a [separate -repository](https://notabug.org/libreboot/lbwww) where you can send patches. +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). -Any and all development discussion and user support are all done on the IRC -channel. More information is on the contact page of libreboot.org. +Development is also done on the IRC channel. -LICENSE FOR THIS README -======================= +License for this README +----------------------- -It's just a README file. This README file is released under the terms of the -Creative Commons Zero license, version 1.0 of the license, which you can -read here: +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). - diff --git a/blobutil b/blobutil deleted file mode 100755 index 6a48067e..00000000 --- a/blobutil +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2022 Caleb La Grange -# SPDX-License-Identifier: GPL-3.0-only - -./.gitcheck - -script_dir="resources/scripts/blobs" -modes=$(ls -1 ${script_dir}) - -Print_help(){ - cat <<- EOF - Usage: ./blobutil [mode] - Example: ./blobutil download x230_12mb - - Possible options for mode are - ${modes} - - Mode descriptions: - download: Try to automatically generate blobs for specified board - inject: Inject blobs for specified board into specified rom - extract: Extract blobs from specified rom for specified board - EOF -} - - -if [ $# -gt 0 ]; then - mode="${1}" - shift - args="$@" - - if [ ! -f "${script_dir}/${mode}" ]; then - printf "Error: No mode ${mode}\n" - Print_help - exit 1 - else - ./${script_dir}/${mode} ${args} - fi - -else - printf 'Error: You must specify a mode\n' - Print_help -fi - -./.gitcheck clean 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