Possible to set CONFIG_COMPAT with a 32-bit kernel ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Possible to set CONFIG_COMPAT with a 32-bit kernel ?

Jump to solution
3,143 Views
mathiasparnaude
Contributor III

Hi

To activate some functions in the framebuffer code (that manages 64-bit physical addresses), I need to set CONFIG_COMPAT in the Linux config file. I use a bbappend recipe to set my own configs.

I know that with Yocto, when a config is set but dépendent configs don't appear in the config file, the target config is silently ignored. So I checked I had no undeclared dépendent configs. But in any cases, I never get CONFIG_COMPAT in my final computed .config file.

Is it really possible to activate CONFIG_COMPAT with a 32-bit kernel? I see nothing that forbids that, even if this config is mainly there for 64-bit kernels.

What can I do?

I use Yocto 1.6.1 with Linux 3.12 on a T1040RDB board.

Any ideas to solve this problem?

Thanks,

Mathias

0 Kudos
1 Solution
1,919 Views
scottwood
NXP Employee
NXP Employee

The whole point of CONFIG_COMPAT is to allow running 32-bit userspace code on a 64-bit kernel.  So no, you can't enable it on a 32-bit kernel.  If the fb code is misusing it for something else, then the fb code needs to be fixed.

View solution in original post

0 Kudos
2 Replies
1,920 Views
scottwood
NXP Employee
NXP Employee

The whole point of CONFIG_COMPAT is to allow running 32-bit userspace code on a 64-bit kernel.  So no, you can't enable it on a 32-bit kernel.  If the fb code is misusing it for something else, then the fb code needs to be fixed.

0 Kudos
1,919 Views
mathiasparnaude
Contributor III

Thanks you, Scott. I thought using CONFIG_COMPAT with a 32-bit kernel would allow to execute compat_ioctl calls.

I think the framebuffer code is good but in the Kconfig, I saw no reason to not set CONFIG_COMPAT with a 32-bit kernel.

I built a 64-bit environment and the newly enabled code in fbmem.c fixed the problem of 64-bit physical addresses and ... now I have a working display on the T1040RDB!

0 Kudos