Commit 761340df authored by David Boddie's avatar David Boddie

Merge branch 'update_heads_beta_repo' into 'master'

Update documentation for new heads repo and v4 hardware

See merge request !13
parents cc738e19 245bb78e
Pipeline #4188 failed with stage
......@@ -73,13 +73,18 @@ Build Heads for your Librem hardware
The first step to build Heads for your Librem hardware is to pull down the full source code repository for it. For the purposes of this beta we have created a special branch that contains pull requests that have not yet been merged into the Heads master repo. So first clone the following repository::
git clone --branch purism_beta https://github.com/kylerankin/heads.git
git clone --branch purism_beta https://source.puri.sm/coreboot/purism-heads.git
Heads will require additional dependencies beyond what you needed to build coreboot, so you will need to install those now::
sudo apt install libelf-dev pkg-config cmake
There are two main Librem board categories within Heads, one for the Librem 13v2/13v3 and one for the Librem 15v3. Under the boards/ directory you will see a librem13v2 and librem15v3 directory. Within each of these directories is a corresponding librem13v2.config or librem15v3.config file. Open the config file that corresponds to your laptop and inspect the following configuration values::
(Deprecated) Editing Boot Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*Note that the following configuration options are no longer necessary, as our Heads build has the ability to update this configuration within the Heads menu itself. You can still update the configuration here if you wish, so the following config is in the documention for your refrence. Otherwise skip ahead to the next section.*
There are four main Librem board categories within Heads, one for the Librem 13v2/13v3, one for the Librem 15v3, one for Librem 13v4 and one for Librem 15v4. Under the boards/ directory you will see a librem13v2, librem13v4, librem15v3 and librem15v4 directory. Within each of these directories is a corresponding librem13v2.config, librem13v4.config, librem15v3.config or librem15v4.config file. Open the config file that corresponds to your laptop and inspect the following configuration values::
export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
......@@ -99,39 +104,66 @@ If your Librem laptop has both a SATA drive and an NVMe drive in it, and you int
Add Binary Blobs for Coreboot
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Coreboot on Librem laptops unfortunately still requires a few binary blobs to run, so you will need to copy those down before you build Heads. Within the blobs/librem_skl directory is a get_blobs.sh script that you can execute to get the blobs::
Coreboot on Librem laptops unfortunately still requires a few binary blobs to run, so you will need to copy those down before you build Heads. There is a blobs/librem_skl and blobs/librem_kbl directory that contains a get_blobs.sh script to pull down blobs. You will execute the script from a different directory depending on which version laptop you have.
For Librem 13v2/13v3 and Librem 15v3 owners::
cd blobs/librem_skl
./get_blobs.sh
For Librem 13v4 and Librem 15v4 owners::
cd blobs/librem_kbl
./get_blobs.sh
Once the script completes, you can ``cd`` back to the main Heads directory and prepare to build.
Make the Heads ROM image
^^^^^^^^^^^^^^^^^^^^^^^^
To make the Heads ROM image, from the base of the Heads code directory, run ``make`` followed by an environment variable that tells Heads which board to use. For Librem 13v2/13v3 laptops type::
To make the Heads ROM image, from the base of the Heads code directory, run ``make`` followed by an environment variable that tells Heads which board to use.
For Librem 13v2/13v3 laptops type::
make BOARD=librem13v2
For Librem 13v4 laptops type::
make BOARD=librem13v4
For Librem 15v3 laptops type::
make BOARD=librem15v3
For Librem 15v4 laptops type::
make BOARD=librem15v4
The first time you build Heads it will take quite a long time (hours) to complete the build process as it will need to pull down and compile the entire cross-compile toolchain. If for some reason the build process errors out, make a note of which module it was attempting to build and then go to the logs/ directory and inspect the logs for that particular module. More often than not a build fails because you are missing a development library on your system.
Once Heads completes the build process, you will find the corresponding ROM file at ``build/librem13v2/coreboot.rom`` or ``build/librem15v3/coreboot.rom`` depending on your device.
Once Heads completes the build process, you will find the corresponding ROM file at ``build/librem13v2/coreboot.rom``, ``build/librem13v4/coreboot.com``, ``build/librem15v3/coreboot.rom`` or ``build/librem15v4/coreboot.com`` depending on your device.
Flash Heads to your hardware
----------------------------
Before you flash Heads over the top of your existing coreboot BIOS, **confirm that you have a USB thumb drive that contains your backup coreboot BIOS and your GPG public key**. Then, use the flashrom you built initially from the ``building-coreboot`` directory to flash this new image. Assuming both the ``building-coreboot`` and ``heads`` directories are sitting in your home directory and you are still inside the main ``heads/`` directory, the command for Librem 13v2/13v3 would look like::
Before you flash Heads over the top of your existing coreboot BIOS, **confirm that you have a USB thumb drive that contains your backup coreboot BIOS and your GPG public key**. Then, use the flashrom you built initially from the ``building-coreboot`` directory to flash this new image. The following commands assume both the ``building-coreboot`` and ``heads`` directories are sitting in your home directory and you are still inside the main ``heads/`` directory.
The command for Librem 13v2/13v3 would look like::
sudo ../building-coreboot/coreboot/flashrom/flashrom -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq -w build/librem13v2/coreboot.rom
For the Librem 13v4 type::
sudo ../building-coreboot/coreboot/flashrom/flashrom -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq -w build/librem13v4/coreboot.rom
For the Librem 15v3 type::
sudo ../building-coreboot/coreboot/flashrom/flashrom -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq -w build/librem15v3/coreboot.rom
For the Librem 15v4 type::
sudo ../building-coreboot/coreboot/flashrom/flashrom -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq -w build/librem15v4/coreboot.rom
Once flashrom completes you are ready to reboot into Heads.
Perform initial Heads configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment