Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Package:Debian-sources

From Funtoo
Revision as of 19:40, March 30, 2022 by Invakid404 (talk | contribs) (Tweaking Kernel Config Options via /etc/portage/env)
Jump to navigation Jump to search

Debian-sources

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Introduction

This is the Debian kernel. It is roughly equal to a kernel shipped by Debian Linux in their releases. Ebuild now support the binary USE flag. The aim of this ebuild is to have support for near all possible hardware and users shouldn't really dig into configs, aka "install and forget". Daniel has added a special config-extract command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel.

Usage

root # echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use
root # emerge debian-sources
root # nano -w /etc/boot.conf
root # boot-update
   Important

debian-sources with binary USE flag also automatically installing a /usr/src/linux symlink pointing to debian kernel.

Advanced use

Additional information about using config-extract tool and genkernel tips can be found here: Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel



Tweaking Kernel Config Options via /etc/portage/env

If you want to tweak specific kernel config options while still having the binary USE flag enabled, one can make use of the /etc/portage/env directory.

In particular, one can create a file called /etc/portage/env/sys-kernel/debian-sources, and use it to call the tweak_config function in the debian-sources ebuild. Since that file is sourced before executing any phase of the ebuild, one could "hook" the src_compile phase and run tweak_config right before it.

The tweak_config function has three arguments: path to the kernel config, option key, and option value. In the case of debian-sources, the first argument is always "${T}"/config, as that's where genkernel expects the config to be located.

Here's a simple example, which enables the Tux logo on boot:

   /etc/portage/env/sys-kernel/debian-sources (Shell source code)
#!/bin/bash
if [ "${EBUILD_PHASE}" == "compile" ]; then
	tweak_config "${T}"/config CONFIG_LOGO y
fi