diff --git a/config/Config-images.in b/config/Config-images.in index 8b76b246ae..7d56d70908 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -274,7 +274,7 @@ menu "Target Images" config TARGET_ROOTFS_PARTSIZE int "Root filesystem partition size (in MB)" - depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml + depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml default 104 help Select the root filesystem partition size. diff --git a/target/linux/rb532/Makefile b/target/linux/rb532/Makefile deleted file mode 100644 index 43ec4cc491..0000000000 --- a/target/linux/rb532/Makefile +++ /dev/null @@ -1,20 +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 squashfs minor nand - -KERNEL_PATCHVER:=4.14 - -include $(INCLUDE_DIR)/target.mk - -DEFAULT_PACKAGES += wpad-basic-wolfssl kmod-ath5k kmod-input-rb532 e2fsprogs mkf2fs nand-utils - -$(eval $(call BuildTarget)) 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 c689d63278..0000000000 --- a/target/linux/rb532/base-files/etc/config/network +++ /dev/null @@ -1,26 +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 type bridge - 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 eth0 - 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 482b8e9953..0000000000 --- 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/lib/preinit/01_sysinfo b/target/linux/rb532/base-files/lib/preinit/01_sysinfo deleted file mode 100644 index 4c932fde19..0000000000 --- a/target/linux/rb532/base-files/lib/preinit/01_sysinfo +++ /dev/null @@ -1,11 +0,0 @@ -get_model_rb532() { - grep system\ type /proc/cpuinfo | awk -F ": " '{print $2}' -} - -do_sysinfo_rb532() { - mkdir -p /tmp/sysinfo - echo rb532 > /tmp/sysinfo/board_name - get_model_rb532 > /tmp/sysinfo/model -} - -boot_hook_add preinit_main do_sysinfo_rb532 diff --git a/target/linux/rb532/base-files/lib/upgrade/platform.sh b/target/linux/rb532/base-files/lib/upgrade/platform.sh deleted file mode 100644 index 334d6e2ff6..0000000000 --- a/target/linux/rb532/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,17 +0,0 @@ -REQUIRE_IMAGE_METADATA=1 -RAMFS_COPY_BIN='nandwrite' -CI_KERNPART=none - -platform_check_image() { - [ -e /dev/ubi0 ] || { - ubiattach -m 1 - sleep 1 - } - return 0; -} - -platform_do_upgrade() { - mtd erase kernel - tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 - - nand_do_upgrade "$1" -} diff --git a/target/linux/rb532/config-4.14 b/target/linux/rb532/config-4.14 deleted file mode 100644 index 257b4e2d6c..0000000000 --- a/target/linux/rb532/config-4.14 +++ /dev/null @@ -1,181 +0,0 @@ -CONFIG_ARCH_BINFMT_ELF_STATE=y -CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_ARCH_DISCARD_MEMBLOCK=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set -# CONFIG_ARCH_HAS_SG_CHAIN is not set -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_ATA=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_SD=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_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=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_DEFLATE=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CSRC_R4K=y -CONFIG_DMA_NONCOHERENT=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -CONFIG_EXT4_FS=y -# CONFIG_F2FS_CHECK_FS is not set -CONFIG_F2FS_FS=y -# CONFIG_F2FS_FS_SECURITY is not set -CONFIG_F2FS_FS_XATTR=y -CONFIG_F2FS_STAT_FS=y -CONFIG_FS_MBCACHE=y -CONFIG_GENERIC_ATOMIC64=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_GENERIC_IO=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GLOB=y -CONFIG_GPIOLIB=y -CONFIG_HARDWARE_WATCHPOINTS=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -# CONFIG_HAVE_ARCH_BITREVERSE is not set -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_CC_STACKPROTECTOR=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DEBUG_STACKOVERFLOW=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=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_GENERIC_DMA_COHERENT=y -CONFIG_HAVE_IDE=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=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_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=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_DOMAIN=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_MIPS_CPU=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -CONFIG_KEXEC=y -CONFIG_KEXEC_CORE=y -CONFIG_KORINA=y -CONFIG_LEDS_MIKROTIK_RB532=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_MIKROTIK_RB532=y -CONFIG_MIPS=y -CONFIG_MIPS_CLOCK_VSYSCALL=y -CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set -CONFIG_MIPS_L1_CACHE_SHIFT=4 -CONFIG_MIPS_L1_CACHE_SHIFT_4=y -# CONFIG_MIPS_MACHINE is not set -CONFIG_MODULES_USE_ELF_REL=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_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=20 -CONFIG_MTD_UBI_BLOCK=y -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_PER_CPU_KM=y -CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y -# CONFIG_NO_IOPORT_MAP is not set -# CONFIG_OF is not set -CONFIG_PATA_RB532=y -CONFIG_PCI=y -CONFIG_PCI_DISABLE_COMMON_QUIRKS=y -CONFIG_PCI_DOMAINS=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_RC32434_WDT=y -# CONFIG_RCU_STALL_COMMON is not set -# CONFIG_SCHED_HRTICK is not set -# CONFIG_SCHED_INFO is not set -CONFIG_SCSI=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_PROC_FS is not set -# CONFIG_SERIAL_8250_FSL is not set -CONFIG_SQUASHFS_DECOMP_MULTI=y -# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set -CONFIG_SRCU=y -# CONFIG_SWAP is not set -CONFIG_SWAP_IO_SPACE=y -CONFIG_SYSCTL_EXCEPTION_TRACE=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_UBIFS_FS=y -# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_VIA_RHINE=y -CONFIG_VIA_RHINE_MMIO=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_ZLIB_INFLATE=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 a6f8a6beaf..0000000000 --- a/target/linux/rb532/image/Makefile +++ /dev/null @@ -1,95 +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= \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - PATH="$(TARGET_PATH)" \ - CC="$(TARGET_CC)" \ - KDIR=$(KDIR) \ - LOADADDR=$(LOADADDR) \ - KERNEL_ENTRY=$(KERNEL_ENTRY) \ - RAMSIZE=$(RAMSIZE) \ - IMAGE_COPY=$(IMAGE_COPY) - - -LOADER_DIR = $(GENERIC_PLATFORM_DIR)/image/lzma-loader - -define Build/lzma-loader-elf - rm -rf $@.loader - mkdir -p $@.loader - $(CP) $(LOADER_DIR)/src/* $@.loader/ - $(CP) $@ $@.loader/vmlinux.lzma - $(MAKE) -C $@.loader $(LOADER_MAKEOPTS) - cp $@.loader/lzma.elf $@ - rm -rf $@.loader -endef - -define Device/nand - DEVICE_VENDOR := MikroTik - DEVICE_MODEL := RouterBOARD 532 - CMDLINE := ubi.mtd=1 ubi.block=0,rootfs root=/dev/ubiblock0_1 - BOARD_NAME := rb532 - SUPPORTED_DEVICES := rb532 - KERNEL_INITRAMFS := append-kernel | patch-cmdline | lzma | lzma-loader-elf - KERNEL := $$(KERNEL_INITRAMFS) | kernel2minor -s 2048 -i 0 -c - IMAGES := sysupgrade.bin - FILESYSTEMS := squashfs - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -endef - -TARGET_DEVICES := nand - -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.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/yaffs2 -root=/dev/mtdblock1 rootfstype=yaffs2 -endef - -define Image/Build/squashfs - dd if=/dev/zero bs=128k count=1 >> $(KDIR)/root.squashfs -endef - -define Image/Build - $(call Image/Build/$(1),$(1)) - $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel - $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel 'root=/dev/sda2 ' - ./gen_image.sh $(BIN_DIR)/$(IMG_COMBINED)-$(1).bin \ - 6 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \ - 128 -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 e46539fd85..0000000000 --- a/target/linux/rb532/image/gen_image.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -OUTPUT="$1" -KERNELSIZE="$2" -KERNELIMAGE="$3" -ROOTFSSIZE="$4" -ROOTFSIMAGE="$5" -ALIGN="$6" - -rm -f "$OUTPUT" - -# create partition table -set $(ptgen -o "$OUTPUT" -h 16 -s 32 -l ${ALIGN} -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 0cbbdab3ea..0000000000 --- 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-4.14/001-cmdline_hack.patch b/target/linux/rb532/patches-4.14/001-cmdline_hack.patch deleted file mode 100644 index a39da9c14a..0000000000 --- a/target/linux/rb532/patches-4.14/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-4.14/004-rb532-fix-partition-info.patch b/target/linux/rb532/patches-4.14/004-rb532-fix-partition-info.patch deleted file mode 100644 index 5161a233dd..0000000000 --- a/target/linux/rb532/patches-4.14/004-rb532-fix-partition-info.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/arch/mips/rb532/devices.c -+++ b/arch/mips/rb532/devices.c -@@ -186,11 +186,11 @@ static struct platform_device nand_slot0 - - static struct mtd_partition rb532_partition_info[] = { - { -- .name = "Routerboard NAND boot", -+ .name = "kernel", - .offset = 0, -- .size = 4 * 1024 * 1024, -+ .size = 8 * 1024 * 1024, - }, { -- .name = "rootfs", -+ .name = "ubi", - .offset = MTDPART_OFS_NXTBLK, - .size = MTDPART_SIZ_FULL, - } diff --git a/target/linux/rb532/patches-4.14/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch b/target/linux/rb532/patches-4.14/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch deleted file mode 100644 index 2bc2c1067e..0000000000 --- a/target/linux/rb532/patches-4.14/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch +++ /dev/null @@ -1,156 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -122,8 +122,6 @@ struct korina_private { - - int rx_irq; - int tx_irq; -- int ovr_irq; -- int und_irq; - - spinlock_t lock; /* NIC xmit lock */ - -@@ -891,8 +889,6 @@ static void korina_restart_task(struct w - */ - disable_irq(lp->rx_irq); - disable_irq(lp->tx_irq); -- disable_irq(lp->ovr_irq); -- disable_irq(lp->und_irq); - - writel(readl(&lp->tx_dma_regs->dmasm) | - DMA_STAT_FINI | DMA_STAT_ERR, -@@ -911,40 +907,10 @@ static void korina_restart_task(struct w - } - korina_multicast_list(dev); - -- enable_irq(lp->und_irq); -- enable_irq(lp->ovr_irq); - enable_irq(lp->tx_irq); - enable_irq(lp->rx_irq); - } - --static void korina_clear_and_restart(struct net_device *dev, u32 value) --{ -- struct korina_private *lp = netdev_priv(dev); -- -- netif_stop_queue(dev); -- writel(value, &lp->eth_regs->ethintfc); -- schedule_work(&lp->restart_task); --} -- --/* Ethernet Tx Underflow interrupt */ --static irqreturn_t korina_und_interrupt(int irq, void *dev_id) --{ -- struct net_device *dev = dev_id; -- struct korina_private *lp = netdev_priv(dev); -- unsigned int und; -- -- spin_lock(&lp->lock); -- -- und = readl(&lp->eth_regs->ethintfc); -- -- if (und & ETH_INT_FC_UND) -- korina_clear_and_restart(dev, und & ~ETH_INT_FC_UND); -- -- spin_unlock(&lp->lock); -- -- return IRQ_HANDLED; --} -- - static void korina_tx_timeout(struct net_device *dev) - { - struct korina_private *lp = netdev_priv(dev); -@@ -952,25 +918,6 @@ static void korina_tx_timeout(struct net - schedule_work(&lp->restart_task); - } - --/* Ethernet Rx Overflow interrupt */ --static irqreturn_t --korina_ovr_interrupt(int irq, void *dev_id) --{ -- struct net_device *dev = dev_id; -- struct korina_private *lp = netdev_priv(dev); -- unsigned int ovr; -- -- spin_lock(&lp->lock); -- ovr = readl(&lp->eth_regs->ethintfc); -- -- if (ovr & ETH_INT_FC_OVR) -- korina_clear_and_restart(dev, ovr & ~ETH_INT_FC_OVR); -- -- spin_unlock(&lp->lock); -- -- return IRQ_HANDLED; --} -- - #ifdef CONFIG_NET_POLL_CONTROLLER - static void korina_poll_controller(struct net_device *dev) - { -@@ -993,8 +940,7 @@ static int korina_open(struct net_device - } - - /* Install the interrupt handler -- * that handles the Done Finished -- * Ovr and Und Events */ -+ * that handles the Done Finished */ - ret = request_irq(lp->rx_irq, korina_rx_dma_interrupt, - 0, "Korina ethernet Rx", dev); - if (ret < 0) { -@@ -1010,31 +956,10 @@ static int korina_open(struct net_device - goto err_free_rx_irq; - } - -- /* Install handler for overrun error. */ -- ret = request_irq(lp->ovr_irq, korina_ovr_interrupt, -- 0, "Ethernet Overflow", dev); -- if (ret < 0) { -- printk(KERN_ERR "%s: unable to get OVR IRQ %d\n", -- dev->name, lp->ovr_irq); -- goto err_free_tx_irq; -- } -- -- /* Install handler for underflow error. */ -- ret = request_irq(lp->und_irq, korina_und_interrupt, -- 0, "Ethernet Underflow", dev); -- if (ret < 0) { -- printk(KERN_ERR "%s: unable to get UND IRQ %d\n", -- dev->name, lp->und_irq); -- goto err_free_ovr_irq; -- } - mod_timer(&lp->media_check_timer, jiffies + 1); - out: - return ret; - --err_free_ovr_irq: -- free_irq(lp->ovr_irq, dev); --err_free_tx_irq: -- free_irq(lp->tx_irq, dev); - err_free_rx_irq: - free_irq(lp->rx_irq, dev); - err_release: -@@ -1052,8 +977,6 @@ static int korina_close(struct net_devic - /* Disable interrupts */ - disable_irq(lp->rx_irq); - disable_irq(lp->tx_irq); -- disable_irq(lp->ovr_irq); -- disable_irq(lp->und_irq); - - korina_abort_tx(dev); - tmp = readl(&lp->tx_dma_regs->dmasm); -@@ -1073,8 +996,6 @@ static int korina_close(struct net_devic - - free_irq(lp->rx_irq, dev); - free_irq(lp->tx_irq, dev); -- free_irq(lp->ovr_irq, dev); -- free_irq(lp->und_irq, dev); - - return 0; - } -@@ -1113,8 +1034,6 @@ static int korina_probe(struct platform_ - - lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx"); - lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx"); -- lp->ovr_irq = platform_get_irq_byname(pdev, "korina_ovr"); -- lp->und_irq = platform_get_irq_byname(pdev, "korina_und"); - - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs"); - dev->base_addr = r->start; diff --git a/target/linux/rb532/patches-4.14/107-korina-refactor-rx-descriptor-flags-processing.patch b/target/linux/rb532/patches-4.14/107-korina-refactor-rx-descriptor-flags-processing.patch deleted file mode 100644 index 80745f534d..0000000000 --- a/target/linux/rb532/patches-4.14/107-korina-refactor-rx-descriptor-flags-processing.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -363,59 +363,60 @@ static int korina_rx(struct net_device * - if ((KORINA_RBSIZE - (u32)DMA_COUNT(rd->control)) == 0) - break; - -- /* Update statistics counters */ -- if (devcs & ETH_RX_CRC) -- dev->stats.rx_crc_errors++; -- if (devcs & ETH_RX_LOR) -- dev->stats.rx_length_errors++; -- if (devcs & ETH_RX_LE) -- dev->stats.rx_length_errors++; -- if (devcs & ETH_RX_OVR) -- dev->stats.rx_fifo_errors++; -- if (devcs & ETH_RX_CV) -- dev->stats.rx_frame_errors++; -- if (devcs & ETH_RX_CES) -- dev->stats.rx_length_errors++; -- if (devcs & ETH_RX_MP) -- dev->stats.multicast++; -+ /* check that this is a whole packet -+ * WARNING: DMA_FD bit incorrectly set -+ * in Rc32434 (errata ref #077) */ -+ if (!(devcs & ETH_RX_LD)) -+ goto next; - -- if ((devcs & ETH_RX_LD) != ETH_RX_LD) { -- /* check that this is a whole packet -- * WARNING: DMA_FD bit incorrectly set -- * in Rc32434 (errata ref #077) */ -+ if (!(devcs & ETH_RX_ROK)) { -+ /* Update statistics counters */ - dev->stats.rx_errors++; - dev->stats.rx_dropped++; -- } else if ((devcs & ETH_RX_ROK)) { -- pkt_len = RCVPKT_LENGTH(devcs); -+ if (devcs & ETH_RX_CRC) -+ dev->stats.rx_crc_errors++; -+ if (devcs & ETH_RX_LE) -+ dev->stats.rx_length_errors++; -+ if (devcs & ETH_RX_OVR) -+ dev->stats.rx_fifo_errors++; -+ if (devcs & ETH_RX_CV) -+ dev->stats.rx_frame_errors++; -+ if (devcs & ETH_RX_CES) -+ dev->stats.rx_frame_errors++; - -- /* must be the (first and) last -- * descriptor then */ -- pkt_buf = (u8 *)lp->rx_skb[lp->rx_next_done]->data; -- -- /* invalidate the cache */ -- dma_cache_inv((unsigned long)pkt_buf, pkt_len - 4); -- -- /* Malloc up new buffer. */ -- skb_new = netdev_alloc_skb_ip_align(dev, KORINA_RBSIZE); -- -- if (!skb_new) -- break; -- /* Do not count the CRC */ -- skb_put(skb, pkt_len - 4); -- skb->protocol = eth_type_trans(skb, dev); -- -- /* Pass the packet to upper layers */ -- netif_receive_skb(skb); -- dev->stats.rx_packets++; -- dev->stats.rx_bytes += pkt_len; -- -- /* Update the mcast stats */ -- if (devcs & ETH_RX_MP) -- dev->stats.multicast++; -- -- lp->rx_skb[lp->rx_next_done] = skb_new; -+ goto next; - } - -+ pkt_len = RCVPKT_LENGTH(devcs); -+ -+ /* must be the (first and) last -+ * descriptor then */ -+ pkt_buf = (u8 *)lp->rx_skb[lp->rx_next_done]->data; -+ -+ /* invalidate the cache */ -+ dma_cache_inv((unsigned long)pkt_buf, pkt_len - 4); -+ -+ /* Malloc up new buffer. */ -+ skb_new = netdev_alloc_skb_ip_align(dev, KORINA_RBSIZE); -+ -+ if (!skb_new) -+ break; -+ /* Do not count the CRC */ -+ skb_put(skb, pkt_len - 4); -+ skb->protocol = eth_type_trans(skb, dev); -+ -+ /* Pass the packet to upper layers */ -+ netif_receive_skb(skb); -+ dev->stats.rx_packets++; -+ dev->stats.rx_bytes += pkt_len; -+ -+ /* Update the mcast stats */ -+ if (devcs & ETH_RX_MP) -+ dev->stats.multicast++; -+ -+ lp->rx_skb[lp->rx_next_done] = skb_new; -+ -+next: - rd->devcs = 0; - - /* Restore descriptor's curr_addr */ diff --git a/target/linux/rb532/patches-4.14/107-use-NAPI_POLL_WEIGHT.patch b/target/linux/rb532/patches-4.14/107-use-NAPI_POLL_WEIGHT.patch deleted file mode 100644 index d4af90636f..0000000000 --- a/target/linux/rb532/patches-4.14/107-use-NAPI_POLL_WEIGHT.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -1082,7 +1082,7 @@ static int korina_probe(struct platform_ - dev->netdev_ops = &korina_netdev_ops; - dev->ethtool_ops = &netdev_ethtool_ops; - dev->watchdog_timeo = TX_TIMEOUT; -- netif_napi_add(dev, &lp->napi, korina_poll, 64); -+ netif_napi_add(dev, &lp->napi, korina_poll, NAPI_POLL_WEIGHT); - - lp->phy_addr = (((lp->rx_irq == 0x2c? 1:0) << 8) | 0x05); - lp->mii_if.dev = dev; diff --git a/target/linux/rb532/patches-4.14/108-korina-use-gro.patch b/target/linux/rb532/patches-4.14/108-korina-use-gro.patch deleted file mode 100644 index 8cbe2a0777..0000000000 --- a/target/linux/rb532/patches-4.14/108-korina-use-gro.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -406,7 +406,7 @@ static int korina_rx(struct net_device * - skb->protocol = eth_type_trans(skb, dev); - - /* Pass the packet to upper layers */ -- netif_receive_skb(skb); -+ napi_gro_receive(&lp->napi, skb); - dev->stats.rx_packets++; - dev->stats.rx_bytes += pkt_len; - diff --git a/target/linux/rb532/patches-4.14/109-korina-whitespace-cleanup-2.patch b/target/linux/rb532/patches-4.14/109-korina-whitespace-cleanup-2.patch deleted file mode 100644 index ad24a9e846..0000000000 --- a/target/linux/rb532/patches-4.14/109-korina-whitespace-cleanup-2.patch +++ /dev/null @@ -1,135 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -64,9 +64,9 @@ - #include - #include - --#define DRV_NAME "korina" --#define DRV_VERSION "0.10" --#define DRV_RELDATE "04Mar2008" -+#define DRV_NAME "korina" -+#define DRV_VERSION "0.10" -+#define DRV_RELDATE "04Mar2008" - - #define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \ - ((dev)->dev_addr[1])) -@@ -75,7 +75,7 @@ - ((dev)->dev_addr[4] << 8) | \ - ((dev)->dev_addr[5])) - --#define MII_CLOCK 1250000 /* no more than 2.5MHz */ -+#define MII_CLOCK 1250000 /* no more than 2.5MHz */ - - /* the following must be powers of two */ - #define KORINA_NUM_RDS 64 /* number of receive descriptors */ -@@ -87,15 +87,19 @@ - #define KORINA_RBSIZE 1536 /* size of one resource buffer = Ether MTU */ - #define KORINA_RDS_MASK (KORINA_NUM_RDS - 1) - #define KORINA_TDS_MASK (KORINA_NUM_TDS - 1) --#define RD_RING_SIZE (KORINA_NUM_RDS * sizeof(struct dma_desc)) -+#define RD_RING_SIZE (KORINA_NUM_RDS * sizeof(struct dma_desc)) - #define TD_RING_SIZE (KORINA_NUM_TDS * sizeof(struct dma_desc)) - --#define TX_TIMEOUT (6000 * HZ / 1000) -+#define TX_TIMEOUT (6000 * HZ / 1000) - --enum chain_status { desc_filled, desc_empty }; --#define IS_DMA_FINISHED(X) (((X) & (DMA_DESC_FINI)) != 0) --#define IS_DMA_DONE(X) (((X) & (DMA_DESC_DONE)) != 0) --#define RCVPKT_LENGTH(X) (((X) & ETH_RX_LEN) >> ETH_RX_LEN_BIT) -+enum chain_status { -+ desc_filled, -+ desc_empty -+}; -+ -+#define IS_DMA_FINISHED(X) (((X) & (DMA_DESC_FINI)) != 0) -+#define IS_DMA_DONE(X) (((X) & (DMA_DESC_DONE)) != 0) -+#define RCVPKT_LENGTH(X) (((X) & ETH_RX_LEN) >> ETH_RX_LEN_BIT) - - /* Information that need to be kept for each board. */ - struct korina_private { -@@ -123,7 +127,7 @@ struct korina_private { - int rx_irq; - int tx_irq; - -- spinlock_t lock; /* NIC xmit lock */ -+ spinlock_t lock; /* NIC xmit lock */ - - int dma_halt_cnt; - int dma_run_cnt; -@@ -146,17 +150,17 @@ static inline void korina_start_dma(stru - static inline void korina_abort_dma(struct net_device *dev, - struct dma_reg *ch) - { -- if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) { -- writel(0x10, &ch->dmac); -+ if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) { -+ writel(0x10, &ch->dmac); - -- while (!(readl(&ch->dmas) & DMA_STAT_HALT)) -- netif_trans_update(dev); -+ while (!(readl(&ch->dmas) & DMA_STAT_HALT)) -+ netif_trans_update(dev); - -- writel(0, &ch->dmas); -- } -+ writel(0, &ch->dmas); -+ } - -- writel(0, &ch->dmadptr); -- writel(0, &ch->dmandptr); -+ writel(0, &ch->dmadptr); -+ writel(0, &ch->dmandptr); - } - - static inline void korina_chain_dma(struct dma_reg *ch, u32 dma_addr) -@@ -685,7 +689,7 @@ static int korina_ioctl(struct net_devic - - /* ethtool helpers */ - static void netdev_get_drvinfo(struct net_device *dev, -- struct ethtool_drvinfo *info) -+ struct ethtool_drvinfo *info) - { - struct korina_private *lp = netdev_priv(dev); - -@@ -728,10 +732,10 @@ static u32 netdev_get_link(struct net_de - } - - static const struct ethtool_ops netdev_ethtool_ops = { -- .get_drvinfo = netdev_get_drvinfo, -- .get_link = netdev_get_link, -- .get_link_ksettings = netdev_get_link_ksettings, -- .set_link_ksettings = netdev_set_link_ksettings, -+ .get_drvinfo = netdev_get_drvinfo, -+ .get_link = netdev_get_link, -+ .get_link_ksettings = netdev_get_link_ksettings, -+ .set_link_ksettings = netdev_set_link_ksettings, - }; - - static int korina_alloc_ring(struct net_device *dev) -@@ -863,7 +867,7 @@ static int korina_init(struct net_device - /* Management Clock Prescaler Divisor - * Clock independent setting */ - writel(((idt_cpu_freq) / MII_CLOCK + 1) & ~1, -- &lp->eth_regs->ethmcp); -+ &lp->eth_regs->ethmcp); - - /* don't transmit until fifo contains 48b */ - writel(48, &lp->eth_regs->ethfifott); -@@ -946,14 +950,14 @@ static int korina_open(struct net_device - 0, "Korina ethernet Rx", dev); - if (ret < 0) { - printk(KERN_ERR "%s: unable to get Rx DMA IRQ %d\n", -- dev->name, lp->rx_irq); -+ dev->name, lp->rx_irq); - goto err_release; - } - ret = request_irq(lp->tx_irq, korina_tx_dma_interrupt, - 0, "Korina ethernet Tx", dev); - if (ret < 0) { - printk(KERN_ERR "%s: unable to get Tx DMA IRQ %d\n", -- dev->name, lp->tx_irq); -+ dev->name, lp->tx_irq); - goto err_free_rx_irq; - } - diff --git a/target/linux/rb532/patches-4.14/110-korina-update-authors.patch b/target/linux/rb532/patches-4.14/110-korina-update-authors.patch deleted file mode 100644 index 843397cf37..0000000000 --- a/target/linux/rb532/patches-4.14/110-korina-update-authors.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -4,6 +4,7 @@ - * Copyright 2004 IDT Inc. (rischelp@idt.com) - * Copyright 2006 Felix Fietkau - * Copyright 2008 Florian Fainelli -+ * Copyright 2017 Roman Yeryomin - * - * 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 -@@ -1150,5 +1151,6 @@ module_platform_driver(korina_driver); - MODULE_AUTHOR("Philip Rischel "); - MODULE_AUTHOR("Felix Fietkau "); - MODULE_AUTHOR("Florian Fainelli "); -+MODULE_AUTHOR("Roman Yeryomin "); - MODULE_DESCRIPTION("IDT RC32434 (Korina) Ethernet driver"); - MODULE_LICENSE("GPL"); diff --git a/target/linux/rb532/patches-4.14/111-korina-version-bump.patch b/target/linux/rb532/patches-4.14/111-korina-version-bump.patch deleted file mode 100644 index 1501e174b1..0000000000 --- a/target/linux/rb532/patches-4.14/111-korina-version-bump.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/drivers/net/ethernet/korina.c -+++ b/drivers/net/ethernet/korina.c -@@ -66,8 +66,8 @@ - #include - - #define DRV_NAME "korina" --#define DRV_VERSION "0.10" --#define DRV_RELDATE "04Mar2008" -+#define DRV_VERSION "0.20" -+#define DRV_RELDATE "15Sep2017" - - #define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \ - ((dev)->dev_addr[1])) diff --git a/tools/patch-image/src/patch-cmdline.c b/tools/patch-image/src/patch-cmdline.c index 8d1fce9172..9eaa648ec0 100644 --- a/tools/patch-image/src/patch-cmdline.c +++ b/tools/patch-image/src/patch-cmdline.c @@ -1,5 +1,5 @@ /* - * patch-cmdline.c - patch the kernel command line on rb532 + * patch-cmdline.c - patch the kernel command line * * Copyright (C) 2006 Felix Fietkau *