canoeboot build system. https://canoeboot.org/
 
 
 
Go to file
Leah Rowe 226b2301db safer, simpler error handling in cbmk
in shell scripts, a function named the same as a program included in
the $PATH will override that program. for example, you could make a
function called ls() and this would override the standand "ls".

in cbmk, a part of it was first trying to run the "fail" command,
deferring to "err", because some scripts call fail() which does
some minor cleanup before calling err.

in most cases, fail() is not defined, and it's possible that the user
could have a program called "fail" in their $PATH, the behaviour of
which we could not determine, and it could have disastrous effects.

cbmk error handling has been re-engineered in such a way that the
err function is defined in a variable, which defaults to err_ which
calls err_, so defined under include/err.sh.

in functions that require cleanup prior to error handling, a fail()
function is still defined, and err is overridden, thus:

err="fail"

this change has made xx_() obsolete, so now only x_ is used. the x_
function is a wrapper that can be used to run a command and exit with
non-zero status (from cbmk) if the command fails. the xx_ command
did the same thing, but called fail() which would have called err();
now everything is $err

example:

	rm -f "$filename" || err "could not delete file"

this would now be:

	rm -f "$filename" || $err "could not delete file"

overriding of err= must be done *after* including err.sh. for
example:

err="fail"
. "include/err.sh"

^ this is wrong. instead, one must do:

. "include/err.sh"
err="fail"

this is because err is set as a global variable under err.sh

the new error handling is much cleaner, and safer. it also reduces
the chance of mistakes such as: calling err when you meant to
call fail. this is because the standard way is now to call $err,
so you set err="fail" at the top of the script and all is well.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 22:41:35 +01:00
config enable serial console on fam15h boards 2024-05-02 22:08:33 +01:00
include safer, simpler error handling in cbmk 2024-05-02 22:41:35 +01:00
script safer, simpler error handling in cbmk 2024-05-02 22:41:35 +01:00
util dell-flash-unlock: add NetBSD support 2024-05-02 22:19:48 +01:00
.gitignore Canoeboot 20231107 release 2023-11-07 17:19:04 +00:00
COPYING censored libreboot c20230710 2023-10-26 20:20:43 +01:00
README.md simplified README, without affecting substance 2024-05-02 22:19:11 +01:00
build safer, simpler error handling in cbmk 2024-05-02 22:41:35 +01:00
projectname Canoeboot 20231026 release 2023-10-27 08:21:04 +01:00
update Canoeboot 20231026 release 2023-10-27 08:21:04 +01:00

README.md

Canoeboot

Find canoeboot documentation at https://canoeboot.org/

The canoeboot project provides libre 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 #canoeboot IRC on Libera IRC.

Canoeboot is maintained in parallel with Libreboot, by the same developer. You are strongly advised to use Libreboot, but a certain minority may prefer Canoeboot, which is essentially a censored Libreboot (no binary blobs allowed, so only few boards supported whereas Libreboot supports more boards while minimising the number of blobs to zero when possible).

For more context, please read Libreboot's Binary Blob Reduction Policy:

https://libreboot.org/news/policy.html

You may also read Canoeboot's about page, which contains more history pertaining to Canoeboot. Please read this page:

https://canoeboot.org/about.html

Canoeboot is inferior to Libreboot, in every way, and you should never use it.

Project goals

  • Be Libreboot, but adhere to GNU FSDG as policy. This means that many boards from Libreboot must be removed; Canoeboot is therefore inferior to Libreboot, and always will be. It provides a useful proof of concept, showing what is still possible when you completely bastardise Libreboot in like with FSF/GNU dogma - and Canoeboot does it better than GNU ever could.
  • Support as much hardware as possible! (within the restrictions imposed by GNU FSDG policy)
  • 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. Canoeboot's automated build system and user-friendly installation instructions solves this problem.

Canoeboot 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.

Canoeboot already comes with a payload (GRUB), flashprog 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 canoeboot 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!

Canoeboot 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 Canoeboot, based on specific coreboot revisions.

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:

https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt

The documentation in Canoeboot will use a mix of other licenses, so you should check that for more information.