Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491636 - sys-kernel/genkernel-3.4.45.1: Always needs kernel sources even when not building kernel or modules
Summary: sys-kernel/genkernel-3.4.45.1: Always needs kernel sources even when not buil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 616734 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-19 07:17 UTC by Patrick Lauer
Modified: 2019-07-15 10:36 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-11-19 07:17:13 UTC
This is in a VM with no kernel sources on disk, with a static (no-module) kernel. I can't think of any part of the initrd that needs kernel source bits.

I'd expect genkernel to just build me an initrd, but:


# genkernel initramfs --luks --no-ramdisk-modules
* Gentoo Linux Genkernel; Version 3.4.45.1
* Running with options: initramfs --luks --no-ramdisk-modules

* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* ERROR: kernel source directory "/usr/src/linux" was not found!
* 
* -- Grepping log... --
* 
* Running with options: initramfs --luks --no-ramdisk-modules
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: kernel source directory "/usr/src/linux" was not found!
* 
* -- End log... --
* 
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* 
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
* 
* Please do *not* report compilation failures as genkernel bugs!
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-23 00:05:43 UTC
CANTFIX at the moment: Since https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=0042cf39f3efd3ed14a9a8a363b82cb43117b4e4 we depend on gen_init_cpio which is part of kernel sources:

> * initramfs: >> Initializing...
> *         >> Appending devices cpio data...
> Adding devices to cpio:
> dir /dev 0755 0 0
> nod /dev/console 660 0 0 c 5 1
> nod /dev/null 660 0 0 c 1 3
> nod /dev/zero 660 0 0 c 1 5
> nod /dev/tty0 600 0 0 c 4 0
> nod /dev/tty1 600 0 0 c 4 1
> nod /dev/ttyS0 600 0 0 c 4 64
> /usr/share/genkernel/gen_initramfs.sh: line 80: /usr/src/linux/usr/gen_init_cpio: No such file or directory
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-15 10:34:27 UTC
*** Bug 616734 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-15 10:36:37 UTC
Like posted in bug 491636, need for gen_init_cpio was addressed via https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=dcfc952708ed4d6f7ffd303178d7b72e79c6aa3c

Keep in mind: If you are going to build a static kernel you have to tell genkernel.