tegra: override compiler flags for cmd_nvedit
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 tegra: override compiler flags for cmd_nvedit
Override -march setting for tegra to -march=armv4t for cmd_nvedit.c
The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there is a call to getenv_ulong() that causes an illegal instruction exception if cmd_nvedit is compiled for armv7.
--- arch/arm/cpu/armv7/tegra2/config.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/tegra2/config.mk +3 -2
@@ -24,10 +24,11 @@ # MA 02111-1307 USA # -# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this -# file with compatible flags +# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build these +# files with compatible flags ifdef CONFIG_TEGRA2 CFLAGS_arch/arm/lib/board.o += -march=armv4t +CFLAGS_common/cmd_nvedit.o += -march=armv4t endif USE_PRIVATE_LIBGCC = yes
Signature · 1 line
1.7.9.5
PATCH 1/1 tegra: override compiler flags for low level init code
In reply to a message not in the archiveOverride -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra.
The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to getenv_ulong() and memset() that cause an illegal instruction exception if compiled for armv7.
--- arch/arm/cpu/armv7/tegra2/config.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/tegra2/config.mk +5 -2
@@ -24,10 +24,13 @@ # MA 02111-1307 USA # -# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this -# file with compatible flags +# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build these +# files with compatible flags ifdef CONFIG_TEGRA2 CFLAGS_arch/arm/lib/board.o += -march=armv4t +CFLAGS_arch/arm/lib/memset.o += -march=armv4t +CFLAGS_lib/string.o += -march=armv4t +CFLAGS_common/cmd_nvedit.o += -march=armv4t endif USE_PRIVATE_LIBGCC = yes
Signature · 1 line
1.7.9.5
PATCH 1/1 tegra: override compiler flags for low level init code
Quoted 10 lines · Allen Martin
Override -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra.
The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to
getenv_ulong()andmemset()that cause an illegal instruction exception if compiled for armv7.Signed-off-by Allen Martin <[email protected]>
(This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The Whistler patches I just sent were tested with this fix in place)
PATCH 1/1 tegra: override compiler flags for low level init code
Quoted 10 lines · Stephen Warren
Quoted 9 lines · Allen Martin
Override -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra.
The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to
getenv_ulong()andmemset()that cause an illegal instruction exception if compiled for armv7.
Quoted 6 lines
Quoted 1 line
Signed-off-by Allen Martin <[email protected]>Tested-by Stephen Warren <[email protected]>(This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The Whistler patches I just sent were tested with this fix in place)
Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use.
-Allen
Signature · 1 line
nvpublic
PATCH 1/1 tegra: override compiler flags for low level init code
Quoted 13 lines · Allen Martin
Quoted 12 lines · Stephen Warren
Quoted 10 lines · Allen Martin
Override -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra.
The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to
getenv_ulong()andmemset()that cause an illegal instruction exception if compiled for armv7.Signed-off-by Allen Martin <[email protected]>
Quoted 8 lines
Quoted 4 lines
Tested-by Stephen Warren <[email protected]>(This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The Whistler patches I just sent were tested with this fix in place)
Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use.
It's been there for a while, I believe, at least in u-boot-tegra/master.
PATCH 1/1 tegra: override compiler flags for low level init code
Quoted 6 lines · Stephen Warren
Quoted 3 lines · Allen Martin
Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use.
It's been there for a while, I believe, at least in u-boot-tegra/master.
Ah you're right sorry, my remote was stale. What's the next merge window to get this into u-boot/master? I imagine other people must be running into this too.
-Allen
Signature · 1 line
nvpublic
PATCH 1/1 tegra: override compiler flags for low level init code
Allen,
Quoted 13 lines
-----Original Message-----
From: Allen Martin [mailto:amartin at nvidia.com]
Sent: Monday, June 04, 2012 11:06 AM
To: Stephen Warren
Cc: Tom Warren; vapier at gentoo.org; wd at denx.de; u-boot at lists.denx.de
Subject: Re: [PATCH] tegra: override compiler flags for low level init codeQuoted 5 lines · Stephen Warren
Quoted 3 lines · Allen Martin
Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use.
Quoted 5 lines
Quoted 1 line
It's been there for a while, I believe, at least in u-boot-tegra/master.
Ah you're right sorry, my remote was stale. What's the next merge window to get this into u-boot/master? I imagine other people must be running into this too.
Sorry, not sure. Adding Wolfgang and Albert - it really depends on them. The pull request that contains this patch went out on Thursday.
Tom
Quoted 4 lines
-Allen
--
nvpublic