[PATCH 1/7] add AVR32 architecture to kbuild
Hans-Christian Egtvedt
hcegtvedt at atmel.com
Mon Nov 5 23:50:04 PST 2007
This patch adds AVR32 to the kbuild system.
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt at atmel.com>
---
diff --git a/Rules.mak b/Rules.mak
index 0197fa3..9f60273 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -317,6 +317,12 @@ ifeq ($(TARGET_ARCH),frv)
UCLIBC_LDSO=ld.so.1
endif
+ifeq ($(strip $(TARGET_ARCH)),avr32)
+ CPU_CFLAGS-$(CONFIG_AVR32_AP7) += -march=ap
+ CPU_CFLAGS-$(CONFIG_LINKRELAX) += -mrelax
+ CPU_LDFLAGS-$(CONFIG_LINKRELAX) += --relax
+endif
+
# Keep the check_gcc from being needlessly executed
ifndef PIEFLAG
ifneq ($(UCLIBC_BUILD_PIE),y)
diff --git a/extra/Configs/Config.avr32 b/extra/Configs/Config.avr32
new file mode 100644
index 0000000..8d70e6e
--- /dev/null
+++ b/extra/Configs/Config.avr32
@@ -0,0 +1,31 @@
+#
+# For a description of the syntax of this configuration file,
+# see extra/config/Kconfig-language.txt
+#
+
+config TARGET_ARCH
+ string
+ default "avr32"
+
+config FORCE_OPTIONS_FOR_ARCH
+ bool
+ default y
+ select ARCH_BIG_ENDIAN
+ select FORCE_SHAREABLE_TEXT_SEGMENTS
+
+config ARCH_CFLAGS
+ string
+
+choice
+ prompt "Target CPU Type"
+ default CONFIG_AVR32_AP7
+
+config CONFIG_AVR32_AP7
+ bool "AVR32 AP7"
+ select ARCH_HAS_MMU
+
+endchoice
+
+config LINKRELAX
+ bool "Enable linker optimizations"
+ default y
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 30b4a4c..1ddaeec 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -16,6 +16,9 @@ config TARGET_alpha
config TARGET_arm
bool "arm"
+config TARGET_avr32
+ bool "avr32"
+
config TARGET_bfin
bool "bfin"
@@ -92,6 +95,10 @@ if TARGET_arm
source "extra/Configs/Config.arm"
endif
+if TARGET_avr32
+source "extra/Configs/Config.avr32"
+endif
+
if TARGET_bfin
source "extra/Configs/Config.bfin"
endif
diff --git a/extra/Configs/defconfigs/avr32 b/extra/Configs/defconfigs/avr32
new file mode 100644
index 0000000..0b890a2
--- /dev/null
+++ b/extra/Configs/defconfigs/avr32
@@ -0,0 +1 @@
+TARGET_avr32=y
More information about the uClibc
mailing list