summaryrefslogtreecommitdiff
path: root/target/linux/rb532
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/rb532')
-rw-r--r--target/linux/rb532/Makefile19
-rw-r--r--target/linux/rb532/base-files.mk11
-rw-r--r--target/linux/rb532/base-files/etc/config/network25
-rw-r--r--target/linux/rb532/base-files/etc/diag.sh17
-rwxr-xr-xtarget/linux/rb532/base-files/sbin/cf2nand67
-rwxr-xr-xtarget/linux/rb532/base-files/sbin/wget2nand71
-rw-r--r--target/linux/rb532/config-3.10147
-rw-r--r--target/linux/rb532/image/Makefile72
-rwxr-xr-xtarget/linux/rb532/image/gen_image.sh17
-rw-r--r--target/linux/rb532/modules.mk45
-rw-r--r--target/linux/rb532/patches-3.10/001-cmdline_hack.patch20
-rw-r--r--target/linux/rb532/patches-3.10/002-rb532_nand_fixup.patch47
-rw-r--r--target/linux/rb532/patches-3.10/003-MIPS-rc32434-fix-broken-pci-init.patch37
-rw-r--r--target/linux/rb532/patches-3.10/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch11
-rw-r--r--target/linux/rb532/src/patch-cmdline.c79
15 files changed, 0 insertions, 685 deletions
diff --git a/target/linux/rb532/Makefile b/target/linux/rb532/Makefile
deleted file mode 100644
index 3fda24b..0000000
--- a/target/linux/rb532/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-ARCH:=mipsel
-BOARD:=rb532
-BOARDNAME:=Mikrotik RouterBoard 532
-FEATURES:=pci targz
-
-LINUX_VERSION:=3.10.49
-
-include $(INCLUDE_DIR)/target.mk
-DEFAULT_PACKAGES += wpad-mini kmod-madwifi kmod-input-rb532
-
-$(eval $(call BuildTarget))
diff --git a/target/linux/rb532/base-files.mk b/target/linux/rb532/base-files.mk
deleted file mode 100644
index afd1220..0000000
--- a/target/linux/rb532/base-files.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-define Build/Compile
- $(call Build/Compile/Default)
- $(TARGET_CC) -o $(PKG_BUILD_DIR)/patch-cmdline $(PLATFORM_DIR)/src/patch-cmdline.c
-endef
-
-define Package/base-files/install-target
- mkdir -p $(1)/sbin
- $(CP) $(PKG_BUILD_DIR)/patch-cmdline $(1)/sbin
-endef
-
-
diff --git a/target/linux/rb532/base-files/etc/config/network b/target/linux/rb532/base-files/etc/config/network
deleted file mode 100644
index 1153799..0000000
--- a/target/linux/rb532/base-files/etc/config/network
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2006 OpenWrt.org
-
-config interface loopback
- option ifname lo
- option proto static
- option ipaddr 127.0.0.1
- option netmask 255.0.0.0
-
-config interface wan
- option ifname eth0
- option proto dhcp
-
-config interface lan
- option ifname eth2
- option proto static
- option ipaddr 192.168.1.1
- option netmask 255.255.255.0
- option ip6assign 60
-
-config interface wan6
- option ifname @wan
- option proto dhcpv6
-
-config globals globals
- option ula_prefix auto
diff --git a/target/linux/rb532/base-files/etc/diag.sh b/target/linux/rb532/base-files/etc/diag.sh
deleted file mode 100644
index 482b8e9..0000000
--- a/target/linux/rb532/base-files/etc/diag.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2007-2013 OpenWrt.org
-
-. /lib/functions/leds.sh
-
-status_led="rb500led:amber"
-
-set_state() {
- case "$1" in
- preinit)
- status_led_on
- ;;
- done)
- status_led_off
- ;;
- esac
-}
diff --git a/target/linux/rb532/base-files/sbin/cf2nand b/target/linux/rb532/base-files/sbin/cf2nand
deleted file mode 100755
index 0bfc259..0000000
--- a/target/linux/rb532/base-files/sbin/cf2nand
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-. /lib/functions.sh
-
-copy_kernel() {
- local input="$1"
- local output="$2"
- local cmdline="$3"
- size="$(echo -n "$cmdline" | wc -c)"
- dd if="$input" bs=3M count=1 > "$output"
- /sbin/patch-cmdline "$output" "$cmdline"
-}
-
-fstype="$(mount | grep ' / ' | awk '$5 != "rootfs" {print $5}')"
-case "$fstype" in
- ext2|jffs2) echo "Copying from $fstype to yaffs2";;
- *) echo "Invalid filesystem."; exit 1;;
-esac
-
-[ -d /tmp/cf2nand ] && {
- echo "/tmp/cf2nand already exists"
- exit 1
-}
-
-mkdir /tmp/cf2nand
-mkdir /tmp/cf2nand/rootfs
-mount -t "$fstype" /dev/root /tmp/cf2nand/rootfs || {
- echo "Mounting rootfs failed."
- exit 1
-}
-
-boot="$(find_mtd_part 'Routerboard NAND boot')"
-main="$(find_mtd_part 'rootfs')"
-[ -z "$boot" -o -z "$main" ] && {
- echo "Cannot find NAND Flash partitions"
- exit 1
-}
-
-echo "Erasing filesystem..."
-mtd erase Boot 2>/dev/null >/dev/null
-mtd erase Main 2>/dev/null >/dev/null
-
-mkdir /tmp/cf2nand/p1
-mkdir /tmp/cf2nand/p2
-mount -t yaffs2 "$boot" /tmp/cf2nand/p1
-mount -t yaffs2 "$main" /tmp/cf2nand/p2
-
-echo "Copying kernel..."
-copy_kernel /dev/cfa1 /tmp/cf2nand/p1/kernel "root=/dev/mtdblock1 rootfstype=yaffs2 " 2>/dev/null >/dev/null
-umount /tmp/cf2nand/p1
-rmdir /tmp/cf2nand/p1
-
-echo "Copying filesystem..."
-( cd /tmp/cf2nand/rootfs; tar c . ) | ( cd /tmp/cf2nand/p2; tar x )
-echo "chmod ugo+x /" > /tmp/cf2nand/p2/etc/uci-defaults/set_root_permission
-sync
-# Use kexec is present
-[ -x /usr/bin/kexec ] && {
- kexec -l /tmp/cf2nand/p1/kernel --command-line="$(cat /proc/cmdline) root=/dev/mtdblock1 rootfstype=yaffs2"
- kexec -e
-}
-umount /tmp/cf2nand/p2
-rmdir /tmp/cf2nand/p2
-
-umount /tmp/cf2nand/rootfs
-rmdir /tmp/cf2nand/rootfs
-rmdir /tmp/cf2nand
-
diff --git a/target/linux/rb532/base-files/sbin/wget2nand b/target/linux/rb532/base-files/sbin/wget2nand
deleted file mode 100755
index 9a111fa..0000000
--- a/target/linux/rb532/base-files/sbin/wget2nand
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-# wget2nand
-# This script can be used to download a TGZ file from your build system which
-# contains the files to be installed on the NAND flash on your RB1xx card.
-# The one parameter is the URL of the TGZ file to be downloaded.
-# Licence GPL V2
-# Author david.goodenough@linkchoose.co.uk
-# Based on cf2nand from RB532 support
-. /lib/functions.sh
-
-[ -d /tmp/wget2nand ] && {
- echo "/tmp/wget2nand already exists"
- exit 1
-}
-
-# first get an address for br-lan using udhcpc
-killall udhcpc
-/sbin/udhcpc -i br-lan
-
-# need to find the wget server from the command line
-url=$1
-[ -z "$url" ] && {
- echo "No URL specified for image TGZ"
- echo "Usage : $0 URL"
- exit 1
-}
-
-boot="$(find_mtd_part 'Routerboard NAND Boot')"
-main="$(find_mtd_part 'rootfs')"
-[ -z "$boot" -o -z "$main" ] && {
- echo "Cannot find NAND Flash partitions"
- exit 1
-}
-
-echo "Erasing filesystem."
-mtd erase Boot 2>/dev/null >/dev/null
-mtd erase Main 2>/dev/null >/dev/null
-
-echo "Mounting $main as new root and $boot as boot partition"
-
-mkdir /tmp/wget2nand/
-mkdir /tmp/wget2nand-boot
-mount -t yaffs2 "$main" /tmp/wget2nand/
-mount -t yaffs2 "$boot" /tmp/wget2nand-boot
-
-echo "Copying filesystem..."
-( wget -O - $url/openwrt-rb532-rootfs.tgz) | ( cd /tmp/wget2nand/; tar xvz )
-wget -O /tmp/wget2nand-boot/kernel $url/openwrt-rb532-vmlinux
-
-# No need to patch the kernel, this was done during the build process
-chmod +x /tmp/wget2nand-boot/kernel
-
-# make sure everything is written before we unmount the partitions
-echo "chmod ugo+x /" > /tmp/wget2nand/etc/uci-defaults/set_root_permission
-sync
-ls /tmp/wget2nand-boot/
-ls /tmp/wget2nand/
-# use kexec if present
-[ -x /usr/bin/kexec ] && {
- kexec -l /tmp/wget2nand-boot/kernel --command-line="$(cat /proc/cmdline) root=$main rootfstype=yaffs2"
- kexec -e
-}
-
-# unmount the partitions and remove the directories into which they were mounted
-umount /tmp/wget2nand-boot
-umount /tmp/wget2nand
-rmdir /tmp/wget2nand-boot
-rmdir /tmp/wget2nand
-
-# all done
-echo "Image written, you can now reboot. Remember to change the boot source to Boot from Nand"
diff --git a/target/linux/rb532/config-3.10 b/target/linux/rb532/config-3.10
deleted file mode 100644
index 5e7dd3d..0000000
--- a/target/linux/rb532/config-3.10
+++ /dev/null
@@ -1,147 +0,0 @@
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_DISCARD_MEMBLOCK=y
-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_ATA=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPSR1=y
-CONFIG_CPU_R4K_CACHE_TLB=y
-CONFIG_CPU_R4K_FPU=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_HASH2=y
-CONFIG_CSRC_R4K=y
-CONFIG_DMA_NONCOHERENT=y
-# CONFIG_ENABLE_WARN_DEPRECATED is not set
-CONFIG_EXT4_FS=y
-CONFIG_FS_MBCACHE=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_IO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_DEVRES=y
-CONFIG_GPIO_SYSFS=y
-# CONFIG_HAMRADIO is not set
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
-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
-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_MEMBLOCK=y
-CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-# CONFIG_HIGH_RES_TIMERS is not set
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_IMAGE_CMDLINE_HACK=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQ_CPU=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_KEXEC=y
-CONFIG_KORINA=y
-CONFIG_LEDS_MIKROTIK_RB532=y
-CONFIG_MIKROTIK_RB532=y
-CONFIG_MIPS=y
-# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=4
-# CONFIG_MIPS_MACHINE is not set
-CONFIG_MIPS_MT_DISABLED=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD_BLOCK2MTD=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-# CONFIG_MTD_CFI_AMDSTD is not set
-CONFIG_MTD_CFI_GEOMETRY=y
-# CONFIG_MTD_CFI_INTELEXT is not set
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_ECC=y
-CONFIG_MTD_NAND_PLATFORM=y
-CONFIG_MTD_PHYSMAP=y
-# CONFIG_MTD_ROOTFS_ROOT_DEV is not set
-CONFIG_MTD_ROOTFS_SPLIT=y
-# CONFIG_MTD_SM_COMMON is not set
-# CONFIG_MTD_SPLIT is not set
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_PATA_RB532=y
-CONFIG_PCI=y
-CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PERF_USE_VMALLOC=y
-# CONFIG_PREEMPT_RCU is not set
-CONFIG_RC32434_WDT=y
-# CONFIG_RCU_STALL_COMMON is not set
-CONFIG_SCSI=y
-# CONFIG_SCSI_LOWLEVEL is not set
-# CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_PROC_FS is not set
-# CONFIG_SWAP is not set
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_UIDGID_CONVERTED=y
-CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_VIA_RHINE=y
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_YAFFS_9BYTE_TAGS=y
-# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
-CONFIG_YAFFS_AUTO_YAFFS2=y
-# CONFIG_YAFFS_DISABLE_BACKGROUND is not set
-# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set
-# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set
-# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set
-CONFIG_YAFFS_FS=y
-CONFIG_YAFFS_XATTR=y
-CONFIG_YAFFS_YAFFS1=y
-CONFIG_YAFFS_YAFFS2=y
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile
deleted file mode 100644
index 706c768..0000000
--- a/target/linux/rb532/image/Makefile
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Copyright (C) 2006-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
-
-LOADADDR = 0x81000000 # RAM start + 16M
-KERNEL_ENTRY = 0x80101000
-RAMSIZE = 0x00100000 # 1MB
-IMAGE_COPY = 1
-
-LOADER_MAKEOPTS= \
- KDIR=$(KDIR) \
- LOADADDR=$(LOADADDR) \
- KERNEL_ENTRY=$(KERNEL_ENTRY) \
- RAMSIZE=$(RAMSIZE) \
- IMAGE_COPY=$(IMAGE_COPY)
-
-define Build/Clean
- $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean
-endef
-
-define Image/Prepare
- cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
- $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-initramfs '$(strip $(call Image/cmdline/yaffs2)) '
- cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
- $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
- $(CP) $(KDIR)/loader.elf $(KDIR)/loader-initramfs.elf
-endif
-endef
-
-VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-kernel
-
-define Image/BuildKernel
- $(CP) $(KDIR)/loader.elf $(VMLINUX)
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(CP) $(KDIR)/loader-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
-endif
-endef
-
-define Image/cmdline/jffs2-64k
-block2mtd.block2mtd=/dev/sda2,65536 root=/dev/mtdblock2 rootfstype=jffs2
-endef
-
-define Image/cmdline/jffs2-128k
-block2mtd.block2mtd=/dev/sda2,131072 root=/dev/mtdblock2 rootfstype=jffs2
-endef
-
-define Image/cmdline/ext4
-root=/dev/sda2 rootfstype=ext4
-endef
-
-define Image/cmdline/squashfs
-block2mtd.block2mtd=/dev/sda2,65536,rootfs root=/dev/mtdblock2 rootfstype=squashfs
-endef
-
-define Image/cmdline/yaffs2
-root=/dev/mtdblock1 rootfstype=yaffs2
-endef
-
-define Image/Build
- $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
- $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
- ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
-endef
-
-$(eval $(call BuildImage))
diff --git a/target/linux/rb532/image/gen_image.sh b/target/linux/rb532/image/gen_image.sh
deleted file mode 100755
index 8875834..0000000
--- a/target/linux/rb532/image/gen_image.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-OUTPUT="$1"
-KERNELSIZE="$2"
-KERNELIMAGE="$3"
-ROOTFSSIZE="$4"
-ROOTFSIMAGE="$5"
-
-rm -f "$OUTPUT"
-
-# create partition table
-set `ptgen -o "$OUTPUT" -h 16 -s 32 -t 0x27 -p ${KERNELSIZE}m -t 0x83 -p ${ROOTFSSIZE}m`
-
-KERNELOFFSET="$(($1 / 512))"
-ROOTFSOFFSET="$(($3 / 512))"
-
-dd if="$KERNELIMAGE" of="$OUTPUT" bs=512 conv=notrunc seek="$KERNELOFFSET"
-dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 conv=notrunc seek="$ROOTFSOFFSET"
diff --git a/target/linux/rb532/modules.mk b/target/linux/rb532/modules.mk
deleted file mode 100644
index 0cbbdab..0000000
--- a/target/linux/rb532/modules.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define KernelPackage/ata-rb532-cf
- SUBMENU:=$(BLOCK_MENU)
- TITLE:=RB532 Compact Flash support
- DEPENDS:=@TARGET_rb532 @BROKEN
- KCONFIG:= \
- CONFIG_PATA_PLATFORM \
- CONFIG_PATA_RB532
- FILES:=\
- $(LINUX_DIR)/drivers/ata/pata_platform.ko \
- $(LINUX_DIR)/drivers/ata/pata_rb532_cf.ko
- AUTOLOAD:=$(call AutoLoad,41,pata_platform pata_rb532_cf,1)
- $(call AddDepends/ata)
-endef
-
-define KernelPackage/ata-rb532-cf/description
- RB532 Compact Flash support.
-endef
-
-$(eval $(call KernelPackage,ata-rb532-cf))
-
-
-define KernelPackage/input-rb532
- SUBMENU:=$(OTHER_MENU)
- TITLE:=RB532 button device support
- DEPENDS:=@TARGET_rb532 +kmod-input-polldev
- KCONFIG:= \
- CONFIG_INPUT_MISC=y \
- CONFIG_INPUT_RB532_BUTTON
- FILES:=$(LINUX_DIR)/drivers/input/misc/rb532_button.ko
- AUTOLOAD:=$(call AutoLoad,62,rb532_button)
- $(call AddDepends/input)
-endef
-
-define KernelPackage/input-rb532/description
- Kernel module for RB532 button
-endef
-
-$(eval $(call KernelPackage,input-rb532))
diff --git a/target/linux/rb532/patches-3.10/001-cmdline_hack.patch b/target/linux/rb532/patches-3.10/001-cmdline_hack.patch
deleted file mode 100644
index a39da9c..0000000
--- a/target/linux/rb532/patches-3.10/001-cmdline_hack.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/arch/mips/rb532/prom.c
-+++ b/arch/mips/rb532/prom.c
-@@ -67,6 +67,7 @@ static inline unsigned long tag2ul(char
- return simple_strtoul(num, 0, 10);
- }
-
-+extern char __image_cmdline[];
- void __init prom_setup_cmdline(void)
- {
- static char cmd_line[COMMAND_LINE_SIZE] __initdata;
-@@ -108,6 +109,9 @@ void __init prom_setup_cmdline(void)
- }
- *(cp++) = ' ';
-
-+ strcpy(cp,(__image_cmdline));
-+ cp += strlen(__image_cmdline);
-+
- i = strlen(arcs_cmdline);
- if (i > 0) {
- *(cp++) = ' ';
diff --git a/target/linux/rb532/patches-3.10/002-rb532_nand_fixup.patch b/target/linux/rb532/patches-3.10/002-rb532_nand_fixup.patch
deleted file mode 100644
index 916653d..0000000
--- a/target/linux/rb532/patches-3.10/002-rb532_nand_fixup.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/arch/mips/rb532/devices.c
-+++ b/arch/mips/rb532/devices.c
-@@ -140,6 +140,19 @@ static struct platform_device cf_slot0 =
- };
-
- /* Resources and device for NAND */
-+
-+/*
-+ * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader
-+ * will not be able to find the kernel that we load. So set the oobinfo
-+ * when creating the partitions
-+ */
-+static struct nand_ecclayout rb532_nand_ecclayout = {
-+ .eccbytes = 6,
-+ .eccpos = { 8, 9, 10, 13, 14, 15 },
-+ .oobavail = 9,
-+ .oobfree = { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } }
-+};
-+
- static int rb532_dev_ready(struct mtd_info *mtd)
- {
- return gpio_get_value(GPIO_RDY);
-@@ -275,6 +288,16 @@ static void __init parse_mac_addr(char *
- /* NAND definitions */
- #define NAND_CHIP_DELAY 25
-
-+static int rb532_nand_fixup(struct mtd_info *mtd)
-+{
-+ struct nand_chip *chip = mtd->priv;
-+
-+ if (mtd->writesize == 512)
-+ chip->ecc.layout = &rb532_nand_ecclayout;
-+
-+ return 0;
-+}
-+
- static void __init rb532_nand_setup(void)
- {
- switch (mips_machtype) {
-@@ -293,6 +316,7 @@ static void __init rb532_nand_setup(void
- rb532_nand_data.chip.nr_partitions = ARRAY_SIZE(rb532_partition_info);
- rb532_nand_data.chip.partitions = rb532_partition_info;
- rb532_nand_data.chip.chip_delay = NAND_CHIP_DELAY;
-+ rb532_nand_data.chip.chip_fixup = &rb532_nand_fixup;
- }
-
-
diff --git a/target/linux/rb532/patches-3.10/003-MIPS-rc32434-fix-broken-pci-init.patch b/target/linux/rb532/patches-3.10/003-MIPS-rc32434-fix-broken-pci-init.patch
deleted file mode 100644
index af6f7ca..0000000
--- a/target/linux/rb532/patches-3.10/003-MIPS-rc32434-fix-broken-pci-init.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From patchwork Thu May 15 08:35:44 2014
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: MIPS: RC32434: fix broken PCI resource initialization
-From: Gabor Juhos <juhosg@openwrt.org>
-X-Patchwork-Id: 6940
-Message-Id: <1400142944-32147-1-git-send-email-juhosg@openwrt.org>
-To: Ralf Baechle <ralf@linux-mips.org>
-Cc: linux-mips@linux-mips.org, Gabor Juhos <juhosg@openwrt.org>
-Date: Thu, 15 May 2014 10:35:44 +0200
-
-The parent field of the 'rc32434_res_pci_mem1' resource points to
-the resource itself which is obviously wrong. Due to the broken
-initialitazion, the PCI devices on the Mikrotik RB532 boards are
-not working since commit 22283178 (MIPS: avoid possible resource
-conflict in register_pci_controller).
-
-Remove the field initialization to fix the issue.
-
-Reported-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-
----
-arch/mips/pci/pci-rc32434.c | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/arch/mips/pci/pci-rc32434.c
-+++ b/arch/mips/pci/pci-rc32434.c
-@@ -53,7 +53,6 @@ static struct resource rc32434_res_pci_m
- .start = 0x50000000,
- .end = 0x5FFFFFFF,
- .flags = IORESOURCE_MEM,
-- .parent = &rc32434_res_pci_mem1,
- .sibling = NULL,
- .child = &rc32434_res_pci_mem2
- };
diff --git a/target/linux/rb532/patches-3.10/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch b/target/linux/rb532/patches-3.10/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
deleted file mode 100644
index e3f6c41..0000000
--- a/target/linux/rb532/patches-3.10/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/arch/mips/rb532/devices.c 2014-07-07 01:05:10.000000000 +0300
-+++ b/arch/mips/rb532/devices.c 2014-07-07 01:05:27.268505016 +0300
-@@ -202,7 +202,7 @@ static struct mtd_partition rb532_partit
- .offset = 0,
- .size = 4 * 1024 * 1024,
- }, {
-- .name = "rootfs",
-+ .name = "rootfs_onboard",
- .offset = MTDPART_OFS_NXTBLK,
- .size = MTDPART_SIZ_FULL,
- }
diff --git a/target/linux/rb532/src/patch-cmdline.c b/target/linux/rb532/src/patch-cmdline.c
deleted file mode 100644
index 571f848..0000000
--- a/target/linux/rb532/src/patch-cmdline.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * patch-cmdline.c - patch the kernel command line on rb532
- *
- * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <string.h>
-
-#define SEARCH_SPACE (16 * 1024)
-#define CMDLINE_MAX 512
-
-int main(int argc, char **argv)
-{
- int fd, found = 0, len, ret = -1;
- char *ptr, *p;
-
- if (argc != 3) {
- fprintf(stderr, "Usage: %s <file> <cmdline>\n", argv[0]);
- goto err1;
- }
- len = strlen(argv[2]);
- if (len + 9 > CMDLINE_MAX) {
- fprintf(stderr, "Command line string too long\n");
- goto err1;
- }
-
- if (((fd = open(argv[1], O_RDWR)) < 0) ||
- (ptr = (char *) mmap(0, SEARCH_SPACE + CMDLINE_MAX, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1)) {
- fprintf(stderr, "Could not open kernel image");
- goto err2;
- }
-
- for (p = ptr; p < (ptr + SEARCH_SPACE); p += 4) {
- if (memcmp(p, "CMDLINE:", 8) == 0) {
- found = 1;
- p += 8;
- break;
- }
- }
- if (!found) {
- fprintf(stderr, "Command line marker not found!\n");
- goto err3;
- }
-
- memset(p, 0, CMDLINE_MAX - 8);
- strcpy(p, argv[2]);
- msync(p, CMDLINE_MAX, MS_SYNC|MS_INVALIDATE);
- ret = 0;
-
-err3:
- munmap((void *) ptr, len);
-err2:
- if (fd > 0)
- close(fd);
-err1:
- return ret;
-}