aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/malta
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/malta')
-rw-r--r--target/linux/malta/Makefile24
-rw-r--r--target/linux/malta/README13
-rw-r--r--target/linux/malta/base-files/etc/inittab7
-rw-r--r--target/linux/malta/be/config-default2
-rw-r--r--target/linux/malta/be/target.mk10
-rw-r--r--target/linux/malta/config-3.3296
-rw-r--r--target/linux/malta/image/Makefile23
-rw-r--r--target/linux/malta/le/target.mk10
-rw-r--r--target/linux/malta/patches-3.3/001-remove_unused_perf_function.patch14
9 files changed, 399 insertions, 0 deletions
diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
new file mode 100644
index 000000000..172aeeca8
--- /dev/null
+++ b/target/linux/malta/Makefile
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2010-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+BOARD:=malta
+BOARDNAME:=MIPS Malta CoreLV board (qemu)
+CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
+SUBTARGETS:=le be
+INITRAMFS_EXTRA_FILES:=
+MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+
+LINUX_VERSION:=3.3.8
+
+DEVICE_TYPE:=developerboard
+
+include $(INCLUDE_DIR)/target.mk
+
+DEFAULT_PACKAGES += wpad-mini kmod-mac80211-hwsim kmod-pcnet32
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/malta/README b/target/linux/malta/README
new file mode 100644
index 000000000..624d5703b
--- /dev/null
+++ b/target/linux/malta/README
@@ -0,0 +1,13 @@
+This Malta target is intended to be used with the Qemu emulator. It can be used
+to prototype an OpenWrt firmware for MIPS processors. One could also use it to
+troubleshoot MIPS applications without access to real hardware.
+
+To use the images built by OpenWrt with qemu, use the following commands:
+
+For the little-endian image:
+qemu-system-mipsel -kernel bin/malta/openwrt-malta-le-vmlinux.elf -nographic -m 256
+
+For the big-endian image:
+qemu-system-mips -kernel bin/malta/openwrt-malta-be-vmlinux.elf -nographic -m 256
+
+and enjoy the system bootin.
diff --git a/target/linux/malta/base-files/etc/inittab b/target/linux/malta/base-files/etc/inittab
new file mode 100644
index 000000000..88567b245
--- /dev/null
+++ b/target/linux/malta/base-files/etc/inittab
@@ -0,0 +1,7 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+tts/0::askfirst:/bin/ash --login
+ttyS0::askfirst:/bin/ash --login
+ttyS1::askfirst:/bin/ash --login
+ttyS2::askfirst:/bin/ash --login
+tty1::askfirst:/bin/ash --login
diff --git a/target/linux/malta/be/config-default b/target/linux/malta/be/config-default
new file mode 100644
index 000000000..ccc0ba4eb
--- /dev/null
+++ b/target/linux/malta/be/config-default
@@ -0,0 +1,2 @@
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
diff --git a/target/linux/malta/be/target.mk b/target/linux/malta/be/target.mk
new file mode 100644
index 000000000..681bba881
--- /dev/null
+++ b/target/linux/malta/be/target.mk
@@ -0,0 +1,10 @@
+ARCH:=mips
+ARCH_PACKAGES:=malta_mips
+SUBTARGET:=be
+BOARDNAME:=Big Endian
+FEATURES:=ramdisk
+
+define Target/Description
+ Build BE firmware images for MIPS Malta CoreLV board running in
+ big-endian mode
+endef
diff --git a/target/linux/malta/config-3.3 b/target/linux/malta/config-3.3
new file mode 100644
index 000000000..701d5ca6c
--- /dev/null
+++ b/target/linux/malta/config-3.3
@@ -0,0 +1,296 @@
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_DISCARD_MEMBLOCK=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+# CONFIG_ARPD is not set
+CONFIG_AX88796=m
+# CONFIG_AX88796_93CX6 is not set
+CONFIG_BCMA_POSSIBLE=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSGLIB=y
+# CONFIG_BLK_DEV_DM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BOARD_SCACHE=y
+CONFIG_BONDING=m
+CONFIG_BOOT_ELF32=y
+CONFIG_BOUNCE=y
+CONFIG_BROADCOM_PHY=m
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_R4K_LIB=y
+CONFIG_CICADA_PHY=m
+CONFIG_CLKBLD_I8253=y
+CONFIG_CLKEVT_I8253=y
+CONFIG_CLKSRC_I8253=y
+# CONFIG_CLS_U32_MARK is not set
+# CONFIG_CLS_U32_PERF is not set
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_HAS_PREFETCH=y
+# CONFIG_CPU_HAS_SMARTMIPS is not set
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+# CONFIG_CPU_MIPS64_R1 is not set
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_RM7000 is not set
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_PCOMP2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CSRC_R4K=y
+CONFIG_CSRC_R4K_LIB=y
+CONFIG_DAVICOM_PHY=m
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_ZBOOT is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+CONFIG_DEVKMEM=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DNOTIFY=y
+CONFIG_DUMMY=m
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ELF_CORE=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_EQUALIZER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_PCI_IOMAP=y
+# CONFIG_HAMRADIO is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_C_RECORDMCOUNT=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_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_IRQ_WORK=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PCSPKR_PLATFORM=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_HAS_PCI=y
+CONFIG_HW_PERF_EVENTS=y
+CONFIG_HW_RANDOM=m
+CONFIG_I8253=y
+CONFIG_I8253_LOCK=y
+CONFIG_I8259=y
+CONFIG_ICPLUS_PHY=m
+CONFIG_IMAGE_CMDLINE_HACK=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+CONFIG_INPUT=y
+# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_IPC_NS=y
+# CONFIG_IP_MROUTE is not set
+CONFIG_IP_ROUTE_CLASSID=y
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_GIC=y
+CONFIG_IRQ_WORK=y
+CONFIG_ISA_DMA_API=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+# CONFIG_JFFS2_SUMMARY is not set
+CONFIG_KALLSYMS=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LIB80211=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_LXT_PHY=m
+CONFIG_MACVLAN=m
+CONFIG_MARVELL_PHY=m
+CONFIG_MD=y
+CONFIG_MDIO_BITBANG=m
+CONFIG_MDIO_BOARDINFO=y
+CONFIG_MIPS=y
+CONFIG_MIPS_BOARDS_GEN=y
+CONFIG_MIPS_BONITO64=y
+# CONFIG_MIPS_CMP is not set
+CONFIG_MIPS_CPU_SCACHE=y
+CONFIG_MIPS_EXTERNAL_TIMER=y
+CONFIG_MIPS_L1_CACHE_SHIFT=6
+# CONFIG_MIPS_MACHINE is not set
+CONFIG_MIPS_MALTA=y
+CONFIG_MIPS_MSC=y
+CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_DISABLED is not set
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_VPE_LOADER is not set
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MTD_CFI_STAA=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_DEBUG is not set
+CONFIG_MTD_UBI_GLUEBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NAMESPACES=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_FLOW=m
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_U32=m
+# CONFIG_NET_NS is not set
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NO_HZ=y
+CONFIG_NR_CPUS=2
+CONFIG_NR_CPUS_DEFAULT_2=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_GT64XXX_PCI0=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYLIB=m
+CONFIG_PID_NS=y
+# CONFIG_PREEMPT_RCU is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_PROC_PAGE_MONITOR=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QSEMI_PHY=m
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_QUOTA_TREE=y
+CONFIG_REALTEK_PHY=m
+CONFIG_RELAY=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_SCSI=y
+CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_NETLINK=y
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SECCOMP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SMSC_PHY=m
+# CONFIG_STAGING is not set
+CONFIG_STOP_MACHINE=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_CPU_MIPS64_R1=y
+CONFIG_SYS_HAS_CPU_NEVADA=y
+CONFIG_SYS_HAS_CPU_RM7000=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS_CMP=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMARTMIPS=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TREE_RCU=y
+CONFIG_TUN=m
+# CONFIG_UBIFS_FS is not set
+CONFIG_USB_ARCH_HAS_XHCI=y
+CONFIG_USB_SUPPORT=y
+# CONFIG_USER_NS is not set
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+CONFIG_UTS_NS=y
+CONFIG_VETH=m
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_VITESSE_PHY=m
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_VXFS_FS=y
+# CONFIG_WATCHDOG is not set
+CONFIG_XPS=y
+CONFIG_XZ_DEC=y
diff --git a/target/linux/malta/image/Makefile b/target/linux/malta/image/Makefile
new file mode 100644
index 000000000..b09bfa349
--- /dev/null
+++ b/target/linux/malta/image/Makefile
@@ -0,0 +1,23 @@
+#
+# 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/BuildKernel
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
+endef
+
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+endef
+
+define Image/Build
+ $(call Image/Build/$(1))
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+endef
+
+$(eval $(call BuildImage))
diff --git a/target/linux/malta/le/target.mk b/target/linux/malta/le/target.mk
new file mode 100644
index 000000000..5b609980b
--- /dev/null
+++ b/target/linux/malta/le/target.mk
@@ -0,0 +1,10 @@
+ARCH:=mipsel
+ARCH_PACKAGES:=malta_mipsel
+SUBTARGET:=le
+BOARDNAME:=Little Endian
+FEATURES:=ramdisk
+
+define Target/Description
+ Build LE firmware images for MIPS Malta CoreLV board running in
+ little-endian mode
+endef
diff --git a/target/linux/malta/patches-3.3/001-remove_unused_perf_function.patch b/target/linux/malta/patches-3.3/001-remove_unused_perf_function.patch
new file mode 100644
index 000000000..dd538343a
--- /dev/null
+++ b/target/linux/malta/patches-3.3/001-remove_unused_perf_function.patch
@@ -0,0 +1,14 @@
+--- a/arch/mips/kernel/perf_event_mipsxx.c
++++ b/arch/mips/kernel/perf_event_mipsxx.c
+@@ -162,11 +162,6 @@ static unsigned int counters_total_to_pe
+ return counters >> vpe_shift();
+ }
+
+-static unsigned int counters_per_cpu_to_total(unsigned int counters)
+-{
+- return counters << vpe_shift();
+-}
+-
+ #else /* !CONFIG_MIPS_MT_SMP */
+ #define vpe_id() 0
+