Hello All,
I have a need to enable thumb2 kernel option for kernel built using omap2plus_defconfig. Hence I am trying to find a mechanism to automatically enable the thumb2 kernel config option. I have tried adding the CONFIG_THUMB2_KERNEL=y option to the .config file by
1) Appending it to the end of the .config using the echo CONFIG_THUMB2_KERNEL=y >> output_dir/.config 2) By replacing the CONFIG_ARM_THUMB=y with CONFIG_THUMB2_KERNEL=y option using the sed -ie 's/CONFIG_ARM_THUMB=y/CONFIG_THUMB2_KERNEL=y/g' output_dir/.config
I follow this with the make oldconfig for ex:
yes "" | make ARCH=arm O=output_dir KERNELVERSION=3.0.5-758-g051c523-omap2plus-linaro-omap KERNELRELEASE=3.0.5-758-g051c523-omap2plus-linaro-omap CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Both the above mechanisms work, but once I run oldconfig the .config is getting overwritten and it gets back to the old state.
I am sure there is something which I am missing. Can you let me know the exact steps to overwrite the .config file.
1) I want to be able to overwrite the THUMB option with THUMB2 or add the THUMB2 option ( if existence of both THUMB and THUMB2 in the .config is permissible) 2) What would happen if both the CONFIG_ARM_THUMB=y and CONFIG_THUMB2_KERNEL=y options are present in the .config. Would the kernel be built with CONFIG_ARM_THUMB=y or CONFIG_THUMB2_KERNEL=y ?
Do you have any suggestions to enable the THUMB2 option in a non-interactive way ?
You should use the "config" script inside the scripts directory in the Kernel. Example: (in the kernel root directory) make ARCH=arm CROSS_COMPILE=arm- omap2plus_defconfig scripts/config --enable CONFIG_THUMB2_KERNEL
Regards, Venkat.
On Thu, Oct 20, 2011 at 6:43 PM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
Hello All,
I have a need to enable thumb2 kernel option for kernel built using omap2plus_defconfig. Hence I am trying to find a mechanism to automatically enable the thumb2 kernel config option. I have tried adding the CONFIG_THUMB2_KERNEL=y option to the .config file by
- Appending it to the end of the .config using the echo
CONFIG_THUMB2_KERNEL=y >> output_dir/.config 2) By replacing the CONFIG_ARM_THUMB=y with CONFIG_THUMB2_KERNEL=y option using the sed -ie 's/CONFIG_ARM_THUMB=y/CONFIG_THUMB2_KERNEL=y/g' output_dir/.config
I follow this with the make oldconfig for ex:
yes "" | make ARCH=arm O=output_dir KERNELVERSION=3.0.5-758-g051c523-omap2plus-linaro-omap KERNELRELEASE=3.0.5-758-g051c523-omap2plus-linaro-omap CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Both the above mechanisms work, but once I run oldconfig the .config is getting overwritten and it gets back to the old state.
I am sure there is something which I am missing. Can you let me know the exact steps to overwrite the .config file.
- I want to be able to overwrite the THUMB option with THUMB2 or add the
THUMB2 option ( if existence of both THUMB and THUMB2 in the .config is permissible) 2) What would happen if both the CONFIG_ARM_THUMB=y and CONFIG_THUMB2_KERNEL=y options are present in the .config. Would the kernel be built with CONFIG_ARM_THUMB=y or CONFIG_THUMB2_KERNEL=y ?
Do you have any suggestions to enable the THUMB2 option in a non-interactive way ?
-- 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/#%21/linaroorg - http://www.linaro.org/linaro-blog
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
Cool new trick!
However, this won't retain the THUMB2 config upon running oldconfig again, since ARCH_OMAP2 and THUMB2 can't coexist.
So we'd have to do,
scripts/config --disable CONFIG_ARCH_OMAP2 scripts/config --enable CONFIG_THUMB2_KERNEL.
So my original set of instructions becomes,
make ARCH=arm CROSS_COMPILE=arm- omap2plus_defconfig scripts/config --disable CONFIG_ARCH_OMAP2 scripts/config --enable CONFIG_THUMB2_KERNEL yes "" | make ARCH=arm oldconfig grep THUMB2 .config
/Amit On Thu, Oct 20, 2011 at 11:04 PM, S, Venkatraman svenkatr@ti.com wrote:
You should use the "config" script inside the scripts directory in the Kernel. Example: (in the kernel root directory) make ARCH=arm CROSS_COMPILE=arm- omap2plus_defconfig scripts/config --enable CONFIG_THUMB2_KERNEL
Regards, Venkat.
On Thu, Oct 20, 2011 at 6:43 PM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
Hello All,
I have a need to enable thumb2 kernel option for kernel built using omap2plus_defconfig. Hence I am trying to find a mechanism to automatically enable the thumb2 kernel config option. I have tried adding the CONFIG_THUMB2_KERNEL=y option to the .config file by
- Appending it to the end of the .config using the echo
CONFIG_THUMB2_KERNEL=y >> output_dir/.config 2) By replacing the CONFIG_ARM_THUMB=y with CONFIG_THUMB2_KERNEL=y option using the sed -ie 's/CONFIG_ARM_THUMB=y/CONFIG_THUMB2_KERNEL=y/g' output_dir/.config
I follow this with the make oldconfig for ex:
yes "" | make ARCH=arm O=output_dir KERNELVERSION=3.0.5-758-g051c523-omap2plus-linaro-omap KERNELRELEASE=3.0.5-758-g051c523-omap2plus-linaro-omap CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Both the above mechanisms work, but once I run oldconfig the .config is getting overwritten and it gets back to the old state.
I am sure there is something which I am missing. Can you let me know the exact steps to overwrite the .config file.
- I want to be able to overwrite the THUMB option with THUMB2 or add the
THUMB2 option ( if existence of both THUMB and THUMB2 in the .config is permissible) 2) What would happen if both the CONFIG_ARM_THUMB=y and CONFIG_THUMB2_KERNEL=y options are present in the .config. Would the kernel be built with CONFIG_ARM_THUMB=y or CONFIG_THUMB2_KERNEL=y ?
Do you have any suggestions to enable the THUMB2 option in a non-interactive way ?
-- 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/#%21/linaroorg - http://www.linaro.org/linaro-blog
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
On 11 Oct 20, Deepti Kalakeri wrote:
Hello All,
I have a need to enable thumb2 kernel option for kernel built using omap2plus_defconfig. Hence I am trying to find a mechanism to automatically enable the thumb2 kernel config option. I have tried adding the CONFIG_THUMB2_KERNEL=y option to the .config file by
- Appending it to the end of the .config using the echo
CONFIG_THUMB2_KERNEL=y >> output_dir/.config 2) By replacing the CONFIG_ARM_THUMB=y with CONFIG_THUMB2_KERNEL=y option using the sed -ie 's/CONFIG_ARM_THUMB=y/CONFIG_THUMB2_KERNEL=y/g' output_dir/.config
I follow this with the make oldconfig for ex:
yes "" | make ARCH=arm O=output_dir KERNELVERSION=3.0.5-758-g051c523-omap2plus-linaro-omap KERNELRELEASE=3.0.5-758-g051c523-omap2plus-linaro-omap CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Both the above mechanisms work, but once I run oldconfig the .config is getting overwritten and it gets back to the old state.
You can't just enable THUMB2 when other config options that prevent THUMB2 (such as CPU_V6) are enabled.
I tried this with the make omap2plus_defconfig, followed by make menuconfig to do interactive selection of THUMB2. For this, I first had to disable CPU_V6 (by disabling OMAP2 support), for the THUMB2 to be selectable.
The diff between the resulting .config and omap2plus_defconfig is at http://paste.ubuntu.com/714378/
See below on how to achieve this non-interactively.
I am sure there is something which I am missing. Can you let me know the exact steps to overwrite the .config file.
- I want to be able to overwrite the THUMB option with THUMB2 or add the
THUMB2 option ( if existence of both THUMB and THUMB2 in the .config is permissible) 2) What would happen if both the CONFIG_ARM_THUMB=y and CONFIG_THUMB2_KERNEL=y options are present in the .config. Would the kernel be built with CONFIG_ARM_THUMB=y or CONFIG_THUMB2_KERNEL=y ?
Do you have any suggestions to enable the THUMB2 option in a non-interactive way ?
Try the following:
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
/Amit
On Thu, Oct 20, 2011 at 11:30 PM, Amit Kucheria amit.kucheria@linaro.orgwrote:
On 11 Oct 20, Deepti Kalakeri wrote:
Hello All,
I have a need to enable thumb2 kernel option for kernel built using omap2plus_defconfig. Hence I am trying to find a mechanism to automatically enable the thumb2 kernel config option. I have tried adding the CONFIG_THUMB2_KERNEL=y option to the .config file
by
- Appending it to the end of the .config using the echo
CONFIG_THUMB2_KERNEL=y >> output_dir/.config 2) By replacing the CONFIG_ARM_THUMB=y with CONFIG_THUMB2_KERNEL=y
option
using the sed -ie 's/CONFIG_ARM_THUMB=y/CONFIG_THUMB2_KERNEL=y/g' output_dir/.config
I follow this with the make oldconfig for ex:
yes "" | make ARCH=arm O=output_dir KERNELVERSION=3.0.5-758-g051c523-omap2plus-linaro-omap KERNELRELEASE=3.0.5-758-g051c523-omap2plus-linaro-omap CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Both the above mechanisms work, but once I run oldconfig the .config is getting overwritten and it gets back to the old state.
You can't just enable THUMB2 when other config options that prevent THUMB2 (such as CPU_V6) are enabled.
I tried this with the make omap2plus_defconfig, followed by make menuconfig to do interactive selection of THUMB2. For this, I first had to disable CPU_V6 (by disabling OMAP2 support), for the THUMB2 to be selectable.
The diff between the resulting .config and omap2plus_defconfig is at http://paste.ubuntu.com/714378/
See below on how to achieve this non-interactively.
I am sure there is something which I am missing. Can you let me know the exact steps to overwrite the .config file.
- I want to be able to overwrite the THUMB option with THUMB2 or add the
THUMB2 option ( if existence of both THUMB and THUMB2 in the .config is permissible) 2) What would happen if both the CONFIG_ARM_THUMB=y and CONFIG_THUMB2_KERNEL=y options are present in the .config. Would the kernel be built with CONFIG_ARM_THUMB=y or CONFIG_THUMB2_KERNEL=y ?
Do you have any suggestions to enable the THUMB2 option in a
non-interactive
way ?
Try the following:
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.
/Amit
On Fri, Oct 21, 2011 at 11:54 AM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
On Thu, Oct 20, 2011 at 11:30 PM, Amit Kucheria amit.kucheria@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.
Cheers ---Dave
Hello Dave,
On Mon, Oct 24, 2011 at 10:51 PM, Dave Martin dave.martin@linaro.orgwrote:
On Fri, Oct 21, 2011 at 11:54 AM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
On Thu, Oct 20, 2011 at 11:30 PM, Amit Kucheria <
amit.kucheria@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
On Tue, Oct 25, 2011 at 1:16 PM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
Hello Dave,
On Mon, Oct 24, 2011 at 10:51 PM, Dave Martin dave.martin@linaro.org wrote:
On Fri, Oct 21, 2011 at 11:54 AM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
[...]
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 ?
This is a know proble with ARMv6 and ARMv7 kernel build together. When you disable OMAP2, you basically disable ARMV6 and then kernel is build only for ARMV7 based machines. That works.
Last time when I looked at the code, there was an issue with TLB operations. I haven't looked at it after that.
Regards Santosh
On Tue, Oct 25, 2011 at 01:56:13PM +0530, Shilimkar, Santosh wrote:
On Tue, Oct 25, 2011 at 1:16 PM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
Hello Dave,
On Mon, Oct 24, 2011 at 10:51 PM, Dave Martin dave.martin@linaro.org wrote:
On Fri, Oct 21, 2011 at 11:54 AM, Deepti Kalakeri deepti.kalakeri@linaro.org wrote:
[...]
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 ?
This is a know proble with ARMv6 and ARMv7 kernel build together. When you disable OMAP2, you basically disable ARMV6 and then kernel is build only for ARMV7 based machines. That works.
Last time when I looked at the code, there was an issue with TLB operations. I haven't looked at it after that.
For the upstream tree, the fix for the issue is present in linux-linaro-3.0 and linux-linaro-3.1. Russell has accepted the fix and is should be in v3.2-rc1. So CONFIG_ARCH_OMAP2=n should only be needed temporarily, until the tree under test has been rebased. Maybe that has happened already.
I don't know anything about an issue with TLB operations -- do you have any more details on that?
---Dave
linaro-kernel@lists.linaro.org