Bug 6611 - linux-yocto based recipes require a config (won't use Linux defconfig)
Summary: linux-yocto based recipes require a config (won't use Linux defconfig)
Status: RESOLVED FIXED
Alias: None
Product: Kernel
Classification: Yocto Project Subprojects
Component: kernel-tooling (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M3
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard: 17 June 2015: Documentation revisions...
Depends on:
Blocks:
 
Reported: 2014-08-05 19:55 UTC by Darren Hart
Modified: 2015-06-17 19:09 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2014-08-05 19:55:41 UTC
When attempting to write a linux-yocto-custom based recipe for 3.16 for x86_64, I found if I didn't specify a defconfig, the build would complain:

Log data follows:                                                                   | DEBUG: Executing shell function do_kernel_configme
| [INFO] doing kernel configme
| [INFO] Configuring target/machine combo: "standard/intel-corei7-64"
| [INFO] collecting configs in ./.meta/meta-series
| cat: .meta/cfg/standard/intel-corei7-64/config_frag.txt: No such file or directory
| cat: .meta/cfg/standard/intel-corei7-64/config_frag.txt: No such file or directory
| mv: cannot stat '/build/yocto/master/intel-corei7-64_20140718213113/build/tmp/work/intel_corei7_64-eywa-linux/linux-eywa/3.16+gitAUTOINC+f845b06934-r0/linux-intel_corei7_64-standard-build/.tmp.config*': No such file or directory
| creation of pre-processed config data failed
| config of "standard/intel-corei7-64" failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_kernel_configme (log file is located at /build/yocto/master/intel-corei7-64_20140718213113/build/tmp/work/intel_corei7_64-eywa-linux/linux-eywa/3.16+gitAUTOINC+f845b06934-r0/temp/log.do_kernel_configme.13711)

However, if I ran the following:

$ make defconfig

in a linux source directory and copied the resulting .config to the files dir as defconfig and added it to the SRC_URI, the build would complete.

I would expect the tools to default to "make defconfig" in the absence of any other configuration data.

Bruce - what are your thoughts. This is either a bug against the kern tools, or a bug against linux-yocto-custom and the kernel development manual, depending on what we agree the expectations to be.
Comment 1 Bruce Ashfield 2014-08-07 03:12:20 UTC
It's a documentation issue, since you must specify something
for a configuration .. i.e. a defconfig or fragments.

That being said, the error message for this is really nasty,
so I can take the bug and use it to improve the message, which
is the documentation.
Comment 2 Darren Hart 2014-08-07 05:37:55 UTC
We'll need to update the kernel-dev manual as well. Adding Scott.
Comment 3 Bruce Ashfield 2015-03-16 19:26:02 UTC
I've emailed Scott on this. Looking for the right place to document it.
Comment 4 Scott Rifenbark 2015-03-17 17:06:15 UTC
Hi, 

I have a section in the YP Linux Kernel Development Manual that is titled "Modifying an Existing Recipe" (http://www.yoctoproject.org/docs/kernel-dev/kernel-dev.html#modifying-an-existing-recipe).  This section has some sub-sections.  Originally, I thought that we could address this with a note in the section that talks about changing the configuration.  Bruce indicates, though, that it is not quite the same.  So, if this involves only "using" custom Linux-yocto kernels and does not involve creating them, which is what I thought this existing section would cover, then do we want a brand new section called "Using Custom Linux-Yocto Kernel Recipes"?

Scott
Comment 5 Scott Rifenbark 2015-05-26 12:56:07 UTC
Hi, 

I found what I think would be an appropriate section to note this requirement when using the yocto-linux-custom.bb recipe.  I have added a step to the list and noted some more information in the description of SRC_URI.  Please look this over and let me know if this will meet the documentation requirement of this bug.

http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-your-own-sources

See step 3 and the description for SRC_URI in step 4.

Thanks, 
Scott
Comment 6 Bruce Ashfield 2015-06-16 04:02:05 UTC
(In reply to comment #5)
> Hi, 
> 
> I found what I think would be an appropriate section to note this
> requirement when using the yocto-linux-custom.bb recipe.  I have added a
> step to the list and noted some more information in the description of
> SRC_URI.  Please look this over and let me know if this will meet the
> documentation requirement of this bug.
> 
> http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> your-own-sources
> 
> See step 3 and the description for SRC_URI in step 4.
> 
> Thanks, 
> Scott

(In reply to comment #5)
> Hi, 
> 
> I found what I think would be an appropriate section to note this
> requirement when using the yocto-linux-custom.bb recipe.  I have added a
> step to the list and noted some more information in the description of
> SRC_URI.  Please look this over and let me know if this will meet the
> documentation requirement of this bug.
> 
> http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> your-own-sources
> 
> See step 3 and the description for SRC_URI in step 4.

We should add more text around step #3. When you do a 'make defconfig',
you are getting the kernel defined default configuration for your
architecture, but there is no guarantee that it is valid for your
use case, or will even boot your board. This is particularly true in
non-x86 architectures. To use non-x86 defconfigs, you need to be a 
bit more specific and fine one that matches your board. 

i.e. for arm, you look in "arch/arm/configs" and fine the one that
is the best starting point for your board.

Alternatively, your board vendor may supply a baseline .config, that
you copy into place and call 'defconfig'.

The SRC_URI changes look fine.


> 
> Thanks, 
> Scott
Comment 7 Scott Rifenbark 2015-06-17 12:52:42 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Hi, 
> > 
> > I found what I think would be an appropriate section to note this
> > requirement when using the yocto-linux-custom.bb recipe.  I have added a
> > step to the list and noted some more information in the description of
> > SRC_URI.  Please look this over and let me know if this will meet the
> > documentation requirement of this bug.
> > 
> > http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> > your-own-sources
> > 
> > See step 3 and the description for SRC_URI in step 4.
> > 
> > Thanks, 
> > Scott
> 
> (In reply to comment #5)
> > Hi, 
> > 
> > I found what I think would be an appropriate section to note this
> > requirement when using the yocto-linux-custom.bb recipe.  I have added a
> > step to the list and noted some more information in the description of
> > SRC_URI.  Please look this over and let me know if this will meet the
> > documentation requirement of this bug.
> > 
> > http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> > your-own-sources
> > 
> > See step 3 and the description for SRC_URI in step 4.
> 
> We should add more text around step #3. When you do a 'make defconfig',
> you are getting the kernel defined default configuration for your
> architecture, but there is no guarantee that it is valid for your
> use case, or will even boot your board. This is particularly true in
> non-x86 architectures. To use non-x86 defconfigs, you need to be a 
> bit more specific and fine one that matches your board. 
> 
> i.e. for arm, you look in "arch/arm/configs" and fine the one that
> is the best starting point for your board.
> 
> Alternatively, your board vendor may supply a baseline .config, that
> you copy into place and call 'defconfig'.

Bruce, Check out http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-your-own-sources section and Step 3 now.  I have your suggestions in.  Let me know if this works. 

> 
> The SRC_URI changes look fine.
> 
> 
> > 
> > Thanks, 
> > Scott
Comment 8 Bruce Ashfield 2015-06-17 14:40:03 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Hi, 
> > > 
> > > I found what I think would be an appropriate section to note this
> > > requirement when using the yocto-linux-custom.bb recipe.  I have added a
> > > step to the list and noted some more information in the description of
> > > SRC_URI.  Please look this over and let me know if this will meet the
> > > documentation requirement of this bug.
> > > 
> > > http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> > > your-own-sources
> > > 
> > > See step 3 and the description for SRC_URI in step 4.
> > > 
> > > Thanks, 
> > > Scott
> > 
> > (In reply to comment #5)
> > > Hi, 
> > > 
> > > I found what I think would be an appropriate section to note this
> > > requirement when using the yocto-linux-custom.bb recipe.  I have added a
> > > step to the list and noted some more information in the description of
> > > SRC_URI.  Please look this over and let me know if this will meet the
> > > documentation requirement of this bug.
> > > 
> > > http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> > > your-own-sources
> > > 
> > > See step 3 and the description for SRC_URI in step 4.
> > 
> > We should add more text around step #3. When you do a 'make defconfig',
> > you are getting the kernel defined default configuration for your
> > architecture, but there is no guarantee that it is valid for your
> > use case, or will even boot your board. This is particularly true in
> > non-x86 architectures. To use non-x86 defconfigs, you need to be a 
> > bit more specific and fine one that matches your board. 
> > 
> > i.e. for arm, you look in "arch/arm/configs" and fine the one that
> > is the best starting point for your board.
> > 
> > Alternatively, your board vendor may supply a baseline .config, that
> > you copy into place and call 'defconfig'.
> 
> Bruce, Check out
> http://www.yoctoproject.org/docs/1.9/kernel-dev/kernel-dev.html#working-with-
> your-own-sources section and Step 3 now.  I have your suggestions in.  Let
> me know if this works. 

This looks good to me.

Bruce

> 
> > 
> > The SRC_URI changes look fine.
> > 
> > 
> > > 
> > > Thanks, 
> > > Scott