Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97672 - genkernel fails if new Kconfig is added (3.2.2)
Summary: genkernel fails if new Kconfig is added (3.2.2)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard: InCVS
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-01 18:08 UTC by Alon Bar-Lev (RETIRED)
Modified: 2005-07-15 10:32 UTC (History)
0 users

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


Attachments
A sample of error (genkernel.log,1.72 KB, text/plain)
2005-07-03 23:48 UTC, Alon Bar-Lev (RETIRED)
Details
Parse .config to create kernel version (gen_determineargs.sh.diff,939 bytes, patch)
2005-07-13 10:40 UTC, Alon Bar-Lev (RETIRED)
Details | Diff
gen_determineargs.sh.diff (gen_determineargs.sh.diff,809 bytes, patch)
2005-07-14 11:05 UTC, Alon Bar-Lev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-01 18:08:01 UTC
When using genkernel after installing a new kernel with a new configuration
settings, genkernel tries to execute "make prepare" and fails since it cannot
provide value for the new settings.


Reproducible: Always
Steps to Reproduce:
1. Compile your kernel using genkernel.
2. Add an new entry to Kconfig.
3. Try to compile your kernel again with the same config created in 1.

Actual Results:  
Genkernel fails without proper message.

Expected Results:  
1. Print proper message that prepare failed.
2. If execute with --menuconfig maybe skip the initial prepare?
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2005-07-03 13:42:45 UTC
Please attach a genkernel.log of the failure.
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-03 23:48:51 UTC
Created attachment 62577 [details]
A sample of error

I've added the following to init/Kconfig
A new options are added by many kernel patches...
The config does not have an entry to ALON_A, then you get the error.

menu "alon"
config ALON_A
	int "test"
	default 5
	help
	  this is a test
endmenu
Comment 3 Eric Edgar (RETIRED) gentoo-dev 2005-07-12 12:54:12 UTC
genkernel 3.2.2 is out and it should fix this issue.  The early make prepare 
has been removed.

Please reopen if this is an issue.
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-13 10:36:17 UTC
Hi!
It does not work currectly...

You commented the "compile_generic prepare kernel > /dev/null 2>&1", but you
still reference to the ${KERNEL_DIR}/include/linux/version.h that should refer
to the output of the prepare...

This causes CONFIG_LOCALVERSION to be ignored.

You can parse the.config file or determine kernel version string only after
menuconfig or prepare.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-13 10:40:12 UTC
Created attachment 63328 [details, diff]
Parse .config to create kernel version

This is a suggestion of parsing .config file in place of the version.h.
Comment 6 Eric Edgar (RETIRED) gentoo-dev 2005-07-13 11:22:59 UTC
This will not work as there are multiple places the VERSION can creep into play.

The kernel Makefiles may modify it after a prepare is run.  IF a localversion-* 
file is found in the kernel sources tree it will append that as well.  So 
really our solution is better it just needs to execute a bit later after the 
prepare.

 
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-13 11:29:54 UTC
I agree.
But you have a loop there... Since you determine kernel version then fetch the
config file from /etc/kernels and only then you can prepare...

You cannot prepare until you have .config.
You cannot copy .config from /etc/kernels until you prepare and get currect version.

So what do you do?
You can force the user to sepcify config file.
This solves the problem...
1. copy the correct .config
2. OPT menuconfig
3. prepare
Now you get kernel version and continue...

Comment 8 Tim Yamin (RETIRED) gentoo-dev 2005-07-13 14:00:33 UTC
Solution:

Try make prepare
Works? Continue as usual.
Fails? Try parsing .config.

Fixed in my CVS queue.
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2005-07-13 17:15:58 UTC
Fixed in 3.2.3, thanks!
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-14 11:04:49 UTC
Sorry for reopen... But the last fix was with error.
Consider the patch.
Comment 11 Alon Bar-Lev (RETIRED) gentoo-dev 2005-07-14 11:05:39 UTC
Created attachment 63409 [details, diff]
gen_determineargs.sh.diff

Remove error messages due to variable not set.
Comment 12 Eric Edgar (RETIRED) gentoo-dev 2005-07-14 11:09:15 UTC
Thanks for the patch.  This was reported to us via another bug report.  It 
should be included in the next genkernel.
Comment 13 Eric Edgar (RETIRED) gentoo-dev 2005-07-15 10:32:03 UTC
genkernel-3.2.5 is out ..