aboutsummaryrefslogtreecommitdiff
path: root/docs/git/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/git/index.md')
-rw-r--r--docs/git/index.md145
1 files changed, 71 insertions, 74 deletions
diff --git a/docs/git/index.md b/docs/git/index.md
index 263a41bb..30ba50e2 100644
--- a/docs/git/index.md
+++ b/docs/git/index.md
@@ -3,12 +3,15 @@ Depthcharge is currently not documented, since it is in the new build
system. Instructions for how to build boards that have depthcharge are
included in the BUILD\_HOWTO file in libreboot.git or \_src.
+
+
Building libreboot from source
==============================
This section relates to building libreboot from source, and working with
the git repository.
+
- [Install build dependencies](#build_dependencies)
- [Get the full source code from metadata (git clone)](#build_meta)
- [How to build "bucts" (for LenovoBIOS
@@ -16,6 +19,8 @@ the git repository.
- [How to build "flashrom"](#build_flashrom)
- [How to build the ROM images](#build)
+
+
Install build dependencies {#build_dependencies}
==========================
@@ -25,21 +30,24 @@ libreboot\_src.tar.xz or git. **If you are using libreboot\_util.tar.xz
(binary archive) then you can ignore this, because ROM images and
statically compiled executables for the utilities are included.**
-For Debian Stretch (may also work on Debian Jessie), you can run the
-following command:
- $ sudo ./oldbuild dependencies debian
+For Debian Stretch (may also work on Debian Jessie), you can run the
+following command:\
+\$ **sudo ./oldbuild dependencies debian**\
(this will also work in Devuan)
-For Parabola, you can run the following command:
-
- $ sudo ./oldbuild dependencies parabola
-or:
+For Parabola, you can run the following command:\
+\$ **sudo ./oldbuild dependencies parabola**\
+or:\
+\# **./oldbuild dependencies parabola**
-# **./oldbuild dependencies parabola**
For other GNU+Linux distributions, you can adapt the existing scripts.
+[Back to top of page](#pagetop)
+
+
+
Get the full source code from metadata (git clone) {#build_meta}
==================================================
@@ -55,34 +63,33 @@ First, [install the build dependencies](#build_dependencies).
Since libreboot makes extensive use of git, you need to configure git
properly. If you have not yet configured git, then the minimum
-requirement is:
-
- $ git config \--global user.name "Your Name"
- $ git config \--global user.email your@emailaddress.com
+requirement is:\
+\$ **git config \--global user.name "Your Name"**\
+\$ **git config \--global user.email your@emailaddress.com**\
This is what will also appear in git logs if you ever commit your own
changes to a given repository. For more information, see
<http://git-scm.com/doc>.
-Another nice config for you (optional, but recommended):
-
- $ git config \--global core.editor nano
- $ git config \--global color.status auto
- $ git config \--global color.branch auto
- $ git config \--global color.interactive auto
+Another nice config for you (optional, but recommended):\
+\$ **git config \--global core.editor nano**\
+\$ **git config \--global color.status auto**\
+\$ **git config \--global color.branch auto**\
+\$ **git config \--global color.interactive auto**\
\$ **git config \--global color.diff auto**
-After that, run the script:
-
+After that, run the script:\
\$ **./download all**
What this did was download everything (grub, coreboot, memtest86+,
bucts, flashrom) at the versions last tested for this release, and patch
them. Read the script in a text editor to learn more.
-To build the ROM images, see [#build](#build).
+To build the ROM images, see [\#build](#build).
[Back to top of page.](#pagetop)
+
+
How to build "bucts" (for LenovoBIOS X60/X60S/X60T/T60) {#build_bucts}
=========================================================
@@ -95,17 +102,17 @@ a register in the chipset on some Intel systems.
Bucts is needed when flashing in software the X60/X60S/X60T/T60 ROM
while Lenovo BIOS is running; external flashing will be safe regardless.
Each ROM contains identical data inside the two final 64K region in the
-file*. This corresponds to the final two 64K regions in the flash chip.
+file\*. This corresponds to the final two 64K regions in the flash chip.
Lenovo BIOS will prevent you from writing the final one, so running
"**bucts 1**" will set the system to boot from the other block instead
(which is writeable along with everything beneath it when using a
-patched flashrom. see [#build\_flashrom](#build_flashrom)). After
+patched flashrom. see [\#build\_flashrom](#build_flashrom)). After
shutting down and booting up after the first flash of libreboot, the
final 64K block is writeable so you flash the ROM again with an
unpatched flashrom and run "**bucts 0**" to make the system boot from
the normal (highest) block again.
-*Libreboot ROM images have identical data in those two 64KiB regions
+\*Libreboot ROM images have identical data in those two 64KiB regions
because dd is used to do that, by the build system. If you're building
from upstream (coreboot), you have to do it manually.
@@ -116,9 +123,8 @@ the mainboard. Removing that battery removes power to BUC.TS, resetting
the bit back to 0 (if you previously set it to 1).
BUC.TS utility is included in libreboot\_src.tar.xz and
-libreboot\_util.tar.xz.
-
-**If you downloaded from git, follow [#build\_meta](#build_meta) before
+libreboot\_util.tar.xz.\
+**If you downloaded from git, follow [\#build\_meta](#build_meta) before
you proceed.**
"BUC" means "**B**ack**u**p **C**ontrol" (it's a register) and
@@ -130,12 +136,10 @@ If you have the binary release archive, you'll find executables under
First, [install the build dependencies](#build_dependencies).
-To build bucts, do this in the main directory:
-
+To build bucts, do this in the main directory:\
\$ **./oldbuild module bucts**
-To statically compile it, do this:
-
+To statically compile it, do this:\
\$ **./oldbuild module bucts static**
The "builddeps" script in libreboot\_src also makes use of
@@ -143,6 +147,8 @@ builddeps-bucts.
[Back to top of page.](#pagetop)
+
+
How to build "flashrom" {#build_flashrom}
=========================
@@ -150,9 +156,8 @@ Flashrom is the utility for flashing/dumping ROM images. This is what
you will use to install libreboot.
Flashrom source code is included in libreboot\_src.tar.xz and
-libreboot\_util.tar.xz.
-
-**If you downloaded from git, follow [#build\_meta](#build_meta) before
+libreboot\_util.tar.xz.\
+**If you downloaded from git, follow [\#build\_meta](#build_meta) before
you proceed.**
If you are using the binary release archive, then there are already
@@ -162,12 +167,10 @@ flashrom from source, continue reading.
First, [install the build dependencies](#build_dependencies).
-To build it, do the following in the main directory:
-
+To build it, do the following in the main directory:\
\$ **./oldbuild module flashrom**
-To statically compile it, do the following in the main directory:
-
+To statically compile it, do the following in the main directory:\
\$ **./oldbuild module flashrom static**
After you've done that, under ./flashrom/ you will find the following
@@ -187,6 +190,8 @@ builddeps-flashrom.
[Back to top of page.](#pagetop)
+
+
How to build the ROM images {#build}
===========================
@@ -207,42 +212,38 @@ MacBook1,1 laptops are all 32-bit only.
First, [install the build dependencies](#build_dependencies).
If you downloaded libreboot from git, refer to
-[#build\_meta](#build_meta).
-
-Build all of the components used in libreboot:
+[\#build\_meta](#build_meta).
+Build all of the components used in libreboot:\
\$ **./oldbuild module all**
You can also build each modules separately, using *./oldbuild module
-modulename*. To see the possible values for *modulename*, use:
-
+modulename*. To see the possible values for *modulename*, use:\
\$ **./oldbuild module list**
-After that, build the ROM images (for all boards):
-
- $ ./oldbuild roms withgrub
+After that, build the ROM images (for all boards):\
+\$ **./oldbuild roms withgrub**\
Alternatively, you can build for a specific board or set of boards. For
-example:
-
- $ ./oldbuild roms withgrub x60
- $ ./oldbuild roms withgrub x200\_8mb
- $ ./oldbuild roms withgrub x60 x200\_8mb
+example:\
+\$ **./oldbuild roms withgrub x60**\
+\$ **./oldbuild roms withgrub x200\_8mb**\
+\$ **./oldbuild roms withgrub x60 x200\_8mb**\
The list of board options can be found by looking at the directory names
in **resources/libreboot/config/grub/**.
-To clean (reverse) everything, do the following:
-
+To clean (reverse) everything, do the following:\
\$ **./oldbuild clean all**
The ROM images will be stored under **bin/*payload*/**, where *payload*
could be *grub*, *seabios*, or whatever other payload those images were
built for.
+
Preparing release archives (optional)
-------------------------------------
**This is only confirmed to work (tested) in Debian Stretch. Parabola
-*fails* at this stage (for now). For all other distros, YMMV. This
+\*fails\* at this stage (for now). For all other distros, YMMV. This
will also work in Devuan.**
This is mainly intended for use with the git repository. These commands
@@ -258,29 +259,23 @@ Tag the current commit, and that version will appear in both the
in the file names of the archives. Otherwise, whatever git uses for *git
describe \--tags HEAD* will be used.
-Utilities (static executables):
-
+Utilities (static executables):\
\$ **./oldbuild release util**
-Archive containing flashrom and bucts source code:
-
+Archive containing flashrom and bucts source code:\
\$ **./oldbuild release tobuild**
Documentation archive (**does not work on \_src release archive, only
-git**):
-
+git**):\
\$ **./oldbuild release docs**
-ROM image archives:
-
+ROM image archives:\
\$ **./oldbuild release roms**
-Source code archive:
-
+Source code archive:\
\$ **./oldbuild release src**
-SHA512 sums of all other release archives that have been generated:
-
+SHA512 sums of all other release archives that have been generated:\
\$ **./oldbuild release sha512sums**
If you are building on an i686 host, this will build statically linked
@@ -288,7 +283,7 @@ If you are building on an i686 host, this will build statically linked
**nvramtool, cbfstool, ich9deblob, cbmem**.
If you are building on an x86\_64 host, this will build statically
-linked 32- *and* 64-bit binaries for **cbmem**, **ich9deblob**,
+linked 32- \*and\* 64-bit binaries for **cbmem**, **ich9deblob**,
**cbfstool** and **nvramtool**.
**To include statically linked i686 and x86\_64 binaries for bucts and
@@ -309,9 +304,8 @@ libreboot\_util, for:
- flashrom
If you are building binaries on a live system or chroot (for
-flashrom/bucts), you can use the following to statically link them:
-
- $ ./oldbuild module flashrom static
+flashrom/bucts), you can use the following to statically link them:\
+\$ **./oldbuild module flashrom static**\
\$ **./oldbuild module bucts static**
The same conditions as above apply for ARM (except, building bucts on
@@ -321,9 +315,8 @@ an X60/T60 while lenovo bios is present, working around the security
restrictions).
The command that you used for generating the release archives will also
-run the following command:
-
- $ ./oldbuild release tobuild
+run the following command:\
+\$ **./oldbuild release tobuild**\
The archive **tobuild.tar.xz** will have been created under
**release/oldbuildsystem/**, containing bucts, flashrom and all other
required resources for building them.
@@ -335,8 +328,12 @@ libreboot\_src.tar.xz have been created, under
The ROM images will be stored in separate archives for each system,
under **release/oldbuildsystem/rom/**.
-Copyright © 2014, 2015, 2016 Leah Rowe <info@minifree.org>
+[Back to top of page](#pagetop)
+
+
+
+Copyright © 2014, 2015, 2016 Leah Rowe <info@minifree.org>\
Permission is granted to copy, distribute and/or modify this document
under the terms of the Creative Commons Attribution-ShareAlike 4.0
International license or any later version published by Creative