Kernel Deblobing

From Wikipedia: A binary blob is a closed-source binary-only piece of software without publicly available source code. Since 1996, Linux kernel includes an increasing amount of binary blobs to handle devices with closed-sources firmware only (and among these devices, those without technical documentation which would authorize free firmware development for them). Proprietary software always introduces freedom, security, or privacy concerns.

Deblobing is Article description::the operation which removes binary blobs from source code to get a completely blob-free kernel. This is done with two shell scripts written by Brian Brazil, Jeff Moe, and Alexandre Oliva, named and, where   represents the kernel revision. A third script which is for Linux tarballs,, is not used here. See the scripts README to get information about them.

Those scripts are provided by the Free Software Foundation Latin America, for each kernel revision. FSFLA mainly provides Linux-libre distribution.

Once deblobed the kernel is compiled as usual. Deblobing kernel obviously means that devices that exclusively support proprietary firmware cannot be used. Generally this includes all new Intel wireless cards. Nvidia graphic cards will only use the nouveau open source driver.

See below how to get a list of removed blobs without kernel compilation.

Deblobing rt-sources
For, set the USE flag  in , sources will be automatically deblobed after being emerged.

Deblobing gentoo-sources (or any other sources)
USE flag no more deblobs, this must be manually done.

Emerging sources
When using the default, first accept the   license needed for Gentoo sources.

Then emerge Gentoo sources:

Then set symlink to the emerged sources if   USE flag is not set for Gentoo sources:

First get the list of available sources:

… then choose the right ones:

Then change directory to :

Downloading deblob scripts
Scripts are on Linux-libre server. First make some vars to simplify lines to be entered:

(If there is a release candidate string,  for example, enter   by hand —there is usually no rc string with gentoo-sources.)
 * will contain sources version and is the only one to be adapted, a minor version number is not mandatory;
 * will be generated, containing version without minor revision if needed,  for  ;
 * will contain downloading URL.

Making the vars:

Downloading:

Make the scripts executable by root only:

Verifying signatures
First import or update the Linux-libre server key:

Then verify the signatures:

Python version
Deblob scripts use the Python 3.8 interpreter. Emerge it:

Deblob command
Deblobing can now be started (remember the  var):

During the operation, which may be long, all deblobing information is displayed. After kernel compilation -gnu suffix will be appended to it's name,  in this example.

List of removed blobs
To get the list of removed blobs with their kernel symbol names, redirect the deblob command output to a file:

As kernel sources can be re-emerged after being deblobed, this is a convenient way, without kernel compilation, to investigate if targeted hardware should work without binary blobs.

External resources

 * The Binary blob Wikipedia article