[U-Boot] [PATCH] tegra: override compiler flags for cmd_nvedit
Allen Martin
amartin at nvidia.com
Fri May 4 22:29:40 CEST 2012
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 at 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
More information about the U-Boot
mailing list