summaryrefslogtreecommitdiffstats
path: root/target/linux/malta
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/malta')
-rw-r--r--target/linux/malta/Makefile5
-rw-r--r--target/linux/malta/be/config-default8
-rw-r--r--target/linux/malta/be/target.mk3
-rw-r--r--target/linux/malta/be64/config-default14
-rw-r--r--target/linux/malta/be64/target.mk11
-rw-r--r--target/linux/malta/config-3.8 (renamed from target/linux/malta/config-3.6)32
-rw-r--r--target/linux/malta/image/Makefile22
-rw-r--r--target/linux/malta/le/config-default10
-rw-r--r--target/linux/malta/le/target.mk3
-rw-r--r--target/linux/malta/le64/config-default14
-rw-r--r--target/linux/malta/le64/target.mk11
-rw-r--r--target/linux/malta/patches-3.6/001-MIPS-fix-CBUS-UART-irq.patch34
-rw-r--r--target/linux/malta/patches-3.6/002-MIPS-Malta-fix-build-failure.patch23
13 files changed, 108 insertions, 82 deletions
diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
index 83cf63f27..12a3c263b 100644
--- a/target/linux/malta/Makefile
+++ b/target/linux/malta/Makefile
@@ -8,12 +8,11 @@ include $(TOPDIR)/rules.mk
BOARD:=malta
BOARDNAME:=MIPS Malta CoreLV board (qemu)
-CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
-SUBTARGETS:=le be
+SUBTARGETS:=le be le64 be64
INITRAMFS_EXTRA_FILES:=
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
-LINUX_VERSION:=3.6.8
+LINUX_VERSION:=3.8.12
DEVICE_TYPE:=developerboard
diff --git a/target/linux/malta/be/config-default b/target/linux/malta/be/config-default
index ccc0ba4eb..ed67d802a 100644
--- a/target/linux/malta/be/config-default
+++ b/target/linux/malta/be/config-default
@@ -1,2 +1,10 @@
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
CONFIG_CPU_BIG_ENDIAN=y
# CONFIG_CPU_LITTLE_ENDIAN is not set
+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_MIPS64_R2 is not set
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/malta/be/target.mk b/target/linux/malta/be/target.mk
index 681bba881..90b655c8d 100644
--- a/target/linux/malta/be/target.mk
+++ b/target/linux/malta/be/target.mk
@@ -2,7 +2,8 @@ ARCH:=mips
ARCH_PACKAGES:=malta_mips
SUBTARGET:=be
BOARDNAME:=Big Endian
-FEATURES:=ramdisk
+FEATURES:=ramdisk mips16
+CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
define Target/Description
Build BE firmware images for MIPS Malta CoreLV board running in
diff --git a/target/linux/malta/be64/config-default b/target/linux/malta/be64/config-default
new file mode 100644
index 000000000..373b33d24
--- /dev/null
+++ b/target/linux/malta/be64/config-default
@@ -0,0 +1,14 @@
+# CONFIG_32BIT is not set
+CONFIG_64BIT=y
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+# CONFIG_CPU_MIPS32_R2 is not set
+CONFIG_CPU_MIPS64_R1=y
+# CONFIG_CPU_MIPS64_R2 is not set
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
+# CONFIG_HUGETLBFS is not set
+CONFIG_MIPS32_COMPAT=y
+CONFIG_MIPS32_N32=y
+CONFIG_MIPS32_O32=y
diff --git a/target/linux/malta/be64/target.mk b/target/linux/malta/be64/target.mk
new file mode 100644
index 000000000..30804f4e1
--- /dev/null
+++ b/target/linux/malta/be64/target.mk
@@ -0,0 +1,11 @@
+ARCH:=mips64
+ARCH_PACKAGES:=malta_mips64
+SUBTARGET:=be64
+BOARDNAME:=Big Endian (64-bits)
+CFLAGS:=-Os -pipe -mips64 -mtune=mips64 -fno-caller-saves
+FEATURES:=ramdisk
+
+define Target/Description
+ Build BE firmware images for MIPS Malta CoreLV board running in
+ big-endian and 64-bits mode
+endef
diff --git a/target/linux/malta/config-3.6 b/target/linux/malta/config-3.8
index 522032d3c..edb4cac24 100644
--- a/target/linux/malta/config-3.6
+++ b/target/linux/malta/config-3.8
@@ -31,10 +31,10 @@ CONFIG_CLKSRC_I8253=y
# CONFIG_CLS_U32_PERF is not set
CONFIG_CONSOLE_TRANSLATIONS=y
# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_GENERIC_DUMP_TLB=y
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
@@ -44,27 +44,12 @@ CONFIG_CPU_MIPSR2=y
CONFIG_CPU_MIPSR2_IRQ_EI=y
CONFIG_CPU_MIPSR2_IRQ_VI=y
# CONFIG_CPU_NEVADA is not set
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_R4K_FPU=y
# 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
@@ -76,7 +61,6 @@ 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
@@ -98,6 +82,7 @@ CONFIG_HAS_IOPORT=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -115,6 +100,7 @@ CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_HAVE_PERF_EVENTS=y
@@ -179,13 +165,16 @@ CONFIG_MIPS_MT=y
CONFIG_MIPS_MT_FPAFF=y
CONFIG_MIPS_MT_SMP=y
# CONFIG_MIPS_MT_SMTC is not set
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
# CONFIG_MIPS_VPE_LOADER is not set
+CONFIG_MODULES_USE_ELF_REL=y
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_BEB_LIMIT=20
+# CONFIG_MTD_UBI_FASTMAP is not set
CONFIG_MTD_UBI_GLUEBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MUTEX_SPIN_ON_OWNER=y
@@ -277,11 +266,14 @@ CONFIG_SYS_SUPPORTS_SMARTMIPS=y
CONFIG_SYS_SUPPORTS_SMP=y
CONFIG_SYS_SUPPORTS_ZBOOT=y
# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_TREE_RCU=y
CONFIG_TUN=m
# CONFIG_UBIFS_FS is not set
+CONFIG_UIDGID_CONVERTED=y
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
diff --git a/target/linux/malta/image/Makefile b/target/linux/malta/image/Makefile
index b09bfa349..c0e520fbe 100644
--- a/target/linux/malta/image/Makefile
+++ b/target/linux/malta/image/Makefile
@@ -7,8 +7,30 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
+define get_kernel_entry
+0x$(shell $(TARGET_CROSS)nm $(1) 2>/dev/null | grep " kernel_entry" | cut -f1 -d ' ')
+endef
+
+define CompressLzma
+ $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(2)
+endef
+
+define CompressGzip
+ gzip -9 -c $(1) > $(2)
+endef
+
+define MkuImage
+ mkimage -A mips -O linux -T kernel -a 0x80100000 -C $(1) $(2) \
+ -e $(call get_kernel_entry,$(LINUX_DIR)/vmlinux) -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
+ -d $(3) $(4)
+endef
+
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
+ $(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
+ $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(BIN_DIR)/$(IMG_PREFIX)-uImage-lzma)
+ $(call CompressGzip,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.gz)
+ $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(BIN_DIR)/$(IMG_PREFIX)-uImage-gzip)
endef
define Image/Build/squashfs
diff --git a/target/linux/malta/le/config-default b/target/linux/malta/le/config-default
new file mode 100644
index 000000000..368eca098
--- /dev/null
+++ b/target/linux/malta/le/config-default
@@ -0,0 +1,10 @@
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
+# CONFIG_CPU_BIG_ENDIAN is not set
+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_MIPS64_R2 is not set
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/malta/le/target.mk b/target/linux/malta/le/target.mk
index 5b609980b..3b6e8953d 100644
--- a/target/linux/malta/le/target.mk
+++ b/target/linux/malta/le/target.mk
@@ -2,7 +2,8 @@ ARCH:=mipsel
ARCH_PACKAGES:=malta_mipsel
SUBTARGET:=le
BOARDNAME:=Little Endian
-FEATURES:=ramdisk
+FEATURES:=ramdisk mips16
+CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
define Target/Description
Build LE firmware images for MIPS Malta CoreLV board running in
diff --git a/target/linux/malta/le64/config-default b/target/linux/malta/le64/config-default
new file mode 100644
index 000000000..2526b07ca
--- /dev/null
+++ b/target/linux/malta/le64/config-default
@@ -0,0 +1,14 @@
+# CONFIG_32BIT is not set
+CONFIG_64BIT=y
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_CPU_MIPS32_R1 is not set
+# CONFIG_CPU_MIPS32_R2 is not set
+CONFIG_CPU_MIPS64=y
+CONFIG_CPU_MIPS64_R1=y
+# CONFIG_CPU_MIPS64_R2 is not set
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
+# CONFIG_HUGETLBFS is not set
+CONFIG_MIPS32_COMPAT=y
+CONFIG_MIPS32_N32=y
+CONFIG_MIPS32_O32=y
diff --git a/target/linux/malta/le64/target.mk b/target/linux/malta/le64/target.mk
new file mode 100644
index 000000000..bd5c63619
--- /dev/null
+++ b/target/linux/malta/le64/target.mk
@@ -0,0 +1,11 @@
+ARCH:=mips64el
+ARCH_PACKAGES:=malta_mipsel64
+SUBTARGET:=le64
+BOARDNAME:=Little Endian (64-bits)
+CFLAGS:=-Os -pipe -mips64 -mtune=mips64 -fno-caller-saves
+FEATURES:=ramdisk
+
+define Target/Description
+ Build LE firmware images for MIPS Malta CoreLV board running in
+ little-endian and 64-bits mode.
+endef
diff --git a/target/linux/malta/patches-3.6/001-MIPS-fix-CBUS-UART-irq.patch b/target/linux/malta/patches-3.6/001-MIPS-fix-CBUS-UART-irq.patch
deleted file mode 100644
index 347dcc0d1..000000000
--- a/target/linux/malta/patches-3.6/001-MIPS-fix-CBUS-UART-irq.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 132a7253fe87b1f4d71aab5abee3108a793234db Mon Sep 17 00:00:00 2001
-From: Ralf Baechle <ralf@linux-mips.org>
-Date: Tue, 13 Nov 2012 10:41:50 +0100
-Subject: [PATCH] MIPS: Malta: Fix interupt number of CBUS UART.
-
-The CBUS UART's interrupt number was wrong conflicting with the interrupt
-being tied to the Intel PIIX4. Since the PIIX4's interrupt is registered
-before the CBUS UART which is not being used on most systems this would
-not be noticed.
-
-Attempts to open the ttyS2 CBUS UART would result in:
-
-genirq: Flags mismatch irq 18. 00000000 (serial) vs. 00010000 (XT-PIC cascade)
-serial_link_irq_chain: request failed: -16 for irq: 18
-
-Qemu was written to match the kernel so will need to be fixed also.
-
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-(cherry picked from commit fe2ccd4dcebd3c5e264af1705bb9b659972418cc)
----
- arch/mips/mti-malta/malta-platform.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/mti-malta/malta-platform.c
-+++ b/arch/mips/mti-malta/malta-platform.c
-@@ -48,7 +48,7 @@ static struct plat_serial8250_port uart8
- SMC_PORT(0x2F8, 3),
- {
- .mapbase = 0x1f000900, /* The CBUS UART */
-- .irq = MIPS_CPU_IRQ_BASE + 2,
-+ .irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
- .uartclk = 3686400, /* Twice the usual clk! */
- .iotype = UPIO_MEM32,
- .flags = CBUS_UART_FLAGS,
diff --git a/target/linux/malta/patches-3.6/002-MIPS-Malta-fix-build-failure.patch b/target/linux/malta/patches-3.6/002-MIPS-Malta-fix-build-failure.patch
deleted file mode 100644
index 636265239..000000000
--- a/target/linux/malta/patches-3.6/002-MIPS-Malta-fix-build-failure.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 4ade440f81a3c248068d8b89eea7754cc8705b58 Mon Sep 17 00:00:00 2001
-From: Ralf Baechle <ralf@linux-mips.org>
-Date: Tue, 13 Nov 2012 14:33:30 +0100
-Subject: [PATCH] MIPS: Malta: Fix build error
-
-Caused by fe2ccd4dcebd3c5e264af1705bb9b659972418cc [MIPS: Malta: Fix
-interupt number of CBUS UART.]
-
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/mti-malta/malta-platform.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/mips/mti-malta/malta-platform.c
-+++ b/arch/mips/mti-malta/malta-platform.c
-@@ -29,6 +29,7 @@
- #include <linux/mtd/partitions.h>
- #include <linux/mtd/physmap.h>
- #include <linux/platform_device.h>
-+#include <asm/mips-boards/maltaint.h>
- #include <mtd/mtd-abi.h>
-
- #define SMC_PORT(base, int) \