summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/target.mk1
-rw-r--r--target/linux/sparc/Makefile18
-rw-r--r--target/linux/sparc/config-default193
-rw-r--r--target/linux/sparc/image/Makefile20
-rw-r--r--toolchain/Config.in1
-rw-r--r--toolchain/gcc/Config.in1
-rw-r--r--toolchain/gcc/Config.version3
-rw-r--r--toolchain/gcc/common.mk4
-rw-r--r--toolchain/uClibc/config-0.9.30.1/sparc8
-rw-r--r--toolchain/uClibc/config-0.9.31/sparc8
-rw-r--r--toolchain/uClibc/config-0.9.32/sparc8
11 files changed, 265 insertions, 0 deletions
diff --git a/include/target.mk b/include/target.mk
index 9744a7c..5b7b047 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -164,6 +164,7 @@ ifeq ($(DUMP),1)
DEFAULT_CFLAGS_mipsel=$(DEFAULT_CFLAGS_mips)
DEFAULT_CFLAGS_mips64=-Os -pipe -mips64 -mtune=mips64 -mabi=64 -funit-at-a-time
DEFAULT_CFLAGS_mips64el=$(DEFAULT_CFLAGS_mips64)
+ DEFAULT_CFLAGS_sparc=-Os -pipe -mcpu=ultrasparc -funit-at-a-time
DEFAULT_CFLAGS_arm=-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time
DEFAULT_CFLAGS_armeb=$(DEFAULT_CFLAGS_arm)
DEFAULT_CFLAGS=$(if $(DEFAULT_CFLAGS_$(ARCH)),$(DEFAULT_CFLAGS_$(ARCH)),-Os -pipe -funit-at-a-time)
diff --git a/target/linux/sparc/Makefile b/target/linux/sparc/Makefile
new file mode 100644
index 0000000..465bd57
--- /dev/null
+++ b/target/linux/sparc/Makefile
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=sparc
+BOARD:=sparc
+BOARDNAME:=Sun UltraSPARC
+FEATURES+=fpu tgz
+
+LINUX_VERSION:=2.6.36
+
+include $(INCLUDE_DIR)/target.mk
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/sparc/config-default b/target/linux/sparc/config-default
new file mode 100644
index 0000000..0536c8d
--- /dev/null
+++ b/target/linux/sparc/config-default
@@ -0,0 +1,193 @@
+CONFIG_64BIT=y
+CONFIG_ARCH_DEFCONFIG="arch/sparc/configs/sparc64_defconfig"
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_ARPD is not set
+CONFIG_ATA=y
+CONFIG_AUDIT_ARCH=y
+# CONFIG_BBC_I2C is not set
+CONFIG_BITS=64
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLOCK_COMPAT=y
+# CONFIG_BRIDGE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_COMPAT=y
+CONFIG_COMPAT_BINFMT_ELF=y
+CONFIG_COMPAT_BRK=y
+CONFIG_COMPAT_NETLINK_MESSAGES=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DECOMPRESS_LZMA=y
+# CONFIG_DISPLAY7SEG is not set
+CONFIG_DNOTIFY=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EARLYFB=y
+CONFIG_ELF_CORE=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_ENVCTRL is not set
+CONFIG_FB=y
+# CONFIG_FB_SBUS is not set
+# CONFIG_FB_SM7XX is not set
+# CONFIG_FB_XGI is not set
+# CONFIG_FB_XVR1000 is not set
+# CONFIG_FB_XVR2500 is not set
+# CONFIG_FB_XVR500 is not set
+# CONFIG_FIRMWARE_EDID is not set
+CONFIG_FIRMWARE_IN_KERNEL=y
+# CONFIG_FONTS is not set
+# CONFIG_FONT_SUN12x22 is not set
+CONFIG_FONT_SUN8x16=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_GENERIC_ACL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+# CONFIG_GRETH is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_HAPPYMEAL=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HAVE_SYSCALL_WRAPPERS=y
+CONFIG_HID=m
+CONFIG_HID_SUPPORT=y
+# CONFIG_HUGETLBFS is not set
+CONFIG_HW_CONSOLE=y
+CONFIG_HZ=250
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+CONFIG_INOTIFY_USER=y
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_POLLDEV=y
+# CONFIG_INPUT_SPARCSPKR is not set
+CONFIG_IOMMU_HELPER=y
+# CONFIG_LEDS_SUNFIRE is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LOCK_KERNEL=y
+# CONFIG_MISC_DEVICES is not set
+# CONFIG_MTD is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+# CONFIG_MYRI_SBUS is not set
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
+CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NR_CPUS=4
+CONFIG_NR_QUICK=1
+# CONFIG_NUMA is not set
+# CONFIG_OBP_FLASH is not set
+CONFIG_OF=y
+CONFIG_OF_DEVICE=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PATA_CMD64X=y
+CONFIG_PCI=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_QUICKLIST=y
+CONFIG_RELAY=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_BQ4802=y
+CONFIG_RTC_DRV_M48T59=y
+CONFIG_RTC_DRV_STARFIRE=y
+CONFIG_RTC_DRV_SUN4V=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_SATA_PMP=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SCHED_HRTICK=y
+# CONFIG_SCHED_MC is not set
+# CONFIG_SCHED_SMT is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SECCOMP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set
+CONFIG_SERIAL_SUNCORE=y
+# CONFIG_SERIAL_SUNHV is not set
+CONFIG_SERIAL_SUNSAB=y
+CONFIG_SERIAL_SUNSAB_CONSOLE=y
+CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
+# CONFIG_SERIAL_SUNZILOG is not set
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+CONFIG_SMP=y
+CONFIG_SPARC=y
+# CONFIG_SPARC32 is not set
+CONFIG_SPARC64=y
+# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
+CONFIG_SPARC64_PAGE_SIZE_8KB=y
+CONFIG_SPARC64_PCI=y
+CONFIG_SPARC64_SMP=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_STOP_MACHINE=y
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUN_LDOMS is not set
+CONFIG_SUN_OPENPROMFS=y
+CONFIG_SUN_OPENPROMIO=y
+CONFIG_SUN_PARTITION=y
+CONFIG_SYSVIPC_COMPAT=y
+# CONFIG_TADPOLE_TS102_UCTRL is not set
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TREE_RCU=y
+CONFIG_UID16=y
+# CONFIG_US3_MC is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+# CONFIG_VLAN_8021Q is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_WATCHDOG is not set
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/sparc/image/Makefile b/target/linux/sparc/image/Makefile
new file mode 100644
index 0000000..314cd6a
--- /dev/null
+++ b/target/linux/sparc/image/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Image/Prepare
+ cp $(LINUX_DIR)/arch/sparc/boot/zImage $(KDIR)/zImage
+endef
+
+define Image/BuildKernel
+ mkdir -p $(BIN_DIR)
+ cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
+# cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
+endef
+
+$(eval $(call BuildImage))
diff --git a/toolchain/Config.in b/toolchain/Config.in
index aaf4f47..a826ff5 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -98,6 +98,7 @@ config EABI_SUPPORT
menuconfig EXTRA_TARGET_ARCH
bool
prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
+ depends !sparc
default y if powerpc64
default n
help
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 56416bd..ed8002c 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -8,6 +8,7 @@ choice
default GCC_VERSION_4_3_3_CS if (mips || mipsel) && !(TARGET_octeon || TARGET_sibyte)
default GCC_VERSION_4_4_5 if (powerpc || ubicom32)
default GCC_VERSION_4_4_5 if (TARGET_omap35xx || TARGET_octeon || TARGET_sibyte)
+ default GCC_VERSION_4_5_1_LINARO if sparc
default GCC_VERSION_4_1_2
help
Select the version of gcc you wish to use.
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 9229122..1c887d2 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -61,4 +61,7 @@ if !TOOLCHAINOPTS
default y if powerpc
default y if ubicom32
+ config GCC_VERSION_4_5_1_LINARO
+ default y if sparc
+
endif
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 59010b5..89c5218 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -154,6 +154,10 @@ ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
endif
+ifdef CONFIG_sparc
+ GCC_CONFIGURE+= --enable-targets=all
+endif
+
ifeq ($(LIBC),uClibc)
GCC_CONFIGURE+= \
--disable-__cxa_atexit
diff --git a/toolchain/uClibc/config-0.9.30.1/sparc b/toolchain/uClibc/config-0.9.30.1/sparc
new file mode 100644
index 0000000..e1596c4
--- /dev/null
+++ b/toolchain/uClibc/config-0.9.30.1/sparc
@@ -0,0 +1,8 @@
+ARCH_BIG_ENDIAN=y
+# CONFIG_SPARC_V7 is not set
+# CONFIG_SPARC_V8 is not set
+CONFIG_SPARC_V9=y
+# CONFIG_SPARC_V9B is not set
+TARGET_ARCH="sparc"
+TARGET_sparc=y
+UCLIBC_HAS_LONG_DOUBLE_MATH=y
diff --git a/toolchain/uClibc/config-0.9.31/sparc b/toolchain/uClibc/config-0.9.31/sparc
new file mode 100644
index 0000000..e1596c4
--- /dev/null
+++ b/toolchain/uClibc/config-0.9.31/sparc
@@ -0,0 +1,8 @@
+ARCH_BIG_ENDIAN=y
+# CONFIG_SPARC_V7 is not set
+# CONFIG_SPARC_V8 is not set
+CONFIG_SPARC_V9=y
+# CONFIG_SPARC_V9B is not set
+TARGET_ARCH="sparc"
+TARGET_sparc=y
+UCLIBC_HAS_LONG_DOUBLE_MATH=y
diff --git a/toolchain/uClibc/config-0.9.32/sparc b/toolchain/uClibc/config-0.9.32/sparc
new file mode 100644
index 0000000..e1596c4
--- /dev/null
+++ b/toolchain/uClibc/config-0.9.32/sparc
@@ -0,0 +1,8 @@
+ARCH_BIG_ENDIAN=y
+# CONFIG_SPARC_V7 is not set
+# CONFIG_SPARC_V8 is not set
+CONFIG_SPARC_V9=y
+# CONFIG_SPARC_V9B is not set
+TARGET_ARCH="sparc"
+TARGET_sparc=y
+UCLIBC_HAS_LONG_DOUBLE_MATH=y