Bug 6777

Summary: [FNC] Unable to set CONFIG_COMPAT=y to kernel config
Product: [Build System, Metadata & Runtime] BSPs Reporter: Pavel Demenko <pavel.demenko>
Component: bsps-meta-intelAssignee: Darren Hart <dvhart>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium CC: boon.leong.ong, logovskaya, rebecca.swee.fun.chang, tom.zanussi
Version: 1.6.1   
Target Milestone: 1.7 M4   
Hardware: MinnowBoard Max   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Log file none

Description Pavel Demenko 2014-09-30 13:54:42 UTC
Created attachment 2148 [details]
Log file

Setup: ubuntu 12.04 as host
Steps: configure yocto 1.6.1 with Mohon Peak BSP (MinnowBoard Max has the same issue) and vtune layer, add CONFIG_COMPAT=y option to kernel config as described here (http://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#configuring-the-kernel). VTune driver cannot be build without CONFIG_COMPAT=y
start building 
Bug: Kernel was built without CONFIG_COMPAT=y, and autoconf.h missed this option. 
folder .meta/cfg/standard/intel-corei7-64 contains files that say CONFIG_COMPAT=y was not included into final configuration (in attach)

--
Value requested for CONFIG_COMPAT not in final .config
Requested value:  CONFIG_COMPAT=y
Actual value:
Comment 1 Darren Hart 2014-09-30 16:06:01 UTC
This error is usually the result of just adding a specific config option without verifying that the dependencies listed in the Kconfig files are also added.

If you aren't familiar with this, use menuconfig to navigate to the CONFIG_COMPAT option and read the help where the dependencies are listed in boolean logic. Check to see which are missing and include them in your configuratino fragment.
Comment 2 Darren Hart 2014-09-30 16:10:32 UTC
for example:

$ cat arch/x86/Kconfig | egrep "config COMPAT$" -A4
config COMPAT
	def_bool y
	depends on IA32_EMULATION || X86_X32
	select ARCH_WANT_OLD_COMPAT_IPC

Have you also enabled IA32_EMULATION?

$ cat arch/x86/Kconfig | egrep "config IA32_EMULATION$" -A10
config IA32_EMULATION
	bool "IA32 Emulation"
	depends on X86_64
	select BINFMT_ELF
	select COMPAT_BINFMT_ELF
	select HAVE_UID16
	---help---
	  Include code to run legacy 32-bit programs under a
	  64-bit kernel. You should likely turn this on, unless you're
	  100% sure that you don't have any 32-bit programs left.

Generally speaking, I would agree that these should be enabled in meta-intel 64b BSPs.
Comment 3 Darren Hart 2014-10-03 15:09:16 UTC
This solution worked for Pavel. I will use this bug to ensure the intel-common 64b BSPs get this change. This will go in to the meta-intel 1.7 release. Is there a desire to see this backported to the 1.6 release?
Comment 4 Ekaterina Logovskaya 2014-10-06 09:50:17 UTC
Hi Darren,

it would be great to see the fix backported to the 1.6 as will allow to VTune users to build sampling driver for meta-intel 64b BSPs out of the box.

Thanks, 
Katya
Comment 5 Darren Hart 2014-10-07 00:05:17 UTC
Patch prepared, tested, and sent to linux-yocto mailing list for the 3.17 and 3.14 kernels. Once merged, a subsequent update will be required to the current and daisy branches for the new meta SRCREV.
Comment 6 Darren Hart 2014-10-07 04:52:25 UTC
Boon Leong and Rebecca, do you have any concerns with these configs being added to the ISG BSPs? If not, I can include them in the SRCREV update for meta-intel to include this change. To be clear, this enables CONFIG_COMPAT for x86_64 and X32 machines so they can execute 32b code. It does not force the inclusion of multilib or anything like that, it is strictly enabling support in the kernel (which is the recommendation of the Kconfig, and arguably strengthens the platform).
Comment 7 Ong Boon Leong 2014-10-07 05:51:58 UTC
Hi Darren,
    Yup. We have no concern on this. Thanks for bringing that up.
Comment 8 Darren Hart 2014-10-31 15:22:45 UTC
This is fixed in the proposed meta-intel 1.7 dizzy release.