From 6fd8e0f943a0e8216daf238e015b6a311512d4ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 9 Apr 2023 21:01:11 +0200 Subject: [PATCH] bmips: add subtargets for each SoC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit BMIPS is a generic arch that can be used for multiple Broadcom SoCs, each one with its own specific drivers, so instead of having a huge kernel supporting all of them, let's switch to a subtarget per SoC like other OpenWrt targets. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/Makefile | 2 +- .../lib/upgrade/cfe-jffs2-nand.sh} | 20 -- .../bcm6318/base-files/etc/board.d/01_leds | 16 + .../bcm6318/base-files/etc/board.d/02_network | 16 + .../base-files/etc/uci-defaults/09_fix_crc | 8 +- .../base-files/lib/upgrade/platform.sh | 6 +- target/linux/bmips/{ => bcm6318}/config-5.15 | 33 +- target/linux/bmips/bcm6318/target.mk | 8 + .../bcm63268/base-files/etc/board.d/01_leds | 27 ++ .../base-files/etc/board.d/02_network | 10 +- .../base-files/etc/board.d/03_gpio_switches | 0 .../base-files/lib/upgrade/platform.sh | 26 ++ target/linux/bmips/bcm63268/config-5.15 | 295 ++++++++++++++++++ target/linux/bmips/bcm63268/target.mk | 9 + .../bcm6328/base-files/etc/board.d/02_network | 16 + .../base-files/etc/uci-defaults/09_fix_crc | 11 + .../base-files/lib/upgrade/platform.sh | 18 ++ target/linux/bmips/bcm6328/config-5.15 | 293 +++++++++++++++++ target/linux/bmips/bcm6328/target.mk | 9 + .../bcm6358/base-files/etc/board.d/01_leds | 16 + .../bcm6358/base-files/etc/board.d/02_network | 15 + .../base-files/lib/upgrade/platform.sh | 16 + target/linux/bmips/bcm6358/config-5.15 | 274 ++++++++++++++++ target/linux/bmips/bcm6358/target.mk | 9 + .../bcm6362/base-files/etc/board.d/01_leds | 20 ++ .../bcm6362/base-files/etc/board.d/02_network | 17 + .../base-files/lib/upgrade/platform.sh | 22 ++ target/linux/bmips/bcm6362/config-5.15 | 295 ++++++++++++++++++ target/linux/bmips/bcm6362/target.mk | 9 + .../base-files/etc/board.d/02_network | 5 - .../base-files/etc/uci-defaults/09_fix_crc | 11 + .../base-files/lib/upgrade/platform.sh | 16 + target/linux/bmips/bcm6368/config-5.15 | 290 +++++++++++++++++ target/linux/bmips/bcm6368/target.mk | 9 + .../generic/base-files/etc/board.d/01_leds | 16 - target/linux/bmips/generic/config-default | 3 - target/linux/bmips/generic/target.mk | 5 - target/linux/bmips/image/Makefile | 75 ++++- target/linux/bmips/image/bcm6318.mk | 13 + target/linux/bmips/image/bcm63268.mk | 82 +++++ target/linux/bmips/image/bcm6328.mk | 13 + target/linux/bmips/image/bcm6358.mk | 15 + target/linux/bmips/image/bcm6362.mk | 41 +++ target/linux/bmips/image/bcm6368.mk | 14 + target/linux/bmips/image/bcm63xx_generic.mk | 78 ----- target/linux/bmips/image/bcm63xx_nand.mk | 168 ---------- .../bmips/nand/base-files/etc/board.d/01_leds | 16 - target/linux/bmips/nand/config-default | 27 -- target/linux/bmips/nand/target.mk | 6 - 49 files changed, 2037 insertions(+), 382 deletions(-) rename target/linux/bmips/{nand/base-files/lib/upgrade/platform.sh => base-files/lib/upgrade/cfe-jffs2-nand.sh} (79%) create mode 100644 target/linux/bmips/bcm6318/base-files/etc/board.d/01_leds create mode 100644 target/linux/bmips/bcm6318/base-files/etc/board.d/02_network rename target/linux/bmips/{generic => bcm6318}/base-files/etc/uci-defaults/09_fix_crc (53%) rename target/linux/bmips/{generic => bcm6318}/base-files/lib/upgrade/platform.sh (82%) rename target/linux/bmips/{ => bcm6318}/config-5.15 (93%) create mode 100644 target/linux/bmips/bcm6318/target.mk create mode 100644 target/linux/bmips/bcm63268/base-files/etc/board.d/01_leds rename target/linux/bmips/{nand => bcm63268}/base-files/etc/board.d/02_network (93%) rename target/linux/bmips/{nand => bcm63268}/base-files/etc/board.d/03_gpio_switches (100%) create mode 100644 target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/bmips/bcm63268/config-5.15 create mode 100644 target/linux/bmips/bcm63268/target.mk create mode 100644 target/linux/bmips/bcm6328/base-files/etc/board.d/02_network create mode 100644 target/linux/bmips/bcm6328/base-files/etc/uci-defaults/09_fix_crc create mode 100644 target/linux/bmips/bcm6328/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/bmips/bcm6328/config-5.15 create mode 100644 target/linux/bmips/bcm6328/target.mk create mode 100644 target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds create mode 100644 target/linux/bmips/bcm6358/base-files/etc/board.d/02_network create mode 100644 target/linux/bmips/bcm6358/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/bmips/bcm6358/config-5.15 create mode 100644 target/linux/bmips/bcm6358/target.mk create mode 100644 target/linux/bmips/bcm6362/base-files/etc/board.d/01_leds create mode 100644 target/linux/bmips/bcm6362/base-files/etc/board.d/02_network create mode 100644 target/linux/bmips/bcm6362/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/bmips/bcm6362/config-5.15 create mode 100644 target/linux/bmips/bcm6362/target.mk rename target/linux/bmips/{generic => bcm6368}/base-files/etc/board.d/02_network (72%) create mode 100644 target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc create mode 100644 target/linux/bmips/bcm6368/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/bmips/bcm6368/config-5.15 create mode 100644 target/linux/bmips/bcm6368/target.mk delete mode 100644 target/linux/bmips/generic/base-files/etc/board.d/01_leds delete mode 100644 target/linux/bmips/generic/config-default delete mode 100644 target/linux/bmips/generic/target.mk create mode 100644 target/linux/bmips/image/bcm6318.mk create mode 100644 target/linux/bmips/image/bcm63268.mk create mode 100644 target/linux/bmips/image/bcm6328.mk create mode 100644 target/linux/bmips/image/bcm6358.mk create mode 100644 target/linux/bmips/image/bcm6362.mk create mode 100644 target/linux/bmips/image/bcm6368.mk delete mode 100644 target/linux/bmips/image/bcm63xx_generic.mk delete mode 100644 target/linux/bmips/image/bcm63xx_nand.mk delete mode 100644 target/linux/bmips/nand/base-files/etc/board.d/01_leds delete mode 100644 target/linux/bmips/nand/config-default delete mode 100644 target/linux/bmips/nand/target.mk diff --git a/target/linux/bmips/Makefile b/target/linux/bmips/Makefile index fa648665d9..0de5377f4e 100644 --- a/target/linux/bmips/Makefile +++ b/target/linux/bmips/Makefile @@ -6,7 +6,7 @@ ARCH:=mips CPU_TYPE:=mips32 BOARD:=bmips BOARDNAME:=Broadcom BMIPS -SUBTARGETS:=generic nand +SUBTARGETS:=bcm6318 bcm6328 bcm6358 bcm6362 bcm6368 bcm63268 FEATURES:=gpio source-only squashfs usb KERNEL_PATCHVER:=5.15 diff --git a/target/linux/bmips/nand/base-files/lib/upgrade/platform.sh b/target/linux/bmips/base-files/lib/upgrade/cfe-jffs2-nand.sh similarity index 79% rename from target/linux/bmips/nand/base-files/lib/upgrade/platform.sh rename to target/linux/bmips/base-files/lib/upgrade/cfe-jffs2-nand.sh index 33217ed975..64b8df652b 100644 --- a/target/linux/bmips/nand/base-files/lib/upgrade/platform.sh +++ b/target/linux/bmips/base-files/lib/upgrade/cfe-jffs2-nand.sh @@ -1,12 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -PART_NAME=firmware -REQUIRE_IMAGE_METADATA=1 - -platform_check_image() { - return 0 -} - cfe_jffs2_nand_upgrade() { local tar_file="$1" local kernel_mtd="$(find_mtd_index $CI_KERNPART)" @@ -42,16 +35,3 @@ cfe_jffs2_nand_upgrade() { nand_do_upgrade_success } - -platform_do_upgrade() { - case "$(board_name)" in - comtrend,vr-3032u|\ - huawei,hg253s-v2|\ - netgear,dgnd3700-v2) - cfe_jffs2_nand_upgrade "$1" - ;; - *) - nand_do_upgrade "$1" - ;; - esac -} diff --git a/target/linux/bmips/bcm6318/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm6318/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..98355460a0 --- /dev/null +++ b/target/linux/bmips/bcm6318/base-files/etc/board.d/01_leds @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +comtrend,ar-5315u) + ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6318/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6318/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..92b2e8f4d4 --- /dev/null +++ b/target/linux/bmips/bcm6318/base-files/etc/board.d/02_network @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +comtrend,ar-5315u) + ucidef_set_bridge_device switch + ucidef_set_interface_lan "lan1 lan2 lan3 lan4" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/generic/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bmips/bcm6318/base-files/etc/uci-defaults/09_fix_crc similarity index 53% rename from target/linux/bmips/generic/base-files/etc/uci-defaults/09_fix_crc rename to target/linux/bmips/bcm6318/base-files/etc/uci-defaults/09_fix_crc index 60227e7c34..a52f0ecc40 100644 --- a/target/linux/bmips/generic/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bmips/bcm6318/base-files/etc/uci-defaults/09_fix_crc @@ -3,11 +3,9 @@ . /lib/functions.sh case "$(board_name)" in - comtrend,ar-5315u|\ - comtrend,ar-5387un|\ - comtrend,vr-3025u) - mtd fixtrx firmware - ;; +comtrend,ar-5315u) + mtd fixtrx firmware + ;; esac exit 0 diff --git a/target/linux/bmips/generic/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm6318/base-files/lib/upgrade/platform.sh similarity index 82% rename from target/linux/bmips/generic/base-files/lib/upgrade/platform.sh rename to target/linux/bmips/bcm6318/base-files/lib/upgrade/platform.sh index d731bb74d5..1cf95be26a 100644 --- a/target/linux/bmips/generic/base-files/lib/upgrade/platform.sh +++ b/target/linux/bmips/bcm6318/base-files/lib/upgrade/platform.sh @@ -9,8 +9,8 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in - *) - default_do_upgrade "$1" - ;; + *) + default_do_upgrade "$1" + ;; esac } diff --git a/target/linux/bmips/config-5.15 b/target/linux/bmips/bcm6318/config-5.15 similarity index 93% rename from target/linux/bmips/config-5.15 rename to target/linux/bmips/bcm6318/config-5.15 index 3fc58d01dd..588d751744 100644 --- a/target/linux/bmips/config-5.15 +++ b/target/linux/bmips/bcm6318/config-5.15 @@ -10,7 +10,7 @@ CONFIG_B53_MMAP_DRIVER=y CONFIG_B53_SPI_DRIVER=y CONFIG_BCM6345_EXT_IRQ=y CONFIG_BCM6345_L1_IRQ=y -CONFIG_BCM6348_ENET=y +# CONFIG_BCM6348_ENET is not set CONFIG_BCM6368_ENETSW=y CONFIG_BCM63XX_POWER=y CONFIG_BCM7038_WDT=y @@ -28,7 +28,7 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y CONFIG_BMIPS_GENERIC=y CONFIG_CEVT_R4K=y -CONFIG_CLK_BCM63268_TIMER=y +# CONFIG_CLK_BCM63268_TIMER is not set CONFIG_CLK_BCM_63XX_GATE=y CONFIG_CLONE_BACKWARDS=y CONFIG_COMMON_CLK=y @@ -116,8 +116,6 @@ CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_BCM2835=y CONFIG_HZ_PERIODIC=y CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y @@ -165,6 +163,8 @@ CONFIG_MTD_CFI_BE_BYTE_SWAP=y CONFIG_MTD_CFI_STAA=y CONFIG_MTD_JEDECPROBE=y # CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y @@ -191,9 +191,9 @@ CONFIG_PADATA=y CONFIG_PCI=y CONFIG_PCIEPORTBUS=y CONFIG_PCIE_BCM6318=y -CONFIG_PCIE_BCM6328=y +# CONFIG_PCIE_BCM6328 is not set CONFIG_PCIE_PME=y -CONFIG_PCI_BCM6348=y +# CONFIG_PCI_BCM6348 is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_DRIVERS_LEGACY=y CONFIG_PERF_USE_VMALLOC=y @@ -205,11 +205,11 @@ CONFIG_PHY_BCM63XX_USBH=y # CONFIG_PHY_BRCM_SATA is not set CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM6318=y -CONFIG_PINCTRL_BCM63268=y -CONFIG_PINCTRL_BCM6328=y -CONFIG_PINCTRL_BCM6358=y -CONFIG_PINCTRL_BCM6362=y -CONFIG_PINCTRL_BCM6368=y +# CONFIG_PINCTRL_BCM63268 is not set +# CONFIG_PINCTRL_BCM6328 is not set +# CONFIG_PINCTRL_BCM6358 is not set +# CONFIG_PINCTRL_BCM6362 is not set +# CONFIG_PINCTRL_BCM6368 is not set CONFIG_PINCTRL_BCM63XX=y CONFIG_PM=y CONFIG_PM_CLK=y @@ -241,20 +241,11 @@ CONFIG_SMP_UP=y CONFIG_SOCK_RX_QUEUE_MAPPING=y CONFIG_SOC_BCM63XX=y CONFIG_SPI=y -CONFIG_SPI_BCM63XX=y +# CONFIG_SPI_BCM63XX is not set CONFIG_SPI_BCM63XX_HSSPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y CONFIG_SRCU=y -CONFIG_SSB=y -CONFIG_SSB_B43_PCI_BRIDGE=y -CONFIG_SSB_BLOCKIO=y -# CONFIG_SSB_DRIVER_MIPS is not set -CONFIG_SSB_DRIVER_PCICORE=y -CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y -CONFIG_SSB_PCIHOST=y -CONFIG_SSB_PCIHOST_POSSIBLE=y -CONFIG_SSB_SPROM=y CONFIG_SWAP_IO_SPACE=y CONFIG_SWPHY=y CONFIG_SYNC_R4K=y diff --git a/target/linux/bmips/bcm6318/target.mk b/target/linux/bmips/bcm6318/target.mk new file mode 100644 index 0000000000..a8bbc8b976 --- /dev/null +++ b/target/linux/bmips/bcm6318/target.mk @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm6318 +BOARDNAME:=BCM6318 based boards + +define Target/Description + Build firmware images for Broadcom BCM6318 based boards. +endef diff --git a/target/linux/bmips/bcm63268/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm63268/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..d5b65a9c0f --- /dev/null +++ b/target/linux/bmips/bcm63268/base-files/etc/board.d/01_leds @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +comtrend,vr-3032u) + ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1" + ;; +sercomm,h500-s-lowi |\ +sercomm,h500-s-vfes) + ucidef_set_led_netdev "wan" "WAN" "green:internet" "wan" + ucidef_set_led_netdev "wifi" "WiFi" "green:wifi" "wifi" + ucidef_set_led_usbport "usb" "USB" "green:mobile" "usb1-port1" "usb2-port1" + ;; +sercomm,shg2500) + ucidef_set_led_netdev "wan" "WAN" "green:internet" "wan" + ucidef_set_led_usbport "usb1" "USB1" "blue:modem" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "usb2" "USB2" "green:modem" "usb1-port2" "usb2-port2" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/nand/base-files/etc/board.d/02_network b/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network similarity index 93% rename from target/linux/bmips/nand/base-files/etc/board.d/02_network rename to target/linux/bmips/bcm63268/base-files/etc/board.d/02_network index 0e130103da..ad7f2432e2 100644 --- a/target/linux/bmips/nand/base-files/etc/board.d/02_network +++ b/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network @@ -9,12 +9,6 @@ comtrend,vr-3032u) ucidef_set_bridge_device switch ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; -huawei,hg253s-v2 |\ -netgear,dgnd3700-v2 |\ -sercomm,shg2500) - ucidef_set_bridge_device switch - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ;; sercomm,h500-s-lowi |\ sercomm,h500-s-vfes) ucidef_set_bridge_device switch @@ -22,6 +16,10 @@ sercomm,h500-s-vfes) ucidef_set_interface "qtn" device "wifi" protocol "static" ipaddr "1.1.1.1" netmask "255.255.255.252" uci add_list firewall.@zone[0].network='qtn' ;; +sercomm,shg2500) + ucidef_set_bridge_device switch + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; esac board_config_flush diff --git a/target/linux/bmips/nand/base-files/etc/board.d/03_gpio_switches b/target/linux/bmips/bcm63268/base-files/etc/board.d/03_gpio_switches similarity index 100% rename from target/linux/bmips/nand/base-files/etc/board.d/03_gpio_switches rename to target/linux/bmips/bcm63268/base-files/etc/board.d/03_gpio_switches diff --git a/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..0aaf10442b --- /dev/null +++ b/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/upgrade/cfe-jffs2-nand.sh + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + case "$(board_name)" in + comtrend,vr-3032u) + cfe_jffs2_nand_upgrade "$1" + ;; + sercomm,h500-s-lowi |\ + sercomm,h500-s-vfes |\ + sercomm,shg2500) + nand_do_upgrade "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/bmips/bcm63268/config-5.15 b/target/linux/bmips/bcm63268/config-5.15 new file mode 100644 index 0000000000..4cdbe13228 --- /dev/null +++ b/target/linux/bmips/bcm63268/config-5.15 @@ -0,0 +1,295 @@ +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_B53=y +CONFIG_B53_MDIO_DRIVER=y +CONFIG_B53_MMAP_DRIVER=y +CONFIG_B53_SPI_DRIVER=y +CONFIG_BCM6345_EXT_IRQ=y +CONFIG_BCM6345_L1_IRQ=y +# CONFIG_BCM6348_ENET is not set +CONFIG_BCM6368_ENETSW=y +CONFIG_BCM63XX_POWER=y +CONFIG_BCM7038_WDT=y +CONFIG_BCMA=y +CONFIG_BCMA_BLOCKIO=y +# CONFIG_BCMA_DEBUG is not set +# CONFIG_BCMA_DRIVER_GMAC_CMN is not set +# CONFIG_BCMA_DRIVER_MIPS is not set +CONFIG_BCMA_DRIVER_PCI=y +# CONFIG_BCMA_DRIVER_PCI_HOSTMODE is not set +CONFIG_BCMA_HOST_PCI=y +CONFIG_BCMA_HOST_PCI_POSSIBLE=y +# CONFIG_BCMA_HOST_SOC is not set +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BMIPS_GENERIC=y +CONFIG_CEVT_R4K=y +CONFIG_CLK_BCM63268_TIMER=y +CONFIG_CLK_BCM_63XX_GATE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_BMIPS=y +CONFIG_CPU_BMIPS32_3300=y +CONFIG_CPU_BMIPS4350=y +CONFIG_CPU_BMIPS4380=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CSRC_R4K=y +CONFIG_DEBUG_INFO=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DTC=y +# CONFIG_DT_BCM93384WVG is not set +# CONFIG_DT_BCM93384WVG_VIPER is not set +# CONFIG_DT_BCM96368MVWG is not set +# CONFIG_DT_BCM97125CBMB is not set +# CONFIG_DT_BCM97346DBSMB is not set +# CONFIG_DT_BCM97358SVMB is not set +# CONFIG_DT_BCM97360SVMB is not set +# CONFIG_DT_BCM97362SVMB is not set +# CONFIG_DT_BCM97420C is not set +# CONFIG_DT_BCM97425SVMB is not set +# CONFIG_DT_BCM97435SVMB is not set +# CONFIG_DT_BCM9EJTAGPRB is not set +# CONFIG_DT_COMTREND_VR3032U is not set +# CONFIG_DT_NETGEAR_CVG834G is not set +CONFIG_DT_NONE=y +# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set +# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set +CONFIG_FIXED_PHY=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_CMPDI2=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GPIO_BRCMSTB is not set +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_REGMAP=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_BCM2835=y +CONFIG_HZ_PERIODIC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MIPS_CPU=y +CONFIG_IRQ_WORK=y +# CONFIG_LEDS_SERCOMM_MSP430 is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_BUS_MUX=y +CONFIG_MDIO_BUS_MUX_BCM6368=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CLOCK_VSYSCALL=y +# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_MIPS_CMDLINE_FROM_DTB=y +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_EXTERNAL_TIMER=y +CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y +CONFIG_MIPS_L1_CACHE_SHIFT_6=y +CONFIG_MIPS_LD_CAN_LINK_VDSO=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_O32_FP64_SUPPORT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MTD_BCM63XX_PARTS is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_BE_BYTE_SWAP=y +# CONFIG_MTD_CFI_GEOMETRY is not set +# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +# CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y +CONFIG_MTD_SPLIT_BCM_WFI_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_EXCEPT_FILL=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +CONFIG_NR_CPUS=2 +CONFIG_NVMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_PADATA=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIE_BCM6318 is not set +CONFIG_PCIE_BCM6328=y +CONFIG_PCIE_PME=y +# CONFIG_PCI_BCM6348 is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x80010000 +CONFIG_PHY_BCM63XX_USBH=y +# CONFIG_PHY_BRCM_SATA is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_BCM6318 is not set +CONFIG_PINCTRL_BCM63268=y +# CONFIG_PINCTRL_BCM6328 is not set +# CONFIG_PINCTRL_BCM6358 is not set +# CONFIG_PINCTRL_BCM6362 is not set +# CONFIG_PINCTRL_BCM6368 is not set +CONFIG_PINCTRL_BCM63XX=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELAY=y +CONFIG_RESET_BCM6345=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SOC_BCM63XX=y +CONFIG_SPI=y +CONFIG_SPI_BCM63XX=y +CONFIG_SPI_BCM63XX_HSSPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SRCU=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_SWPHY=y +CONFIG_SYNC_R4K=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_HAS_CPU_BMIPS=y +CONFIG_SYS_HAS_CPU_BMIPS32_3300=y +CONFIG_SYS_HAS_CPU_BMIPS4350=y +CONFIG_SYS_HAS_CPU_BMIPS4380=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TARGET_ISA_REV=0 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/bcm63268/target.mk b/target/linux/bmips/bcm63268/target.mk new file mode 100644 index 0000000000..98cc6c533c --- /dev/null +++ b/target/linux/bmips/bcm63268/target.mk @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm63268 +BOARDNAME:=BCM63268 based boards +FEATURES+=nand + +define Target/Description + Build firmware images for Broadcom BCM63268 based boards. +endef diff --git a/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..792926fcf2 --- /dev/null +++ b/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +comtrend,ar-5387un) + ucidef_set_bridge_device switch + ucidef_set_interface_lan "lan1 lan2 lan3 lan4" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6328/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bmips/bcm6328/base-files/etc/uci-defaults/09_fix_crc new file mode 100644 index 0000000000..3909947be6 --- /dev/null +++ b/target/linux/bmips/bcm6328/base-files/etc/uci-defaults/09_fix_crc @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions.sh + +case "$(board_name)" in +comtrend,ar-5387un) + mtd fixtrx firmware + ;; +esac + +exit 0 diff --git a/target/linux/bmips/bcm6328/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm6328/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..eb1d7fd0e5 --- /dev/null +++ b/target/linux/bmips/bcm6328/base-files/lib/upgrade/platform.sh @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/upgrade/cfe-jffs2-nand.sh + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + case "$(board_name)" in + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/bmips/bcm6328/config-5.15 b/target/linux/bmips/bcm6328/config-5.15 new file mode 100644 index 0000000000..ea9898782a --- /dev/null +++ b/target/linux/bmips/bcm6328/config-5.15 @@ -0,0 +1,293 @@ +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_B53=y +CONFIG_B53_MDIO_DRIVER=y +CONFIG_B53_MMAP_DRIVER=y +CONFIG_B53_SPI_DRIVER=y +CONFIG_BCM6345_EXT_IRQ=y +CONFIG_BCM6345_L1_IRQ=y +# CONFIG_BCM6348_ENET is not set +CONFIG_BCM6368_ENETSW=y +CONFIG_BCM63XX_POWER=y +CONFIG_BCM7038_WDT=y +CONFIG_BCMA=y +CONFIG_BCMA_BLOCKIO=y +# CONFIG_BCMA_DEBUG is not set +# CONFIG_BCMA_DRIVER_GMAC_CMN is not set +# CONFIG_BCMA_DRIVER_MIPS is not set +CONFIG_BCMA_DRIVER_PCI=y +# CONFIG_BCMA_DRIVER_PCI_HOSTMODE is not set +CONFIG_BCMA_HOST_PCI=y +CONFIG_BCMA_HOST_PCI_POSSIBLE=y +# CONFIG_BCMA_HOST_SOC is not set +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BMIPS_GENERIC=y +CONFIG_CEVT_R4K=y +# CONFIG_CLK_BCM63268_TIMER is not set +CONFIG_CLK_BCM_63XX_GATE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_BMIPS=y +CONFIG_CPU_BMIPS32_3300=y +CONFIG_CPU_BMIPS4350=y +CONFIG_CPU_BMIPS4380=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CSRC_R4K=y +CONFIG_DEBUG_INFO=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DTC=y +# CONFIG_DT_BCM93384WVG is not set +# CONFIG_DT_BCM93384WVG_VIPER is not set +# CONFIG_DT_BCM96368MVWG is not set +# CONFIG_DT_BCM97125CBMB is not set +# CONFIG_DT_BCM97346DBSMB is not set +# CONFIG_DT_BCM97358SVMB is not set +# CONFIG_DT_BCM97360SVMB is not set +# CONFIG_DT_BCM97362SVMB is not set +# CONFIG_DT_BCM97420C is not set +# CONFIG_DT_BCM97425SVMB is not set +# CONFIG_DT_BCM97435SVMB is not set +# CONFIG_DT_BCM9EJTAGPRB is not set +# CONFIG_DT_COMTREND_VR3032U is not set +# CONFIG_DT_NETGEAR_CVG834G is not set +CONFIG_DT_NONE=y +# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set +# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set +CONFIG_FIXED_PHY=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_CMPDI2=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GPIO_BRCMSTB is not set +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_REGMAP=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HZ_PERIODIC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MIPS_CPU=y +CONFIG_IRQ_WORK=y +# CONFIG_LEDS_SERCOMM_MSP430 is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_BUS_MUX=y +CONFIG_MDIO_BUS_MUX_BCM6368=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CLOCK_VSYSCALL=y +# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_MIPS_CMDLINE_FROM_DTB=y +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_EXTERNAL_TIMER=y +CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y +CONFIG_MIPS_L1_CACHE_SHIFT_6=y +CONFIG_MIPS_LD_CAN_LINK_VDSO=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_O32_FP64_SUPPORT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MTD_BCM63XX_PARTS is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_BE_BYTE_SWAP=y +# CONFIG_MTD_CFI_GEOMETRY is not set +# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +# CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y +CONFIG_MTD_SPLIT_BCM_WFI_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_EXCEPT_FILL=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +CONFIG_NR_CPUS=2 +CONFIG_NVMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_PADATA=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIE_BCM6318 is not set +CONFIG_PCIE_BCM6328=y +CONFIG_PCIE_PME=y +CONFIG_PCI_BCM6348=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x80010000 +CONFIG_PHY_BCM63XX_USBH=y +# CONFIG_PHY_BRCM_SATA is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_BCM6318 is not set +# CONFIG_PINCTRL_BCM63268 is not set +CONFIG_PINCTRL_BCM6328=y +# CONFIG_PINCTRL_BCM6358 is not set +# CONFIG_PINCTRL_BCM6362 is not set +# CONFIG_PINCTRL_BCM6368 is not set +CONFIG_PINCTRL_BCM63XX=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELAY=y +CONFIG_RESET_BCM6345=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SOC_BCM63XX=y +CONFIG_SPI=y +# CONFIG_SPI_BCM63XX is not set +CONFIG_SPI_BCM63XX_HSSPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SRCU=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_SWPHY=y +CONFIG_SYNC_R4K=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_HAS_CPU_BMIPS=y +CONFIG_SYS_HAS_CPU_BMIPS32_3300=y +CONFIG_SYS_HAS_CPU_BMIPS4350=y +CONFIG_SYS_HAS_CPU_BMIPS4380=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TARGET_ISA_REV=0 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/bcm6328/target.mk b/target/linux/bmips/bcm6328/target.mk new file mode 100644 index 0000000000..a514130fc7 --- /dev/null +++ b/target/linux/bmips/bcm6328/target.mk @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm6328 +BOARDNAME:=BCM6328 based boards +FEATURES+=nand + +define Target/Description + Build firmware images for Broadcom BCM6328 based boards. +endef diff --git a/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..74fdef28fb --- /dev/null +++ b/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +huawei,hg556a-b) + ucidef_set_led_usbport "usb" "USB" "red:hspa" "1-1-port1" "1-1-port2" "usb1-port2" "usb2-port2" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..470d1b1bd0 --- /dev/null +++ b/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +huawei,hg556a-b) + ucidef_set_interface_lan "eth0" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6358/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm6358/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..1cf95be26a --- /dev/null +++ b/target/linux/bmips/bcm6358/base-files/lib/upgrade/platform.sh @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + case "$(board_name)" in + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/bmips/bcm6358/config-5.15 b/target/linux/bmips/bcm6358/config-5.15 new file mode 100644 index 0000000000..62956398d5 --- /dev/null +++ b/target/linux/bmips/bcm6358/config-5.15 @@ -0,0 +1,274 @@ +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_B53=y +CONFIG_B53_MDIO_DRIVER=y +CONFIG_B53_SPI_DRIVER=y +CONFIG_BCM6345_EXT_IRQ=y +CONFIG_BCM6345_L1_IRQ=y +CONFIG_BCM6348_ENET=y +# CONFIG_BCM6368_ENETSW is not set +CONFIG_BCM7038_WDT=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BMIPS_GENERIC=y +CONFIG_CEVT_R4K=y +# CONFIG_CLK_BCM63268_TIMER is not set +CONFIG_CLK_BCM_63XX_GATE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_BMIPS=y +CONFIG_CPU_BMIPS32_3300=y +CONFIG_CPU_BMIPS4350=y +CONFIG_CPU_BMIPS4380=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CSRC_R4K=y +CONFIG_DEBUG_INFO=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DTC=y +# CONFIG_DT_BCM93384WVG is not set +# CONFIG_DT_BCM93384WVG_VIPER is not set +# CONFIG_DT_BCM96368MVWG is not set +# CONFIG_DT_BCM97125CBMB is not set +# CONFIG_DT_BCM97346DBSMB is not set +# CONFIG_DT_BCM97358SVMB is not set +# CONFIG_DT_BCM97360SVMB is not set +# CONFIG_DT_BCM97362SVMB is not set +# CONFIG_DT_BCM97420C is not set +# CONFIG_DT_BCM97425SVMB is not set +# CONFIG_DT_BCM97435SVMB is not set +# CONFIG_DT_BCM9EJTAGPRB is not set +# CONFIG_DT_COMTREND_VR3032U is not set +# CONFIG_DT_NETGEAR_CVG834G is not set +CONFIG_DT_NONE=y +# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set +# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set +CONFIG_FIXED_PHY=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_CMPDI2=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GPIO_BRCMSTB is not set +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_REGMAP=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HZ_PERIODIC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MIPS_CPU=y +CONFIG_IRQ_WORK=y +# CONFIG_LEDS_SERCOMM_MSP430 is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=y +# CONFIG_MDIO_BUS_MUX_BCM6368 is not set +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CLOCK_VSYSCALL=y +# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_MIPS_CMDLINE_FROM_DTB=y +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_EXTERNAL_TIMER=y +CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y +CONFIG_MIPS_L1_CACHE_SHIFT_6=y +CONFIG_MIPS_LD_CAN_LINK_VDSO=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_O32_FP64_SUPPORT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MTD_BCM63XX_PARTS is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_BE_BYTE_SWAP=y +# CONFIG_MTD_CFI_GEOMETRY is not set +# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +# CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_EXCEPT_FILL=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +CONFIG_NR_CPUS=2 +CONFIG_NVMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_PADATA=y +CONFIG_PCI=y +# CONFIG_PCIE_BCM6318 is not set +# CONFIG_PCIE_BCM6328 is not set +CONFIG_PCI_BCM6348=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x80010000 +CONFIG_PHY_BCM63XX_USBH=y +# CONFIG_PHY_BRCM_SATA is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_BCM6318 is not set +# CONFIG_PINCTRL_BCM63268 is not set +# CONFIG_PINCTRL_BCM6328 is not set +CONFIG_PINCTRL_BCM6358=y +# CONFIG_PINCTRL_BCM6362 is not set +# CONFIG_PINCTRL_BCM6368 is not set +CONFIG_PINCTRL_BCM63XX=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELAY=y +CONFIG_RESET_BCM6345=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +# CONFIG_SOC_BCM63XX is not set +CONFIG_SPI=y +CONFIG_SPI_BCM63XX=y +# CONFIG_SPI_BCM63XX_HSSPI is not set +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SRCU=y +CONFIG_SSB=y +CONFIG_SSB_B43_PCI_BRIDGE=y +CONFIG_SSB_BLOCKIO=y +# CONFIG_SSB_DRIVER_MIPS is not set +CONFIG_SSB_DRIVER_PCICORE=y +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_SPROM=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_SWPHY=y +CONFIG_SYNC_R4K=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_HAS_CPU_BMIPS=y +CONFIG_SYS_HAS_CPU_BMIPS32_3300=y +CONFIG_SYS_HAS_CPU_BMIPS4350=y +CONFIG_SYS_HAS_CPU_BMIPS4380=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TARGET_ISA_REV=0 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/bcm6358/target.mk b/target/linux/bmips/bcm6358/target.mk new file mode 100644 index 0000000000..d868d0a986 --- /dev/null +++ b/target/linux/bmips/bcm6358/target.mk @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm6358 +BOARDNAME:=BCM6358 based boards +FEATURES+=low_mem + +define Target/Description + Build firmware images for Broadcom BCM6358 based boards. +endef diff --git a/target/linux/bmips/bcm6362/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm6362/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..cb1d24ce89 --- /dev/null +++ b/target/linux/bmips/bcm6362/base-files/etc/board.d/01_leds @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +huawei,hg253s-v2) + ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1" + ;; +netgear,dgnd3700-v2) + ucidef_set_led_usbport "usb1" "USB1" "green:usb1" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "usb2" "USB2" "green:usb2" "usb1-port2" "usb2-port2" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6362/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6362/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..7986f78310 --- /dev/null +++ b/target/linux/bmips/bcm6362/base-files/etc/board.d/02_network @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +huawei,hg253s-v2 |\ +netgear,dgnd3700-v2) + ucidef_set_bridge_device switch + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6362/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm6362/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..9175cf4255 --- /dev/null +++ b/target/linux/bmips/bcm6362/base-files/lib/upgrade/platform.sh @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/upgrade/cfe-jffs2-nand.sh + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + case "$(board_name)" in + huawei,hg253s-v2 |\ + netgear,dgnd3700-v2) + cfe_jffs2_nand_upgrade "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/bmips/bcm6362/config-5.15 b/target/linux/bmips/bcm6362/config-5.15 new file mode 100644 index 0000000000..325692e5f3 --- /dev/null +++ b/target/linux/bmips/bcm6362/config-5.15 @@ -0,0 +1,295 @@ +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_B53=y +CONFIG_B53_MDIO_DRIVER=y +CONFIG_B53_MMAP_DRIVER=y +CONFIG_B53_SPI_DRIVER=y +CONFIG_BCM6345_EXT_IRQ=y +CONFIG_BCM6345_L1_IRQ=y +# CONFIG_BCM6348_ENET is not set +CONFIG_BCM6368_ENETSW=y +CONFIG_BCM63XX_POWER=y +CONFIG_BCM7038_WDT=y +CONFIG_BCMA=y +CONFIG_BCMA_BLOCKIO=y +# CONFIG_BCMA_DEBUG is not set +# CONFIG_BCMA_DRIVER_GMAC_CMN is not set +# CONFIG_BCMA_DRIVER_MIPS is not set +CONFIG_BCMA_DRIVER_PCI=y +# CONFIG_BCMA_DRIVER_PCI_HOSTMODE is not set +CONFIG_BCMA_HOST_PCI=y +CONFIG_BCMA_HOST_PCI_POSSIBLE=y +# CONFIG_BCMA_HOST_SOC is not set +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BMIPS_GENERIC=y +CONFIG_CEVT_R4K=y +# CONFIG_CLK_BCM63268_TIMER is not set +CONFIG_CLK_BCM_63XX_GATE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_BMIPS=y +CONFIG_CPU_BMIPS32_3300=y +CONFIG_CPU_BMIPS4350=y +CONFIG_CPU_BMIPS4380=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CSRC_R4K=y +CONFIG_DEBUG_INFO=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DTC=y +# CONFIG_DT_BCM93384WVG is not set +# CONFIG_DT_BCM93384WVG_VIPER is not set +# CONFIG_DT_BCM96368MVWG is not set +# CONFIG_DT_BCM97125CBMB is not set +# CONFIG_DT_BCM97346DBSMB is not set +# CONFIG_DT_BCM97358SVMB is not set +# CONFIG_DT_BCM97360SVMB is not set +# CONFIG_DT_BCM97362SVMB is not set +# CONFIG_DT_BCM97420C is not set +# CONFIG_DT_BCM97425SVMB is not set +# CONFIG_DT_BCM97435SVMB is not set +# CONFIG_DT_BCM9EJTAGPRB is not set +# CONFIG_DT_COMTREND_VR3032U is not set +# CONFIG_DT_NETGEAR_CVG834G is not set +CONFIG_DT_NONE=y +# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set +# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set +CONFIG_FIXED_PHY=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_CMPDI2=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GPIO_BRCMSTB is not set +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_REGMAP=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_BCM2835=y +CONFIG_HZ_PERIODIC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MIPS_CPU=y +CONFIG_IRQ_WORK=y +# CONFIG_LEDS_SERCOMM_MSP430 is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_BUS_MUX=y +CONFIG_MDIO_BUS_MUX_BCM6368=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CLOCK_VSYSCALL=y +# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_MIPS_CMDLINE_FROM_DTB=y +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_EXTERNAL_TIMER=y +CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y +CONFIG_MIPS_L1_CACHE_SHIFT_6=y +CONFIG_MIPS_LD_CAN_LINK_VDSO=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_O32_FP64_SUPPORT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MTD_BCM63XX_PARTS is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_BE_BYTE_SWAP=y +# CONFIG_MTD_CFI_GEOMETRY is not set +# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +# CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y +CONFIG_MTD_SPLIT_BCM_WFI_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_EXCEPT_FILL=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +CONFIG_NR_CPUS=2 +CONFIG_NVMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_PADATA=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIE_BCM6318 is not set +CONFIG_PCIE_BCM6328=y +CONFIG_PCIE_PME=y +# CONFIG_PCI_BCM6348 is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x80010000 +CONFIG_PHY_BCM63XX_USBH=y +# CONFIG_PHY_BRCM_SATA is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_BCM6318 is not set +# CONFIG_PINCTRL_BCM63268 is not set +# CONFIG_PINCTRL_BCM6328 is not set +# CONFIG_PINCTRL_BCM6358 is not set +CONFIG_PINCTRL_BCM6362=y +# CONFIG_PINCTRL_BCM6368 is not set +CONFIG_PINCTRL_BCM63XX=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELAY=y +CONFIG_RESET_BCM6345=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SOC_BCM63XX=y +CONFIG_SPI=y +CONFIG_SPI_BCM63XX=y +CONFIG_SPI_BCM63XX_HSSPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SRCU=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_SWPHY=y +CONFIG_SYNC_R4K=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_HAS_CPU_BMIPS=y +CONFIG_SYS_HAS_CPU_BMIPS32_3300=y +CONFIG_SYS_HAS_CPU_BMIPS4350=y +CONFIG_SYS_HAS_CPU_BMIPS4380=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TARGET_ISA_REV=0 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/bcm6362/target.mk b/target/linux/bmips/bcm6362/target.mk new file mode 100644 index 0000000000..81addd45f6 --- /dev/null +++ b/target/linux/bmips/bcm6362/target.mk @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm6362 +BOARDNAME:=BCM6362 based boards +FEATURES+=nand + +define Target/Description + Build firmware images for Broadcom BCM6362 based boards. +endef diff --git a/target/linux/bmips/generic/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network similarity index 72% rename from target/linux/bmips/generic/base-files/etc/board.d/02_network rename to target/linux/bmips/bcm6368/base-files/etc/board.d/02_network index a5995849f0..14d6e56dd1 100644 --- a/target/linux/bmips/generic/base-files/etc/board.d/02_network +++ b/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network @@ -5,15 +5,10 @@ board_config_update case "$(board_name)" in -comtrend,ar-5315u |\ -comtrend,ar-5387un |\ comtrend,vr-3025u) ucidef_set_bridge_device switch ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; -huawei,hg556a-b) - ucidef_set_interface_lan "eth0" - ;; esac board_config_flush diff --git a/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc new file mode 100644 index 0000000000..c66e4169fd --- /dev/null +++ b/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions.sh + +case "$(board_name)" in +comtrend,vr-3025u) + mtd fixtrx firmware + ;; +esac + +exit 0 diff --git a/target/linux/bmips/bcm6368/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm6368/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..1cf95be26a --- /dev/null +++ b/target/linux/bmips/bcm6368/base-files/lib/upgrade/platform.sh @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + case "$(board_name)" in + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/bmips/bcm6368/config-5.15 b/target/linux/bmips/bcm6368/config-5.15 new file mode 100644 index 0000000000..06d72d9ebe --- /dev/null +++ b/target/linux/bmips/bcm6368/config-5.15 @@ -0,0 +1,290 @@ +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_B53=y +CONFIG_B53_MDIO_DRIVER=y +CONFIG_B53_MMAP_DRIVER=y +CONFIG_B53_SPI_DRIVER=y +CONFIG_BCM6345_EXT_IRQ=y +CONFIG_BCM6345_L1_IRQ=y +# CONFIG_BCM6348_ENET is not set +CONFIG_BCM6368_ENETSW=y +CONFIG_BCM7038_WDT=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BMIPS_GENERIC=y +CONFIG_CEVT_R4K=y +# CONFIG_CLK_BCM63268_TIMER is not set +CONFIG_CLK_BCM_63XX_GATE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_BMIPS=y +CONFIG_CPU_BMIPS32_3300=y +CONFIG_CPU_BMIPS4350=y +CONFIG_CPU_BMIPS4380=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_NO_EFFICIENT_FFS=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CSRC_R4K=y +CONFIG_DEBUG_INFO=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DTC=y +# CONFIG_DT_BCM93384WVG is not set +# CONFIG_DT_BCM93384WVG_VIPER is not set +# CONFIG_DT_BCM96368MVWG is not set +# CONFIG_DT_BCM97125CBMB is not set +# CONFIG_DT_BCM97346DBSMB is not set +# CONFIG_DT_BCM97358SVMB is not set +# CONFIG_DT_BCM97360SVMB is not set +# CONFIG_DT_BCM97362SVMB is not set +# CONFIG_DT_BCM97420C is not set +# CONFIG_DT_BCM97425SVMB is not set +# CONFIG_DT_BCM97435SVMB is not set +# CONFIG_DT_BCM9EJTAGPRB is not set +# CONFIG_DT_COMTREND_VR3032U is not set +# CONFIG_DT_NETGEAR_CVG834G is not set +CONFIG_DT_NONE=y +# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set +# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set +CONFIG_FIXED_PHY=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_LIB_ASHLDI3=y +CONFIG_GENERIC_LIB_ASHRDI3=y +CONFIG_GENERIC_LIB_CMPDI2=y +CONFIG_GENERIC_LIB_LSHRDI3=y +CONFIG_GENERIC_LIB_UCMPDI2=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GPIO_BRCMSTB is not set +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_REGMAP=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_BCM2835=y +CONFIG_HZ_PERIODIC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MIPS_CPU=y +CONFIG_IRQ_WORK=y +# CONFIG_LEDS_SERCOMM_MSP430 is not set +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_BUS_MUX=y +CONFIG_MDIO_BUS_MUX_BCM6368=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CLOCK_VSYSCALL=y +# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_MIPS_CMDLINE_FROM_DTB=y +CONFIG_MIPS_EBPF_JIT=y +CONFIG_MIPS_EXTERNAL_TIMER=y +CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y +CONFIG_MIPS_L1_CACHE_SHIFT_6=y +CONFIG_MIPS_LD_CAN_LINK_VDSO=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_NR_CPU_NR_MAP=2 +CONFIG_MIPS_O32_FP64_SUPPORT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MTD_BCM63XX_PARTS is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_BE_BYTE_SWAP=y +# CONFIG_MTD_CFI_GEOMETRY is not set +# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +# CONFIG_MTD_PARSER_IMAGETAG is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BCM63XX_FW=y +CONFIG_MTD_SPLIT_BCM_WFI_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_TAG_BRCM=y +CONFIG_NET_DSA_TAG_BRCM_COMMON=y +CONFIG_NET_DSA_TAG_BRCM_LEGACY=y +CONFIG_NET_DSA_TAG_BRCM_PREPEND=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NO_EXCEPT_FILL=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +CONFIG_NR_CPUS=2 +CONFIG_NVMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_PADATA=y +CONFIG_PCI=y +# CONFIG_PCIE_BCM6318 is not set +# CONFIG_PCIE_BCM6328 is not set +CONFIG_PCI_BCM6348=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x80010000 +CONFIG_PHY_BCM63XX_USBH=y +# CONFIG_PHY_BRCM_SATA is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_BCM6318 is not set +# CONFIG_PINCTRL_BCM63268 is not set +# CONFIG_PINCTRL_BCM6328 is not set +# CONFIG_PINCTRL_BCM6358 is not set +# CONFIG_PINCTRL_BCM6362 is not set +CONFIG_PINCTRL_BCM6368=y +CONFIG_PINCTRL_BCM63XX=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RELAY=y +CONFIG_RESET_BCM6345=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_BCM63XX=y +CONFIG_SERIAL_BCM63XX_CONSOLE=y +CONFIG_SGL_ALLOC=y +CONFIG_SMP=y +CONFIG_SMP_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +# CONFIG_SOC_BCM63XX is not set +CONFIG_SPI=y +CONFIG_SPI_BCM63XX=y +# CONFIG_SPI_BCM63XX_HSSPI is not set +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SRCU=y +CONFIG_SSB=y +CONFIG_SSB_B43_PCI_BRIDGE=y +CONFIG_SSB_BLOCKIO=y +# CONFIG_SSB_DRIVER_MIPS is not set +CONFIG_SSB_DRIVER_PCICORE=y +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_SPROM=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_SWPHY=y +CONFIG_SYNC_R4K=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_HAS_CPU_BMIPS=y +CONFIG_SYS_HAS_CPU_BMIPS32_3300=y +CONFIG_SYS_HAS_CPU_BMIPS4350=y +CONFIG_SYS_HAS_CPU_BMIPS4380=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_TARGET_ISA_REV=0 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/bcm6368/target.mk b/target/linux/bmips/bcm6368/target.mk new file mode 100644 index 0000000000..950bf7224a --- /dev/null +++ b/target/linux/bmips/bcm6368/target.mk @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + +SUBTARGET:=bcm6368 +BOARDNAME:=BCM6368 based boards +FEATURES+=nand + +define Target/Description + Build firmware images for Broadcom BCM6368 based boards. +endef diff --git a/target/linux/bmips/generic/base-files/etc/board.d/01_leds b/target/linux/bmips/generic/base-files/etc/board.d/01_leds deleted file mode 100644 index 3461eca10c..0000000000 --- a/target/linux/bmips/generic/base-files/etc/board.d/01_leds +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -. /lib/functions/leds.sh -. /lib/functions/uci-defaults.sh - -board_config_update - -led_usb="$(get_dt_led usb)" -[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" - -led_usb2="$(get_dt_led usb2)" -[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" - -board_config_flush - -exit 0 diff --git a/target/linux/bmips/generic/config-default b/target/linux/bmips/generic/config-default deleted file mode 100644 index 33fa39715b..0000000000 --- a/target/linux/bmips/generic/config-default +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPLIT_BCM63XX_FW=y diff --git a/target/linux/bmips/generic/target.mk b/target/linux/bmips/generic/target.mk deleted file mode 100644 index bd75426f69..0000000000 --- a/target/linux/bmips/generic/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -BOARDNAME:=generic - -define Target/Description - BMIPS boards without NAND support -endef diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile index da328f7216..8369a86669 100644 --- a/target/linux/bmips/image/Makefile +++ b/target/linux/bmips/image/Makefile @@ -7,7 +7,15 @@ KERNEL_LOADADDR := 0x80010000 # RAM start + 64K LOADER_ENTRY := 0x80a00000 # RAM start + 10M, for relocate LZMA_TEXT_START := 0x81800000 # RAM start + 24M +DEVICE_VARS += CFE_BOARD_ID CFE_EXTRAS +DEVICE_VARS += CFE_PART_FLAGS CFE_PART_ID +DEVICE_VARS += CFE_RAM_FILE +DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD +DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE +DEVICE_VARS += CFE_WFI_FLAGS CFE_WFI_VERSION DEVICE_VARS += CHIP_ID DEVICE_LOADADDR +DEVICE_VARS += FLASH_MB IMAGE_OFFSET +DEVICE_VARS += SERCOMM_FSVER SERCOMM_HWVER SERCOMM_SWVER define Build/Compile rm -rf $(KDIR)/relocate @@ -253,11 +261,74 @@ define Device/Default DEVICE_LOADADDR := endef +define Device/bcm63xx-cfe + FILESYSTEMS := squashfs jffs2-64k jffs2-128k + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf + KERNEL_INITRAMFS_SUFFIX := .elf + IMAGES := cfe.bin sysupgrade.bin + IMAGE/cfe.bin := \ + cfe-bin $$$$(if $$$$(FLASH_MB),--pad $$$$(shell expr $$$$(FLASH_MB) / 2)) + IMAGE/sysupgrade.bin := cfe-bin | append-metadata + BLOCKSIZE := 0x10000 + IMAGE_OFFSET := + FLASH_MB := + CFE_BOARD_ID := + CFE_EXTRAS = --block-size $$(BLOCKSIZE) \ + --image-offset $$(if $$(IMAGE_OFFSET),$$(IMAGE_OFFSET),$$(BLOCKSIZE)) +endef + +# Legacy CFEs with specific LZMA parameters and no length +define Device/bcm63xx-cfe-legacy + $(Device/bcm63xx-cfe) + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe +endef + +# CFE expects a single JFFS2 partition with cferam and kernel. However, +# it's possible to fool CFE into properly loading both cferam and kernel +# from two different JFFS2 partitions by adding dummy files (see +# cfe-jffs2-cferam and cfe-jffs2-kernel). +# Separate JFFS2 partitions allow upgrading openwrt without reflashing cferam +# JFFS2 partition, which is much safer in case anything goes wrong. +define Device/bcm63xx-nand + FILESYSTEMS := squashfs ubifs + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | cfe-jffs2-kernel + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf + KERNEL_INITRAMFS_SUFFIX := .elf + IMAGES := cfe.bin sysupgrade.bin + IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) |\ + cfe-jffs2-cferam | append-ubi | cfe-wfi-tag + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + KERNEL_SIZE := 5120k + CFE_PART_FLAGS := + CFE_PART_ID := + CFE_RAM_FILE := + CFE_RAM_JFFS2_NAME := + CFE_RAM_JFFS2_PAD := + CFE_WFI_VERSION := + CFE_WFI_CHIP_ID = 0x$$(CHIP_ID) + CFE_WFI_FLASH_TYPE := + CFE_WFI_FLAGS := + UBINIZE_OPTS := -E 5 + DEVICE_PACKAGES += nand-utils +endef + +define Device/sercomm-nand + $(Device/bcm63xx-nand) + IMAGES := factory.img sysupgrade.bin + IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi |\ + cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto + SERCOMM_FSVER := + SERCOMM_HWVER := + SERCOMM_SWVER := +endef + +### Package helpers ### ATH9K_PACKAGES := kmod-ath9k wpad-basic-mbedtls B43_PACKAGES := kmod-b43 wpad-basic-mbedtls -USB1_PACKAGES := kmod-usb-ohci kmod-ledtrig-usbdev +USB1_PACKAGES := kmod-usb-ohci kmod-usb-ledtrig-usbport USB2_PACKAGES := $(USB1_PACKAGES) kmod-usb2 -include bcm63xx_$(SUBTARGET).mk +include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/bmips/image/bcm6318.mk b/target/linux/bmips/image/bcm6318.mk new file mode 100644 index 0000000000..fc73eb4521 --- /dev/null +++ b/target/linux/bmips/image/bcm6318.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/comtrend_ar-5315u + $(Device/bcm63xx-cfe) + DEVICE_VENDOR := Comtrend + DEVICE_MODEL := AR-5315u + CHIP_ID := 6318 + CFE_BOARD_ID := 96318A-1441N1 + FLASH_MB := 16 + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-bcm6328 +endef +TARGET_DEVICES += comtrend_ar-5315u diff --git a/target/linux/bmips/image/bcm63268.mk b/target/linux/bmips/image/bcm63268.mk new file mode 100644 index 0000000000..6f7cda7405 --- /dev/null +++ b/target/linux/bmips/image/bcm63268.mk @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/comtrend_vr-3032u + $(Device/bcm63xx-nand) + DEVICE_VENDOR := Comtrend + DEVICE_MODEL := VR-3032u + CHIP_ID := 63268 + SOC := bcm63168 + CFE_RAM_FILE := comtrend,vr-3032u/cferam.000 + CFE_RAM_JFFS2_NAME := cferam.000 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 + CFE_WFI_FLASH_TYPE := 3 + CFE_WFI_VERSION := 0x5732 +endef +TARGET_DEVICES += comtrend_vr-3032u + +define Device/sercomm_h500-s-lowi + $(Device/sercomm-nand) + DEVICE_VENDOR := Sercomm + DEVICE_MODEL := H500-s + DEVICE_VARIANT := lowi + DEVICE_LOADADDR := $(KERNEL_LOADADDR) + KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel + CHIP_ID := 63268 + SOC := bcm63167 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 1434b31 + SERCOMM_SWVER := 3305 +endef +TARGET_DEVICES += sercomm_h500-s-lowi + +define Device/sercomm_h500-s-vfes + $(Device/sercomm-nand) + DEVICE_VENDOR := Sercomm + DEVICE_MODEL := H500-s + DEVICE_VARIANT := vfes + DEVICE_LOADADDR := $(KERNEL_LOADADDR) + KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel + CHIP_ID := 63268 + SOC := bcm63167 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 142584b + SERCOMM_SWVER := 3417 +endef +TARGET_DEVICES += sercomm_h500-s-vfes + +define Device/sercomm_shg2500 + $(Device/sercomm-nand) + DEVICE_VENDOR := Sercomm + DEVICE_MODEL := SHG2500 + DEVICE_LOADADDR := $(KERNEL_LOADADDR) + KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel + CHIP_ID := 63268 + SOC := bcm63168 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) kmod-i2c-gpio \ + kmod-leds-sercomm-msp430 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 1424e4a + SERCOMM_SWVER := 3207 +endef +TARGET_DEVICES += sercomm_shg2500 diff --git a/target/linux/bmips/image/bcm6328.mk b/target/linux/bmips/image/bcm6328.mk new file mode 100644 index 0000000000..3a739a7e71 --- /dev/null +++ b/target/linux/bmips/image/bcm6328.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/comtrend_ar-5387un + $(Device/bcm63xx-cfe) + DEVICE_VENDOR := Comtrend + DEVICE_MODEL := AR-5387un + CHIP_ID := 6328 + CFE_BOARD_ID := 96328A-1441N1 + FLASH_MB := 16 + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-bcm6328 +endef +TARGET_DEVICES += comtrend_ar-5387un diff --git a/target/linux/bmips/image/bcm6358.mk b/target/linux/bmips/image/bcm6358.mk new file mode 100644 index 0000000000..33c87f9ce4 --- /dev/null +++ b/target/linux/bmips/image/bcm6358.mk @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/huawei_hg556a-b + $(Device/bcm63xx-cfe-legacy) + DEVICE_VENDOR := Huawei + DEVICE_MODEL := EchoLife HG556a + DEVICE_VARIANT := B + CHIP_ID := 6358 + CFE_BOARD_ID := HW556 + CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8 + BLOCKSIZE := 0x20000 + DEVICE_PACKAGES += $(USB2_PACKAGES) $(ATH9K_PACKAGES) \ + kmod-leds-gpio +endef +TARGET_DEVICES += huawei_hg556a-b diff --git a/target/linux/bmips/image/bcm6362.mk b/target/linux/bmips/image/bcm6362.mk new file mode 100644 index 0000000000..d6b4b1ce60 --- /dev/null +++ b/target/linux/bmips/image/bcm6362.mk @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/huawei_hg253s-v2 + $(Device/bcm63xx-nand) + IMAGES := flash.bin sysupgrade.bin + IMAGE/flash.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | cfe-jffs2-cferam | append-ubi + DEVICE_VENDOR := Huawei + DEVICE_MODEL := HG253s + DEVICE_VARIANT := v2 + CHIP_ID := 6362 + CFE_PART_FLAGS := 1 + CFE_PART_ID := 0x0001EFEE + CFE_RAM_FILE := huawei,hg253s-v2/cferam.000 + CFE_RAM_JFFS2_NAME := cferam.000 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 kmod-leds-gpio + CFE_WFI_FLASH_TYPE := 3 +endef +TARGET_DEVICES += huawei_hg253s-v2 + +define Device/netgear_dgnd3700-v2 + $(Device/bcm63xx-nand) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGND3700 + DEVICE_VARIANT := v2 + CHIP_ID := 6362 + CFE_RAM_FILE := netgear,dgnd3700-v2/cferam + CFE_RAM_JFFS2_NAME := cferam + CFE_RAM_JFFS2_PAD := 496k + BLOCKSIZE := 16k + PAGESIZE := 512 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 kmod-leds-gpio + CFE_WFI_FLASH_TYPE := 2 + CFE_WFI_VERSION := 0x5731 +endef +TARGET_DEVICES += netgear_dgnd3700-v2 diff --git a/target/linux/bmips/image/bcm6368.mk b/target/linux/bmips/image/bcm6368.mk new file mode 100644 index 0000000000..be4cc576db --- /dev/null +++ b/target/linux/bmips/image/bcm6368.mk @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +define Device/comtrend_vr-3025u + $(Device/bcm63xx-cfe) + DEVICE_VENDOR := Comtrend + DEVICE_MODEL := VR-3025u + CHIP_ID := 6368 + CFE_BOARD_ID := 96368M-1541N + BLOCKSIZE := 0x20000 + FLASH_MB := 32 + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-gpio +endef +TARGET_DEVICES += comtrend_vr-3025u diff --git a/target/linux/bmips/image/bcm63xx_generic.mk b/target/linux/bmips/image/bcm63xx_generic.mk deleted file mode 100644 index 2c832fe8ba..0000000000 --- a/target/linux/bmips/image/bcm63xx_generic.mk +++ /dev/null @@ -1,78 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -DEVICE_VARS += CFE_BOARD_ID CFE_EXTRAS -DEVICE_VARS += FLASH_MB IMAGE_OFFSET - -define Device/bcm63xx-cfe - FILESYSTEMS := squashfs jffs2-64k jffs2-128k - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf - KERNEL_INITRAMFS_SUFFIX := .elf - IMAGES := cfe.bin sysupgrade.bin - IMAGE/cfe.bin := \ - cfe-bin $$$$(if $$$$(FLASH_MB),--pad $$$$(shell expr $$$$(FLASH_MB) / 2)) - IMAGE/sysupgrade.bin := cfe-bin | append-metadata - BLOCKSIZE := 0x10000 - IMAGE_OFFSET := - FLASH_MB := - CFE_BOARD_ID := - CFE_EXTRAS = --block-size $$(BLOCKSIZE) \ - --image-offset $$(if $$(IMAGE_OFFSET),$$(IMAGE_OFFSET),$$(BLOCKSIZE)) -endef - -# Legacy CFEs with specific LZMA parameters and no length -define Device/bcm63xx-cfe-legacy - $(Device/bcm63xx-cfe) - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe -endef - -define Device/comtrend_ar-5315u - $(Device/bcm63xx-cfe) - DEVICE_VENDOR := Comtrend - DEVICE_MODEL := AR-5315u - CHIP_ID := 6318 - CFE_BOARD_ID := 96318A-1441N1 - FLASH_MB := 16 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ - kmod-leds-bcm6328 -endef -TARGET_DEVICES += comtrend_ar-5315u - -define Device/comtrend_ar-5387un - $(Device/bcm63xx-cfe) - DEVICE_VENDOR := Comtrend - DEVICE_MODEL := AR-5387un - CHIP_ID := 6328 - CFE_BOARD_ID := 96328A-1441N1 - FLASH_MB := 16 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ - kmod-leds-bcm6328 -endef -TARGET_DEVICES += comtrend_ar-5387un - -define Device/comtrend_vr-3025u - $(Device/bcm63xx-cfe) - DEVICE_VENDOR := Comtrend - DEVICE_MODEL := VR-3025u - CHIP_ID := 6368 - CFE_BOARD_ID := 96368M-1541N - BLOCKSIZE := 0x20000 - FLASH_MB := 32 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ - kmod-leds-gpio -endef -TARGET_DEVICES += comtrend_vr-3025u - -define Device/huawei_hg556a-b - $(Device/bcm63xx-cfe-legacy) - DEVICE_VENDOR := Huawei - DEVICE_MODEL := EchoLife HG556a - DEVICE_VARIANT := B - CHIP_ID := 6358 - CFE_BOARD_ID := HW556 - CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8 - BLOCKSIZE := 0x20000 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(ATH9K_PACKAGES) \ - kmod-leds-gpio -endef -TARGET_DEVICES += huawei_hg556a-b diff --git a/target/linux/bmips/image/bcm63xx_nand.mk b/target/linux/bmips/image/bcm63xx_nand.mk deleted file mode 100644 index 732a5accdc..0000000000 --- a/target/linux/bmips/image/bcm63xx_nand.mk +++ /dev/null @@ -1,168 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -DEVICE_VARS += CFE_PART_FLAGS CFE_PART_ID -DEVICE_VARS += CFE_RAM_FILE -DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD -DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE -DEVICE_VARS += CFE_WFI_FLAGS CFE_WFI_VERSION -DEVICE_VARS += SERCOMM_FSVER SERCOMM_HWVER SERCOMM_SWVER - -# CFE expects a single JFFS2 partition with cferam and kernel. However, -# it's possible to fool CFE into properly loading both cferam and kernel -# from two different JFFS2 partitions by adding dummy files (see -# cfe-jffs2-cferam and cfe-jffs2-kernel). -# Separate JFFS2 partitions allow upgrading openwrt without reflashing cferam -# JFFS2 partition, which is much safer in case anything goes wrong. -define Device/bcm63xx-nand - FILESYSTEMS := squashfs ubifs - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | cfe-jffs2-kernel - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf - KERNEL_INITRAMFS_SUFFIX := .elf - IMAGES := cfe.bin sysupgrade.bin - IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) |\ - cfe-jffs2-cferam | append-ubi | cfe-wfi-tag - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - KERNEL_SIZE := 5120k - CFE_PART_FLAGS := - CFE_PART_ID := - CFE_RAM_FILE := - CFE_RAM_JFFS2_NAME := - CFE_RAM_JFFS2_PAD := - CFE_WFI_VERSION := - CFE_WFI_CHIP_ID = 0x$$(CHIP_ID) - CFE_WFI_FLASH_TYPE := - CFE_WFI_FLAGS := - UBINIZE_OPTS := -E 5 - DEVICE_PACKAGES += nand-utils -endef - -define Device/sercomm-nand - $(Device/bcm63xx-nand) - IMAGES := factory.img sysupgrade.bin - IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi |\ - cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto - SERCOMM_FSVER := - SERCOMM_HWVER := - SERCOMM_SWVER := -endef - -define Device/comtrend_vr-3032u - $(Device/bcm63xx-nand) - DEVICE_VENDOR := Comtrend - DEVICE_MODEL := VR-3032u - CHIP_ID := 63268 - SOC := bcm63168 - CFE_RAM_FILE := comtrend,vr-3032u/cferam.000 - CFE_RAM_JFFS2_NAME := cferam.000 - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) \ - kmod-leds-bcm6328 - CFE_WFI_FLASH_TYPE := 3 - CFE_WFI_VERSION := 0x5732 -endef -TARGET_DEVICES += comtrend_vr-3032u - -define Device/huawei_hg253s-v2 - $(Device/bcm63xx-nand) - IMAGES := flash.bin sysupgrade.bin - IMAGE/flash.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | cfe-jffs2-cferam | append-ubi - DEVICE_VENDOR := Huawei - DEVICE_MODEL := HG253s - DEVICE_VARIANT := v2 - CHIP_ID := 6362 - CFE_PART_FLAGS := 1 - CFE_PART_ID := 0x0001EFEE - CFE_RAM_FILE := huawei,hg253s-v2/cferam.000 - CFE_RAM_JFFS2_NAME := cferam.000 - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) \ - kmod-leds-bcm6328 kmod-leds-gpio - CFE_WFI_FLASH_TYPE := 3 -endef -TARGET_DEVICES += huawei_hg253s-v2 - -define Device/netgear_dgnd3700-v2 - $(Device/bcm63xx-nand) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := DGND3700 - DEVICE_VARIANT := v2 - CHIP_ID := 6362 - CFE_RAM_FILE := netgear,dgnd3700-v2/cferam - CFE_RAM_JFFS2_NAME := cferam - CFE_RAM_JFFS2_PAD := 496k - BLOCKSIZE := 16k - PAGESIZE := 512 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ - kmod-leds-bcm6328 kmod-leds-gpio - CFE_WFI_FLASH_TYPE := 2 - CFE_WFI_VERSION := 0x5731 -endef -TARGET_DEVICES += netgear_dgnd3700-v2 - -define Device/sercomm_h500-s-lowi - $(Device/sercomm-nand) - DEVICE_VENDOR := Sercomm - DEVICE_MODEL := H500-s - DEVICE_VARIANT := lowi - DEVICE_LOADADDR := $(KERNEL_LOADADDR) - KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel - CHIP_ID := 63268 - SOC := bcm63167 - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) \ - kmod-leds-bcm6328 - SERCOMM_FSVER := 1001 - SERCOMM_HWVER := 1434b31 - SERCOMM_SWVER := 3305 -endef -TARGET_DEVICES += sercomm_h500-s-lowi - -define Device/sercomm_h500-s-vfes - $(Device/sercomm-nand) - DEVICE_VENDOR := Sercomm - DEVICE_MODEL := H500-s - DEVICE_VARIANT := vfes - DEVICE_LOADADDR := $(KERNEL_LOADADDR) - KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel - CHIP_ID := 63268 - SOC := bcm63167 - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) \ - kmod-leds-bcm6328 - SERCOMM_FSVER := 1001 - SERCOMM_HWVER := 142584b - SERCOMM_SWVER := 3417 -endef -TARGET_DEVICES += sercomm_h500-s-vfes - -define Device/sercomm_shg2500 - $(Device/sercomm-nand) - DEVICE_VENDOR := Sercomm - DEVICE_MODEL := SHG2500 - DEVICE_LOADADDR := $(KERNEL_LOADADDR) - KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel - CHIP_ID := 63268 - SOC := bcm63168 - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) kmod-i2c-gpio \ - kmod-leds-sercomm-msp430 - SERCOMM_FSVER := 1001 - SERCOMM_HWVER := 1424e4a - SERCOMM_SWVER := 3207 -endef -TARGET_DEVICES += sercomm_shg2500 diff --git a/target/linux/bmips/nand/base-files/etc/board.d/01_leds b/target/linux/bmips/nand/base-files/etc/board.d/01_leds deleted file mode 100644 index 3461eca10c..0000000000 --- a/target/linux/bmips/nand/base-files/etc/board.d/01_leds +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -. /lib/functions/leds.sh -. /lib/functions/uci-defaults.sh - -board_config_update - -led_usb="$(get_dt_led usb)" -[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" - -led_usb2="$(get_dt_led usb2)" -[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" - -board_config_flush - -exit 0 diff --git a/target/linux/bmips/nand/config-default b/target/linux/bmips/nand/config-default deleted file mode 100644 index eeb45b82f1..0000000000 --- a/target/linux/bmips/nand/config-default +++ /dev/null @@ -1,27 +0,0 @@ -CONFIG_CRC16=y -CONFIG_CRYPTO_ACOMP2=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_HASH_INFO=y -CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_ZSTD=y -CONFIG_JFFS2_FS_NAND=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_MTD_NAND_BRCMNAND=y -CONFIG_MTD_NAND_CORE=y -CONFIG_MTD_NAND_ECC_SW_HAMMING=y -CONFIG_MTD_RAW_NAND=y -CONFIG_MTD_SPLIT_BCM_WFI_FW=y -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_SGL_ALLOC=y -CONFIG_UBIFS_FS=y -CONFIG_XXHASH=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZSTD_COMPRESS=y -CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/bmips/nand/target.mk b/target/linux/bmips/nand/target.mk deleted file mode 100644 index da8ba0428a..0000000000 --- a/target/linux/bmips/nand/target.mk +++ /dev/null @@ -1,6 +0,0 @@ -BOARDNAME:=nand -FEATURES+=nand - -define Target/Description - BMIPS boards with NAND support -endef -- 2.30.2