Patchwork Natty ti-omap4

login
register
mail settings
Submitter Tim Gardner
Date Dec. 9, 2010, 3:49 p.m.
Message ID <4D00FAA3.4000800@canonical.com>
Download mbox | patch
Permalink /patch/74913/
State Accepted
Headers show

Comments

Tim Gardner - Dec. 9, 2010, 3:49 p.m.
On 12/09/2010 08:01 AM, Dechesne, Nicolas wrote:
> bryan,
>
> On Thu, Dec 9, 2010 at 7:48 AM, Bryan Wu<bryan.wu@canonical.com>  wrote:
>
>> For this issue:
>> ---
>>   AS      arch/arm/mach-omap2/omap-headsmp.o
>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:
>> Assembler messages:
>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:36:
>> Error: selected processor does not support ARM mode `smc #0'
>> make[3]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1
>> make[2]: *** [arch/arm/mach-omap2] Error 2
>> make[1]: *** [sub-make] Error 2
>> make[1]: Leaving directory `/build/buildd/linux-ti-omap4-2.6.35'
>> make: ***
>> [/build/buildd/linux-ti-omap4-2.6.35/debian/stamps/stamp-build-omap4]
>> Error 2
>> dpkg-buildpackage: error: debian/rules build gave error exit status 2
>> ---
>> I think it's a issue of compiler, which is gcc 4.5.1 in Natty. When we
>> use gcc 4.5.1 to build 2.6.35 ARM kernel, it pops up. Gcc 4.5.1 can
>> build the 2.6.37 based Linaro kernel without this error.
>>
>
> could we be missing this:
>
> http://marc.info/?l=linux-omap&m=129118316614865&w=2
>
> nicolas
>

No joy. I applied (by hand) the attached patch. I still get these errors:

/home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S: 
Assembler messages:
/home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S:30: 
Error: selected processor does not support ARM mode `smc #0'

rtg
Bryan Wu - Dec. 10, 2010, 12:37 p.m.
On Thu, Dec 9, 2010 at 11:49 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
> On 12/09/2010 08:01 AM, Dechesne, Nicolas wrote:
>>
>> bryan,
>>
>> On Thu, Dec 9, 2010 at 7:48 AM, Bryan Wu<bryan.wu@canonical.com>  wrote:
>>
>>> For this issue:
>>> ---
>>>  AS      arch/arm/mach-omap2/omap-headsmp.o
>>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:
>>> Assembler messages:
>>>
>>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:36:
>>> Error: selected processor does not support ARM mode `smc #0'
>>> make[3]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1
>>> make[2]: *** [arch/arm/mach-omap2] Error 2
>>> make[1]: *** [sub-make] Error 2
>>> make[1]: Leaving directory `/build/buildd/linux-ti-omap4-2.6.35'
>>> make: ***
>>> [/build/buildd/linux-ti-omap4-2.6.35/debian/stamps/stamp-build-omap4]
>>> Error 2
>>> dpkg-buildpackage: error: debian/rules build gave error exit status 2
>>> ---
>>> I think it's a issue of compiler, which is gcc 4.5.1 in Natty. When we
>>> use gcc 4.5.1 to build 2.6.35 ARM kernel, it pops up. Gcc 4.5.1 can
>>> build the 2.6.37 based Linaro kernel without this error.
>>>
>>
>> could we be missing this:
>>
>> http://marc.info/?l=linux-omap&m=129118316614865&w=2
>>
>> nicolas
>>
>
> No joy. I applied (by hand) the attached patch. I still get these errors:
>
> /home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S:
> Assembler messages:
> /home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S:30:
> Error: selected processor does not support ARM mode `smc #0'
>

Oh, I think the patch you post is not completed, should remove one
more line as below:
--
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
+AFLAGS_omap-headsmp.o                  :=-Wa,-march=armv7-a$(plus_sec)
+AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a$(plus_sec)
+
- AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a
--

With this right patch, I can build the kernel natively on my OMAP4
Panda board with Linaro GCC 4.5.1

