public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] tegra: override compiler flags for cmd_nvedit
@ 2012-05-04 20:29 Allen Martin
  2012-05-05 20:01 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Allen Martin @ 2012-05-04 20:29 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 common/Makefile |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/Makefile b/common/Makefile
index d9f10f3..e1b5307 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -43,6 +43,12 @@ COBJS-y += cmd_help.o
 COBJS-y += cmd_nvedit.o
 COBJS-y += cmd_version.o
 
+# tegra calls getenv_ulong() from the context of the arm7tdmi processor
+# so this needs to be compiled armv4t on tegra
+ifneq ($(CONFIG_MACH_TEGRA_GENERIC),)
+CFLAGS_common/cmd_nvedit.o += -march=armv4t
+endif
+
 # environment
 COBJS-y += env_common.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-14 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04 20:29 [U-Boot] [PATCH] tegra: override compiler flags for cmd_nvedit Allen Martin
2012-05-05 20:01 ` Wolfgang Denk
2012-05-07 16:36   ` Allen Martin
2012-05-14  5:24     ` Mike Frysinger
2012-05-14 19:39       ` Allen Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox