Enabling THUMB2 kernel config option
Deepti Kalakeri
deepti.kalakeri at linaro.org
Tue Oct 25 07:46:48 UTC 2011
Hello Dave,
On Mon, Oct 24, 2011 at 10:51 PM, Dave Martin <dave.martin at linaro.org>wrote:
> On Fri, Oct 21, 2011 at 11:54 AM, Deepti Kalakeri
> <deepti.kalakeri at linaro.org> wrote:
> >
> >
> > On Thu, Oct 20, 2011 at 11:30 PM, Amit Kucheria <
> amit.kucheria at linaro.org>
> > wrote:
>
> [...]
>
> >> make ARCH=arm omap2plus_defconfig
> >> yes "" | make ARCH=arm oldconfig
> >> cp .config /tmp/config
> >> echo "CONFIG_ARCH_OMAP2=n" >> .config
> >> echo "CONFIG_THUMB2_KERNEL=y" >> .config
> >> yes "" | make ARCH=arm oldconfig
> >> grep THUMB2 .config
> >>
> >
> > Thanks Amit. These steps worked for me.
>
> That looks correct. For recent trees, CONFIG_THUMB2_KERNEL=y should be
> enough.
>
> However since Thumb-2 needs ARMv7, for any platform configured to
> include ARMv6 support in the kernel by default, some platform-specific
> config change will be needed to remove support for any v6 platform in
> order for enabling CONFIG_THUMB2_KERNEL to be possible.
>
>
> Note that CONFIG_ARM_THUMB is a completely independent thing from
> CONFIG_THUMB2_KERNEL.
>
> CONFIG_THUMB2_KERNEL=y builds the kernel using the Thumb-2 instruction
> set, but should have no effect on the user/kernel ABI or on what code
> can execute in userspace. This option can only be turned on if the
> kernel is not configured to support any pre-ARMv7 CPUs, since a
> Thumb-2 kernel cannot run on a CPU which doesn't support the Thumb-2
> instruction set.
>
> CONFIG_ARM_THUMB=y enables the execution of Thumb binaries in
> userspace. Without this, Thumb userspace binaries won't work
> preoperly; Linaro (Ubuntu) armel packages for userspace are all built
> in Thumb-2, so In order to execute Linaro filesystems this option must
> always be turned on. This does not cause the kernel to be built in
> Thumb-2. Fortunately, most defconfigs turn this option on by default
> anyway.
>
>
I tried kernel build with "CONFIG_ARCH_OMAP2=n" and the rebooting problem
seems to be fixed.
The config file contained something like this below:
grep THUMB /boot/config-3.0.5-758-g051c523-omap2plus-linaro-omap
CONFIG_ARM_THUMB=y
CONFIG_ARM_THUMBEE=y
# CONFIG_THUMB2_KERNEL is not set
grep "CONFIG_ARCH_OMAP2"
/boot/config-3.0.5-758-g051c523-omap2plus-linaro-omap
CONFIG_ARCH_OMAP2PLUS=y
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
# CONFIG_ARCH_OMAP2 is not set
seems like disabling the OMAP2 Config solves the reboot issue and not by
enabling the THUMB2 option.
So, CONFIG_ARCH_OMAP2 is something which needs to be disabled when we intend
to build a kernel with omap2plus_defconfig ?
What should be the approach for the Kernel CI work, should we build the
kernel by disabling "CONFIG_ARCH_OMAP2" option only?
Or should we have a kernel builds with THUMB2 enabled as well ?
> Cheers
> ---Dave
>
--
Thanks and Regards,
Deepti
Infrastructure Team Member, Linaro Platform Teams
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linaro.org/pipermail/linaro-kernel/attachments/20111025/3f60a995/attachment-0001.html>
More information about the linaro-kernel
mailing list