From 8203f1fd9da1a5e4f357baf82c1fb22b185457cd Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:15:36 +0800 Subject: [PATCH] update --- .github/workflows/Openwrt-AutoBuild.yml | 4 +- .github/workflows/repo-dispatcher.yml | 7 +- devices/amlogic_meson8b/.config | 11 + .../{meson_meson8b => amlogic_meson8b}/diy.sh | 4 +- .../patches/BRCMFMAC_SDIO.patch | 10 + .../patches/onecloud.patch | 19 +- devices/amlogic_mesongx/.config | 9 + devices/amlogic_mesongx/diy.sh | 14 + .../patches/BRCMFMAC_SDIO.patch | 10 + devices/bcm27xx_bcm2712/.config | 3 + devices/common/info.mk | 12 - devices/common/patches/imagebuilder.patch | 71 ++- devices/mediatek_filogic/.config | 2 + .../linux/mediatek/dts/mt7981-ikuai-q3000.dts | 319 ++++++++++++ .../mediatek/dts/mt7981b-nokia-ea0326gmp.dts | 287 ----------- .../mediatek_filogic/patches/01-360t7.patch | 2 +- .../mediatek_filogic/patches/03-nx30.patch | 2 +- .../patches/08-cmcc_rax3000m.patch | 4 +- .../patches/09-jcg_q30-pro.patch | 2 +- .../patches/10-re-cp-03.patch | 2 +- .../mediatek_filogic/patches/12-asr3000.patch | 2 +- .../patches/13-rg-x60-pro.patch | 404 --------------- .../patches/15-cmcc-a10.patch | 2 +- .../patches/17-lc-hx3001.patch | 4 +- .../mediatek_filogic/patches/18-wr30u.patch | 6 +- .../patches/20-ea0326gmp.patch | 152 ++---- .../mediatek_filogic/patches/21-q3000.patch | 64 +++ devices/mediatek_mt7981/.config | 146 ------ devices/mediatek_mt7981/README.md | 1 - devices/mediatek_mt7981/diy.sh | 19 - devices/mediatek_mt7981/feeds.conf | 4 - .../mediatek_mt7981/patches/base-files.patch | 22 - devices/mediatek_mt7981/patches/fix.patch | 55 -- .../patches/iptables-mod-socket.patch | 40 -- .../patches/kernel-defaults.patch | 10 - devices/mediatek_mt7981/patches/targets.patch | 55 -- devices/mediatek_mt7981/settings.ini | 2 - devices/meson_meson8b/.config | 9 - .../patches/kernel_5.10.revert.patch.b | 485 ------------------ devices/ramips_mt7620/.config | 6 + .../ramips_mt7620/patches/hiwifi_r33.patch | 4 +- devices/ramips_mt7621/.config | 4 + .../ramips/dts/mt7621_jdcloud_re-cp-02.dts | 181 +++++++ .../linux/ramips/dts/mt7621_openfi_5pro.dts | 176 +++++++ .../patches/01-small_flash.patch | 128 ----- .../patches/11-openfi-5pro.patch | 29 ++ devices/ramips_mt7621/patches/re-cp-02.patch | 101 ++++ devices/rockchip_armv8/diy.sh | 2 +- devices/sunxi_cortexa53/diy.sh | 2 +- 49 files changed, 1073 insertions(+), 1836 deletions(-) create mode 100644 devices/amlogic_meson8b/.config rename devices/{meson_meson8b => amlogic_meson8b}/diy.sh (59%) create mode 100644 devices/amlogic_meson8b/patches/BRCMFMAC_SDIO.patch rename devices/{meson_meson8b => amlogic_meson8b}/patches/onecloud.patch (54%) create mode 100644 devices/amlogic_mesongx/.config create mode 100644 devices/amlogic_mesongx/diy.sh create mode 100644 devices/amlogic_mesongx/patches/BRCMFMAC_SDIO.patch delete mode 100644 devices/common/info.mk create mode 100644 devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-ikuai-q3000.dts delete mode 100644 devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts delete mode 100644 devices/mediatek_filogic/patches/13-rg-x60-pro.patch create mode 100644 devices/mediatek_filogic/patches/21-q3000.patch delete mode 100644 devices/mediatek_mt7981/.config delete mode 100644 devices/mediatek_mt7981/README.md delete mode 100644 devices/mediatek_mt7981/diy.sh delete mode 100644 devices/mediatek_mt7981/feeds.conf delete mode 100644 devices/mediatek_mt7981/patches/base-files.patch delete mode 100644 devices/mediatek_mt7981/patches/fix.patch delete mode 100644 devices/mediatek_mt7981/patches/iptables-mod-socket.patch delete mode 100644 devices/mediatek_mt7981/patches/kernel-defaults.patch delete mode 100644 devices/mediatek_mt7981/patches/targets.patch delete mode 100644 devices/mediatek_mt7981/settings.ini delete mode 100644 devices/meson_meson8b/.config delete mode 100644 devices/meson_meson8b/patches/kernel_5.10.revert.patch.b create mode 100644 devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts create mode 100644 devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_openfi_5pro.dts delete mode 100644 devices/ramips_mt7621/patches/01-small_flash.patch create mode 100644 devices/ramips_mt7621/patches/11-openfi-5pro.patch create mode 100644 devices/ramips_mt7621/patches/re-cp-02.patch diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index 433a138dc58c..ac853c2facd3 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -79,7 +79,7 @@ jobs: echo "MTARGET=arm_cortex-a7" >> $GITHUB_ENV elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7) ]]; then echo "MTARGET=arm_cortex-a7_neon-vfpv4" >> $GITHUB_ENV - elif [[ ${{matrix.target}} == "meson_meson8b" ]]; then + elif [[ ${{matrix.target}} == "amlogic_meson8b" ]]; then echo "MTARGET=arm_cortex-a5_vfpv4" >> $GITHUB_ENV elif [[ ${{matrix.target}} == "bcm53xx" ]]; then echo "MTARGET=arm_cortex-a9" >> $GITHUB_ENV @@ -219,7 +219,7 @@ jobs: run: | cd openwrt make defconfig - if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*|meson_meson8b) ]]; then + if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*) ]]; then sed -n '/# Wireless Drivers/,/# end of Wireless Drivers/p' .config | sed -e 's/=m/=n/' >>.config sed -i "s/\(kmod-qca.*\)=m/\1=n/" .config make defconfig diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index 585c142e8bbd..a1c1d9372397 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -122,11 +122,6 @@ jobs: -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \ - -d '{"event_type": "mediatek_mt7981 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_mt7981"}}' - curl \ - -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \ -d '{"event_type": "ipq50xx_arm ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq50xx_arm"}}' curl \ -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ @@ -162,7 +157,7 @@ jobs: -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \ - -d '{"event_type": "meson_meson8b ${{ github.event.inputs.param }}", "client_payload": {"target": "meson_meson8b"}}' + -d '{"event_type": "amlogic_meson8b ${{ github.event.inputs.param }}", "client_payload": {"target": "amlogic_meson8b"}}' curl \ -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ diff --git a/devices/amlogic_meson8b/.config b/devices/amlogic_meson8b/.config new file mode 100644 index 000000000000..a44dcfc0d7e4 --- /dev/null +++ b/devices/amlogic_meson8b/.config @@ -0,0 +1,11 @@ + +CONFIG_TARGET_amlogic=y +CONFIG_TARGET_amlogic_meson8b=y +CONFIG_TARGET_amlogic_meson8b_DEVICE_thunder-onecloud=y + +CONFIG_TARGET_ROOTFS_SQUASHFS=n +CONFIG_TARGET_ROOTFS_EXT4FS=y + +CONFIG_PACKAGE_perf=n + +CONFIG_PACKAGE_kmod-rt2x00-pci=n \ No newline at end of file diff --git a/devices/meson_meson8b/diy.sh b/devices/amlogic_meson8b/diy.sh similarity index 59% rename from devices/meson_meson8b/diy.sh rename to devices/amlogic_meson8b/diy.sh index fb2ef73d0542..d24bb947ce7b 100644 --- a/devices/meson_meson8b/diy.sh +++ b/devices/amlogic_meson8b/diy.sh @@ -6,7 +6,9 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.1.sh -git_clone_path master https://github.com/coolsnowwolf/lede target/linux/meson +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic package/boot/uboot-amlogic + +sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/meson8b.mk diff --git a/devices/amlogic_meson8b/patches/BRCMFMAC_SDIO.patch b/devices/amlogic_meson8b/patches/BRCMFMAC_SDIO.patch new file mode 100644 index 000000000000..a4fc04f67e3b --- /dev/null +++ b/devices/amlogic_meson8b/patches/BRCMFMAC_SDIO.patch @@ -0,0 +1,10 @@ +--- a/package/kernel/mac80211/broadcom.mk ++++ b/package/kernel/mac80211/broadcom.mk +@@ -437,6 +437,7 @@ define KernelPackage/brcmfmac/config + default y if TARGET_starfive + default y if TARGET_rockchip + default y if TARGET_sunxi ++ default y if TARGET_amlogic + default n + help + Enable support for cards attached to an SDIO bus. \ No newline at end of file diff --git a/devices/meson_meson8b/patches/onecloud.patch b/devices/amlogic_meson8b/patches/onecloud.patch similarity index 54% rename from devices/meson_meson8b/patches/onecloud.patch rename to devices/amlogic_meson8b/patches/onecloud.patch index a5a7c1e8bf4e..abd0c2203d5d 100644 --- a/devices/meson_meson8b/patches/onecloud.patch +++ b/devices/amlogic_meson8b/patches/onecloud.patch @@ -1,6 +1,6 @@ ---- a/target/linux/meson/image/Makefile -+++ b/target/linux/meson/image/Makefile -@@ -46,7 +46,8 @@ endef +--- a/target/linux/amlogic/image/meson8b.mk ++++ b/target/linux/amlogic/image/meson8b.mk +@@ -11,7 +11,8 @@ endef define Device/thunder-onecloud DEVICE_DTS := meson8b-onecloud @@ -10,14 +10,19 @@ KERNEL_LOADADDR := 0x00208000 IMAGE/emmc.img := boot-script onecloud | emmc-common $$(DEVICE_NAME) endef -@@ -54,4 +55,10 @@ ifeq ($(SUBTARGET),meson8b) - TARGET_DEVICES += thunder-onecloud - endif + +--- a/target/linux/amlogic/image/Makefile ++++ b/target/linux/amlogic/image/Makefile +@@ -88,4 +88,12 @@ endef + + include $(SUBTARGET).mk +define Image/Build ++ if [ "$(PROFILE_SANITIZED)" == "thunder-onecloud" ]; then \ + export BIN_DIR=$(BIN_DIR); \ + cd /data/packit/openwrt-onecloud || true; \ -+ . ~/packit/packit_onecloud1.sh || true; ++ . ~/packit/packit_onecloud1.sh || true; \ ++ fi +endef + $(eval $(call BuildImage)) diff --git a/devices/amlogic_mesongx/.config b/devices/amlogic_mesongx/.config new file mode 100644 index 000000000000..59d0ca8c77ea --- /dev/null +++ b/devices/amlogic_mesongx/.config @@ -0,0 +1,9 @@ + +CONFIG_TARGET_amlogic=y +CONFIG_TARGET_amlogic_mesongx=y +CONFIG_TARGET_amlogic_mesongx_DEVICE_phicomm_n1=y + +CONFIG_TARGET_ROOTFS_SQUASHFS=n +CONFIG_TARGET_ROOTFS_EXT4FS=y + +CONFIG_PACKAGE_perf=n diff --git a/devices/amlogic_mesongx/diy.sh b/devices/amlogic_mesongx/diy.sh new file mode 100644 index 000000000000..07cffc1f0ffe --- /dev/null +++ b/devices/amlogic_mesongx/diy.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +shopt -s extglob + +SHELL_FOLDER=$(dirname $(readlink -f "$0")) + +bash $SHELL_FOLDER/../common/kernel_6.1.sh + +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic package/boot/uboot-amlogic + +sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/mesongx.mk + + + diff --git a/devices/amlogic_mesongx/patches/BRCMFMAC_SDIO.patch b/devices/amlogic_mesongx/patches/BRCMFMAC_SDIO.patch new file mode 100644 index 000000000000..a4fc04f67e3b --- /dev/null +++ b/devices/amlogic_mesongx/patches/BRCMFMAC_SDIO.patch @@ -0,0 +1,10 @@ +--- a/package/kernel/mac80211/broadcom.mk ++++ b/package/kernel/mac80211/broadcom.mk +@@ -437,6 +437,7 @@ define KernelPackage/brcmfmac/config + default y if TARGET_starfive + default y if TARGET_rockchip + default y if TARGET_sunxi ++ default y if TARGET_amlogic + default n + help + Enable support for cards attached to an SDIO bus. \ No newline at end of file diff --git a/devices/bcm27xx_bcm2712/.config b/devices/bcm27xx_bcm2712/.config index 01b4a778d61a..1e2b08dd2738 100644 --- a/devices/bcm27xx_bcm2712/.config +++ b/devices/bcm27xx_bcm2712/.config @@ -10,3 +10,6 @@ CONFIG_PACKAGE_kmod-of-mdio=n CONFIG_PACKAGE_kmod-pcie_mhi=m +CONFIG_PACKAGE_kmod-codec-bcm2835=n +CONFIG_PACKAGE_kmod-isp-bcm2835=n + diff --git a/devices/common/info.mk b/devices/common/info.mk deleted file mode 100644 index 40c26eac1eae..000000000000 --- a/devices/common/info.mk +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2007 OpenWrt.org - -TOPDIR:=${CURDIR} -export OPENWRT_VERBOSE=s - -include rules.mk -include $(INCLUDE_DIR)/target.mk - -kernel_version: FORCE - @echo "$(LINUX_VERSION)" diff --git a/devices/common/patches/imagebuilder.patch b/devices/common/patches/imagebuilder.patch index c144f03f4429..b9d30b02a35d 100644 --- a/devices/common/patches/imagebuilder.patch +++ b/devices/common/patches/imagebuilder.patch @@ -1,3 +1,36 @@ +--- a/include/image.mk ++++ b/include/image.mk +@@ -761,6 +761,7 @@ define Device/DumpInfo + Target-Profile: DEVICE_$(1) + Target-Profile-Name: $(DEVICE_DISPLAY) + Target-Profile-Packages: $(DEVICE_PACKAGES) ++Target-Profile-ImageSize: $(IMAGE_SIZE) + Target-Profile-hasImageMetadata: $(if $(foreach image,$(IMAGES),$(findstring append-metadata,$(IMAGE/$(image)))),1,0) + Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES) + $(if $(BROKEN),Target-Profile-Broken: $(BROKEN)) + +--- a/scripts/target-metadata.pl ++++ b/scripts/target-metadata.pl +@@ -437,6 +437,7 @@ () + print "PROFILE_NAMES = ".join(" ", @profile_ids_unique)."\n"; + foreach my $profile (@{$cur->{profiles}}) { + print $profile->{id}.'_NAME:='.$profile->{name}."\n"; ++ print $profile->{id}.'_IMAGE_SIZE:='.$profile->{image_size}."\n"; + print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n"; + if (defined($profile->{supported_devices}) and @{$profile->{supported_devices}} > 0) { + print $profile->{id}.'_SUPPORTED_DEVICES:='.join(' ', @{$profile->{supported_devices}})."\n"; + +--- a/scripts/metadata.pm ++++ b/scripts/metadata.pm +@@ -150,6 +150,7 @@ sub parse_target_metadata($) { + push @{$target->{profiles}}, $profile; + }; + /^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1; ++ /^Target-Profile-ImageSize:\s*(.*)\s*/ and $profile->{image_size} = $1; + /^Target-Profile-hasImageMetadata:\s*(\d+)\s*$/ and $profile->{has_image_metadata} = $1; + /^Target-Profile-SupportedDevices:\s*(.+)\s*$/ and $profile->{supported_devices} = [ split(/\s+/, $1) ]; + /^Target-Profile-Priority:\s*(\d+)\s*$/ and do { + --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -38,13 +38,15 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean @@ -22,10 +55,22 @@ --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile -@@ -135,17 +135,32 @@ BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(fi +@@ -131,21 +131,47 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) + # "-pkgname" in the package list means remove "pkgname" from the package list + BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) + BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES) ++IMAGE_SIZE:="$(shell echo $$(echo $($(USER_PROFILE)_IMAGE_SIZE) | cut -d k -f1))" ++BUILD_PACKAGES:=$(shell if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \ ++echo "$(BUILD_PACKAGES) -coremark -htop -bash -openssh-sftp-server "; \ ++else \ ++echo "$(BUILD_PACKAGES)"; \ ++fi \ ++) + BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) PACKAGES:= _call_image: staging_dir/host/.prereq-build +- echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))' + [ "$(DATE)" ] && DATE="$(DATE)" || DATE="`date +'%m.%d.%Y'`"; \ + mkdir -p $(USER_FILES)/etc/uci-defaults || true; \ + echo -e " \ @@ -34,15 +79,19 @@ + sed -i \"s/OpenWrt .* by/OpenWrt $$DATE by/\" /etc/banner \n \ + echo \"$$DATE\" >/etc/openwrt_version \n \ + "> $(USER_FILES)/etc/uci-defaults/99-version; \ - echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))' ++ echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'; \ echo 'Packages: $(BUILD_PACKAGES)' echo rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG) mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR) -+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_ht-jsh_0211|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ -+ echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/small_flash" >>$(TOPDIR)/repositories.conf; \ ++ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" ]]; then \ ++ if [[ $(IMAGE_SIZE) -lt 20480 ]]; then \ ++ if [[ ! "`grep "small_flash" $(TOPDIR)/repositories.conf`" ]]; then \ ++ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf; \ ++ fi \ + else \ -+ sed -i "/smflash/d" $(TOPDIR)/repositories.conf; \ ++ sed -i "/small_flash/d" $(TOPDIR)/repositories.conf; \ ++ fi \ + fi $(MAKE) package_reload $(MAKE) package_install @@ -55,7 +104,7 @@ _call_manifest: FORCE rm -rf $(TARGET_DIR) -@@ -186,7 +201,17 @@ package_install: FORCE +@@ -186,7 +212,17 @@ package_install: FORCE @echo Installing packages... $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk)) $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk)) @@ -68,18 +117,18 @@ + if [[ "`echo "$(BUILD_PACKAGES)" | grep "usb"`" ]]; then \ + packages+="automount "; \ + fi; \ -+ $(OPKG) install --force-overwrite --force-checksum --force-depends $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \ ++ $(OPKG) install $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \ + $(OPKG) install $$packages || true -+ $(OPKG) install --force-overwrite --force-checksum --force-depends --force-maintainer --force-reinstall my-default-settings ++ $(OPKG) install --force-maintainer --force-reinstall my-default-settings prepare_rootfs: FORCE @echo -@@ -200,12 +225,15 @@ prepare_rootfs: FORCE +@@ -200,12 +236,15 @@ prepare_rootfs: FORCE ) \ ) $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES)) -+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ -+ echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/mipsel_24kc/small_flash" >>$(BUILD_DIR)/root-ramips/etc/opkg/distfeeds.conf; \ ++ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \ ++ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf; \ + fi build_image: FORCE diff --git a/devices/mediatek_filogic/.config b/devices/mediatek_filogic/.config index 2d6d40bb9f0a..cf95a11b18b1 100644 --- a/devices/mediatek_filogic/.config +++ b/devices/mediatek_filogic/.config @@ -35,6 +35,8 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y +CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_ikuai_q3000=y +CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openwrt_one=y CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 CONFIG_PACKAGE_kmod-pcie_mhi=m diff --git a/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-ikuai-q3000.dts b/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-ikuai-q3000.dts new file mode 100644 index 000000000000..2eb061616151 --- /dev/null +++ b/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-ikuai-q3000.dts @@ -0,0 +1,319 @@ +/dts-v1/; +#include "mt7981.dtsi" +/ { + compatible = "ikuai,q3000", "mediatek,mt7981-spim-snand-rfb"; + model = "q3000"; + + aliases { + led-boot = &red_led; + led-failsafe = &red_led; + led-running = &green_led; + led-upgrade = &blue_led; + }; + + chosen { + bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 clk_ignore_unused"; + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + green_led: green { + label = "q3000:green"; + gpios = <&pio 11 1>; + }; + + red_led: red { + label = "q3000:red"; + gpios = <&pio 10 1>; + }; + + blue_led: blue { + label = "q3000:blue"; + gpios = <&pio 12 1>; + }; + }; + + nmbm_spim_nand { + compatible = "generic,nmbm"; + + #address-cells = <1>; + #size-cells = <1>; + + lower-mtd-device = <&spi_nand>; + forced-create; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x00000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x0200000>; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x0200000>; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x4000000>; + }; + }; + }; + + sound_wm8960 { + compatible = "mediatek,mt79xx-wm8960-machine"; + mediatek,platform = <&afe>; + audio-routing = "Headphone", "HP_L", + "Headphone", "HP_R", + "LINPUT1", "AMIC", + "RINPUT1", "AMIC"; + mediatek,audio-codec = <&wm8960>; + status = "disabled"; + }; + + sound_si3218x { + compatible = "mediatek,mt79xx-si3218x-machine"; + mediatek,platform = <&afe>; + mediatek,ext-codec = <&proslic_spi>; + status = "disabled"; + }; +}; + +&afe { + pinctrl-names = "default"; + pinctrl-0 = <&pcm_pins>; + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + status = "disabled"; + + wm8960: wm8960@1a { + compatible = "wlf,wm8960"; + reg = <0x1a>; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + switch@0 { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@2 { + reg = <2>; + label = "lan3"; + }; + + port@3 { + reg = <3>; + label = "wan"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + spi_nand: spi_nand@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <52000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spic_pins>; + status = "okay"; + + proslic_spi: proslic_spi@0 { + compatible = "silabs,proslic_spi"; + reg = <0>; + spi-max-frequency = <10000000>; + spi-cpha = <1>; + spi-cpol = <1>; + channel_count = <1>; + debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */ + reset_gpio = <&pio 15 0>; + ig,enable-spi = <1>; /* 1: Enable, 0: Disable */ + }; +}; + +&pio { + i2c_pins: i2c-pins-g0 { + mux { + function = "i2c"; + groups = "i2c0_0"; + }; + }; + + pcm_pins: pcm-pins-g0 { + mux { + function = "pcm"; + groups = "pcm"; + }; + }; + + pwm0_pin: pwm0-pin-g0 { + mux { + function = "pwm"; + groups = "pwm0_0"; + }; + }; + + pwm1_pin: pwm1-pin-g0 { + mux { + function = "pwm"; + groups = "pwm1_0"; + }; + }; + + pwm2_pin: pwm2-pin { + mux { + function = "pwm"; + groups = "pwm2"; + }; + }; + + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = ; + bias-pull-up = ; + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; + + spic_pins: spi1-pins { + mux { + function = "spi"; + groups = "spi1_1"; + }; + }; + + uart1_pins: uart1-pins-g1 { + mux { + function = "uart"; + groups = "uart1_1"; + }; + }; + + uart2_pins: uart2-pins-g1 { + mux { + function = "uart"; + groups = "uart2_1"; + }; + }; +}; + +&xhci { + mediatek,u3p-dis-msk = <0x0>; + phys = <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>; + status = "okay"; +}; diff --git a/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts b/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts deleted file mode 100644 index 7018e284413f..000000000000 --- a/devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts +++ /dev/null @@ -1,287 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -/dts-v1/; -#include -#include -#include -#include "mt7981.dtsi" - -/ { - model = "Nokia EA0326GMP"; - compatible = "nokia,ea0326gmp", "mediatek,mt7981"; - - aliases { - led-boot = &power_led; - led-running = &power_led; - led-failsafe = &power_led; - led-upgrade = &power_led; - label-mac-device = &gmac1; - serial0 = &uart0; - }; - - chosen { - rootdisk = <&ubi_rootdisk>; - stdout-path = "serial0:115200n8"; - }; - - memory@40000000 { - reg = <0 0x40000000 0 0x10000000>; - }; - - gpio-keys { - compatible = "gpio-keys"; - - button-reset { - label = "reset"; - linux,code = ; - gpios = <&pio 1 GPIO_ACTIVE_LOW>; - }; - - button-wps { - label = "wps"; - linux,code = ; - gpios = <&pio 0 GPIO_ACTIVE_HIGH>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - power_led: led-0 { - color = ; - function = LED_FUNCTION_POWER; - gpios = <&pio 4 GPIO_ACTIVE_LOW>; - }; - - led-1 { - color = ; - function = LED_FUNCTION_WAN; - gpios = <&pio 5 GPIO_ACTIVE_LOW>; - }; - - led-2 { - color = ; - function = LED_FUNCTION_WAN; - gpios = <&pio 6 GPIO_ACTIVE_LOW>; - }; - - led-3 { - color = ; - function = LED_FUNCTION_LAN; - gpios = <&pio 7 GPIO_ACTIVE_LOW>; - }; - - led-4 { - color = ; - function = LED_FUNCTION_WLAN; - gpios = <&pio 8 GPIO_ACTIVE_LOW>; - }; - - led-5 { - color = ; - function = LED_FUNCTION_WPS; - gpios = <&pio 9 GPIO_ACTIVE_LOW>; - }; - }; -}; - -ð { - pinctrl-names = "default"; - pinctrl-0 = <&mdio_pins>; - status = "okay"; - - gmac0: mac@0 { - compatible = "mediatek,eth-mac"; - reg = <0>; - phy-mode = "2500base-x"; - - nvmem-cells = <&macaddr_factory_28 0>; - nvmem-cell-names = "mac-address"; - - fixed-link { - speed = <2500>; - full-duplex; - pause; - }; - }; - - gmac1: mac@1 { - compatible = "mediatek,eth-mac"; - reg = <1>; - phy-mode = "gmii"; - phy-handle = <&int_gbe_phy>; - - nvmem-cells = <&macaddr_factory_28 3>; - nvmem-cell-names = "mac-address"; - }; -}; - -&mdio_bus { - switch: switch@1f { - compatible = "mediatek,mt7531"; - reg = <31>; - reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; - interrupt-controller; - #interrupt-cells = <1>; - interrupt-parent = <&pio>; - interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; - }; -}; - -&pio { - spi0_flash_pins: spi0-pins { - mux { - function = "spi"; - groups = "spi0", "spi0_wp_hold"; - }; - - conf-pu { - pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; - drive-strength = <8>; - mediatek,pull-up-adv = <0>; /* bias-disable */ - }; - - conf-pd { - pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; - drive-strength = <8>; - mediatek,pull-up-adv = <0>; /* bias-disable */ - }; - }; -}; - -&spi0 { - pinctrl-names = "default"; - pinctrl-0 = <&spi0_flash_pins>; - status = "okay"; - - spi_nand: flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spi-nand"; - reg = <0>; - - spi-max-frequency = <52000000>; - spi-tx-bus-width = <4>; - spi-rx-bus-width = <4>; - - mediatek,nmbm; - mediatek,bmt-max-ratio = <1>; - mediatek,bmt-max-reserved-blocks = <64>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "bl2"; - reg = <0x00000 0x0100000>; - read-only; - }; - - partition@100000 { - label = "u-boot-env"; - reg = <0x100000 0x80000>; - }; - - partition@180000 { - label = "factory"; - reg = <0x180000 0x200000>; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x1000>; - }; - - macaddr_factory_28: macaddr@28 { - compatible = "mac-base"; - reg = <0x28 0x6>; - #nvmem-cell-cells = <1>; - }; - }; - }; - - partition@380000 { - label = "fip"; - reg = <0x380000 0x200000>; - read-only; - }; - - partition@580000 { - label = "config"; - reg = <0x580000 0x200000>; - read-only; - }; - - partition@780000 { - label = "config2"; - reg = <0x780000 0x200000>; - read-only; - }; - - partition@980000 { - label = "ubi"; - reg = <0x980000 0x6e00000>; - - volumes { - ubi_rootdisk: ubi-volume-fit { - volname = "fit"; - }; - }; - }; - }; - }; -}; - -&switch { - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - label = "lan1"; - }; - - port@2 { - reg = <2>; - label = "lan2"; - }; - - port@3 { - reg = <3>; - label = "lan3"; - }; - - port@6 { - reg = <6>; - ethernet = <&gmac0>; - phy-mode = "2500base-x"; - - fixed-link { - speed = <2500>; - full-duplex; - pause; - }; - }; - }; -}; - -&uart0 { - status = "okay"; -}; - -&watchdog { - status = "okay"; -}; - -&wifi { - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; - status = "okay"; -}; diff --git a/devices/mediatek_filogic/patches/01-360t7.patch b/devices/mediatek_filogic/patches/01-360t7.patch index 215c02831c43..2efa25503f60 100644 --- a/devices/mediatek_filogic/patches/01-360t7.patch +++ b/devices/mediatek_filogic/patches/01-360t7.patch @@ -40,7 +40,7 @@ + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware - ARTIFACTS := preloader.bin bl31-uboot.fip - ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 - ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot qihoo_360t7 diff --git a/devices/mediatek_filogic/patches/03-nx30.patch b/devices/mediatek_filogic/patches/03-nx30.patch index 2c4353cbbc7c..c539b56ceae5 100644 --- a/devices/mediatek_filogic/patches/03-nx30.patch +++ b/devices/mediatek_filogic/patches/03-nx30.patch @@ -28,7 +28,7 @@ - IMAGE/sysupgrade.itb := append-kernel | \ - fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware - ARTIFACTS := preloader.bin bl31-uboot.fip - ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 - ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot h3c_magic-nx30-pro diff --git a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch index ec92e90e2841..9327a4230f44 100644 --- a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch +++ b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch @@ -23,7 +23,7 @@ + DEVICE_MODEL := RAX3000M NAND + DEVICE_DTS := mt7981b-cmcc-rax3000m-nand + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \ ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \ + e2fsprogs f2fsck mkf2fs + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k @@ -41,7 +41,7 @@ + DEVICE_MODEL := RAX3000M eMMC + DEVICE_DTS := mt7981b-cmcc-rax3000m-emmc + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \ ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \ + e2fsprogs f2fsck mkf2fs losetup kmod-fs-f2fs kmod-mmc + KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb + KERNEL_INITRAMFS := kernel-bin | lzma | \ diff --git a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch index 5ddfbc10433c..5d34c85a3b4f 100644 --- a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch +++ b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch @@ -14,7 +14,7 @@ - fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k - IMAGE/sysupgrade.itb := append-kernel | \ - fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata - DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware - ARTIFACTS := preloader.bin bl31-uboot.fip - ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 - ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot jcg_q30-pro diff --git a/devices/mediatek_filogic/patches/10-re-cp-03.patch b/devices/mediatek_filogic/patches/10-re-cp-03.patch index 0a8be2405369..e64140395bfe 100644 --- a/devices/mediatek_filogic/patches/10-re-cp-03.patch +++ b/devices/mediatek_filogic/patches/10-re-cp-03.patch @@ -10,7 +10,7 @@ DEVICE_DTS_DIR := ../dts - DEVICE_DTC_FLAGS := --pad 4096 - DEVICE_DTS_LOADADDR := 0x43f00000 - DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware \ + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware \ - e2fsprogs f2fsck mkf2fs - KERNEL_LOADADDR := 0x44000000 - KERNEL := kernel-bin | gzip diff --git a/devices/mediatek_filogic/patches/12-asr3000.patch b/devices/mediatek_filogic/patches/12-asr3000.patch index 380ea042c85f..9d571f67171f 100644 --- a/devices/mediatek_filogic/patches/12-asr3000.patch +++ b/devices/mediatek_filogic/patches/12-asr3000.patch @@ -344,7 +344,7 @@ index 95aee51b689..7f28be90a7b 100644 + DEVICE_MODEL := ASR3000 + DEVICE_DTS := mt7981b-abt-asr3000 + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 diff --git a/devices/mediatek_filogic/patches/13-rg-x60-pro.patch b/devices/mediatek_filogic/patches/13-rg-x60-pro.patch deleted file mode 100644 index c9589a2eff60..000000000000 --- a/devices/mediatek_filogic/patches/13-rg-x60-pro.patch +++ /dev/null @@ -1,404 +0,0 @@ -From 0cf380b2ca1002f4a73d3626322ee5a7a5cf7628 Mon Sep 17 00:00:00 2001 -From: Ashley Lee -Date: Sat, 30 Dec 2023 22:54:54 +0800 -Subject: [PATCH] mediatek: add support for Ruijie RG-X60 Pro -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This pull request ports Ruijie RG-X60 Pro router support to the main branch. - -Parameters: -- SoC : MediaTek MT7986A Quad-core ARM Cortex-A53 2.0GHz -- RAM : DDR3 512MiB (W634GU6QB) -- Flash : SPI-NAND 128 MiB (W25N01GVZEIG) -- WLAN : MediaTek MT7986A integration dual-band WiFi 6 - - 2.4 GHz : b/g/n/ax, MIMO 4x4 - - 5 GHz : a/n/ac/ax, MIMO 4x4 -- Ethernet : 10/100/1000 Mbps x4 (MediaTek MT7531AE) - 2500Mbps x 1 (Realtek RTL8221B-VB-CG) -- UART : through-hole on PCB - - [J500] GND, TX, RX, 3.3V (115200n1) -- Buttons : Mesh, Reset -- LEDs : 1x Power (Blue) - 1x Turbo (Purple) -- Power : 12 VDC, 3 A - -How to Installation: -1. Remove the case and connect the TTL cable to the corresponding position. -2. Power on the device and quickly press "down" on the keyboard, then - U-Boot will stay in the menu. -3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)". -4. Input the IP address, input the Openwrt image file name to be - flashed, start the TFTP server, and press "Enter". -5. Wait for the flashing to complete. - -How return to stock: - -1. Remove the case and connect the TTL cable to the corresponding - position. -2. Power on the device and quickly press "down" on the keyboard, then - U-Boot will stay in the menu. -3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)". -4. Input the IP address, input the Stock “E-WEBOS” image file name to - be flashed, start the TFTP server, and press "Enter". -5. Wait for the flashing to complete. - -About recovery: -Connect uart, use u-boot menu to flash stock firmware image or boot -OpenWrt initramfs image. - -About MAC Address: -+---------+-------------------+-----------+ -| | MAC | Algorithm | -+---------+-------------------+-----------+ -| WAN | 10:82:3D:XX:XX:9E | label | -| LAN | 10:82:3D:XX:XX:9F | label+1 | -| WLAN 2g | 10:82:3D:XX:XX:A0 | label+2 | -| WLAN 5g | 10:82:3D:XX:XX:A1 | label+3 | -+---------+-------------------+-----------+ - -Signed-off-by: Ashley Lee ---- - .../dts/mt7986a-ruijie-rg-x60-pro.dts | 280 ++++++++++++++++++ - .../filogic/base-files/etc/board.d/02_network | 6 + - .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 + - target/linux/mediatek/image/filogic.mk | 10 + - 4 files changed, 301 insertions(+) - create mode 100644 target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts - -diff --git a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts -new file mode 100644 -index 0000000000000..80b614ac2282d ---- /dev/null -+++ b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts -@@ -0,0 +1,268 @@ -+// SPDX-License-Identifier: (GPL-2.0 OR MIT) -+ -+/dts-v1/; -+#include -+#include -+#include -+ -+#include "mt7986a.dtsi" -+ -+/ { -+ model = "Ruijie RG-X60 Pro"; -+ compatible = "ruijie,rg-x60-pro", "mediatek,mt7986a"; -+ -+ aliases { -+ serial0 = &uart0; -+ led-boot = &led_system; -+ led-failsafe = &led_alarm; -+ led-running = &led_system; -+ led-upgrade = &led_alarm; -+ }; -+ -+ chosen { -+ bootargs = "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x11002000"; -+ }; -+ -+ memory { -+ reg = <0 0x40000000 0 0x20000000>; -+ }; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ -+ reset { -+ label = "reset"; -+ gpios = <&pio 9 GPIO_ACTIVE_LOW>; -+ linux,code = ; -+ }; -+ -+ mesh { -+ label = "mesh"; -+ gpios = <&pio 10 GPIO_ACTIVE_LOW>; -+ linux,code = ; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led_alarm: status_purple { -+ label = "purple:status"; -+ gpios = <&pio 11 GPIO_ACTIVE_LOW>; -+ }; -+ -+ led_system: status_white { -+ label = "white:status"; -+ gpios = <&pio 22 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+ð { -+ status = "okay"; -+ -+ gmac0: mac@0 { -+ compatible = "mediatek,eth-mac"; -+ reg = <0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <2500>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ -+ gmac1: mac@1 { -+ compatible = "mediatek,eth-mac"; -+ reg = <1>; -+ phy-handle = <&phy7>; -+ phy-mode = "2500base-x"; -+ }; -+ -+ mdio: mdio-bus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+}; -+ -+&mdio { -+ switch: switch@1f { -+ compatible = "mediatek,mt7531"; -+ reg = <31>; -+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ interrupt-parent = <&pio>; -+ interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; -+ }; -+ -+ phy7: phy@7 { -+ compatible = "ethernet-phy-ieee802.3-c45"; -+ reg = <7>; -+ reset-assert-us = <100000>; -+ reset-deassert-us = <100000>; -+ reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>; -+ realtek,aldps-enable; -+ }; -+}; -+ -+&pio { -+ spi_flash_pins: spi-flash-pins-33-to-38 { -+ mux { -+ function = "spi"; -+ groups = "spi0", "spi0_wp_hold"; -+ }; -+ conf-pu { -+ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; -+ drive-strength = <8>; -+ mediatek,pull-up-adv = <0>; /* bias-disable */ -+ }; -+ conf-pd { -+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; -+ drive-strength = <8>; -+ mediatek,pull-down-adv = <0>; /* bias-disable */ -+ }; -+ }; -+ -+ wf_2g_5g_pins: wf_2g_5g-pins { -+ mux { -+ function = "wifi"; -+ groups = "wf_2g", "wf_5g"; -+ }; -+ conf { -+ pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", -+ "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", -+ "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", -+ "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", -+ "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", -+ "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", -+ "WF1_TOP_CLK", "WF1_TOP_DATA"; -+ drive-strength = <4>; -+ }; -+ }; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi_flash_pins>; -+ status = "okay"; -+ -+ flash@0 { -+ compatible = "spi-nand"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0>; -+ -+ spi-max-frequency = <20000000>; -+ spi-tx-bus-width = <4>; -+ spi-rx-bus-width = <4>; -+ -+ mediatek,nmbm; -+ mediatek,bmt-max-ratio = <1>; -+ mediatek,bmt-max-reserved-blocks = <64>; -+ -+ partitions { -+ compatible = "fixed-partitions"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ partition@0 { -+ label = "BL2"; -+ reg = <0x000000 0x100000>; -+ read-only; -+ }; -+ -+ partition@100000 { -+ label = "u-boot-env"; -+ reg = <0x100000 0x80000>; -+ read-only; -+ }; -+ -+ factory: partition@180000 { -+ label = "Factory"; -+ reg = <0x180000 0x200000>; -+ read-only; -+ }; -+ -+ partition@380000 { -+ label = "FIP"; -+ reg = <0x380000 0x200000>; -+ read-only; -+ }; -+ -+ partition@580000 { -+ label = "product_info"; -+ reg = <0x580000 0x80000>; -+ read-only; -+ }; -+ -+ partition@600000 { -+ label = "kdump"; -+ reg = <0x600000 0x80000>; -+ read-only; -+ }; -+ -+ partition@680000 { -+ label = "ubi"; -+ reg = <0x680000 0x3f00000>; -+ }; -+ }; -+ }; -+}; -+ -+&switch { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "lan1"; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan2"; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan3"; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan4"; -+ }; -+ -+ port@6 { -+ reg = <6>; -+ label = "cpu"; -+ ethernet = <&gmac0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <2500>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ }; -+}; -+ -+&wifi { -+ status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&wf_2g_5g_pins>; -+ -+ mediatek,mtd-eeprom = <&factory 0x0>; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&watchdog { -+ status = "okay"; -+}; -diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -index b86c376d74176..28e5f26958567 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -@@ -26,6 +26,7 @@ - jdcloud,re-cp-03|\ - mediatek,mt7981-rfb|\ - netcore,n60|\ -+ ruijie,rg-x60-pro|\ - unielec,u7981-01*|\ - zbtlink,zbt-z8102ax) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1 -@@ -150,6 +151,11 @@ - wan_mac=$(macaddr_add "$lan_mac" 1) - label_mac=$wan_mac - ;; -+ ruijie,rg-x60-pro) -+ label_mac=$(mtd_get_mac_ascii product_info ethaddr) -+ wan_mac=$label_mac -+ lan_mac=$(macaddr_add "$label_mac" 1) -+ ;; - xiaomi,mi-router-ax3000t|\ - xiaomi,mi-router-ax3000t-ubootmod|\ - xiaomi,mi-router-wr30u|\ -diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -index d9e0335b67f3b..0e6c3c1dbcb56 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -@@ -104,6 +104,11 @@ - [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress - [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress - ;; -+ ruijie,rg-x60-pro) -+ addr=$(mtd_get_mac_ascii product_info ethaddr) -+ [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress -+ [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress -+ ;; - tplink,tl-xdr4288|\ - tplink,tl-xdr6086|\ - tplink,tl-xdr6088) -diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk -index d0c9907635fb3..3bd6b3e1303e5 100644 ---- a/target/linux/mediatek/image/filogic.mk -+++ b/target/linux/mediatek/image/filogic.mk -@@ -674,6 +674,16 @@ define Device/routerich_ax3000 - endef - TARGET_DEVICES += routerich_ax3000 - -+define Device/ruijie_rg-x60-pro -+ DEVICE_VENDOR := Ruijie -+ DEVICE_MODEL := RG-X60 Pro -+ DEVICE_DTS := mt7986a-ruijie-rg-x60-pro -+ DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware -+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -+endef -+TARGET_DEVICES += ruijie_rg-x60-pro -+ - define Device/tplink_tl-xdr-common - DEVICE_VENDOR := TP-Link - DEVICE_DTS_DIR := ../dts diff --git a/devices/mediatek_filogic/patches/15-cmcc-a10.patch b/devices/mediatek_filogic/patches/15-cmcc-a10.patch index ad84d3506aac..65f43c4ad835 100644 --- a/devices/mediatek_filogic/patches/15-cmcc-a10.patch +++ b/devices/mediatek_filogic/patches/15-cmcc-a10.patch @@ -296,7 +296,7 @@ index 6976a399e86dc..83428f0d981e7 100644 + DEVICE_MODEL := A10 + DEVICE_DTS := mt7981b-cmcc-a10 + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 diff --git a/devices/mediatek_filogic/patches/17-lc-hx3001.patch b/devices/mediatek_filogic/patches/17-lc-hx3001.patch index d57500aa03f9..1a8285234f27 100644 --- a/devices/mediatek_filogic/patches/17-lc-hx3001.patch +++ b/devices/mediatek_filogic/patches/17-lc-hx3001.patch @@ -306,7 +306,7 @@ index 83428f0d981e7..6d2e9d713be02 100644 + DEVICE_MODEL := LC-HX3001 + DEVICE_DTS := mt7981b-imou-lc-hx3001 + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + SUPPORTED_DEVICES += imou,lc-hx3001 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k @@ -328,7 +328,7 @@ index 83428f0d981e7..6d2e9d713be02 100644 + DEVICE_MODEL := KOMI A31 + DEVICE_DTS := mt7981b-konka-komi-a31 + DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware ++ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + SUPPORTED_DEVICES := konka,komi-a31 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k diff --git a/devices/mediatek_filogic/patches/18-wr30u.patch b/devices/mediatek_filogic/patches/18-wr30u.patch index e64807ccc10a..0afdc9cf1e3c 100644 --- a/devices/mediatek_filogic/patches/18-wr30u.patch +++ b/devices/mediatek_filogic/patches/18-wr30u.patch @@ -1,6 +1,6 @@ --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk -@@ -1036,22 +1036,22 @@ endif +@@ -1206,22 +1206,22 @@ endif endef TARGET_DEVICES += xiaomi_mi-router-ax3000t-ubootmod @@ -19,7 +19,7 @@ + KERNEL_IN_UBI := 1 + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) - DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - ARTIFACTS := initramfs-factory.ubi - ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel @@ -30,4 +30,4 @@ +TARGET_DEVICES += xiaomi_mi-router-wr30u define Device/xiaomi_mi-router-wr30u-ubootmod - DEVICE_VENDOR := Xiaomi + DEVICE_VENDOR := Xiaomi \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/20-ea0326gmp.patch b/devices/mediatek_filogic/patches/20-ea0326gmp.patch index 0c53089f9bab..57d5450de2cf 100644 --- a/devices/mediatek_filogic/patches/20-ea0326gmp.patch +++ b/devices/mediatek_filogic/patches/20-ea0326gmp.patch @@ -1,119 +1,47 @@ -diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -index 7f75de8b3b961c..38aa621ea23867 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds -@@ -54,6 +54,11 @@ netgear,wax220) - ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0" - ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0" - ;; -+nokia,ea0326gmp) -+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link" -+ ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" -+ ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy1-ap0" "link" -+ ;; - openembed,som7981) - ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx" - ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link" -diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -index c9fd8d96e69a1f..051db89275e2f0 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network -@@ -46,6 +46,7 @@ mediatek_setup_interfaces() - ;; - cmcc,rax3000m|\ - h3c,magic-nx30-pro|\ -+ nokia,ea0326gmp|\ - zbtlink,zbt-z8103ax) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 - ;; -diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -index 62860390ebb2e6..928750e6473fc4 100644 ---- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac -@@ -116,6 +116,11 @@ case "$board" in - [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress - [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress - ;; -+ nokia,ea0326gmp) -+ addr=$(cat /sys/class/net/eth0/address) -+ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress -+ [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress -+ ;; - openembed,som7981) - [ "$PHYNBR" = "1" ] && cat /sys/class/net/eth0/address > /sys${DEVPATH}/macaddress - ;; -diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -index ee0e8b62d752db..62b7a209ed4059 100755 ---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -@@ -145,6 +145,12 @@ platform_do_upgrade() { - CI_UBIPART="ubi0" - nand_do_upgrade "$1" - ;; -+ nokia,ea0326gmp) -+ [ -e /dev/fit0 ] && fitblk /dev/fit0 -+ [ -e /dev/fitrw ] && fitblk /dev/fitrw -+ CI_KERNPART="fit" -+ nand_do_upgrade "$1" -+ ;; - ubnt,unifi-6-plus) - CI_KERNPART="kernel0" - EMMC_ROOT_DEV="$(cmdline_get_var root)" -diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk -index f99a73ac74c887..e8abed768fd97f 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk -@@ -881,6 +881,23 @@ define Device/netgear_wax220 - endef - TARGET_DEVICES += netgear_wax220 - -+define Device/nokia_ea0326gmp -+ DEVICE_VENDOR := Nokia -+ DEVICE_MODEL := EA0326GMP -+ DEVICE_DTS := mt7981b-nokia-ea0326gmp -+ DEVICE_DTS_DIR := ../dts -+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware -+ UBINIZE_OPTS := -E 5 -+ BLOCKSIZE := 128k -+ PAGESIZE := 2048 -+ KERNEL_IN_UBI := 1 +@@ -961,17 +961,10 @@ define Device/nokia_ea0326gmp + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 +- UBOOTENV_IN_UBI := 1 +- IMAGES := sysupgrade.itb +- KERNEL_INITRAMFS_SUFFIX := -recovery.itb +- KERNEL := kernel-bin | gzip +- KERNEL_INITRAMFS := kernel-bin | lzma | \ +- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k +- IMAGE/sysupgrade.itb := append-kernel | \ +- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata +- ARTIFACTS := preloader.bin bl31-uboot.fip +- ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 +- ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot nokia_ea0326gmp + IMAGE_SIZE := 112640k + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -+endef -+TARGET_DEVICES += nokia_ea0326gmp + endef + TARGET_DEVICES += nokia_ea0326gmp + + +--- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts ++++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts +@@ -164,6 +164,10 @@ + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + ++ mediatek,nmbm; ++ mediatek,bmt-max-ratio = <1>; ++ mediatek,bmt-max-reserved-blocks = <64>; + - define Device/openembed_som7981 - DEVICE_VENDOR := OpenEmbed - DEVICE_MODEL := SOM7981 -diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -index 62b7a209ed4059..cefe2ac853899c 100755 ---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -@@ -83,11 +83,7 @@ platform_do_upgrade() { - bananapi,bpi-r3-mini|\ - bananapi,bpi-r4|\ - bananapi,bpi-r4-poe|\ -- jdcloud,re-cp-03|\ -- tplink,tl-xdr4288|\ -- tplink,tl-xdr6086|\ -- tplink,tl-xdr6088|\ -- xiaomi,redmi-router-ax6000-ubootmod) -+ jdcloud,re-cp-03) - [ -e /dev/fit0 ] && fitblk /dev/fit0 - [ -e /dev/fitrw ] && fitblk /dev/fitrw - bootdev="$(fitblk_get_bootdev)" -@@ -145,7 +141,11 @@ platform_do_upgrade() { - CI_UBIPART="ubi0" - nand_do_upgrade "$1" - ;; -- nokia,ea0326gmp) -+ nokia,ea0326gmp|\ -+ tplink,tl-xdr4288|\ -+ tplink,tl-xdr6086|\ -+ tplink,tl-xdr6088|\ -+ xiaomi,redmi-router-ax6000-ubootmod) - [ -e /dev/fit0 ] && fitblk /dev/fit0 - [ -e /dev/fitrw ] && fitblk /dev/fitrw - CI_KERNPART="fit" + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; +@@ -223,7 +227,7 @@ + partition@980000 { + compatible = "linux,ubi"; + label = "ubi"; +- reg = <0x980000 0x7680000>; ++ reg = <0x980000 0x6e00000>; + + volumes { + ubi_rootdisk: ubi-volume-fit { diff --git a/devices/mediatek_filogic/patches/21-q3000.patch b/devices/mediatek_filogic/patches/21-q3000.patch new file mode 100644 index 000000000000..ce7fe7d951e7 --- /dev/null +++ b/devices/mediatek_filogic/patches/21-q3000.patch @@ -0,0 +1,64 @@ +--- a/target/linux/mediatek/image/filogic.mk ++++ b/target/linux/mediatek/image/filogic.mk +@@ -733,6 +733,23 @@ + endef + TARGET_DEVICES += h3c_magic-nx30-pro + ++define Device/ikuai_q3000 ++ DEVICE_VENDOR := iKuai ++ DEVICE_MODEL := Q3000 ++ DEVICE_DTS := mt7981-ikuai-q3000 ++ DEVICE_DTS_DIR := ../dts ++ SUPPORTED_DEVICES := ikuai,q3000 ++ UBINIZE_OPTS := -E 5 ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ IMAGE_SIZE := 114816k ++ KERNEL_IN_UBI := 1 ++ IMAGES += factory.bin ++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata ++endef ++TARGET_DEVICES += ikuai_q3000 ++ + define Device/imou_lc-hx3001 + DEVICE_VENDOR := IMOU + DEVICE_MODEL := LC-HX3001 + + +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +@@ -42,6 +42,11 @@ h3c,nx30pro) + ucidef_set_led_default "green" "GREEN" "nx30pro:green" "1" + ucidef_set_led_default "red" "RED" "nx30pro:red" "0" + ;; ++ikuai,q3000) ++ ucidef_set_led_default "green" "GREEN" "q3000:green" "1" ++ ucidef_set_led_default "blue" "BLUE" "q3000:blue" "0" ++ ucidef_set_led_default "red" "RED" "q3000:red" "0" ++ ;; + konka,komi-a31) + ucidef_set_led_netdev "blue" "BLUE" "blue:status" "eth1" "link" + ;; + +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +@@ -18,6 +18,7 @@ mediatek_setup_interfaces() + cetron,ct3003|\ + confiabits,mt7981|\ + cudy,wr3000-v1|\ ++ ikuai,q3000|\ + jcg,q30-pro|\ + qihoo,360t7|\ + routerich,ax3000) +@@ -145,6 +146,10 @@ mediatek_setup_macs() + lan_mac=$(macaddr_add "$wan_mac" 1) + label_mac=$wan_mac + ;; ++ ikuai,q3000) ++ wan_mac=$(mtd_get_mac_binary $part_name 0x10048) ++ lan_mac=$(macaddr_add $wan_mac 1) ++ ;; + mercusys,mr90x-v1) + label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0) + lan_mac=$label_mac \ No newline at end of file diff --git a/devices/mediatek_mt7981/.config b/devices/mediatek_mt7981/.config deleted file mode 100644 index a9d9932360fd..000000000000 --- a/devices/mediatek_mt7981/.config +++ /dev/null @@ -1,146 +0,0 @@ -CONFIG_TARGET_mediatek=y -CONFIG_TARGET_mediatek_mt7981=y -CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_glinet_gl-x3000=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_glinet_gl-xe3000=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_livinet_zr-3020=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_mt7981-clt-r30b1-112M=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_nradio_wt9103=y -CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_nradio_wt9103_512m=y - - -CONFIG_VERSION_DIST="OpenWrt" - -CONFIG_PACKAGE_dnsmasq_full_nftset=n - -CONFIG_DEVEL=y -CONFIG_TOOLCHAINOPTS=y -CONFIG_BUSYBOX_CUSTOM=y -CONFIG_TARGET_PER_DEVICE_ROOTFS=n -CONFIG_AFALG_UPDATE_CTR_IV=y -CONFIG_BUSYBOX_CONFIG_BLKID=y -CONFIG_BUSYBOX_CONFIG_FEATURE_BLKID_TYPE=y -CONFIG_BUSYBOX_CONFIG_VOLUMEID=y -CONFIG_CONNINFRA_AUTO_UP=y -CONFIG_CONNINFRA_EMI_SUPPORT=y -# CONFIG_GDB is not set -# CONFIG_KERNEL_BLK_DEV_THROTTLING is not set -# CONFIG_KERNEL_CFS_BANDWIDTH is not set -CONFIG_KERNEL_CGROUP_DEVICE=y -CONFIG_KERNEL_CGROUP_FREEZER=y -CONFIG_KERNEL_DEVMEM=y -# CONFIG_KERNEL_KEYS is not set -# CONFIG_KERNEL_MEMCG_SWAP is not set -CONFIG_KERNEL_NET_CLS_CGROUP=y -CONFIG_MTK_ACK_CTS_TIMEOUT_SUPPORT=y -CONFIG_MTK_AIR_MONITOR=y -CONFIG_MTK_AMPDU_CONF_SUPPORT=y -CONFIG_MTK_ANTENNA_CONTROL_SUPPORT=y -CONFIG_MTK_APCLI_SUPPORT=y -CONFIG_MTK_ATE_SUPPORT=y -CONFIG_MTK_BACKGROUND_SCAN_SUPPORT=y -CONFIG_MTK_CAL_BIN_FILE_SUPPORT=y -CONFIG_MTK_CFG_SUPPORT_FALCON_MURU=y -CONFIG_MTK_CFG_SUPPORT_FALCON_PP=y -CONFIG_MTK_CFG_SUPPORT_FALCON_SR=y -CONFIG_MTK_CFG_SUPPORT_FALCON_TXCMD_DBG=y -CONFIG_MTK_CHIP_MT7981=y -CONFIG_MTK_CONNINFRA_APSOC=y -CONFIG_MTK_CONNINFRA_APSOC_MT7981=y -CONFIG_MTK_CON_WPS_SUPPORT=y -CONFIG_MTK_DBDC_MODE=y -CONFIG_MTK_DOT11K_RRM_SUPPORT=y -CONFIG_MTK_DOT11R_FT_SUPPORT=y -CONFIG_MTK_DOT11W_PMF_SUPPORT=y -CONFIG_MTK_DOT11_HE_AX=y -CONFIG_MTK_DOT11_N_SUPPORT=y -CONFIG_MTK_DOT11_VHT_AC=y -CONFIG_MTK_FAST_NAT_SUPPORT=y -CONFIG_MTK_FIRST_IF_EEPROM_FLASH=y -CONFIG_MTK_FIRST_IF_IPAILNA=y -CONFIG_MTK_FIRST_IF_MT7981=y -CONFIG_MTK_GREENAP_SUPPORT=y -CONFIG_MTK_G_BAND_256QAM_SUPPORT=y -CONFIG_MTK_HDR_TRANS_RX_SUPPORT=y -CONFIG_MTK_HDR_TRANS_TX_SUPPORT=y -CONFIG_MTK_ICAP_SUPPORT=y -CONFIG_MTK_IGMP_SNOOP_SUPPORT=y -CONFIG_MTK_INTERWORKING=y -CONFIG_MTK_MAP_R2_VER_SUPPORT=y -CONFIG_MTK_MAP_R3_VER_SUPPORT=y -CONFIG_MTK_MAP_SUPPORT=y -CONFIG_MTK_MBSS_DTIM_SUPPORT=y -CONFIG_MTK_MBSS_SUPPORT=y -CONFIG_MTK_MCAST_RATE_SPECIFIC=y -CONFIG_MTK_MEMORY_SHRINK=y -CONFIG_MTK_MEMORY_SHRINK_AGGRESS=y -CONFIG_MTK_MGMT_TXPWR_CTRL=y -CONFIG_MTK_MLME_MULTI_QUEUE_SUPPORT=y -CONFIG_MTK_MT7981_NEW_FW=y -CONFIG_MTK_MT_AP_SUPPORT=m -CONFIG_MTK_MT_DFS_SUPPORT=y -CONFIG_MTK_MT_MAC=y -CONFIG_MTK_MT_WIFI=m -CONFIG_MTK_MT_WIFI_PATH="mt_wifi" -CONFIG_MTK_MUMIMO_SUPPORT=y -CONFIG_MTK_MU_RA_SUPPORT=y -CONFIG_MTK_OFFCHANNEL_SCAN_FEATURE=y -CONFIG_MTK_OWE_SUPPORT=y -CONFIG_MTK_QOS_R1_SUPPORT=y -CONFIG_MTK_RA_PHY_RATE_SUPPORT=y -CONFIG_MTK_RED_SUPPORT=y -CONFIG_MTK_RTMP_FLASH_SUPPORT=y -CONFIG_MTK_RT_FIRST_CARD_EEPROM="flash" -CONFIG_MTK_RT_FIRST_IF_RF_OFFSET=0xc0000 -CONFIG_MTK_SCS_FW_OFFLOAD=y -CONFIG_MTK_SECOND_IF_NONE=y -CONFIG_MTK_SMART_CARRIER_SENSE_SUPPORT=y -CONFIG_MTK_SPECTRUM_SUPPORT=y -CONFIG_MTK_SUPPORT_OPENWRT=y -CONFIG_MTK_THIRD_IF_NONE=y -CONFIG_MTK_TPC_SUPPORT=y -CONFIG_MTK_TXBF_SUPPORT=y -CONFIG_MTK_UAPSD=y -CONFIG_MTK_VLAN_SUPPORT=y -CONFIG_MTK_VOW_SUPPORT=y -CONFIG_MTK_WARP_V2=y -CONFIG_MTK_WDS_SUPPORT=y -CONFIG_MTK_WHNAT_SUPPORT=m -CONFIG_MTK_WIFI_BASIC_FUNC=y -CONFIG_MTK_WIFI_DRIVER=y -CONFIG_MTK_WIFI_EAP_FEATURE=y -CONFIG_MTK_WIFI_FW_BIN_LOAD=y -CONFIG_MTK_WIFI_MODE_AP=m -CONFIG_MTK_WIFI_MT_MAC=y -CONFIG_MTK_WIFI_TWT_SUPPORT=y -CONFIG_MTK_WLAN_HOOK=y -CONFIG_MTK_WLAN_SERVICE=y -CONFIG_MTK_WNM_SUPPORT=y -CONFIG_MTK_WPA3_SUPPORT=y -CONFIG_MTK_WSC_INCLUDED=y -CONFIG_MTK_WSC_V2_SUPPORT=y - -# CONFIG_PKG_CHECK_FORMAT_SECURITY is not set -# CONFIG_PKG_FORTIFY_SOURCE_1 is not set -CONFIG_PKG_FORTIFY_SOURCE_2=y -CONFIG_WARP_CHIPSET="mt7981" -CONFIG_WARP_DBG_SUPPORT=y -CONFIG_WARP_NEW_FW=y -CONFIG_WARP_VERSION=2 -CONFIG_WED_HW_RRO_SUPPORT=y -CONFIG_WIFI_NORMAL_SETTING=y -# CONFIG_WOLFSSL_HAS_ECC25519 is not set -CONFIG_first_card=y -CONFIG_first_card_name="MT7981" -# CONFIG_AFALG_FALLBACK is not set -# CONFIG_MTK_BAND_STEERING is not set -# CONFIG_MTK_DEFAULT_5G_PROFILE is not set -# CONFIG_MTK_MAC_REPEATER_SUPPORT is not set -# CONFIG_MTK_MULTI_PROFILE_SUPPORT is not set -# CONFIG_MTK_PCIE_ASPM_DYM_CTRL_SUPPORT is not set -# CONFIG_MTK_PRE_CAL_TRX_SET1_SUPPORT is not set -# CONFIG_MTK_PRE_CAL_TRX_SET2_SUPPORT is not set -# CONFIG_MTK_RLM_CAL_CACHE_SUPPORT is not set -# CONFIG_MTK_SNIFFER_RADIOTAP_SUPPORT is not set - -CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 \ No newline at end of file diff --git a/devices/mediatek_mt7981/README.md b/devices/mediatek_mt7981/README.md deleted file mode 100644 index 4a529940ffd9..000000000000 --- a/devices/mediatek_mt7981/README.md +++ /dev/null @@ -1 +0,0 @@ -源码来源 https://github.com/hanwckf/immortalwrt-mt798x 感谢 \ No newline at end of file diff --git a/devices/mediatek_mt7981/diy.sh b/devices/mediatek_mt7981/diy.sh deleted file mode 100644 index d637854e7cca..000000000000 --- a/devices/mediatek_mt7981/diy.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -shopt -s extglob - -SHELL_FOLDER=$(dirname $(readlink -f "$0")) - -rm -rf feeds/kiddin9/{rtl*,fullconenat-nft} package/feeds/luci/rpcd-mod-luci toolchain/musl package/feeds/packages/gptfdisk package/utils/f2fs-tools package/utils/e2fsprogs package/libs/libselinux package/feeds/packages/acl package/feeds/packages/libevdev - -rm -rf devices/common/patches/{rootfstargz.patch,kernel_version.patch,seccomp.patch,iptables.patch,kernel-defaults.patch,targets.patch} - -#sed -i "/KernelPackage,sound-soc-core/d" package/kernel/linux/modules/sound.mk -#sed -i "/KernelPackage,multimedia-input/d" package/kernel/linux/modules/video.mk - -git_clone_path openwrt-23.05 https://github.com/openwrt/openwrt toolchain/musl package/utils/e2fsprogs package/utils/ucode package/libs/libselinux -#ln -sf $(pwd)/feeds/luci/modules/luci-base package/feeds/kiddin9/ - -sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/network/config/netifd/Makefile - -sed -i "s/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += luci-app-mtk mii_mgr wifi-profile mtkhqos_util wireless-regdb switch regs kmod-warp kmod-mt_wifi kmod-mediatek_hnat kmod-conninfra datconf-lua/" target/linux/mediatek/Makefile diff --git a/devices/mediatek_mt7981/feeds.conf b/devices/mediatek_mt7981/feeds.conf deleted file mode 100644 index b0f00955de06..000000000000 --- a/devices/mediatek_mt7981/feeds.conf +++ /dev/null @@ -1,4 +0,0 @@ -src-git-full packages https://github.com/immortalwrt/packages.git;openwrt-21.02 -src-git luci https://github.com/openwrt/luci.git;openwrt-23.05 -src-git-full routing https://github.com/openwrt/routing.git;openwrt-21.02 -src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master diff --git a/devices/mediatek_mt7981/patches/base-files.patch b/devices/mediatek_mt7981/patches/base-files.patch deleted file mode 100644 index d601ca72c9d4..000000000000 --- a/devices/mediatek_mt7981/patches/base-files.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/package/feeds/kiddin9/base-files/Makefile -+++ b/package/feeds/kiddin9/base-files/Makefile -@@ -205,6 +205,9 @@ define Package/base-files/install - - $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \ - rm -f $(1)/etc/banner.failsafe,) -+ -+ $(if $(CONFIG_PACKAGE_wifi-profile), \ -+ rm -f $(1)/sbin/wifi) - endef - - ifneq ($(DUMP),1) - ---- a/package/feeds/kiddin9/base-files/files/etc/hotplug.d/net/00-sysctl -+++ b/package/feeds/kiddin9/base-files/files/etc/hotplug.d/net/00-sysctl -@@ -6,4 +6,6 @@ if [ "$ACTION" = add ]; then - sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" "$CONF" | \ - sysctl -e -p - | logger -t sysctl - done -+ -+ [ -f /sbin/smp.sh ] && /sbin/smp.sh - fi diff --git a/devices/mediatek_mt7981/patches/fix.patch b/devices/mediatek_mt7981/patches/fix.patch deleted file mode 100644 index 06e9f84e5861..000000000000 --- a/devices/mediatek_mt7981/patches/fix.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/include/image.mk -+++ b/include/image.mk -@@ -609,6 +609,7 @@ define Device/Build/image - IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ - IMAGE_FILESYSTEM="$(1)" \ - IMAGE_PREFIX="$(IMAGE_PREFIX)" \ -+ KERNEL_INITRAMFS_IMAGE="$(subst $(IMG_PREFIX_EXTRA),,$(KERNEL_INITRAMFS_IMAGE))" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ - ---- a/scripts/json_add_image_info.py -+++ b/scripts/json_add_image_info.py -@@ -48,6 +48,7 @@ def get_titles(): - "profiles": { - device_id: { - "image_prefix": getenv("IMAGE_PREFIX"), -+ "image_initramfs": getenv("KERNEL_INITRAMFS_IMAGE"), - "images": [ - { - "type": getenv("IMAGE_TYPE"), - ---- a/scripts/json_overview_image_info.py -+++ b/scripts/json_overview_image_info.py -@@ -47,7 +47,7 @@ def get_initial_output(image_info): - - - if output: -- default_packages, output["arch_packages"] = run( -+ default_packages, output["arch_packages"], output["kernel_version"] = run( - [ - "make", - "--no-print-directory", -@@ -55,6 +55,7 @@ def get_initial_output(image_info): - "target/linux/", - "val.DEFAULT_PACKAGES", - "val.ARCH_PACKAGES", -+ "val.LINUX_VERSION", - ], - stdout=PIPE, - stderr=PIPE, - ---- a/package/mtk/applications/luci-app-mtk/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm -+++ b/package/mtk/applications/luci-app-mtk/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm -@@ -581,9 +581,7 @@

