hello friends! new(ish)!

Libreboot: Difference between revisions

From InstallGentoo Wiki v2
Jump to navigation Jump to search
>Juno
No edit summary
>Juno
mNo edit summary
Line 15: Line 15:
Libreboot supports only a small subset of hardware on the market. [https://libreboot.org/docs/hardware/ A complete list is available on the Libreboot website], but some are easier to work with than others. For example, you can install Libreboot on a Thinkpad X60 notebook entirely via software means.
Libreboot supports only a small subset of hardware on the market. [https://libreboot.org/docs/hardware/ A complete list is available on the Libreboot website], but some are easier to work with than others. For example, you can install Libreboot on a Thinkpad X60 notebook entirely via software means.


You'll also notice that most the supported devices are at least a decade old. This is because [[https://libreboot.org/faq.html#intel modern hardware has severe security issues]]. Old hardware does too, but Libreboot is able to overcome it.
You'll also notice that most the supported devices are at least a decade old. This is because [https://libreboot.org/faq.html#intel modern hardware has severe security issues]. Old hardware does too, but Libreboot is able to overcome it. As far as we know.


Now that you've realized that your current laptop doesn't support Libreboot, you're probably wondering what you should get instead. Personally, I would recommend the Thinkpad X200 notebook. If you're lucky, you can buy one off Ebay for about $100 USD if you're in the United States. Libreboot also supports the X200s and X200 Tablet models, but flashing Libreboot onto either of those is somewhat more difficult.
Now that you've realized that your current laptop doesn't support Libreboot, you're probably wondering what you should get instead. Personally, I would recommend the Thinkpad X200 notebook. If you're lucky, you can buy one off Ebay for about $100 USD if you're in the United States. Libreboot also supports the X200s and X200 Tablet models, but flashing Libreboot onto either of those is somewhat more difficult.

Revision as of 04:03, 17 November 2019

Libreboot is a distribution of coreboot, which is basically identical to the latter, except for the fact that all proprietary blobs are removed in order to obtain a fully FOSS firmware that initializes hardware and boots the operating system. Despite the controversy, if you are at all interested in keeping/expanding your freedoms, then you should consider using Libreboot. However there is one major problem; Libreboot is only possible on a few different systems (thanks Intel).

Controversy

In September 2016, Libreboot's lead maintainer (a transgender) started accusing the FSF of having fired someone because of transgender-related issues. FSF denied these allegations. This maintainer then tried to remove Libreboot from the GNU but that wasn't a decision they were actually capable of making.

In January 2017, Richard Stallman released Libreboot from the GNU.

Then in April 2017, Libreboot removed the accusations and the lead maintainer apologized. The entire project was also transferred to another contributor. 3 weeks later they reapplied to be a part of GNU.

Installation

Check your hardware

Libreboot supports only a small subset of hardware on the market. A complete list is available on the Libreboot website, but some are easier to work with than others. For example, you can install Libreboot on a Thinkpad X60 notebook entirely via software means.

You'll also notice that most the supported devices are at least a decade old. This is because modern hardware has severe security issues. Old hardware does too, but Libreboot is able to overcome it. As far as we know.

Now that you've realized that your current laptop doesn't support Libreboot, you're probably wondering what you should get instead. Personally, I would recommend the Thinkpad X200 notebook. If you're lucky, you can buy one off Ebay for about $100 USD if you're in the United States. Libreboot also supports the X200s and X200 Tablet models, but flashing Libreboot onto either of those is somewhat more difficult.

Flashing your hardware

There are three steps to flashing your hardware:

  • Taking apart and wiring up your target device
  • Copying the current ROM off the flash chip
  • Overwriting the chip with Libreboot

The first step is best followed by a visual reference and varies significantly depending on the device, so you should search online for a video specific to your hardware.

You will need a program called "flashrom", which is probably available in your Linux distribution's package repositories.

Flashrom is a general-purpose flash chip programming tool. You'll be using the following flags for this installation process:

  • -p <device> - specifies the (hardware) programmer device you will use to control your flash chip. If you're using a Raspberry Pi or similar single-board computer, the device name will be "linux_spi". You can check the program's manual page for a list of every supported device.
  • -r <filename> - orders flashrom to write the contents of the flash chip to the specified file.
  • -w <filename> - overwrites the ROM on the flash chip with the contents of the specified file. This is where you're most likely to brick the device.
  • -c <chipset> - specifies the chipset of the flash chip you're writing to. This should be printed on the chip.

You'll start with the command

sudo flashrom -p <device> -r romread1.rom

You may also need to specify the chipset with the "-c" flag. You can find the chipset printed on the flash chip.

It is recommended to read the ROM multiple times, and then compare the reads to make sure they're identical. Once you've read the ROM to three different files, you can compare their hashes to make sure they're the same.

sha256sum romread{1,2,3}.rom

Once you've gotten three identical reads, proceed by overwriting the ROM.

Libreboot has different versions for various ROM sizes of the same device, and you'll have to determine the storage capacity of your flash chip in order to choose the correct ROM. This can be done through flashrom by running it with just the programmer and chipset specified. You will see a line that looks like this:

Found Macronix flash chip "MX25L6405D" (8192 kB, SPI) mapped at physical address 0x00000

In this case, the flashchip has a capacity of 8192 kB, or 8MB.

Make sure you've selected the correct ROM image for Libreboot, and then run this command

sudo flashrom -p <device> -w libreboot.rom

If everything works out well, flashrom will write the new ROM, attempt to verify it, and then exit with a message along the lines of "Flash verified!".

If you've gotten this far, then you should now disconnect everything from the target device and turn it on (with or without putting it completely back together). If everything worked, your screen will turn on to show a GRUB boot menu, with a background image of a penguin embracing a wildebeest. Find a safe place to keep your copy of the stock boot firmware ROM; you might need it in the future.

Now you just need to install an operating system.

Common issues

>Flashrom isn't finding my flash chip!

Check the wire connections to your flash chip. Make sure you've specified the correct programmer and chipset.

>Flashrom says the flash succeeded, but now the screen won't turn on!

One situation where this will happen is if Libreboot is having troubles with some of your device's hardware. If you're using two mismatched RAM sticks, then Libreboot probably won't run properly.