From e8be9265d623181893c1e81d41b39b3f0b185c4b Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 11 Apr 2015 08:06:30 -0400 Subject: docs/maintain/ (new section. WIP!): Maintaining libreboot --- (limited to 'docs/maintain') diff --git a/docs/maintain/index.html b/docs/maintain/index.html new file mode 100644 index 0000000..10c0652 --- /dev/null +++ b/docs/maintain/index.html @@ -0,0 +1,210 @@ + + + + + + + + + Maintaining libreboot + + + + +
+

Maintaining libreboot

+

+ This section relates to maintaining libreboot. Work-in-progress +

+

+ Do not follow anything here to the letter; is it only a guide + representing how libreboot is maintained (for reference). This + will be added to frequently from now on. +

+

+ Or Back to main index. +

+ +
+ +
+ +

Updating coreboot-libre

+ +

+ Coreboot-libre is the name of the deblobbed coreboot sources + used in libreboot. It is also the name of the collection + of scripts used for deblobbing coreboot, on each new update. +

+ +

+ This section shows an example of how to update (re-base) to + the latest version of coreboot, how to update the deblobbing + scripts, and so on. This does not teach you how to + change what custom patches are used, nor does it tell + you how to add new boards to libreboot. It assumes that you + simply want to re-base to the latest version (for instance, + there could be bug fixes that you want). For those things + not listed in this section, you can refer to other sections + on this page instead. +

+ +

+ Open these files in your editor (you will most likely be editing them): +

+ + +

+ Firstly, download coreboot. Do not use ./download coreboot + for this, just clone coreboot, as it does in that script, like so:
+ $ git clone http://review.coreboot.org/coreboot +

+ +

+ $ cd coreboot/
+ Get the ID of the latest commit in this clone, by reading the commit ID using + e.g.:
+ $ git log
+ In resources/scripts/helpers/download/coreboot you will + find a line that says git reset --hard and then + a commit ID next to it. Replace this with the commit ID of the latest + commit from the coreboot version that you just downloaded. +

+

+ Delete the .git* resources. For example:
+ $ rm -rf .git*
+ ...this is to avoid the deblobbing script from picking up files + in there as blobs, which would be only false positives and + increase the amount of time taken. Now come out of coreboot:
+ $ cd ../ +

+ +

+ Check all coreboot file names/paths in deblob; if any + of them no longer exist at that name/path in the coreboot tree that you downloaded, + delete the reference(s) in deblob. +

+ +

+ Check all coreboot file names/paths in nonblobs; if + any of them no longer exist at that name/path in the coreboot tree that you downloaded, + delete the reference in nonblobs. +

+ +

+ Now, back in the main root directory of libreboot (git repository), + run the deblob script. This is to prevent the findblobs + scripts from finding the blobs that are already deleted + when running the deblob script. Like so:
+ $ ./resources/utilities/coreboot-libre/deblob +

+ +

+ Now search for new blobs:
+ $ cd resources/utilities/coreboot-libre/
+ $ ./findblobs
+ WARNING: this will take a *long* time. Be patient! + What this will do is look through the coreboot source directory, + looking for blobs. It will not find the blobs that you deleted + before (because they no longer exist), and it will ignore any + files listed in nonblobs. +

+ +

+ Once the findblobs script has finished, check the file + tocheck (from the root, this will be resources/utilities/coreboot-libre/tocheck). + These are the files detected as blobs; some might be blobs, some not. + The findblobs script doesn't know how to determine between blobs + and non-blobs, it only knows patterns. Distinguishing between blobs and + non-blobs must be performed by you, the human being. +

+ + +

+ Now come back to the main libreboot root directory (root + of the git clone). If you are still in resources/utilities/coreboot-libre/ + for instance, you would do something like:
+ $ cd ../../../ +

+ +

+ Now delete the coreboot directory:
+ $ rm -rf coreboot/ +

+ +

+ Download coreboot again, only this time, using the download + script. The download script also applies custom patches + to coreboot (see resources/scripts/helpers/download/coreboot); + if they do not apply anymore, you will have to re-base them + and then update resources/scripts/helpers/download/coreboot + accordingly. Anyway, download coreboot like so:
+ $ ./download coreboot +

+ +

+ If the custom patches no longer apply, and you have to re-base + (or replace?) some patches, please do this in coreboot upstream, + not in libreboot. Then re-include new patches from upstream, + into libreboot. Here is coreboot's guide for contributing + patches:
+ http://www.coreboot.org/Git. +

+ +

+ Update all configs:
+ $ ./build config corebootupdate
+ This simply takes all of the coreboot .config files from + resources/libreboot/config/ and does make oldconfig + on them. It usually works. If it doesn't, you'll need to recreate + those configs from scratch using make menuconfig in coreboot + (see ../git/index.html#config) +

+ +

+ Back to top of page. +

+ +
+ +
+ +

+ Copyright © 2015 Francis Rowe <info@gluglug.org.uk>
+ This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions. + A copy of the license can be found at ../license.txt. +

+ +

+ This document 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 ../license.txt for more information. +

+ +
+ + + -- cgit v0.9.1