aboutsummaryrefslogtreecommitdiff
path: root/docs/git
diff options
context:
space:
mode:
Diffstat (limited to 'docs/git')
-rw-r--r--docs/git/index.md105
1 files changed, 54 insertions, 51 deletions
diff --git a/docs/git/index.md b/docs/git/index.md
index d8ed35a2..5b74d51a 100644
--- a/docs/git/index.md
+++ b/docs/git/index.md
@@ -1,5 +1,6 @@
---
title: Instructions for compiling from the source code
+x-toc-enable: true
...
Depthcharge is currently not documented, since it is in the new build
@@ -9,36 +10,33 @@ included in the BUILD\_HOWTO file in libreboot.git or \_src.
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
- X60/X60S/X60T/T60)](#build_bucts)
-
-- [How to build "flashrom"](#build_flashrom)
-- [How to build the ROM images](#build)
-
-Install build dependencies {#build_dependencies}
+Install build dependencies
==========================
Before doing anything, you need the dependencies first. This is true if
you want to build libreboot from source, with either
-libreboot\_src.tar.xz or git. **If you are using libreboot\_util.tar.xz
+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.**
+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
+
(this will also work in Devuan)
For Parabola, you can run the following command:
+
$ sudo ./oldbuild dependencies parabola\
+
or:
+
# ./oldbuild dependencies parabola
For other GNU+Linux distributions, you can adapt the existing scripts.
-Get the full source code from metadata (git clone) {#build_meta}
+Get the full source code from metadata (git clone)
==================================================
If you downloaded libreboot from git, then there are some steps to
@@ -57,6 +55,7 @@ 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>.
@@ -79,11 +78,11 @@ them. Read the script in a text editor to learn more.
To build the ROM images, see [\#build](#build).
-How to build "bucts" (for LenovoBIOS X60/X60S/X60T/T60) {#build_bucts}
+How to build "bucts" (for LenovoBIOS X60/X60S/X60T/T60)
=========================================================
-**This is for Lenovo BIOS users on the ThinkPad X60/X60S, X60 Tablet and
-T60. If you have coreboot or libreboot running already, ignore this.**
+*This is for Lenovo BIOS users on the ThinkPad X60/X60S, X60 Tablet and
+T60. If you have coreboot or libreboot running already, ignore this.*
BUC.TS isn't really specific to these laptops, but is a bit inside the
a register in the chipset on some Intel systems.
@@ -93,12 +92,12 @@ 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.
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
+`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
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
+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
@@ -112,12 +111,13 @@ 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
-you proceed.**
+libreboot\_util.tar.xz.
-"BUC" means "**B**ack**u**p **C**ontrol" (it's a register) and
-"TS" means "**T**op **S**wap" (it's a status bit). Hence "bucts"
+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
+"TS" means "*T*op *S*wap" (it's a status bit). Hence "bucts"
(BUC.TS). TS 1 and TS 0 corresponds to bucts 1 and bucts 0.
If you have the binary release archive, you'll find executables under
@@ -136,16 +136,17 @@ To statically compile it, do this:
The "builddeps" script in libreboot\_src also makes use of
builddeps-bucts.
-How to build "flashrom" {#build_flashrom}
+How to build "flashrom"
=========================
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
-you proceed.**
+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
binaries included under ./flashrom/. The flashing scripts will try to
@@ -165,19 +166,19 @@ To statically compile it, do the following in the main directory:
After you've done that, under ./flashrom/ you will find the following
executables:
-- **flashrom**
+- `flashrom`
- For flashing while coreboot or libreboot is running.
-- **flashrom\_lenovobios\_sst**
+- `flashrom_lenovobios_sst`
- This is patched for flashing while Lenovo BIOS is running on an
X60 or T60 with the SST25VF016B (SST) flash chip.
-- **flashrom\_lenovobios\_macronix**
+- `flashrom_lenovobios_macronix`
- This is patched for flashing while Lenovo BIOS is running on an
X60 or T60 with the MX25L1605D (Macronix) flash chip.
The "builddeps" script in libreboot\_src also makes use of
builddeps-flashrom.
-How to build the ROM images {#build}
+How to build the ROM images
===========================
You don't need to do much, as there are scripts already written for you
@@ -211,29 +212,31 @@ modulename*. To see the possible values for *modulename*, use:
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
+ $ ./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/**.
+in `resources/libreboot/config/grub/`.
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
+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
-will also work in Devuan.**
+*This is only confirmed to work (tested) in Debian Stretch. Parabola 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
will work in the release archive (\_src), unless otherwise noted below.
@@ -256,8 +259,8 @@ Archive containing flashrom and bucts source code:
$ ./oldbuild release tobuild
-Documentation archive (**does not work on \_src release archive, only
-git**):
+Documentation archive (*does not work on \_src release archive, only
+git*):
$ ./oldbuild release docs
@@ -275,17 +278,18 @@ SHA512 sums of all other release archives that have been generated:
If you are building on an i686 host, this will build statically linked
32-bit binaries in the binary release archive that you created, for:
-**nvramtool, cbfstool, ich9deblob, cbmem**.
+
+ 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**,
-**cbfstool** and **nvramtool**.
+linked 32- \*and\* 64-bit binaries for `cbmem`, `ich9deblob`,
+`cbfstool` and `nvramtool`.
-**To include statically linked i686 and x86\_64 binaries for bucts and
+*To include statically linked i686 and x86\_64 binaries for bucts and
flashrom, you will need to build them on a chroot, a virtual system or a
real system where the host uses each given architecture. These packages
are difficult to cross-compile, and the libreboot project is still
-figuring out how to deal with them.**
+figuring out how to deal with them.*
The same applies if you want to include statically linked flashrom
binaries for ARM.
@@ -314,21 +318,20 @@ The command that you used for generating the release archives will also
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
+
+The archive `tobuild.tar.xz` will have been created under
+`release/oldbuildsystem/`, containing bucts, flashrom and all other
required resources for building them.
You'll find that the files libreboot\_util.tar.xz and
libreboot\_src.tar.xz have been created, under
-**release/oldbuildsystem/**.
+`release/oldbuildsystem/`.
The ROM images will be stored in separate archives for each system,
-under **release/oldbuildsystem/rom/**.
+under `release/oldbuildsystem/rom/`.
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 GNU Free Documentation License Version 1.3 or any later
version published by the Free Software Foundation