Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476540 - sys-kernel/genkernel - kernel_outputdir ignored when copying kernel image to tmp dir with --no-install is set
Summary: sys-kernel/genkernel - kernel_outputdir ignored when copying kernel image to ...
Status: RESOLVED OBSOLETE
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:
Depends on:
Blocks:
 
Reported: 2013-07-11 13:30 UTC by Florian Eitel
Modified: 2019-03-22 18:38 UTC (History)
2 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 Florian Eitel 2013-07-11 13:30:32 UTC
Error Message:

cp: cannot stat ‘arch/x86_64/boot/bzImage’: No such file or directory
* ERROR: Could not copy the kernel binary to /data/datenhaufen/libvirt/genkerneltmp!

tried versions: 3.4.45.1 and 3.4.47 -- both fail

config:
TMPDIR="/data/datenhaufen/libvirt/genkerneltmp" # has write permissions!
INSTALL="no"

called with: --kernel-outputdir=/data/datenhaufen/libvirt/genkerneltest

Reproducible: Always

Steps to Reproduce:
1. use --no-install and custom --kernel-outputdir
2. call genkernel
3. error
Actual Results:  
cp: cannot stat ‘arch/x86_64/boot/bzImage’: No such file or directory
* ERROR: Could not copy the kernel binary to /data/datenhaufen/libvirt/genkerneltmp!

Expected Results:  
copy should work -> copy should search for binary in KERNEL_OUTPUTDIR not in /usr/src/linux/

In the file gen_compile.sh the function find_kernel_binary from gen_funcs.sh is called. This function cd into KERNEL_OUTPUTDIR and searches the binary. Then it cd's back to the old curdir (/usr/src/linux). Then if not isTrue CMD_INSTALL the function compile_kernel tries to copy the tmp_kernel_binary to the TMPDIR. But this is not working because the tmp_kernel_binary is "arch/x86_64/boot/bzImage" but the pwd is not the KERNEL_OUTPUTDIR. Instead it searches the binary at /usr/src/linux. But there it doesn't exists.
Comment 1 Florian Eitel 2013-07-11 13:31:48 UTC
genkernel.log:


* Gentoo Linux Genkernel; Version 3.4.47
* Running with options: --no-clean --no-mrproper --kernel-outputdir=/data/datenhaufen/libvirt/genkerneltest --config=/data/datenhaufen/libvirt/genkernel.conf --kernel-config=/data/datenhaufen/libvirt/xenimages/.config all
* Using genkernel.conf from /data/datenhaufen/libvirt/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 ..

* Linux Kernel 3.9.8-gentoo for x86_64...
* .. with config file /data/datenhaufen/libvirt/xenimages/.config
* kernel: --mrproper is disabled; not running 'make mrproper'.
*         >> Running oldconfig...
COMMAND: make -j5 CC="gcc" LD="ld" AS="as" ARCH="x86" O="/data/datenhaufen/libvirt/genkerneltest"
  GEN     /data/datenhaufen/libvirt/genkerneltest/Makefile
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
* kernel: --clean is disabled; not running 'make clean'.
* kernel: >> Invoking menuconfig...
COMMAND: make -j5 -j1 CC="gcc" LD="ld" AS="as" ARCH="x86" O="/data/datenhaufen/libvirt/genkerneltest" menuconfig
COMMAND: make -j5 CC="gcc" LD="ld" AS="as" ARCH="x86" O="/data/datenhaufen/libvirt/genkerneltest"
  GEN     /data/datenhaufen/libvirt/genkerneltest/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: Nothing to be done for `all'.
  GEN     /data/datenhaufen/libvirt/genkerneltest/Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[2]: Nothing to be done for `relocs'.
  Using /usr/src/linux-3.9.8-gentoo as source for kernel
  CALL    /usr/src/linux-3.9.8-gentoo/scripts/checksyscalls.sh
*         >> Compiling 3.9.8-gentoo bzImage...
COMMAND: make -j5 CC="gcc" LD="ld" AS="as" ARCH="x86" O="/data/datenhaufen/libvirt/genkerneltest"
make[2]: Nothing to be done for `all'.
  GEN     /data/datenhaufen/libvirt/genkerneltest/Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      scripts/mod/devicetable-offsets.s
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/mod/modpost
make[2]: Nothing to be done for `relocs'.
  Using /usr/src/linux-3.9.8-gentoo as source for kernel
  CALL    /usr/src/linux-3.9.8-gentoo/scripts/checksyscalls.sh
  CHK     include/generated/compile.h
make[4]: `arch/x86/realmode/rm/realmode.bin' is up to date.
Kernel: arch/x86/boot/bzImage is ready  (#1)
*         >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)...
* Gentoo Linux Genkernel; Version 3.4.47
* Running with options: --no-clean --no-mrproper --kernel-outputdir=/data/datenhaufen/libvirt/genkerneltest --config=/data/datenhaufen/libvirt/genkernel.conf --kernel-config=/data/datenhaufen/libvirt/xenimages/.config all
* Using genkernel.conf from /data/datenhaufen/libvirt/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: Could not copy the kernel binary to /data/datenhaufen/libvirt/genkerneltmp!
*
* -- Grepping log... --
*
*
* -- End log... --
*
* Please consult /data/datenhaufen/libvirt/genkerneltest/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
* /data/datenhaufen/libvirt/genkerneltest/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*
Comment 2 Florian Eitel 2013-09-10 22:11:12 UTC
What can I do to fix this? Any authority I can sent a patch to? It is only a small change of probably one or two lines.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-22 18:38:53 UTC
From reading the source, the affected code wasn't changed within last 10 years. So I am not sure about

> TMPDIR="/data/datenhaufen/libvirt/genkerneltmp" # has write permissions!

Anyway, I cannot reproduce with latest genkernel git version. Please re-open if you are still able to reproduce.