<%:Interface Configurations%> - <%=vifname and devname.."@"..vifname or devn - -

<%:Access control MAC address list%>

- -+ local list = cfgs["AccessControlList"..(vifidx-1)] or "" %><%=table.concat(list:split(";"), "\n")%> - - - <% if string.split(cfgs.WirelessMode,";")[1] == "16" or string.split(cfgs.WirelessMode,";")[1] == "17" or string.split(cfgs.WirelessMode,";")[1] == "18" then %> diff --git a/devices/mediatek_mt7981/patches/iptables-mod-socket.patch b/devices/mediatek_mt7981/patches/iptables-mod-socket.patch deleted file mode 100644 index 0398c93b6a6c..000000000000 --- a/devices/mediatek_mt7981/patches/iptables-mod-socket.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/package/network/utils/iptables/Makefile -+++ b/package/network/utils/iptables/Makefile -@@ -388,6 +388,19 @@ iptables extension for triggering a LED. - - endef - -+define Package/iptables-mod-socket -+$(call Package/iptables/Module, +kmod-ipt-socket) -+ TITLE:=Socket match iptables extensions -+endef -+ -+define Package/iptables-mod-socket/description -+Socket match iptables extensions. -+ -+ Matches: -+ - socket -+ -+endef -+ - define Package/iptables-mod-tproxy - $(call Package/iptables/Module, +kmod-ipt-tproxy) - TITLE:=Transparent proxy iptables extensions -@@ -396,9 +409,6 @@ endef - define Package/iptables-mod-tproxy/description - Transparent proxy iptables extensions. - -- Matches: -- - socket -- - Targets: - - TPROXY - -@@ -721,6 +731,7 @@ $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) - $(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m))) - $(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m))) - $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m))) -+$(eval $(call BuildPlugin,iptables-mod-socket,$(IPT_SOCKET-m))) - $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m))) - $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m))) - $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m))) \ No newline at end of file diff --git a/devices/mediatek_mt7981/patches/kernel-defaults.patch b/devices/mediatek_mt7981/patches/kernel-defaults.patch deleted file mode 100644 index 934b00138ec7..000000000000 --- a/devices/mediatek_mt7981/patches/kernel-defaults.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/kernel-defaults.mk -+++ b/include/kernel-defaults.mk -@@ -115,6 +115,7 @@ endef - - define Kernel/CompileModules/Default - rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map -+ +$(KERNEL_MAKE) olddefconfig - +$(KERNEL_MAKE) modules - endef - diff --git a/devices/mediatek_mt7981/patches/targets.patch b/devices/mediatek_mt7981/patches/targets.patch deleted file mode 100644 index 5d75603614e5..000000000000 --- a/devices/mediatek_mt7981/patches/targets.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/include/target.mk -+++ b/include/target.mk -@@ -46,27 +46,27 @@ DEFAULT_PACKAGES.router:=\ - dnsmasq-full \ - firewall \ - iptables \ -- ipv6helper \ -+ ip6tables \ -+ kmod-ipt-nat \ -+ kmod-ipt-nat6 \ -+ kmod-ipt-offload \ -+ odhcp6c \ -+ odhcpd-ipv6only \ - ppp \ - ppp-mod-pppoe --# For easy usage --DEFAULT_PACKAGES.tweak:=\ -- block-mount \ -- default-settings-chn \ -- kmod-ipt-raw \ -- kmod-nf-nathelper \ -- kmod-nf-nathelper-extra \ -- luci \ -- luci-app-filetransfer \ -- luci-compat \ -- luci-lib-base \ -- luci-lib-fs \ -- luci-lib-ipkg - - ifneq ($(DUMP),) - all: dumpinfo - endif - -+ifeq ($(ARCH),arm) -+ DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ -+ifeq ($(ARCH),aarch64) -+ DEFAULT_PACKAGES+=luci-app-cpufreq -+endif -+ - target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1)))) - ifeq ($(DUMP),) - PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD) - ---- a/target/linux/mediatek/image/mt7981.mk -+++ b/target/linux/mediatek/image/mt7981.mk -@@ -2,7 +2,6 @@ KERNEL_LOADADDR := 0x48080000 - - MT7981_USB_PKGS := automount blkid blockdev fdisk \ - kmod-nls-cp437 kmod-nls-iso8859-1 kmod-usb2 kmod-usb3 \ -- luci-app-usb-printer luci-i18n-usb-printer-zh-cn \ - kmod-usb-net-rndis usbutils - - define Device/mt7981-spim-nor-rfb diff --git a/devices/mediatek_mt7981/settings.ini b/devices/mediatek_mt7981/settings.ini deleted file mode 100644 index 296adccf9b14..000000000000 --- a/devices/mediatek_mt7981/settings.ini +++ /dev/null @@ -1,2 +0,0 @@ -REPO_URL="https://github.com/hanwckf/immortalwrt-mt798x" -REPO_BRANCH="openwrt-21.02" diff --git a/devices/meson_meson8b/.config b/devices/meson_meson8b/.config deleted file mode 100644 index 9693665be350..000000000000 --- a/devices/meson_meson8b/.config +++ /dev/null @@ -1,9 +0,0 @@ - -CONFIG_TARGET_meson=y -CONFIG_TARGET_meson_meson8b=y -CONFIG_TARGET_meson_meson8b_DEVICE_thunder-onecloud=y - -CONFIG_TARGET_ROOTFS_SQUASHFS=n -CONFIG_TARGET_ROOTFS_EXT4FS=y - -CONFIG_PACKAGE_perf=n diff --git a/devices/meson_meson8b/patches/kernel_5.10.revert.patch.b b/devices/meson_meson8b/patches/kernel_5.10.revert.patch.b deleted file mode 100644 index 5964f302747f..000000000000 --- a/devices/meson_meson8b/patches/kernel_5.10.revert.patch.b +++ /dev/null @@ -1,485 +0,0 @@ -diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk -index 77d8d6c98bc8b..c3c56864b77e7 100644 ---- a/package/kernel/linux/modules/fs.mk -+++ b/package/kernel/linux/modules/fs.mk -@@ -83,21 +83,36 @@ endef - $(eval $(call KernelPackage,fs-btrfs)) - - -+define KernelPackage/fs-smbfs-common -+ SUBMENU:=$(FS_MENU) -+ TITLE:=SMBFS common dependencies support -+ HIDDEN:=1 -+ KCONFIG:=CONFIG_SMBFS_COMMON -+ FILES:= \ -+ $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko \ -+ $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko -+endef -+ -+define KernelPackage/fs-smbfs-common/description -+ Kernel module dependency for CIFS or SMB_SERVER support -+endef -+ -+$(eval $(call KernelPackage,fs-smbfs-common)) -+ -+ - define KernelPackage/fs-cifs - SUBMENU:=$(FS_MENU) - TITLE:=CIFS support - KCONFIG:= \ -- CONFIG_SMBFS_COMMON \ - CONFIG_CIFS \ - CONFIG_CIFS_DFS_UPCALL=n \ - CONFIG_CIFS_UPCALL=n - FILES:= \ -- $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko \ -- $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko \ - $(LINUX_DIR)/fs/cifs/cifs.ko - AUTOLOAD:=$(call AutoLoad,30,cifs) - $(call AddDepends/nls) - DEPENDS+= \ -+ +kmod-fs-smbfs-common \ - +kmod-crypto-md5 \ - +kmod-crypto-sha256 \ - +kmod-crypto-sha512 \ -diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk -index 446801ae23360..a3785d26fd04b 100644 ---- a/package/kernel/linux/modules/crypto.mk -+++ b/package/kernel/linux/modules/crypto.mk -@@ -824,9 +824,7 @@ $(eval $(call KernelPackage,crypto-rmd160)) - - define KernelPackage/crypto-rng - TITLE:=CryptoAPI random number generation -- DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac \ -- +LINUX_5_10:kmod-crypto-sha256 \ -- +LINUX_5_15:kmod-crypto-sha512 -+ DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha512 - KCONFIG:= \ - CONFIG_CRYPTO_DRBG \ - CONFIG_CRYPTO_DRBG_HMAC=y \ -diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk -index 547cc796442bd..77d8d6c98bc8b 100644 ---- a/package/kernel/linux/modules/fs.mk -+++ b/package/kernel/linux/modules/fs.mk -@@ -98,20 +98,18 @@ define KernelPackage/fs-cifs - AUTOLOAD:=$(call AutoLoad,30,cifs) - $(call AddDepends/nls) - DEPENDS+= \ -- +LINUX_5_10:kmod-crypto-md4\ - +kmod-crypto-md5 \ - +kmod-crypto-sha256 \ - +kmod-crypto-sha512 \ - +kmod-crypto-cmac \ - +kmod-crypto-hmac \ -- +LINUX_5_10:kmod-crypto-arc4 \ - +kmod-crypto-aead \ - +kmod-crypto-ccm \ - +kmod-crypto-ecb \ - +kmod-crypto-des \ -- +(LINUX_5_15):kmod-asn1-decoder \ -- +(LINUX_5_15):kmod-oid-registry \ -- +(LINUX_5_15):kmod-dnsresolver -+ +kmod-asn1-decoder \ -+ +kmod-oid-registry \ -+ +kmod-dnsresolver - endef - - define KernelPackage/fs-cifs/description -@@ -367,7 +365,6 @@ $(eval $(call KernelPackage,fs-msdos)) - define KernelPackage/fs-netfs - SUBMENU:=$(FS_MENU) - TITLE:=Network Filesystems support -- DEPENDS:=@LINUX_5_15 - KCONFIG:= CONFIG_NETFS_SUPPORT - FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko - AUTOLOAD:=$(call AutoLoad,28,netfs) -@@ -531,7 +528,6 @@ define KernelPackage/fs-ntfs3 - KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y - FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko - $(call AddDepends/nls) -- DEPENDS+=@!LINUX_5_10 - AUTOLOAD:=$(call AutoLoad,80,ntfs3) - endef - -diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk -index 6cc72207f3ebd..92587b1874cf0 100644 ---- a/package/kernel/linux/modules/input.mk -+++ b/package/kernel/linux/modules/input.mk -@@ -92,7 +92,7 @@ $(eval $(call KernelPackage,input-gpio-keys)) - define KernelPackage/input-gpio-keys-polled - SUBMENU:=$(INPUT_MODULES_MENU) - TITLE:=Polled GPIO key support -- DEPENDS:=@GPIO_SUPPORT +kmod-input-core +LINUX_5_10:kmod-input-polldev -+ DEPENDS:=@GPIO_SUPPORT +kmod-input-core - KCONFIG:= \ - CONFIG_KEYBOARD_GPIO_POLLED \ - CONFIG_INPUT_KEYBOARD=y -@@ -142,21 +142,6 @@ endef - $(eval $(call KernelPackage,input-joydev)) - - --define KernelPackage/input-polldev -- SUBMENU:=$(INPUT_MODULES_MENU) -- TITLE:=Polled Input device support -- DEPENDS:=+kmod-input-core @LINUX_5_10 -- KCONFIG:=CONFIG_INPUT_POLLDEV -- FILES:=$(LINUX_DIR)/drivers/input/input-polldev.ko --endef -- --define KernelPackage/input-polldev/description -- Kernel module for support of polled input devices --endef -- --$(eval $(call KernelPackage,input-polldev)) -- -- - define KernelPackage/input-matrixkmap - SUBMENU:=$(INPUT_MODULES_MENU) - TITLE:=Input matrix devices support -diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk -index ce72465ce4d82..fcf9c987e8ece 100644 ---- a/package/kernel/linux/modules/leds.mk -+++ b/package/kernel/linux/modules/leds.mk -@@ -118,7 +118,6 @@ $(eval $(call KernelPackage,ledtrig-pattern)) - define KernelPackage/ledtrig-tty - SUBMENU:=$(LEDS_MENU) - TITLE:=LED Trigger for TTY devices -- DEPENDS:=@LINUX_5_15 - KCONFIG:=CONFIG_LEDS_TRIGGER_TTY - FILES:=$(LED_TRIGGER_DIR)/ledtrig-tty.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-tty) -diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk -index ade6438b9c9ba..dd458ece4cfd4 100644 ---- a/package/kernel/linux/modules/netdevices.mk -+++ b/package/kernel/linux/modules/netdevices.mk -@@ -1448,7 +1448,6 @@ $(eval $(call KernelPackage,sfc-falcon)) - define KernelPackage/wwan - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=WWAN Driver Core -- DEPENDS:=@LINUX_5_15 - KCONFIG:=CONFIG_WWAN - FILES:=$(LINUX_DIR)/drivers/net/wwan/wwan.ko - AUTOLOAD:=$(call AutoProbe,wwan) -@@ -1464,7 +1463,7 @@ $(eval $(call KernelPackage,wwan)) - define KernelPackage/mhi-net - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=MHI Network Device -- DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus -+ DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_NET - FILES:=$(LINUX_DIR)/drivers/net/mhi_net.ko - AUTOLOAD:=$(call AutoProbe,mhi_net) -@@ -1479,7 +1478,7 @@ $(eval $(call KernelPackage,mhi-net)) - define KernelPackage/mhi-wwan-ctrl - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=MHI WWAN Control -- DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan -+ DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus +kmod-wwan - KCONFIG:=CONFIG_MHI_WWAN_CTRL - FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_ctrl.ko - AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl) -@@ -1495,7 +1494,7 @@ $(eval $(call KernelPackage,mhi-wwan-ctrl)) - define KernelPackage/mhi-wwan-mbim - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=MHI MBIM -- DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan -+ DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus +kmod-wwan - KCONFIG:=CONFIG_MHI_WWAN_MBIM - FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_mbim.ko - AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim) -diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk -index d9d6a98ed245d..4653b8256502e 100644 ---- a/package/kernel/linux/modules/netsupport.mk -+++ b/package/kernel/linux/modules/netsupport.mk -@@ -1187,7 +1187,7 @@ define KernelPackage/sctp - FILES:= $(LINUX_DIR)/net/sctp/sctp.ko - AUTOLOAD:= $(call AutoLoad,32,sctp) - DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \ -- +LINUX_5_15:kmod-udptunnel4 +LINUX_5_15:kmod-udptunnel6 -+ +kmod-udptunnel4 +kmod-udptunnel6 - endef - - define KernelPackage/sctp/description -@@ -1443,7 +1443,6 @@ define KernelPackage/qrtr - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Qualcomm IPC Router support - HIDDEN:=1 -- DEPENDS:=@!LINUX_5_10 - KCONFIG:=CONFIG_QRTR - FILES:= \ - $(LINUX_DIR)/net/qrtr/qrtr.ko -diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk -index e8b4ea54feaf7..51e70fbe18af5 100644 ---- a/package/kernel/linux/modules/other.mk -+++ b/package/kernel/linux/modules/other.mk -@@ -1251,8 +1251,8 @@ $(eval $(call KernelPackage,keys-trusted)) - define KernelPackage/tpm - SUBMENU:=$(OTHER_MENU) - TITLE:=TPM Hardware Support -- DEPENDS:= +kmod-random-core +(LINUX_5_15):kmod-asn1-decoder \ -- +(LINUX_5_15):kmod-asn1-encoder +(LINUX_5_15):kmod-oid-registry -+ DEPENDS:= +kmod-random-core +kmod-asn1-decoder \ -+ +kmod-asn1-encoder +kmod-oid-registry - KCONFIG:= CONFIG_TCG_TPM - FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko - AUTOLOAD:=$(call AutoLoad,10,tpm,1) -@@ -1336,7 +1336,6 @@ $(eval $(call KernelPackage,i6300esb-wdt)) - define KernelPackage/mhi-bus - SUBMENU:=$(OTHER_MENU) - TITLE:=MHI bus -- DEPENDS:=@LINUX_5_15 - KCONFIG:=CONFIG_MHI_BUS \ - CONFIG_MHI_BUS_DEBUG=y - FILES:=$(LINUX_DIR)/drivers/bus/mhi/core/mhi.ko -@@ -1352,7 +1351,7 @@ $(eval $(call KernelPackage,mhi-bus)) - define KernelPackage/mhi-pci-generic - SUBMENU:=$(OTHER_MENU) - TITLE:=MHI PCI controller driver -- DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus -+ DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_BUS_PCI_GENERIC - FILES:=$(LINUX_DIR)/drivers/bus/mhi/mhi_pci_generic.ko - AUTOLOAD:=$(call AutoProbe,mhi_pci_generic) -diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk -index 5747ad21663a2..2561f36aa3d6d 100644 ---- a/package/kernel/linux/modules/usb.mk -+++ b/package/kernel/linux/modules/usb.mk -@@ -1155,7 +1155,7 @@ $(eval $(call KernelPackage,usb-net-aqc111)) - - define KernelPackage/usb-net-asix - TITLE:=Kernel module for USB-to-Ethernet Asix convertors -- DEPENDS:=+kmod-libphy +LINUX_5_15:kmod-net-selftests +LINUX_5_15:kmod-mdio-devres +kmod-phy-ax88796b -+ DEPENDS:=+kmod-libphy +kmod-net-selftests +kmod-mdio-devres +kmod-phy-ax88796b - KCONFIG:=CONFIG_USB_NET_AX8817X - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko - AUTOLOAD:=$(call AutoProbe,asix) -@@ -1394,7 +1394,7 @@ define KernelPackage/usb-net-rtl8152 - KCONFIG:=CONFIG_USB_RTL8152 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko - AUTOLOAD:=$(call AutoProbe,r8152) -- $(call AddDepends/usb-net, +LINUX_5_10:kmod-crypto-hash) -+ $(call AddDepends/usb-net) - endef - - define KernelPackage/usb-net-rtl8152/description -diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk -index a89ceef54b1a3..f1e61f33a5761 100644 ---- a/package/kernel/linux/modules/video.mk -+++ b/package/kernel/linux/modules/video.mk -@@ -226,7 +226,7 @@ define KernelPackage/drm - TITLE:=Direct Rendering Manager (DRM) support - HIDDEN:=1 - DEPENDS:=+kmod-dma-buf +kmod-i2c-core +PACKAGE_kmod-backlight:kmod-backlight \ -- +(LINUX_5_15):kmod-fb -+ +kmod-fb - KCONFIG:=CONFIG_DRM - FILES:= \ - $(LINUX_DIR)/drivers/gpu/drm/drm.ko \ -diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk -index f6c9df06989ab..bdf84e8ae29b2 100644 ---- a/package/kernel/linux/modules/block.mk -+++ b/package/kernel/linux/modules/block.mk -@@ -521,13 +521,13 @@ define KernelPackage/scsi-core - TITLE:=SCSI device support - KCONFIG:= \ - CONFIG_SCSI \ -- CONFIG_SCSI_COMMON@ge5.15 \ -+ CONFIG_SCSI_COMMON \ - CONFIG_BLK_DEV_SD - FILES:= \ - $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \ -- $(LINUX_DIR)/drivers/scsi/scsi_common.ko@ge5.15 \ -+ $(LINUX_DIR)/drivers/scsi/scsi_common.ko \ - $(LINUX_DIR)/drivers/scsi/sd_mod.ko -- AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common@ge5.15 sd_mod,1) -+ AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common sd_mod,1) - endef - - $(eval $(call KernelPackage,scsi-core)) -diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk -index 98bcb9e874701..446801ae23360 100644 ---- a/package/kernel/linux/modules/crypto.mk -+++ b/package/kernel/linux/modules/crypto.mk -@@ -704,7 +704,6 @@ define KernelPackage/crypto-misc - CONFIG_CRYPTO_KHAZAD \ - CONFIG_CRYPTO_SERPENT \ - CONFIG_CRYPTO_TEA \ -- CONFIG_CRYPTO_TGR192@lt5.12 \ - CONFIG_CRYPTO_TWOFISH \ - CONFIG_CRYPTO_TWOFISH_COMMON \ - CONFIG_CRYPTO_TWOFISH_586 \ -@@ -717,7 +716,6 @@ define KernelPackage/crypto-misc - $(LINUX_DIR)/crypto/cast6_generic.ko \ - $(LINUX_DIR)/crypto/khazad.ko \ - $(LINUX_DIR)/crypto/tea.ko \ -- $(LINUX_DIR)/crypto/tgr192.ko@lt5.12 \ - $(LINUX_DIR)/crypto/twofish_common.ko \ - $(LINUX_DIR)/crypto/wp512.ko \ - $(LINUX_DIR)/crypto/twofish_generic.ko \ -@@ -725,7 +723,7 @@ define KernelPackage/crypto-misc - $(LINUX_DIR)/crypto/blowfish_generic.ko \ - $(LINUX_DIR)/crypto/serpent_generic.ko - AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \ -- cast5_generic cast6_generic khazad tea tgr192@lt5.12 twofish_common \ -+ cast5_generic cast6_generic khazad tea twofish_common \ - wp512 blowfish_common serpent_generic) - ifndef CONFIG_TARGET_x86 - AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic) -@@ -738,10 +736,9 @@ ifndef CONFIG_TARGET_x86_64 - FILES+= \ - $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \ - $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \ -- $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko@lt5.12 \ - $(LINUX_DIR)/crypto/cryptd.ko \ - $(LINUX_DIR)/crypto/crypto_simd.ko -- AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper@lt5.12 \ -+ AUTOLOAD+= $(call AutoLoad,10,cryptd \ - serpent-sse2-i586 twofish-i586 blowfish_generic) - endef - endif -diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk -index 19fa9fcfc0720..547cc796442bd 100644 ---- a/package/kernel/linux/modules/fs.mk -+++ b/package/kernel/linux/modules/fs.mk -@@ -87,13 +87,13 @@ define KernelPackage/fs-cifs - SUBMENU:=$(FS_MENU) - TITLE:=CIFS support - KCONFIG:= \ -- CONFIG_SMBFS_COMMON@ge5.15 \ -+ CONFIG_SMBFS_COMMON \ - CONFIG_CIFS \ - CONFIG_CIFS_DFS_UPCALL=n \ - CONFIG_CIFS_UPCALL=n - FILES:= \ -- $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@ge5.15 \ -- $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@ge5.15 \ -+ $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko \ -+ $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko \ - $(LINUX_DIR)/fs/cifs/cifs.ko - AUTOLOAD:=$(call AutoLoad,30,cifs) - $(call AddDepends/nls) -diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk -index c0e37f06c7455..f901f87ddd512 100644 ---- a/package/kernel/linux/modules/iio.mk -+++ b/package/kernel/linux/modules/iio.mk -@@ -438,7 +438,7 @@ define KernelPackage/iio-sps30 - CONFIG_SPS30_I2C - FILES:= \ - $(LINUX_DIR)/drivers/iio/chemical/sps30.ko \ -- $(LINUX_DIR)/drivers/iio/chemical/sps30_i2c.ko@ge5.14 -+ $(LINUX_DIR)/drivers/iio/chemical/sps30_i2c.ko - AUTOLOAD:=$(call AutoProbe,sps30 sps30_i2c) - $(call AddDepends/iio) - endef -diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk -index 6270cdeb3b09d..6cc72207f3ebd 100644 ---- a/package/kernel/linux/modules/input.mk -+++ b/package/kernel/linux/modules/input.mk -@@ -179,10 +179,8 @@ define KernelPackage/input-touchscreen-ads7846 - DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang - KCONFIG:= \ - CONFIG_INPUT_TOUCHSCREEN=y \ -- CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \ - CONFIG_TOUCHSCREEN_ADS7846 -- FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \ -- $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13 -+ FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko - AUTOLOAD:=$(call AutoProbe,ads7846) - endef - -@@ -199,10 +197,8 @@ define KernelPackage/input-touchscreen-edt-ft5x06 - DEPENDS:=+kmod-i2c-core +kmod-input-core - KCONFIG:= \ - CONFIG_INPUT_TOUCHSCREEN=y \ -- CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \ - CONFIG_TOUCHSCREEN_EDT_FT5X06 -- FILES:=$(LINUX_DIR)/drivers/input/touchscreen/edt-ft5x06.ko \ -- $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13 -+ FILES:=$(LINUX_DIR)/drivers/input/touchscreen/edt-ft5x06.ko - AUTOLOAD:=$(call AutoProbe,edt-ft5x06) - endef - -diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk -index 208518c3bfc02..ade6438b9c9ba 100644 ---- a/package/kernel/linux/modules/netdevices.mk -+++ b/package/kernel/linux/modules/netdevices.mk -@@ -1170,7 +1170,7 @@ define KernelPackage/of-mdio - KCONFIG:=CONFIG_OF_MDIO - FILES:= \ - $(LINUX_DIR)/drivers/net/mdio/of_mdio.ko \ -- $(LINUX_DIR)/drivers/net/mdio/fwnode_mdio.ko@ge5.15 -+ $(LINUX_DIR)/drivers/net/mdio/fwnode_mdio.ko - AUTOLOAD:=$(call AutoLoad,41,of_mdio) - endef - -diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk -index 1772545f25e82..99a48a37d479b 100644 ---- a/package/kernel/linux/modules/netfilter.mk -+++ b/package/kernel/linux/modules/netfilter.mk -@@ -1141,7 +1141,6 @@ define KernelPackage/nft-bridge - FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m))) - KCONFIG:= \ -- CONFIG_NF_LOG_BRIDGE=n@lt5.13 \ - $(KCONFIG_NFT_BRIDGE) - endef - -diff --git a/package/kernel/linux/modules/spi.mk b/package/kernel/linux/modules/spi.mk -index 5cdfc3b2b36b6..78a1c8a03283b 100644 ---- a/package/kernel/linux/modules/spi.mk -+++ b/package/kernel/linux/modules/spi.mk -@@ -15,10 +15,9 @@ define KernelPackage/mmc-spi - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=\ -- $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko@lt5.13) \ -- $(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko@ge5.13 \ -+ $(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko \ - $(LINUX_DIR)/drivers/mmc/host/mmc_spi.ko -- AUTOLOAD:=$(call AutoProbe,$(if $(CONFIG_OF),of_mmc_spi@lt5.13) of_mmc_spi@ge5.13 mmc_spi) -+ AUTOLOAD:=$(call AutoProbe,of_mmc_spi mmc_spi) - endef - - define KernelPackage/mmc-spi/description -diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk -index 9c2e01357acbf..5747ad21663a2 100644 ---- a/package/kernel/linux/modules/usb.mk -+++ b/package/kernel/linux/modules/usb.mk -@@ -1823,9 +1823,8 @@ define KernelPackage/usb-xhci-mtk - KCONFIG:=CONFIG_USB_XHCI_MTK - HIDDEN:=1 - FILES:= \ -- $(LINUX_DIR)/drivers/usb/host/xhci-mtk.ko@lt5.13 \ -- $(LINUX_DIR)/drivers/usb/host/xhci-mtk-hcd.ko@ge5.13 -- AUTOLOAD:=$(call AutoLoad,54,xhci-mtk@lt5.13 xhci-mtk-hcd@gt5.13,1) -+ $(LINUX_DIR)/drivers/usb/host/xhci-mtk-hcd.ko -+ AUTOLOAD:=$(call AutoLoad,54,xhci-mtk-hcd,1) - $(call AddDepends/usb) - endef - -diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk -index 83f48ac8492c5..a89ceef54b1a3 100644 ---- a/package/kernel/linux/modules/video.mk -+++ b/package/kernel/linux/modules/video.mk -@@ -376,7 +376,7 @@ define KernelPackage/drm-imx-ldb - CONFIG_DRM_PANEL_SITRONIX_ST7789V=n - FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko \ - $(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko \ -- $(LINUX_DIR)/drivers/gpu/drm/drm_dp_aux_bus.ko@gt5.10 -+ $(LINUX_DIR)/drivers/gpu/drm/drm_dp_aux_bus.ko - AUTOLOAD:=$(call AutoLoad,08,imx-ldb) - endef - -diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk -index 59a2d79563dcb..85f47aacbf94f 100644 ---- a/package/kernel/linux/modules/virt.mk -+++ b/package/kernel/linux/modules/virt.mk -@@ -104,7 +104,7 @@ define KernelPackage/vfio-pci - CONFIG_VFIO_PCI \ - CONFIG_VFIO_PCI_IGD=y - FILES:= \ -- $(LINUX_DIR)/drivers/vfio/pci/vfio-pci-core.ko@ge5.15 \ -+ $(LINUX_DIR)/drivers/vfio/pci/vfio-pci-core.ko \ - $(LINUX_DIR)/drivers/vfio/pci/vfio-pci.ko - AUTOLOAD:=$(call AutoProbe,vfio-pci) - endef \ No newline at end of file diff --git a/devices/ramips_mt7620/.config b/devices/ramips_mt7620/.config index 08c5d1f4198e..c3cf46da353d 100644 --- a/devices/ramips_mt7620/.config +++ b/devices/ramips_mt7620/.config @@ -3,6 +3,7 @@ CONFIG_TARGET_ramips=y CONFIG_TARGET_ramips_mt7620=y CONFIG_TARGET_MULTI_PROFILE=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_glinet_gl-mt300a=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_glinet_gl-mt300n=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_glinet_gl-mt750=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_hiwifi_hc5661=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_hiwifi_hc5761=y @@ -15,5 +16,10 @@ CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_youku_yk-l1=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_youku_yk-l1c=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_xiaomi_miwifi-r3=y CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_zbtlink_zbt-we826-32m=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_asus_rt-ac51u=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_asus_rt-ac54u=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_asus_rt-ac51u=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_netcore_nw5212=y +CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_youku_x2=y CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/ramips_mt7620/patches/hiwifi_r33.patch b/devices/ramips_mt7620/patches/hiwifi_r33.patch index 690cd25e6704..ecffd0012fab 100644 --- a/devices/ramips_mt7620/patches/hiwifi_r33.patch +++ b/devices/ramips_mt7620/patches/hiwifi_r33.patch @@ -13,7 +13,6 @@ Subject: [PATCH] ramips: MT7620 add Support HiWiFi R33(C312B B52) .../mt7620/base-files/lib/upgrade/platform.sh | 3 + 7 files changed, 318 insertions(+) create mode 100644 target/linux/ramips/dts/mt7620a_hiwifi_r33.dts - create mode 100644 target/linux/ramips/mt7620/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367b.c b/target/linux/generic/files/drivers/net/phy/rtl8367b.c index 3599791a517b..6297e07628ba 100644 @@ -366,8 +365,7 @@ index 00ffb1b5420c..5f4e7268e8a9 100644 iodata,wn-ac1167gr|\ iodata,wn-ac733gr3) wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) -diff --git a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac -index aa0ad99158271..c7b818a0af7c0 100644 + --- a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -23,4 +23,11 @@ case "$board" in diff --git a/devices/ramips_mt7621/.config b/devices/ramips_mt7621/.config index 744070ef00da..61a3b0382cee 100644 --- a/devices/ramips_mt7621/.config +++ b/devices/ramips_mt7621/.config @@ -57,5 +57,9 @@ CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_zbtlink_zbt-wg3526-32m=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_ht-jsh_0211=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_c-life_xg1=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_hatlab_gateboard-one=y +CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_openfi_5pro=y +CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_jdcloud_re-cp-02=y +CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_yuncore_ax820=y + CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts b/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts new file mode 100644 index 000000000000..1826a9f20c86 --- /dev/null +++ b/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "jdcloud,re-cp-02", "mediatek,mt7621-soc"; + model = "JDCloud RE-CP-02"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_status_blue; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_blue; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + led_status_blue: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + led_status_green: led-2 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "U-Boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + compatible = "u-boot,env"; + label = "Config"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "Factory"; + reg = <0x50000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; + }; + }; + + partition@90000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x90000 0xf70000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&sdhci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + mediatek,disable-radar-background; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_3fff4>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_openfi_5pro.dts b/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_openfi_5pro.dts new file mode 100644 index 000000000000..d23c4e32aafd --- /dev/null +++ b/devices/ramips_mt7621/diy/target/linux/ramips/dts/mt7621_openfi_5pro.dts @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "openfi,5pro", "mediatek,mt7621-soc"; + model = "OpenFi 5Pro"; + + aliases { + led-boot = &led_system_blue; + led-failsafe = &led_system_blue; + led-running = &led_system_blue; + led-upgrade = &led_system_blue; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system_blue: led-0 { + label = "blue:system"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_internet_blue: led-1 { + label = "blue:internet"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + led_wifi_blue: led-2 { + label = "blue:wifi"; + color = ; + linux,default-trigger = "phy0tpt"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + broken-flash-reset; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x3fb0000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <2400000 2500000>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + }; +}; + +&pcie1 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; + }; + port@1 { + status = "okay"; + label = "lan"; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + }; + }; +}; + +&state_default { + gpio { + groups = "wdt"; + function = "gpio"; + }; +}; + diff --git a/devices/ramips_mt7621/patches/01-small_flash.patch b/devices/ramips_mt7621/patches/01-small_flash.patch deleted file mode 100644 index a2374aada48f..000000000000 --- a/devices/ramips_mt7621/patches/01-small_flash.patch +++ /dev/null @@ -1,128 +0,0 @@ -From f4b61c1960aa885d7de2953a36d9efacbf6e5406 Mon Sep 17 00:00:00 2001 -From: kiddin9 <48883331+kiddin9@users.noreply.github.com> -Date: Sat, 27 May 2023 03:53:49 +0800 -Subject: [PATCH] Update mt7621.mk - -Signed-off-by: kiddin9 <48883331+kiddin9@users.noreply.github.com> ---- - target/linux/ramips/image/mt7621.mk | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk -index 2697f84bf7684..df8c7d233cf1e 100644 ---- a/target/linux/ramips/image/mt7621.mk -+++ b/target/linux/ramips/image/mt7621.mk -@@ -330,7 +330,7 @@ define Device/asus_rt-n56u-b1 - DEVICE_VARIANT := B1 - IMAGE_SIZE := 16064k - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ -- kmod-usb-ledtrig-usbport -uboot-envtools -+ kmod-usb-ledtrig-usbport -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += asus_rt-n56u-b1 - -@@ -1327,7 +1327,7 @@ define Device/jcg_y2 - JCG_MAXSIZE := 16064k - DEVICE_VENDOR := JCG - DEVICE_MODEL := Y2 -- DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools -+ DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += jcg_y2 - -@@ -1784,7 +1784,7 @@ define Device/netgear_wndr3700-v5 - SERCOMM_SWVER := 0x1054 - SERCOMM_PAD := 320k - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ -- kmod-usb-ledtrig-usbport -uboot-envtools -+ kmod-usb-ledtrig-usbport -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - SUPPORTED_DEVICES += wndr3700v5 - endef - TARGET_DEVICES += netgear_wndr3700-v5 -@@ -1812,7 +1812,7 @@ define Device/oraybox_x3a - IMAGE_SIZE := 15360k - DEVICE_VENDOR := OrayBox - DEVICE_MODEL := X3A -- DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools -+ DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += oraybox_x3a - -@@ -1824,7 +1824,7 @@ define Device/phicomm_k2p - DEVICE_ALT0_VENDOR := Phicomm - DEVICE_ALT0_MODEL := KE 2P - SUPPORTED_DEVICES += k2p -- DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools -+ DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += phicomm_k2p - -@@ -1988,7 +1988,7 @@ define Device/thunder_timecloud - IMAGE_SIZE := 16064k - DEVICE_VENDOR := Thunder - DEVICE_MODEL := Timecloud -- DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls -uboot-envtools -+ DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls -uboot-envtools -bash -openssh-sftp-server -coremark -htop - SUPPORTED_DEVICES += timecloud - endef - TARGET_DEVICES += thunder_timecloud -@@ -2445,11 +2445,11 @@ TARGET_DEVICES += xiaomi_mi-router-3g - define Device/xiaomi_mi-router-3g-v2 - $(Device/dsa-migration) - $(Device/uimage-lzma-loader) -- IMAGE_SIZE := 14848k -+ IMAGE_SIZE := 16064k - DEVICE_VENDOR := Xiaomi - DEVICE_MODEL := Mi Router 3G - DEVICE_VARIANT := v2 -- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools -+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - SUPPORTED_DEVICES += xiaomi,mir3g-v2 - endef - TARGET_DEVICES += xiaomi_mi-router-3g-v2 -@@ -2479,23 +2479,23 @@ TARGET_DEVICES += xiaomi_mi-router-4 - define Device/xiaomi_mi-router-4a-gigabit - $(Device/dsa-migration) - $(Device/uimage-lzma-loader) -- IMAGE_SIZE := 14848k -+ IMAGE_SIZE := 16064k - DEVICE_VENDOR := Xiaomi - DEVICE_MODEL := Mi Router 4A - DEVICE_VARIANT := Gigabit Edition -- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools -+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += xiaomi_mi-router-4a-gigabit - - define Device/xiaomi_mi-router-4a-gigabit-v2 - $(Device/dsa-migration) - $(Device/uimage-lzma-loader) -- IMAGE_SIZE := 14784k -+ IMAGE_SIZE := 16064k - DEVICE_VENDOR := Xiaomi - DEVICE_MODEL := Mi Router 4A - DEVICE_VARIANT := Gigabit Edition v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ -- -uboot-envtools -+ -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += xiaomi_mi-router-4a-gigabit-v2 - -@@ -2570,7 +2570,7 @@ define Device/youhua_wr1200js - DEVICE_VENDOR := YouHua - DEVICE_MODEL := WR1200JS - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ -- kmod-usb-ledtrig-usbport -uboot-envtools -+ kmod-usb-ledtrig-usbport -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - endef - TARGET_DEVICES += youhua_wr1200js - -@@ -2580,7 +2580,7 @@ define Device/youku_yk-l2 - DEVICE_VENDOR := Youku - DEVICE_MODEL := YK-L2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ -- kmod-usb-ledtrig-usbport -uboot-envtools -+ kmod-usb-ledtrig-usbport -uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server - UIMAGE_MAGIC := 0x12291000 - UIMAGE_NAME := 400000000000000000003000 - endef \ No newline at end of file diff --git a/devices/ramips_mt7621/patches/11-openfi-5pro.patch b/devices/ramips_mt7621/patches/11-openfi-5pro.patch new file mode 100644 index 000000000000..46649c8efc46 --- /dev/null +++ b/devices/ramips_mt7621/patches/11-openfi-5pro.patch @@ -0,0 +1,29 @@ +--- a/target/linux/ramips/image/mt7621.mk ++++ b/target/linux/ramips/image/mt7621.mk +@@ -1401,6 +1401,15 @@ define Device/netis_wf2881 + endef + TARGET_DEVICES += netis_wf2881 + ++define Device/openfi_5pro ++ $(Device/dsa-migration) ++ IMAGE_SIZE := 63448k ++ DEVICE_VENDOR := OpenFi ++ DEVICE_MODEL := 5Pro ++ DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap kmod-usb3 ++endef ++TARGET_DEVICES += openfi_5pro ++ + define Device/oraybox_x3a + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + +--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network ++++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +@@ -61,6 +61,7 @@ ramips_setup_interfaces() + ;; + asiarf,ap7621-001|\ + humax,e10|\ ++ openfi,5pro|\ + wavlink,ws-wn572hp3-4g|\ + winstars,ws-wn583a6) + ucidef_set_interfaces_lan_wan "lan" "wan" diff --git a/devices/ramips_mt7621/patches/re-cp-02.patch b/devices/ramips_mt7621/patches/re-cp-02.patch new file mode 100644 index 000000000000..0acf05d066ad --- /dev/null +++ b/devices/ramips_mt7621/patches/re-cp-02.patch @@ -0,0 +1,101 @@ +From 985af21123a02ff764156aafff2be4e9cc6e640e Mon Sep 17 00:00:00 2001 +From: Sheng Huang +Date: Mon, 6 May 2024 13:51:27 +0800 +Subject: [PATCH] ramips: add support for JDCloud RE-CP-02 + +- Soc: MediaTek MT7621AT +- RAM: 512 MB (DDR3) +- Flash: 16 MB (SPI NOR) +- WiFi: MediaTek MT7905DAN, MediaTek MT7975DN +- Ethernet: 1 WAN, 3 LAN (Gigabit) +- Buttons: Reset, Joylink +- LEDs: (red, blue, green), routed to one indicator in the top of the + device +- Power: DC 12V 1A tip positive +- 1 TF Card Slot + +The pins for the serial console are already labeled on the board +J4(V, R, T, G). Serial settings: 3.3V, 115200 + +MAC addresses: + +| | MAC | Algorithm | +| ------- | ----------------- | --------- | +| label | dc:d8:xx:xx:xx:01 | label | +| LAN | dc:d8:xx:xx:xx:01 | label | +| WAN | dc:d8:xx:xx:xx:02 | label+1 | +| WLAN 2g | dc:d8:xx:xx:xx:03 | label+2 | +| WLAN 5g | de:d8:xx:xx:xx:04 | label+3 | + +1. rename the + openwrt-ramips-mt7621-jdcloud_re-cp-02-squashfs-sysupgrade.bin + to JDCOS.bin + +2. start a TFTP server from IP address 192.168.68.10 and serve the + image named JDCOS.bin + +3. connect your device to the LAN port + +4. power up the router and press any key on the console to interrupt + the boot process. + +5. enter the following commands on the router console + + 1. setenv bootcount 6 + + 2. saveenv + + 3. reset + + > NOTE: wait for the restart, it will automatically fetch the + > image named JDCOS.bin from the TFTP server and write it into + > the flash. After the writing is completed, the router will be + > automatically restarted. + +Unable to recognize large-capacity TF card, see #14042. But the patch +https://github.com/openwrt/openwrt/issues/14042#issuecomment-1910769942 +works + +Co-Authored-By: Jianti Chen +Signed-off-by: Sheng Huang +--- + .../ramips/dts/mt7621_jdcloud_re-cp-02.dts | 186 ++++++++++++++++++ + target/linux/ramips/image/mt7621.mk | 9 + + .../mt7621/base-files/etc/init.d/bootcount | 3 + + 3 files changed, 198 insertions(+) + create mode 100644 target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts + +diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk +index 4c6b7057d5a93..cbaf6a9c59941 100644 +--- a/target/linux/ramips/image/mt7621.mk ++++ b/target/linux/ramips/image/mt7621.mk +@@ -1534,6 +1534,15 @@ define Device/jcg_y2 + endef + TARGET_DEVICES += jcg_y2 + ++define Device/jdcloud_re-cp-02 ++ $(Device/dsa-migration) ++ IMAGE_SIZE := 16000k ++ DEVICE_VENDOR := JD-Cloud ++ DEVICE_MODEL := RE-CP-02 ++ DEVICE_PACKAGES := kmod-mt7915-firmware kmod-sdhci-mt7620 ++endef ++TARGET_DEVICES += jdcloud_re-cp-02 ++ + define Device/keenetic_kn-3010 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) +diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +index c558247341374..06846cd4ca40f 100755 +--- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount ++++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +@@ -15,6 +15,9 @@ boot() { + $((0xff)) ]] || printf '\xff' | dd of=/dev/mtdblock3 \ + count=1 bs=1 seek=$((0x20001)) + ;; ++ jdcloud,re-cp-02) ++ echo -e "bootcount 0\nbootlimit 5\nupgrade_available 1" | /usr/sbin/fw_setenv -s - ++ ;; + linksys,e5600|\ + linksys,ea6350-v4|\ + linksys,ea7300-v1|\ diff --git a/devices/rockchip_armv8/diy.sh b/devices/rockchip_armv8/diy.sh index 364516fdf8de..e86a56f8cd78 100644 --- a/devices/rockchip_armv8/diy.sh +++ b/devices/rockchip_armv8/diy.sh @@ -22,7 +22,7 @@ sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk mv -f tmp/r8125 feeds/kiddin9/ -rm -rf target/linux/rockchip/armv8/base-files/etc/uci-defaults/13_opkg_update +rm -rf target/linux/rockchip/armv8/base-files/etc/uci-defaults/13_opkg_update package/feeds/kiddin9/pcat-manager sed -i -e 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/armv8.mk sed -i -e 's,wpad-openssl,wpad-basic-mbedtls,g' target/linux/rockchip/image/armv8.mk diff --git a/devices/sunxi_cortexa53/diy.sh b/devices/sunxi_cortexa53/diy.sh index 3447dd089711..3d66f6c56917 100644 --- a/devices/sunxi_cortexa53/diy.sh +++ b/devices/sunxi_cortexa53/diy.sh @@ -4,7 +4,7 @@ shopt -s extglob SHELL_FOLDER=$(dirname $(readlink -f "$0")) -bash $SHELL_FOLDER/../common/kernel_6.1.sh +bash $SHELL_FOLDER/../common/kernel_6.6.sh sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152 kmod-rtl8189es/' target/linux/sunxi/Makefile