Thanks,
Tim Gardner - Dec. 10, 2010, 3:50 p.m.
On 12/10/2010 05:37 AM, Bryan Wu wrote:
> On Thu, Dec 9, 2010 at 11:49 PM, Tim Gardner<tim.gardner@canonical.com>  wrote:
>> On 12/09/2010 08:01 AM, Dechesne, Nicolas wrote:
>>>
>>> bryan,
>>>
>>> On Thu, Dec 9, 2010 at 7:48 AM, Bryan Wu<bryan.wu@canonical.com>    wrote:
>>>
>>>> For this issue:
>>>> ---
>>>>   AS      arch/arm/mach-omap2/omap-headsmp.o
>>>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:
>>>> Assembler messages:
>>>>
>>>> /build/buildd/linux-ti-omap4-2.6.35/arch/arm/mach-omap2/omap-headsmp.S:36:
>>>> Error: selected processor does not support ARM mode `smc #0'
>>>> make[3]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1
>>>> make[2]: *** [arch/arm/mach-omap2] Error 2
>>>> make[1]: *** [sub-make] Error 2
>>>> make[1]: Leaving directory `/build/buildd/linux-ti-omap4-2.6.35'
>>>> make: ***
>>>> [/build/buildd/linux-ti-omap4-2.6.35/debian/stamps/stamp-build-omap4]
>>>> Error 2
>>>> dpkg-buildpackage: error: debian/rules build gave error exit status 2
>>>> ---
>>>> I think it's a issue of compiler, which is gcc 4.5.1 in Natty. When we
>>>> use gcc 4.5.1 to build 2.6.35 ARM kernel, it pops up. Gcc 4.5.1 can
>>>> build the 2.6.37 based Linaro kernel without this error.
>>>>
>>>
>>> could we be missing this:
>>>
>>> http://marc.info/?l=linux-omap&m=129118316614865&w=2
>>>
>>> nicolas
>>>
>>
>> No joy. I applied (by hand) the attached patch. I still get these errors:
>>
>> /home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S:
>> Assembler messages:
>> /home/rtg/natty/kern/ubuntu-natty/arch/arm/mach-omap2/omap44xx-smc.S:30:
>> Error: selected processor does not support ARM mode `smc #0'
>>
>
> Oh, I think the patch you post is not completed, should remove one
> more line as below:
> --
> +plus_sec := $(call as-instr,.arch_extension sec,+sec)
> +AFLAGS_omap-headsmp.o                  :=-Wa,-march=armv7-a$(plus_sec)
> +AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a$(plus_sec)
> +
> - AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a
> --
>
> With this right patch, I can build the kernel natively on my OMAP4
> Panda board with Linaro GCC 4.5.1
>
> Thanks,

Doh! stupid copy/paste error. I've uploaded 
linux-ti-omap4_2.6.35-1100.2, so hopefully thats the end of it.

Nicholas, Bryan - thanks for your help.

Patch

From 459e992e5c696c15c333d142da305bfd85bc16d6 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Thu, 9 Dec 2010 08:16:52 -0700
Subject: [PATCH] UBUNTU: [Config] Fix FTBS caused by new binutils

New assemblers need -march=armv7-a+sec on command line or
.arch_extension sec inline to enable use of the smc instruction.

This patch uses as-instr to check the latter to conditionally
enable the former in AFLAGS for files that use smc.

Checked on both old and new binutils to verify that it does
not break old versions.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/arm/mach-omap2/Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6047329..3aa37b0 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -29,6 +29,10 @@  obj-$(CONFIG_HOTPLUG_CPU)		+= omap-hotplug.o
 obj-$(CONFIG_ARCH_OMAP4)		+= omap44xx-smc.o omap4-common.o \
 					   omap4-wakeupgen.o
 
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
+AFLAGS_omap-headsmp.o                  :=-Wa,-march=armv7-a$(plus_sec)
+AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a$(plus_sec)
+
 AFLAGS_omap44xx-smc.o			:=-Wa,-march=armv7-a
 
 # Functions loaded to SRAM
-- 
1.7.0.4