kiddin9 2 vuotta sitten
vanhempi
sitoutus
443dc5e0dc
50 muutettua tiedostoa jossa 3625 lisäystä ja 580 poistoa
  1. 20 24
      .github/workflows/Openwrt-AutoBuild.yml
  2. 35 35
      .github/workflows/repo-dispatcher.yml
  3. 3 3
      README.md
  4. 7 6
      devices/armsr_armv8/patches/rootfs.patch
  5. 19 0
      devices/common/patches/LINUX_VERSION.patch
  6. 17 0
      devices/common/patches/enable_wifi.patch
  7. 7 4
      devices/common/patches/imagebuilder.patch
  8. 0 20
      devices/common/patches/targets.patch
  9. 0 11
      devices/common/patches/usb.patch
  10. 1 1
      devices/ipq50xx_arm/diy.sh
  11. 3 5
      devices/ipq60xx_generic/diy.sh
  12. 2 0
      devices/ipq806x_generic/.config
  13. 4 6
      devices/ipq806x_generic/diy.sh
  14. 415 0
      devices/ipq806x_generic/patches/mac80211-NSS.patch
  15. 2 5
      devices/ipq807x_generic/diy.sh
  16. 1 1
      devices/ipq807x_ipq60xx/diy.sh
  17. 9 5
      devices/kirkwood_generic/.config
  18. 2 1
      devices/mediatek_filogic/.config
  19. 2 1
      devices/mediatek_filogic/diy.sh
  20. 67 0
      devices/mediatek_filogic/patches/360t7.patch
  21. 94 79
      devices/mediatek_filogic/patches/ax6000.patch
  22. 30 344
      devices/mediatek_filogic/patches/nx30.patch
  23. 1 1
      devices/mediatek_filogic/settings.ini
  24. 0 1
      devices/mediatek_mt7981/.config
  25. 1 1
      devices/mediatek_mt7981/diy.sh
  26. 1 2
      devices/mediatek_mt7981/patches/targets.patch
  27. 2 2
      devices/meson_meson8b/.config
  28. 3 0
      devices/meson_meson8b/diy.sh
  29. 14 1
      devices/meson_meson8b/patches/onecloud.patch
  30. 1 1
      devices/ramips_mt7621/patches/02-cr660x.patch
  31. 2 0
      devices/rockchip_armv8/.config
  32. 3 0
      devices/rockchip_armv8/diy.sh
  33. 108 0
      devices/rockchip_armv8/patches/pico3399.patch.b
  34. 15 17
      devices/rockchip_armv8/patches/r6s.patch
  35. 5 0
      devices/rockchip_rk3588_armv8/.config
  36. 3 1
      devices/rockchip_rk3588_armv8/diy.sh
  37. 170 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera1.dtsi
  38. 182 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera2.dtsi
  39. 179 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera3.dtsi
  40. 101 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-lcd.dtsi
  41. 25 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dts
  42. 454 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-spi.dts
  43. 454 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
  44. 381 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
  45. 615 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi.dtsi
  46. 14 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/02-arm64-dts-rockchip-ad-orange-pi-5.patch
  47. 34 0
      devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/03-fix.patch
  48. 47 1
      devices/rockchip_rk3588_armv8/patches/fix.patch
  49. 69 0
      devices/rockchip_rk3588_armv8/patches/orangepi-5.patch
  50. 1 1
      devices/rockchip_rk3588_armv8/settings.ini

+ 20 - 24
.github/workflows/Openwrt-AutoBuild.yml

@@ -12,7 +12,7 @@ on:
   repository_dispatch:
 
 env:
-  REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
+  REPO_TOKEN: ${{ secrets.TOKEN_KIDDIN9 }}
   PPPOE_USERNAME: ${{ secrets.PPPOE_USERNAME }}
   PPPOE_PASSWD: ${{ secrets.PPPOE_PASSWD }}
   SCKEY: ${{ secrets.SCKEY }}
@@ -61,7 +61,7 @@ jobs:
         echo "UPLOAD_FIRMWARE_FOR_RELEASE=${UPLOAD_FIRMWARE_FOR_RELEASE}" >> $GITHUB_ENV
         echo "UPLOAD_FIRMWARE_TO_COWTRANSFER=${UPLOAD_FIRMWARE_TO_COWTRANSFER}" >> $GITHUB_ENV
         echo "UPLOAD_FIRMWARE_TO_WETRANSFER=${UPLOAD_FIRMWARE_TO_WETRANSFER}" >> $GITHUB_ENV
-        sed -i "1a REPO_TOKEN=${{ secrets.REPO_TOKEN }}" ${GITHUB_WORKSPACE}/devices/common/diy.sh
+        sed -i "1a REPO_TOKEN=${{ secrets.TOKEN_KIDDIN9 }}" ${GITHUB_WORKSPACE}/devices/common/diy.sh
         sed -i "1a TARGET=${{matrix.target}}" ${GITHUB_WORKSPACE}/devices/common/diy.sh
         if [ ${{matrix.target}} == "x86_64" ]; then
             echo "ARCH=linux/amd64" >> $GITHUB_ENV
@@ -103,11 +103,11 @@ jobs:
     - name: Trigger Packages Update
       continue-on-error: true
       run: |
-        status=$(curl -H "Authorization: token ${{ secrets.REPO_TOKEN }} -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')
+        status=$(curl -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }} -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')
         if [[ "$status" == "completed" ]]; then
           curl -X POST https://api.github.com/repos/kiddin9/openwrt-packages/dispatches \
             -H "Accept: application/vnd.github.everest-preview+json" \
-            -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+            -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           --data '{"event_type": "update"}'
         fi
 
@@ -150,7 +150,7 @@ jobs:
             cd -
         elif [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then
           REPO_BRANCH="$((curl -gs -H 'Content-Type: application/json' \
-           -H "Authorization: Bearer ${{ secrets.REPO_TOKEN }}" \
+           -H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \
            -X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v23 | tail -n 1)"
            git clone $REPO_URL -b $REPO_BRANCH openwrt
         elif [[ ! "${{ env.REPO_BRANCH }}" ]]; then
@@ -214,18 +214,15 @@ jobs:
         CONFIG_CRYPTO_CHACHA20POLY1305=y \
         CONFIG_FAT_DEFAULT_IOCHARSET="utf8" \
         ' `find target/linux -path "target/linux/*/config-*"`
-        
-    - name: Default PPPOE Setting
-      if: env.PPPOE_USERNAME && env.PPPOE_PASSWD
-      run: |
-        sed -i '$i uci set network.wan.username=${{ env.PPPOE_USERNAME }}' openwrt/package/*/*/my-default-settings/files/etc/uci-defaults/95-default-settings
-        sed -i '$i uci set network.wan.password=${{ env.PPPOE_PASSWD }}' openwrt/package/*/*/my-default-settings/files/etc/uci-defaults/95-default-settings
-        sed -i '$i uci commit network' openwrt/package/*/*/my-default-settings/files/etc/uci-defaults/95-default-settings
 
     - name: Defconfig
       run: |
         cd openwrt
         make defconfig
+        if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|meson_meson8b|rockchip_*|sunxi_*|x86_*) ]]; then
+        sed -n '/# Wireless Drivers/,/# end of Wireless Drivers/p' .config | sed -e 's/=m/=n/' >>.config
+        make defconfig
+        fi
         cat .config
 
     - name: Download package
@@ -291,9 +288,17 @@ jobs:
         echo "NOTICE=请分配不少于1G的存储容量" >> $GITHUB_ENV
         fi
 
+    - name: Upload firmware for artifact
+      uses: actions/upload-artifact@main
+      continue-on-error: true
+      if: env.UPLOAD_FIRMWARE_FOR_ARTIFACT == 'true'
+      with:
+        name: ${{ env.VERSION }}_${{matrix.target}}
+        path: |
+          openwrt/bin/targets/
+
     - name: Deploy imagebuilder to server
       uses: easingthemes/ssh-deploy@main
-      continue-on-error: true
       if: env.SSH_PRIVATE_KEY && ! contains(github.event.action, 'noser')
       with:
         SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@@ -304,15 +309,6 @@ jobs:
         REMOTE_USER: root
         TARGET: "/www/wwwroot/op.supes.top/releases/tmp/"
 
-    - name: Upload firmware for artifact
-      uses: actions/upload-artifact@main
-      continue-on-error: true
-      if: env.UPLOAD_FIRMWARE_FOR_ARTIFACT == 'true'
-      with:
-        name: ${{ env.VERSION }}_${{matrix.target}}
-        path: |
-          openwrt/bin/targets/
-
     - name: Upload firmware to cowtransfer
       if: env.UPLOAD_FIRMWARE_TO_COWTRANSFER == 'true'
       continue-on-error: true
@@ -349,7 +345,7 @@ jobs:
       continue-on-error: true
       if: env.REPO_TOKEN && env.UPLOAD_FIRMWARE_FOR_RELEASE == 'true'
       env:
-        GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
+        GITHUB_TOKEN: ${{ secrets.TOKEN_KIDDIN9 }}
       with:
         files: "${{ env.FIRMWARE }}/*"
         name: ${{ env.date2 }} ${{matrix.target}} ${{ env.EMOJI }}
@@ -407,4 +403,4 @@ jobs:
         keep_latest: 15
         delete_tags: true
       env:
-        GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
+        GITHUB_TOKEN: ${{ secrets.TOKEN_KIDDIN9 }}

+ 35 - 35
.github/workflows/repo-dispatcher.yml

@@ -22,7 +22,7 @@ on:
         default: ''
 
 env:
-  REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
+  TOKEN_KIDDIN9: ${{ secrets.TOKEN_KIDDIN9 }}
   TZ: Asia/Shanghai
 
 jobs:
@@ -50,13 +50,13 @@ jobs:
 
     - name: Trigger Packages Update
       run: |
-        gitdate=$(curl -H "Authorization: token ${{ secrets.REPO_TOKEN }}" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].created_at')
+        gitdate=$(curl -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].created_at')
         gitdate=$(date -d "$gitdate" +%s)
         now=$(date -d "$(date)" +%s)
         if [[ $(expr $gitdate + 120) < $now ]]; then
         curl -X POST https://api.github.com/repos/kiddin9/openwrt-packages/dispatches \
         -H "Accept: application/vnd.github.everest-preview+json" \
-        -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+        -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
         --data '{"event_type": "update"}'
         fi
 
@@ -66,140 +66,140 @@ jobs:
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "x86_64 ${{ github.event.inputs.param }}", "client_payload": {"target": "x86_64"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "x86_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "x86_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "rockchip_armv8 ${{ github.event.inputs.param }}", "client_payload": {"target": "rockchip_armv8"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
+          -d '{"event_type": "rockchip_rk3588_armv8 ${{ github.event.inputs.param }}", "client_payload": {"target": "rockchip_rk3588_armv8"}}'
+          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": "bcm27xx_bcm2711 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2711"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "bcm27xx_bcm2710 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2710"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "bcm27xx_bcm2709 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2709"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "bcm27xx_bcm2708 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2708"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "armsr_armv8 ${{ github.event.inputs.param }}", "client_payload": {"target": "armsr_armv8"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "mediatek_mt7622 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_mt7622"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "mediatek_filogic ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_filogic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -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.REPO_TOKEN }}" \
+          -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 \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-          -d '{"event_type": "mediatek_mt7986 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_mt7986"}}'
-          curl \
-          -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-          -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ramips_mt7621 ${{ github.event.inputs.param }}", "client_payload": {"target": "ramips_mt7621"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ramips_mt7620 ${{ github.event.inputs.param }}", "client_payload": {"target": "ramips_mt7620"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ramips_mt76x8 ${{ github.event.inputs.param }}", "client_payload": {"target": "ramips_mt76x8"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ipq807x_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq807x_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ipq40xx_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq40xx_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "kirkwood_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "kirkwood_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ipq806x_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq806x_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ipq807x_ipq60xx ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq807x_ipq60xx"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "meson_meson8b ${{ github.event.inputs.param }}", "client_payload": {"target": "meson_meson8b"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ipq60xx_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq60xx_generic"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "mvebu_cortexa9 ${{ github.event.inputs.param }}", "client_payload": {"target": "mvebu_cortexa9"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "bcm53xx ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm53xx"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "sunxi_cortexa53 ${{ github.event.inputs.param }}", "client_payload": {"target": "sunxi_cortexa53"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "sunxi_cortexa7 ${{ github.event.inputs.param }}", "client_payload": {"target": "sunxi_cortexa7"}}'
           curl \
           -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
           -H "Accept: application/vnd.github.everest-preview+json" \
-          -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
+          -H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
           -d '{"event_type": "ath79_nand ${{ github.event.inputs.param }}", "client_payload": {"target": "ath79_nand"}}'

+ 3 - 3
README.md

@@ -1,4 +1,4 @@
-#### 一分钟在线编译定制专属固件: [supes.top](https://supes.top)
+#### 一分钟在线编译定制专属固件: [openwrt.ai](https://openwrt.ai)
 #### 支持200+设备:
 X86/64, 友善 NanoPi、R2S、R4S、R4SE、R5S、R2C、R5C、R6S、NEO3, 斐讯 N1、K2P、K3, 树莓派 4B、3B/3B+、2B, 电犀牛r68s、r66s, 香橙派 R1 Plus、R1 Plus LTS, 红米AX6, 小米AX3600, 小米AX9000, 红米AX6000, 红米AX6S/小米AX3200, 红米AC2100, 小米AC2100, 斐讯K3,  360V6, 玩客云, 极路由 HIWIFI HC5962(极路由4、B70)、HC5661A、HC5761A、HC5861B, 小米4, 小米 R3G, 小米 R3P, newifi-d2 (新路由3), 小娱XY-C5, 竞斗云2.0(P&W R619AC), GL.iNet GL-MT1300、GL-AX1800、GL-AXT1800、GL-microuter-N300、GL-MT300N V2, 小米CR660X(CR6606/CR6608/CR6609), 小米4A千兆版, 小米 R3G-v2, 小米青春版Nano, 迅雷下载宝 timecloud, 优酷 yk-l2, 有华 wr1200js, 向日葵 X3A, 华硕 ASUS RT-ACRH17、RT-AC58u/RT-ACRH13、RT-ac85p、RT-n56u-b1、RT-AC88U、RT-AC1200、RT-AC1200 V2, 网件 NETGEAR R6220、R6260、R6120、R6700-v2、R6800、R6850、R6900-v2、R7450、wndr3700-v5, H1 Box, 贝壳云P1, 我家云lL Pro, x96 Max, 微加云V-Plus, 章鱼星球ZYXQ, GT-King, Odroid N2, MXQ Pro+, 京东无线宝JDCloud RE-SP-01B, Linksys WRT1200AC、WRT1900AC v1、WRT1900AC v2、WRT3200ACM、WRT1900ACS v1、WRT1900ACS v2、WRT32X、EA7500 v2 等
 
@@ -31,7 +31,7 @@ X86/64, 友善 NanoPi、R2S、R4S、R4SE、R5S、R2C、R5C、R6S、NEO3, 斐讯
 
 + 自建插件仓库囊括了市面上几乎所有开源插件,插件库日更,系统自动更新所有已安装插件.
 
-+ 通过[supes.top](https://supes.top)在线定制专属固件, 无需任何专业知识, 一分钟生成. 同时支持github云编译.
++ 通过[openwrt.ai](https://openwrt.ai)在线定制专属固件, 无需任何专业知识, 一分钟生成. 同时支持github云编译.
 
 + 后台一键OTA更新固件,省去了每次固件升级都需要找固件,下载固件,上传固件等繁琐操作.
 
@@ -51,7 +51,7 @@ X86/64, 友善 NanoPi、R2S、R4S、R4SE、R5S、R2C、R5C、R6S、NEO3, 斐讯
 
 ### 2.1 **在线生成**
 
-通过浏览器访问[https://supes.top](https://supes.top)进行固件定制,等待固件生成结束之后直接下载使用即可。
+通过浏览器访问[https://openwrt.ai](https://openwrt.ai)进行固件定制,等待固件生成结束之后直接下载使用即可。
 
 ### 2.2 **GitHub编译**
 

+ 7 - 6
devices/armsr_armv8/patches/rootfs.patch

@@ -18,7 +18,7 @@
    $(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1))
    $(BIN_DIR)/$$(KERNEL_IMAGE): $$(KDIR_KERNEL_IMAGE)
 -	cp $$^ $$@
-+	cp generic-kernel.bin $$@
++	cp $(KDIR)/generic-kernel.bin $$@
    ifndef IB
      ifdef CONFIG_IB
        install: $$(KDIR_KERNEL_IMAGE)
@@ -36,13 +36,13 @@
      IMAGES-y += combined.img
    endif
    ifeq ($(CONFIG_VMDK_IMAGES),y)
-@@ -115,4 +113,20 @@ define Device/generic
+@@ -115,4 +113,21 @@ define Device/generic
  endef
  TARGET_DEVICES += generic
  
 +define Device/box
 +  DEVICE_TITLE := 电视盒子全系列 / N1
-+  DEVICE_PACKAGES := perlbase-base btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-mbedtls iw fdisk lsblk -luci-app-attendedsysupgrade -luci-app-gpsysupgrade
++  DEVICE_PACKAGES := perlbase-base perlbase-utf8 perlbase-time perlbase-xsloader perlbase-file btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-mbedtls iw fdisk lsblk -luci-app-attendedsysupgrade -luci-app-gpsysupgrade
 +endef
 +TARGET_DEVICES += box
 +
@@ -50,9 +50,10 @@
 +  if [ "$(PROFILE_SANITIZED)" == "box" ]; then \
 +  	export BIN_DIR=$(BIN_DIR); \
 +  	export DATE=$(DATE); \
-+  	cd /www/wwwroot/op.supes.top/bcache/armsr/armv8/amlogic-s9xxx-openwrt; \
-+  	. ../modify_amlogic.sh; \
-+  	./make -k 5.15.100 -b $(MORE) -s $(shell echo $$(($(ROOTFS_PARTSIZE)/1024/1024))) || true; \
++  	export MORE=$(MORE); \
++	export ROOTFS_PARTSIZE=$(shell echo $$(($(ROOTFS_PARTSIZE)/1024/1024))); \
++  	cd /data/packit/amlogic-s9xxx-openwrt; \
++  	. ~/packit/packit_amlogic.sh; \
 +  fi
 +endef
 +

+ 19 - 0
devices/common/patches/LINUX_VERSION.patch

@@ -0,0 +1,19 @@
+--- a/Makefile
++++ b/Makefile
+@@ -33,6 +33,7 @@ ifneq ($(OPENWRT_BUILD),1)
+   include $(TOPDIR)/include/toplevel.mk
+ else
+   include rules.mk
++  include $(INCLUDE_DIR)/target.mk
+   include $(INCLUDE_DIR)/depends.mk
+   include $(INCLUDE_DIR)/subdir.mk
+   include target/Makefile
+@@ -131,6 +132,8 @@ world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-
+ 	$(_SINGLE)$(SUBMAKE) -r package/index
+ 	$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
+ 	$(_SINGLE)$(SUBMAKE) -r checksum
++	cp $(BIN_DIR)/packages/Packages.manifest $(BIN_DIR)/
++	mv $(BIN_DIR)/packages $(BIN_DIR)/$(LINUX_VERSION) 2>/dev/null
+ ifneq ($(CONFIG_CCACHE),)
+ 	$(STAGING_DIR_HOST)/bin/ccache -s
+ endif

+ 17 - 0
devices/common/patches/enable_wifi.patch

@@ -0,0 +1,17 @@
+--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
++++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+@@ -203,7 +203,6 @@ detect_mac80211() {
+ 			set wireless.${name}.channel=${channel}
+ 			set wireless.${name}.band=${mode_band}
+ 			set wireless.${name}.htmode=$htmode
+-			set wireless.${name}.disabled=1
+ 
+ 			set wireless.default_${name}=wifi-iface
+ 			set wireless.default_${name}.device=${name}
+@@ -213,5 +212,6 @@ detect_mac80211() {
+ 			set wireless.default_${name}.encryption=none
+ EOF
+ 		uci -q commit wireless
++  		wifi reload
+ 	done
+ }

+ 7 - 4
devices/common/patches/imagebuilder.patch

@@ -23,7 +23,7 @@
 
 --- a/target/imagebuilder/files/Makefile
 +++ b/target/imagebuilder/files/Makefile
-@@ -115,17 +115,32 @@ BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(fi
+@@ -135,17 +135,32 @@ BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(fi
  PACKAGES:=
  
  _call_image: staging_dir/host/.prereq-build
@@ -56,7 +56,7 @@
  
  _call_manifest: FORCE
  	rm -rf $(TARGET_DIR)
-@@ -166,7 +181,14 @@ package_install: FORCE
+@@ -186,7 +201,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))
@@ -66,13 +66,16 @@
 +			packages+="luci-i18n-`echo $$p | cut -d - -f 3-`-zh-cn "; \
 +		fi \
 +	done; \
++	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 $$packages || true
 +	$(OPKG) install --force-overwrite --force-checksum --force-depends --force-maintainer --force-reinstall my-default-settings
  
  prepare_rootfs: FORCE
  	@echo
-@@ -180,12 +202,15 @@ prepare_rootfs: FORCE
+@@ -200,12 +225,15 @@ prepare_rootfs: FORCE
  		) \
  	)
  	$(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES))
@@ -88,4 +91,4 @@
 +	nice -n 19 $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
  		$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
  
- $(BIN_DIR)/profiles.json: FORCE
+ $(BIN_DIR)/profiles.json: FORCE

+ 0 - 20
devices/common/patches/targets.patch

@@ -1,23 +1,3 @@
---- a/Makefile
-+++ b/Makefile
-@@ -40,6 +40,7 @@ else
-   include tools/Makefile
-   include toolchain/Makefile
- 
-+include $(INCLUDE_DIR)/target.mk
- $(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check)
- $(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
- $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
-@@ -131,6 +132,8 @@ world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-
- 	$(_SINGLE)$(SUBMAKE) -r package/index
- 	$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
- 	$(_SINGLE)$(SUBMAKE) -r checksum
-+	cp $(BIN_DIR)/packages/Packages.manifest $(BIN_DIR)/
-+	mv $(BIN_DIR)/packages $(BIN_DIR)/$(LINUX_VERSION) 2>/dev/null
- ifneq ($(CONFIG_CCACHE),)
- 	$(STAGING_DIR_HOST)/bin/ccache -s
- endif
-
 --- a/include/target.mk
 +++ b/include/target.mk
 @@ -53,10 +53,10 @@ DEFAULT_PACKAGES.nas:=\

+ 0 - 11
devices/common/patches/usb.patch

@@ -1,11 +0,0 @@
---- a/package/kernel/linux/modules/usb.mk
-+++ b/package/kernel/linux/modules/usb.mk
-@@ -32,7 +32,7 @@ $(eval $(call KernelPackage,usb-core))
- 
- define AddDepends/usb
-   SUBMENU:=$(USB_MENU)
--  DEPENDS+=+kmod-usb-core $(1)
-+  DEPENDS+=+kmod-usb-core +automount $(1)
- endef
- 
- 

+ 1 - 1
devices/ipq50xx_arm/diy.sh

@@ -4,4 +4,4 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2024-12-06/" package/network/config/netifd/Makefile
+sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/network/config/netifd/Makefile

+ 3 - 5
devices/ipq60xx_generic/diy.sh

@@ -3,9 +3,7 @@ shopt -s extglob
 
 svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/ipq60xx target/linux/ipq60xx
 
-git clone https://github.com/robimarko/nss-packages package/nss-packages
-svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/nss-packages/qca
-mv -f package/nss-packages/qca/nss/* package/nss-packages/qca/
-rm -rf package/nss-packages/qca/qca-ssdk package/nss-packages/qca/qca-nss-dp package/nss-packages/qca/qca-*-64 package/nss-packages/qca/nss
+svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/qca
+
+rm -rf package/kernel/{qca-nss-dp,qca-ssdk}
 
-sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-nss-drv kmod-qca-nss-drv-pppoe nss-firmware-ipq6018 qca-nss-ecm/' target/linux/ipq60xx/Makefile

+ 2 - 0
devices/ipq806x_generic/.config

@@ -14,6 +14,8 @@ CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
 CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_vr2600v=y
 CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_buffalo_wxr-2533dhp=y
 
+CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
+
 CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
 
 

+ 4 - 6
devices/ipq806x_generic/diy.sh

@@ -4,11 +4,9 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-git clone https://github.com/robimarko/nss-packages package/nss-packages
-svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/nss-packages/qca
-mv -f package/nss-packages/qca/nss/* package/nss-packages/qca/
-rm -rf package/nss-packages/qca/qca-ssdk package/nss-packages/qca/qca-nss-dp package/nss-packages/qca/qca-*-64 package/nss-packages/qca/nss
+git clone https://github.com/qosmio/nss-packages package/nss-packages
 
-sed -i "/DEPENDS:/d" package/nss-packages/qca/qca-nss-drv/Makefile
+#rm -rf target/linux/ipq806x
+#svn co https://github.com/APCCV/OpenWRT-23.05.0-rc1-NSS/trunk/target/linux/ipq806x target/linux/ipq806x
 
-sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-drv kmod-qca-nss-ecm-standard kmod-qca-nss-gmac kmod-qca-nss-drv-pppoe kmod-qca-mcs/' target/linux/ipq806x/Makefile
+#sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-drv kmod-qca-nss-drv-qdisc kmod-qca-nss-ecm-standard kmod-qca-nss-gmac kmod-qca-nss-drv-pppoe kmod-qca-nss-drv-pptp kmod-nss-ifb qca-nss-crypto qca-nss-drv-igs/' target/linux/ipq806x/Makefile

+ 415 - 0
devices/ipq806x_generic/patches/mac80211-NSS.patch

@@ -0,0 +1,415 @@
+From fc0a9dd3c5f4e6a545b98239affd1d1e3f8c55ca Mon Sep 17 00:00:00 2001
+From: ACwifidude <[email protected]>
+Date: Fri, 30 Sep 2022 11:33:18 -0500
+Subject: [PATCH] ipq806x: NSS Hardware Offloading mac80211 support
+
+---
+ package/kernel/mac80211/Makefile              |  22 +-
+ .../subsys/999-mac80211-NSS-support.patch     | 292 ++++++++++++++++++
+ 2 files changed, 310 insertions(+), 4 deletions(-)
+ create mode 100644 package/kernel/mac80211/patches/subsys/999-mac80211-NSS-support.patch
+
+diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
+index 248b48c3c15..d1840c91758 100644
+--- a/package/kernel/mac80211/Makefile
++++ b/package/kernel/mac80211/Makefile
+@@ -78,6 +78,7 @@ config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
+ 
+ config-$(call config_package,mac80211) += MAC80211
+ config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
++config-$(CONFIG_PACKAGE_MAC80211_NSS_SUPPORT) += MAC80211_NSS_SUPPORT
+ 
+ include ath.mk
+ include broadcom.mk
+@@ -121,7 +122,7 @@ define KernelPackage/mac80211
+   $(call KernelPackage/mac80211/Default)
+   TITLE:=Linux 802.11 Wireless Networking Stack
+   # +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
+-  DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common
++  DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common +PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
+   KCONFIG:=\
+ 	CONFIG_AVERAGE=y
+   FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
+@@ -132,6 +133,16 @@ endef
+ define KernelPackage/mac80211/config
+   if PACKAGE_kmod-mac80211
+ 
++		 if PACKAGE_kmod-qca-nss-drv
++		config PACKAGE_MAC80211_NSS_SUPPORT
++			bool "Enable NSS support for IPQ platform"
++			default y
++			help
++			  This option enables support for NSS in boards
++			  like Netgear R7800.
++	endif
++
++
+ 	config PACKAGE_MAC80211_DEBUGFS
+ 		bool "Export mac80211 internals in DebugFS"
+ 		select KERNEL_DEBUG_FS
+@@ -273,9 +284,12 @@ ifeq ($(BUILD_VARIANT),smallbuffers)
+ 	C_DEFINES+= -DCONFIG_ATH10K_SMALLBUFFERS
+ endif
+ 
+-MAKE_OPTS:= \
+-	$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
+-	EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
++C_DEFINES+= -DSTANDALONE_CT
++
++MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
++	$(KERNEL_MAKE_FLAGS) \
++	EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES) \
++		-I$(STAGING_DIR)/usr/include/qca-nss-drv" \
+ 	KLIB_BUILD="$(LINUX_DIR)" \
+ 	MODPROBE=true \
+ 	KLIB=$(TARGET_MODULES_DIR) \
+diff --git a/package/kernel/mac80211/patches/subsys/999-mac80211-NSS-support.patch b/package/kernel/mac80211/patches/subsys/999-mac80211-NSS-support.patch
+new file mode 100644
+index 00000000000..a0c1720c71a
+--- /dev/null
++++ b/package/kernel/mac80211/patches/subsys/999-mac80211-NSS-support.patch
+@@ -0,0 +1,344 @@
++--- a/net/mac80211/Kconfig
+++++ b/net/mac80211/Kconfig
++@@ -19,6 +19,13 @@ comment "CFG80211 needs to be enabled fo
++ 
++ if MAC80211 != n
++ 
+++config MAC80211_NSS_SUPPORT
+++	bool "Enable NSS support for IPQ platform"
+++	default n
+++	---help---
+++	This option enables support for NSS in boards
+++	like AP148.
+++
++ config MAC80211_HAS_RC
++ 	bool
++ 
++--- a/local-symbols
+++++ b/local-symbols
++@@ -39,6 +39,7 @@ LIB80211_CRYPT_CCMP=
++ LIB80211_CRYPT_TKIP=
++ LIB80211_DEBUG=
++ MAC80211=
+++MAC80211_NSS_SUPPORT=
++ MAC80211_HAS_RC=
++ MAC80211_RC_MINSTREL=
++ MAC80211_RC_DEFAULT_MINSTREL=
++--- a/net/mac80211/ieee80211_i.h
+++++ b/net/mac80211/ieee80211_i.h
++@@ -36,6 +36,10 @@
++ 
++ extern const struct cfg80211_ops mac80211_config_ops;
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++#include <nss_api_if.h>
+++#endif
+++
++ struct ieee80211_local;
++ 
++ /* Maximum number of broadcast/multicast frames to buffer when some of the
++@@ -1097,6 +1101,12 @@ struct ieee80211_sub_if_data {
++ 	} debugfs;
++ #endif
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++	struct nss_virt_if_handle *nssctx;
+++	struct sk_buff_head rx_queue;
+++	struct work_struct rx_work;
+++#endif
+++
++ 	/* must be last, dynamically sized area in this! */
++ 	struct ieee80211_vif vif;
++ };
++--- a/net/mac80211/iface.c
+++++ b/net/mac80211/iface.c
++@@ -15,6 +15,7 @@
++ #include <linux/if_arp.h>
++ #include <linux/netdevice.h>
++ #include <linux/rtnetlink.h>
+++#include <linux/module.h>
++ #include <linux/kcov.h>
++ #include <net/mac80211.h>
++ #include <net/ieee80211_radiotap.h>
++@@ -27,6 +28,12 @@
++ #include "wme.h"
++ #include "rate.h"
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++bool nss_redirect = true;
+++module_param(nss_redirect, bool, 0644);
+++MODULE_PARM_DESC(nss_redirect, "module param to enable NSS Redirect; 1-enable, 0-disable");
+++#endif
+++
++ /**
++  * DOC: Interface list locking
++  *
++@@ -439,6 +446,64 @@ static int ieee80211_open(struct net_dev
++ 	return err;
++ }
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++/* This callback is registered for nss redirect to receive packet exceptioned from nss in Rx path.
+++ * When packet does not match any of the ecm rules is redirected back here.
+++ */
+++void receive_from_nss(struct net_device *dev, struct sk_buff *sk_buff, struct napi_struct *napi)
+++{
+++	struct net_device *netdev;
+++	struct sk_buff *skb;
+++	struct ieee80211_sub_if_data *sdata;
+++
+++	if (!dev) {
+++		kfree(sk_buff);
+++		return;
+++	}
+++
+++	netdev = (struct net_device *)dev;
+++	sdata = netdev_priv(netdev);
+++	if (sdata->dev != dev) {
+++		kfree(sk_buff);
+++		return;
+++	}
+++	skb = (struct sk_buff *)sk_buff;
+++	skb->dev = netdev;
+++	skb->protocol = eth_type_trans(skb, netdev);
+++	napi_gro_receive(napi, skb);
+++}
+++
+++static int ieee80211_create_nss_virtif(struct ieee80211_sub_if_data *sdata, struct net_device *dev)
+++{
+++	if (sdata->nssctx != NULL) {
+++		sdata_err(sdata, "Cannot create a NSS virtual interface. Already exists[n2h:%d, h2n:%d]!\n",
+++			  sdata->nssctx->if_num_n2h, sdata->nssctx->if_num_h2n);
+++		return 1;
+++	}
+++
+++	sdata->nssctx = NULL;
+++	if (nss_redirect) {
+++		sdata->nssctx = nss_virt_if_create_sync(dev);
+++		if (sdata->nssctx) {
+++			sdata_info(sdata, "Created a NSS virtual interface\n");
+++			nss_virt_if_register(sdata->nssctx, receive_from_nss, sdata->dev);
+++		}
+++		else
+++			sdata_err(sdata, "Failed to create a NSS virtual interface\n");
+++	}
+++
+++	return 0;
+++}
+++
+++static void ieee80211_destroy_nss_virtif(struct ieee80211_sub_if_data *sdata)
+++{
+++	if (sdata->nssctx) {
+++		nss_virt_if_destroy_sync(sdata->nssctx);
+++		sdata_info(sdata, "Destroyed NSS virtual interface\n");
+++	}
+++}
+++#endif
+++
++ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_down)
++ {
++ 	struct ieee80211_local *local = sdata->local;
++@@ -800,8 +865,24 @@ static void ieee80211_teardown_sdata(str
++ 	ieee80211_link_stop(&sdata->deflink);
++ }
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++static int ieee80211_init(struct net_device *dev)
+++{
+++	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+++
+++	ieee80211_create_nss_virtif(sdata, dev);
+++
+++	return 0;
+++}
+++#endif
+++
++ static void ieee80211_uninit(struct net_device *dev)
++ {
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+++
+++	ieee80211_destroy_nss_virtif(sdata);
+++#endif
++ 	ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
++ }
++ 
++@@ -814,6 +895,9 @@ ieee80211_get_stats64(struct net_device
++ static const struct net_device_ops ieee80211_dataif_ops = {
++ 	.ndo_open		= ieee80211_open,
++ 	.ndo_stop		= ieee80211_stop,
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++	.ndo_init		= ieee80211_init,
+++#endif
++ 	.ndo_uninit		= ieee80211_uninit,
++ 	.ndo_start_xmit		= ieee80211_subif_start_xmit,
++ 	.ndo_set_rx_mode	= ieee80211_set_multicast_list,
++--- a/net/mac80211/rx.c
+++++ b/net/mac80211/rx.c
++@@ -33,6 +33,60 @@
++ #include "wme.h"
++ #include "rate.h"
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++extern bool nss_redirect;
+++
+++#define case_rtn_string(val) case val: return #val
+++
+++static const char *nss_tx_status_str(nss_tx_status_t status)
+++{
+++	switch (status) {
+++		case_rtn_string(NSS_TX_SUCCESS);
+++		case_rtn_string(NSS_TX_FAILURE);
+++		case_rtn_string(NSS_TX_FAILURE_QUEUE);
+++		case_rtn_string(NSS_TX_FAILURE_NOT_READY);
+++		case_rtn_string(NSS_TX_FAILURE_TOO_LARGE);
+++		case_rtn_string(NSS_TX_FAILURE_TOO_SHORT);
+++		case_rtn_string(NSS_TX_FAILURE_NOT_SUPPORTED);
+++		case_rtn_string(NSS_TX_FAILURE_BAD_PARAM);
+++		case_rtn_string(NSS_TX_FAILURE_NOT_ENABLED);
+++		case_rtn_string(NSS_TX_FAILURE_SYNC_BAD_PARAM);
+++		case_rtn_string(NSS_TX_FAILURE_SYNC_TIMEOUT);
+++		case_rtn_string(NSS_TX_FAILURE_SYNC_FW_ERR);
+++	default:
+++		return "Unknown NSS TX status";
+++	}
+++}
+++
+++static void netif_rx_nss(struct ieee80211_rx_data *rx,
+++			 struct sk_buff *skb)
+++{
+++	struct ieee80211_sub_if_data *sdata = rx->sdata;
+++	int ret;
+++
+++	if (!sdata->nssctx)
+++		goto out;
+++
+++	/* NSS expects ethernet header in skb data so resetting here */
+++	skb_push(skb, ETH_HLEN);
+++	ret = nss_virt_if_tx_buf(sdata->nssctx, skb);
+++	if (ret) {
+++		if (net_ratelimit()) {
+++			sdata_err(sdata, "NSS TX failed with error: %s\n",
+++				  nss_tx_status_str(ret));
+++		}
+++		goto out;
+++	}
+++
+++	return;
+++out:
+++	if (rx->list)
+++		list_add_tail(&skb->list, rx->list);
+++	else
+++		netif_receive_skb(skb);
+++}
+++#endif
+++
++ /*
++  * monitor mode reception
++  *
++@@ -2635,10 +2689,16 @@ static void ieee80211_deliver_skb_to_loc
++ 			ether_addr_copy(ehdr->h_dest, sdata->vif.addr);
++ 
++ 		/* deliver to local stack */
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++		if (likely(nss_redirect)) {
+++			netif_rx_nss(rx, skb);
+++		}
+++#else
++ 		if (rx->list)
++ 			list_add_tail(&skb->list, rx->list);
++ 		else
++ 			netif_receive_skb(skb);
+++#endif
++ 	}
++ }
++ 
++--- a/net/mac80211/tx.c
+++++ b/net/mac80211/tx.c
++@@ -36,6 +36,11 @@
++ #include "wme.h"
++ #include "rate.h"
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++#include <net/ip.h>
+++#include <net/dsfield.h>
+++#endif
+++
++ /* misc utils */
++ 
++ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
++@@ -1729,6 +1734,16 @@ static bool ieee80211_tx_frags(struct ie
++ 					return true;
++ 				}
++ 			} else {
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++				if (skb_queue_len(&local->pending[q]) >= 1000) {
+++					spin_unlock_irqrestore(
+++						&local->queue_stop_reason_lock,
+++						flags);
+++					ieee80211_purge_tx_queue(&local->hw,
+++								 skbs);
+++					return false;
+++				}
+++#endif
++ 
++ 				/*
++ 				 * Since queue is stopped, queue up frames for
++@@ -4448,6 +4463,35 @@ static void ieee80211_mlo_multicast_tx(s
++ 	kfree_skb(skb);
++ }
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++void ieee80211_xmit_nss_fixup(struct sk_buff *skb,
+++			      struct net_device *dev)
+++{
+++	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+++
+++	/* Packets from NSS does not have valid protocol, priority and other
+++	 * network stack values. Derive required parameters (priority
+++	 * and network_header) from payload for QoS header.
+++	 * XXX: Here the assumption is that packet are in 802.3 format.
+++	 * As of now priority is handled only for IPv4 and IPv6.
+++	 */
+++
+++	if (sdata->nssctx && likely(!skb->protocol)) {
+++		skb_set_network_header(skb, 14);
+++		switch (((struct ethhdr *)skb->data)->h_proto) {
+++		case htons(ETH_P_IP):
+++			skb->priority = (ipv4_get_dsfield(ip_hdr(skb)) &
+++					 0xfc) >> 5;
+++			break;
+++		case htons(ETH_P_IPV6):
+++			skb->priority = (ipv6_get_dsfield(ipv6_hdr(skb)) &
+++					 0xfc) >> 5;
+++			break;
+++		}
+++	}
+++}
+++#endif
+++
++ /**
++  * ieee80211_subif_start_xmit - netif start_xmit function for 802.3 vifs
++  * @skb: packet to be sent
++@@ -4461,6 +4505,10 @@ netdev_tx_t ieee80211_subif_start_xmit(s
++ 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
++ 	const struct ethhdr *eth = (void *)skb->data;
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++	ieee80211_xmit_nss_fixup(skb, dev);
+++#endif
+++
++ 	if (likely(!is_multicast_ether_addr(eth->h_dest)))
++ 		goto normal;
++ 
++@@ -4646,6 +4694,10 @@ netdev_tx_t ieee80211_subif_start_xmit_8
++ 	struct ieee80211_key *key;
++ 	struct sta_info *sta;
++ 
+++#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+++	ieee80211_xmit_nss_fixup(skb, dev);
+++#endif
+++
++ 	if (unlikely(!ieee80211_sdata_running(sdata) || skb->len < ETH_HLEN)) {
++ 		kfree_skb(skb);
++ 		return NETDEV_TX_OK;

+ 2 - 5
devices/ipq807x_generic/diy.sh

@@ -3,12 +3,9 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-git clone https://github.com/robimarko/nss-packages package/nss-packages
-svn co https://github.com/coolsnowwolf/lede/trunk/package/qca package/nss-packages/qca
-mv -f package/nss-packages/qca/nss/* package/nss-packages/qca/
-rm -rf package/nss-packages/qca/qca-ssdk package/nss-packages/qca/qca-nss-dp package/nss-packages/qca/qca-*-64 package/nss-packages/qca/nss
+#git clone https://github.com/qosmio/nss-packages package/nss-packages
 
-sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-nss-drv kmod-qca-nss-drv-pppoe kmod-qca-nss-ecm kmod-qca-nss-drv-bridge-mgr kmod-qca-nss-drv-vlan-mgr nss-firmware-ipq8074/' target/linux/ipq807x/Makefile
+#sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-nss-drv kmod-qca-nss-drv-pppoe kmod-qca-nss-ecm kmod-qca-nss-drv-bridge-mgr kmod-qca-nss-drv-vlan-mgr nss-firmware-ipq8074/' target/linux/ipq807x/Makefile
 
 sh -c "curl -sfL https://github.com/robimarko/openwrt/commit/23fa931934151f72c1655ffa62ff1a979575f07e.patch | patch -d './' -p1 --forward"
 

+ 1 - 1
devices/ipq807x_ipq60xx/diy.sh

@@ -22,7 +22,7 @@ CONFIG_FEED_ipq807x=n
 CONFIG_FEED_wifi_ax=n
 " >> devices/common/.config
 
-sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2024-12-06/" package/feeds/wifi_ax/hostapd/Makefile
+sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/feeds/wifi_ax/hostapd/Makefile
 
 rm -rf target/imagebuilder
 svn co https://github.com/openwrt/openwrt/branches/openwrt-21.02/target/imagebuilder target/imagebuilder

+ 9 - 5
devices/kirkwood_generic/.config

@@ -2,11 +2,15 @@
 CONFIG_TARGET_kirkwood=y
 CONFIG_TARGET_kirkwood_generic=y
 CONFIG_TARGET_MULTI_PROFILE=y
-CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_e4200-v2=y
-CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea4500=y
-CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea3500=y
-CONFIG_TARGET_DEVICE_kirkwood_DEVICE_checkpoint_l-50=y
-CONFIG_TARGET_DEVICE_kirkwood_DEVICE_netgear_readynas-duo-v2=y
+
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_linksys_e4200-v2=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_linksys_ea3500=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_linksys_ea4500=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_netgear_readynas-duo-v2=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_seagate_blackarmor-nas220=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_seagate_dockstar=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_seagate_goflexhome=y
+CONFIG_TARGET_DEVICE_kirkwood_generic_DEVICE_seagate_goflexnet=y
 
 CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
 

+ 2 - 1
devices/mediatek_filogic/.config

@@ -10,5 +10,6 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_tplink_tl-xdr6088=y
 CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt3000=y
 CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_h3c_magic-nx30-pro=y
 CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_mi-router-wr30u-112m-nmbm=y
-CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_redmi-router-ax6000-ubootmod=y
+CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_redmi-router-ax6000=y
+CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_qihoo_360t7=y
 CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

+ 2 - 1
devices/mediatek_filogic/diy.sh

@@ -3,4 +3,5 @@
 shopt -s extglob
 
 sed -i "/mt7986_xiaomi_redmi-router-ax6000 /d" package/boot/uboot-mediatek/Makefile
-sed -i "/mt7981_h3c_magic-nx30-pro /d" package/boot/uboot-mediatek/Makefile
+sed -i "/mt7981_h3c_magic-nx30-pro /d" package/boot/uboot-mediatek/Makefile
+sed -i "/mt7981_qihoo_360t7 /d" package/boot/uboot-mediatek/Makefile

+ 67 - 0
devices/mediatek_filogic/patches/360t7.patch

@@ -0,0 +1,67 @@
+--- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
++++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
+@@ -100,6 +100,10 @@
+ 		spi-tx-buswidth = <4>;
+ 		spi-rx-buswidth = <4>;
+ 
++		mediatek,nmbm;
++		mediatek,bmt-max-ratio = <1>;
++		mediatek,bmt-max-reserved-blocks = <64>;
++
+ 		partitions {
+ 			compatible = "fixed-partitions";
+ 			#address-cells = <1>;
+@@ -147,7 +151,7 @@
+ 
+ 			partition@7300000 {
+ 				label = "log";
+-				reg = <0x7300000 0x0700000>;
++				reg = <0x7300000 0x0400000>;
+ 				read-only;
+ 			};
+ 		};
+
+--- a/target/linux/mediatek/image/filogic.mk
++++ b/target/linux/mediatek/image/filogic.mk
+@@ -320,19 +320,12 @@ define Device/qihoo_360t7
+   UBINIZE_OPTS := -E 5
+   BLOCKSIZE := 128k
+   PAGESIZE := 2048
++  IMAGE_SIZE := 36864k
+   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
++  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
+-  ARTIFACTS := preloader.bin bl31-uboot.fip
+-  ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3
+-  ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot qihoo_360t7
+ endef
+ TARGET_DEVICES += qihoo_360t7
+
+--- a/package/boot/uboot-envtools/files/mediatek_filogic
++++ b/package/boot/uboot-envtools/files/mediatek_filogic
+@@ -53,8 +53,12 @@ xiaomi,redmi-router-ax6000-stock)
+ 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
+ 	ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
+ 	;;
++qihoo,360t7)
++	ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" "1"
++	;;
++h3c,magic-nx30-pro)
++	ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x20000" "4"
++	;;
+-h3c,magic-nx30-pro|\
+-qihoo,360t7|\
+ tplink,tl-xdr4288|\
+ tplink,tl-xdr6086|\
+ tplink,tl-xdr6088|\
+ 

+ 94 - 79
devices/mediatek_filogic/patches/ax6000.patch

@@ -1,96 +1,111 @@
 --- a/target/linux/mediatek/image/filogic.mk
 +++ b/target/linux/mediatek/image/filogic.mk
-@@ -384,29 +384,18 @@ TARGET_DEVICES += xiaomi_redmi-router-ax6000-stock
- 
- define Device/xiaomi_redmi-router-ax6000-ubootmod
-   DEVICE_VENDOR := Xiaomi
--  DEVICE_MODEL := Redmi Router AX6000 (OpenWrt U-Boot layout)
-+  DEVICE_MODEL := Redmi Router AX6000 (不死U-Boot)
-   DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000-ubootmod
-   DEVICE_DTS_DIR := ../dts
-   DEVICE_PACKAGES := kmod-leds-ws2812b kmod-mt7986-firmware mt7986-wo-firmware
--  KERNEL_INITRAMFS_SUFFIX := -recovery.itb
--  IMAGES := sysupgrade.itb
-   UBINIZE_OPTS := -E 5
-   BLOCKSIZE := 128k
-   PAGESIZE := 2048
--  KERNEL_IN_UBI := 1
--  UBOOTENV_IN_UBI := 1
--  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 := mt7986-bl2 spim-nand-ddr4
--  ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot xiaomi_redmi-router-ax6000
- ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
--  ARTIFACTS += initramfs-factory.ubi
--  ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
-+  ARTIFACTS := initramfs-factory.ubi
-+  ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel
- endif
-+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+@@ -442,6 +442,24 @@ endif
  endef
- TARGET_DEVICES += xiaomi_redmi-router-ax6000-ubootmod
+ TARGET_DEVICES += xiaomi_mi-router-wr30u-ubootmod
  
++define Device/xiaomi_redmi-router-ax6000
++  DEVICE_VENDOR := Xiaomi
++  DEVICE_MODEL := Redmi Router AX6000
++  DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
++  DEVICE_DTS_DIR := ../dts
++  DEVICE_PACKAGES := kmod-leds-ws2812b kmod-mt7986-firmware mt7986-wo-firmware
++  SUPPORTED_DEVICES := xiaomi,redmi-router-ax6000
++  UBINIZE_OPTS := -E 5
++  BLOCKSIZE := 128k
++  PAGESIZE := 2048
++  IMAGE_SIZE := 112640k
++  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 += xiaomi_redmi-router-ax6000
++
+ define Device/xiaomi_redmi-router-ax6000-stock
+   DEVICE_VENDOR := Xiaomi
+   DEVICE_MODEL := Redmi Router AX6000 (stock layout)
 
 --- a/package/boot/uboot-envtools/files/mediatek_filogic
 +++ b/package/boot/uboot-envtools/files/mediatek_filogic
-@@ -47,7 +47,8 @@ mercusys,mr90x-v1)
- netgear,wax220)
- 	ubootenv_add_uci_config "/dev/mtd5" "0x0" "0x20000" "0x20000"
- 	;;
--xiaomi,redmi-router-ax6000-stock)
-+xiaomi,redmi-router-ax6000-stock|\
-+xiaomi,redmi-router-ax6000-ubootmod)
- 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
- 	ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
+@@ -67,6 +66,9 @@ xiaomi,redmi-router-ax6000-ubootmod)
+ 	ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
+ 	ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
  	;;
-@@ -55,8 +56,7 @@ h3c,magic-nx30-pro|\
- qihoo,360t7|\
- tplink,tl-xdr4288|\
- tplink,tl-xdr6086|\
--tplink,tl-xdr6088|\
--xiaomi,redmi-router-ax6000-ubootmod)
-+tplink,tl-xdr6088)
- 	. /lib/upgrade/nand.sh
- 	local envubi=$(nand_find_ubi ubi)
- 	local envdev=/dev/$(nand_find_volume $envubi ubootenv)
++xiaomi,redmi-router-ax6000)
++	ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x10000" "0x20000" "1"
++	;;
+ zyxel,ex5601-t0)
+ 	local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
+ 	ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x40000" "2"
 
---- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000-ubootmod.dts
-+++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000-ubootmod.dts
-@@ -4,13 +4,31 @@
- #include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
- 
- / {
--	model = "Xiaomi Redmi Router AX6000 (OpenWrt U-Boot layout)";
-+	model = "Xiaomi Redmi Router AX6000 (不死U-Boot)";
- 	compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a";
- };
- 
+new file mode 100644
+index 0000000000000..759baae3aeb18
+--- /dev/null
++++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dts
+@@ -0,0 +1,32 @@
++// SPDX-License-Identifier: (GPL-2.0 OR MIT)
++
++/dts-v1/;
++#include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
++
++/ {
++	model = "Xiaomi Redmi Router AX6000";
++	compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a";
++};
++
 +&spi_nand_flash {
 +	mediatek,nmbm;
 +	mediatek,bmt-max-ratio = <1>;
 +	mediatek,bmt-max-reserved-blocks = <64>;
 +};
 +
- &partitions {
- 	partition@580000 {
-+		label = "crash";
-+		reg = <0x580000 0x40000>;
-+		read-only;
-+	};
++&partitions {
++			partition@580000 {
++				label = "crash";
++				reg = <0x580000 0x40000>;
++			};
 +
-+	partition@5c0000 {
-+		label = "crash_log";
-+		reg = <0x5c0000 0x40000>;
-+		read-only;
-+	};
++			partition@5c0000 {
++				label = "crash_log";
++				reg = <0x5c0000 0x40000>;
++			};
 +
-+	partition@600000 {
- 		label = "ubi";
--		reg = <0x580000 0x7a80000>;
-+		reg = <0x600000 0x6e00000>;
- 	};
- };
++			partition@600000 {
++				label = "ubi";
++				reg = <0x600000 0x6e00000>;
++			};
++};
+
+--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
++++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+@@ -95,6 +95,7 @@ platform_do_upgrade() {
+ 	tplink,tl-xdr6088|\
+ 	xiaomi,mi-router-wr30u-112m-nmbm|\
+ 	xiaomi,mi-router-wr30u-ubootmod|\
++	xiaomi,redmi-router-ax6000|\	
+ 	xiaomi,redmi-router-ax6000-ubootmod)
+ 		CI_KERNPART="fit"
+ 		nand_do_upgrade "$1"
+
+--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+@@ -26,6 +26,7 @@ xiaomi,mi-router-wr30u-ubootmod)
+ 	ucidef_set_led_netdev "wan" "wan" "blue:network" "wan"
+ 	;;
+ xiaomi,redmi-router-ax6000-stock|\
++xiaomi,redmi-router-ax6000|\
+ xiaomi,redmi-router-ax6000-ubootmod)
+ 	ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan"
+ 	;;
+
+--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+@@ -56,6 +56,7 @@ mediatek_setup_interfaces()
+ 	xiaomi,mi-router-wr30u-stock|\
+ 	xiaomi,mi-router-wr30u-ubootmod|\
+ 	xiaomi,redmi-router-ax6000-stock|\
++	xiaomi,redmi-router-ax6000|\
+ 	xiaomi,redmi-router-ax6000-ubootmod)
+ 		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
+ 		;;

+ 30 - 344
devices/mediatek_filogic/patches/nx30.patch

@@ -1,350 +1,36 @@
-From e78d1a06c8a47be9ea5a306bfb43f3d7ceb89646 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <[email protected]>
-Date: Sun, 21 May 2023 23:00:16 +0800
-Subject: [PATCH] mediatek: filogic: add H3C Magic NX30 Pro support
-
-Hardware specification:
-  SoC: MediaTek MT7981B 2x A53
-  Flash: W25N01GVZEIG 128MB
-  RAM: NT5CB128M16JR-FL 256MB
-  Ethernet: 4x 10/100/1000 Mbps
-  Switch: MediaTek MT7531AE
-  WiFi: MediaTek MT7976C
-  Button: Reset, WPS
-  Power: DC 12V 1A
-
-Flash instructions:
-  1. PC run command: "telnet 192.168.124.1 99"
-     Username: H3C, password is the web login
-     password of the router.
-  2. Download preloader.bin and bl31-uboot.fip
-  3. PC run command: "python3 -m http.server 80"
-  4. Download files in the telnet window:
-     "wget http://192.168.124.xx/xxx.bin"
-     Replace xx with your PC's IP and
-     the preloader.bin and bl31-uboot.fip.
-  5. Flushing openwrt's uboot:
-     "mtd write xxx-preloader.bin BL2"
-     "mtd write xxx-bl31-uboot.fip FIP"
-  6. Connect to the router via the Lan port,
-     set a static ip of your PC.
-     (ip 192.168.1.254, gateway 192.168.1.1)
-  7. Download initramfs image, reboot router,
-     waiting for tftp recovery to complete.
-  8. After openwrt boots up, perform sysupgrade.
-
-Note:
-  1. The u-boot-env partition on mtd is empty,
-     OEM stores their env on ubi:u-boot-env.
-  2. Back up all mtd partitions before flashing.
-
-Signed-off-by: Chukun Pan <[email protected]>
----
- .../dts/mt7981b-h3c-magic-nx30-pro.dts        | 239 ++++++++++++++++++
- .../filogic/base-files/etc/board.d/02_network |   8 +
- .../etc/hotplug.d/ieee80211/11_fix_wifi_mac   |   5 +
- .../base-files/lib/upgrade/platform.sh        |   1 +
- target/linux/mediatek/image/filogic.mk        |  25 ++
- 5 files changed, 278 insertions(+)
- create mode 100644 target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
-
-diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
-new file mode 100644
-index 0000000000000..358365adba44b
---- /dev/null
+--- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
 +++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
-@@ -0,0 +1,213 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+
-+/dts-v1/;
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+
-+#include "mt7981.dtsi"
-+
-+/ {
-+	model = "H3C Magic NX30 Pro";
-+	compatible = "h3c,magic-nx30-pro", "mediatek,mt7981";
-+
-+	aliases {
-+		serial0 = &uart0;
-+		led-boot = &led_status_green;
-+		led-failsafe = &led_status_red;
-+		led-running = &led_status_green;
-+		led-upgrade = &led_status_red;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	memory {
-+		reg = <0 0x40000000 0 0x10000000>;
-+	};
-+
-+	gpio-keys {
-+		compatible = "gpio-keys";
-+
-+		reset {
-+			label = "reset";
-+			linux,code = <KEY_RESTART>;
-+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-+		};
-+
-+		wps {
-+			label = "wps";
-+			linux,code = <KEY_WPS_BUTTON>;
-+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led_status_green: green {
-+			label = "green:status";
-+			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
-+		};
-+
-+		led_status_red: red {
-+			label = "red:status";
-+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
-+
-+&eth {
-+	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-mode = "gmii";
-+		phy-handle = <&int_gbe_phy>;
-+	};
-+};
-+
-+&mdio_bus {
-+	switch: switch@0 {
-+		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>;
-+	};
-+};
-+
-+&spi0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&spi0_flash_pins>;
-+	status = "okay";
-+
-+	spi_nand@0 {
-+		compatible = "spi-nand";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		reg = <0>;
-+
-+		spi-max-frequency = <52000000>;
-+		spi-tx-buswidth = <4>;
-+		spi-rx-buswidth = <4>;
-+
-+		partitions {
-+			compatible = "fixed-partitions";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			partition@0 {
-+				label = "BL2";
-+				reg = <0x0000000 0x0100000>;
-+				read-only;
-+			};
-+
-+			partition@100000 {
-+				label = "u-boot-env";
-+				reg = <0x0100000 0x0080000>;
-+			};
-+
-+			factory: partition@180000 {
-+				label = "Factory";
-+				reg = <0x0180000 0x0200000>;
-+				read-only;
-+			};
-+
-+			partition@380000 {
-+				label = "FIP";
-+				reg = <0x0380000 0x0200000>;
-+				read-only;
-+			};
-+
-+			partition@580000 {
-+				label = "ubi";
-+				reg = <0x0580000 0x04000000>;
-+			};
-+		};
-+	};
-+};
-+
-+&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@6 {
-+			reg = <6>;
-+			ethernet = <&gmac0>;
-+			phy-mode = "2500base-x";
-+
-+			fixed-link {
-+				speed = <2500>;
-+				full-duplex;
-+				pause;
-+			};
-+		};
-+	};
-+};
-+
-+&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 */
-+		};
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
-+
-+&watchdog {
-+	status = "okay";
-+};
-+
-+&wifi {
-+	status = "okay";
+@@ -107,6 +107,10 @@
+ 		spi-tx-buswidth = <4>;
+ 		spi-rx-buswidth = <4>;
+ 
++		mediatek,nmbm;
++		mediatek,bmt-max-ratio = <1>;
++		mediatek,bmt-max-reserved-blocks = <64>;
 +
-+	mediatek,mtd-eeprom = <&factory 0x0>;
-+};
-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 c05c5d25e4621..6abc81a0b0561 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
-@@ -23,6 +23,9 @@
- 	glinet,gl-mt3000)
- 		ucidef_set_interfaces_lan_wan eth1 eth0
- 		;;
-+	h3c,magic-nx30-pro)
-+		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1
-+		;;
- 	mediatek,mt7986a-rfb)
- 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan6" "eth1 wan"
- 		;;
-@@ -69,6 +72,11 @@
- 	bananapi,bpi-r3)
- 		wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
- 		;;
-+	h3c,magic-nx30-pro)
-+		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
-+		lan_mac=$(macaddr_add "$wan_mac" 1)
-+		label_mac=$wan_mac
-+		;;
- 	netgear,wax220)
- 		lan_mac=$(mtd_get_mac_ascii u-boot-env mac)
- 		label_mac=$lan_mac
-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 4b7047eec5e5a..ab23b100444ce 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
-@@ -32,6 +32,11 @@
- 		[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
- 		[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
- 		;;
-+	h3c,magic-nx30-pro)
-+		addr=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
-+		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
-+		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
-+		;;
- 	netgear,wax220)
- 		hw_mac_addr=$(mtd_get_mac_ascii u-boot-env mac)
- 		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+ 		partitions {
+ 			compatible = "fixed-partitions";
+ 			#address-cells = <1>;
 
-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 11c2c5c66439d..186abfa5a8d82 100755
---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-@@ -74,6 +74,7 @@ platform_do_upgrade() {
- 		CI_UBIPART="ubi0"
- 		nand_do_upgrade "$1"
- 		;;
-+	h3c,magic-nx30-pro|\
- 	qihoo,360t7|\
- 	tplink,tl-xdr4288|\
- 	tplink,tl-xdr6086|\
-diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
-index fd83b9d4416f9..2ace305140b2e 100644
 --- a/target/linux/mediatek/image/filogic.mk
 +++ b/target/linux/mediatek/image/filogic.mk
-@@ -176,6 +176,21 @@ define Device/glinet_gl-mt3000
- endef
- TARGET_DEVICES += glinet_gl-mt3000
- 
-+define Device/h3c_magic-nx30-pro
-+  DEVICE_VENDOR := H3C
-+  DEVICE_MODEL := Magic NX30 Pro
-+  DEVICE_DTS := mt7981b-h3c-magic-nx30-pro
-+  DEVICE_DTS_DIR := ../dts
-+  UBINIZE_OPTS := -E 5
-+  BLOCKSIZE := 128k
-+  PAGESIZE := 2048
-+  KERNEL_IN_UBI := 1
-+  IMAGE_SIZE := 65536k
+@@ -208,19 +208,9 @@ define Device/h3c_magic-nx30-pro
+   BLOCKSIZE := 128k
+   PAGESIZE := 2048
+   KERNEL_IN_UBI := 1
+-  UBOOTENV_IN_UBI := 1
+   IMAGE_SIZE := 65536k
+-  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
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
-+endef
-+TARGET_DEVICES += h3c_magic-nx30-pro
-+
- define Device/netgear_wax220
-   DEVICE_VENDOR := Netgear
-   DEVICE_MODEL := WAX220
+   DEVICE_PACKAGES := 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
+ endef
+ TARGET_DEVICES += h3c_magic-nx30-pro

+ 1 - 1
devices/mediatek_filogic/settings.ini

@@ -1,2 +1,2 @@
 REPO_URL="https://github.com/openwrt/openwrt"
-REPO_BRANCH="openwrt-23.05"
+REPO_BRANCH="main"

+ 0 - 1
devices/mediatek_mt7981/.config

@@ -4,7 +4,6 @@ CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_glinet_gl-mt2500=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_mt7981-360-t7-108M=y
 CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_livinet_zr-3020=y
 CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_cetron_ct3003=y
 CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_jcg_q30=y

+ 1 - 1
devices/mediatek_mt7981/diy.sh

@@ -8,7 +8,7 @@ rm -rf package/feeds/kiddin9/rtl* package/feeds/packages/gptfdisk package/utils/
 
 rm -rf devices/common/patches/{fix.patch,iptables.patch,kernel-defaults.patch,targets.patch}
 
-sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2024-12-06/" package/network/config/netifd/Makefile
+sed -i "s/PKG_SOURCE_DATE:=.*/PKG_SOURCE_DATE:=2099-12-06/" package/network/config/netifd/Makefile
 
 rm -rf toolchain/musl package/utils/e2fsprogs package/libs/libselinux package/feeds/packages/acl package/feeds/luci/ucode-mod-html package/feeds/luci/rpcd-mod-luci
 

+ 1 - 2
devices/mediatek_mt7981/patches/targets.patch

@@ -1,6 +1,6 @@
 --- a/include/target.mk
 +++ b/include/target.mk
-@@ -46,28 +46,27 @@ DEFAULT_PACKAGES.router:=\
+@@ -46,27 +46,27 @@ DEFAULT_PACKAGES.router:=\
  	dnsmasq-full \
  	firewall \
  	iptables \
@@ -22,7 +22,6 @@
 -	kmod-nf-nathelper-extra \
 -	luci \
 -	luci-app-filetransfer \
--	luci-app-turboacc \
 -	luci-compat \
 -	luci-lib-base \
 -	luci-lib-fs \

+ 2 - 2
devices/meson_meson8b/.config

@@ -1,10 +1,10 @@
 
 CONFIG_TARGET_meson=y
 CONFIG_TARGET_meson_meson8b=y
-CONFIG_TARGET_MULTI_PROFILE=y
-CONFIG_TARGET_DEVICE_meson_meson8b_DEVICE_thunder-onecloud=y
+CONFIG_TARGET_meson_meson8b_DEVICE_thunder-onecloud=y
 
 CONFIG_TARGET_ROOTFS_SQUASHFS=n
 CONFIG_TARGET_ROOTFS_EXT4FS=y
 
 CONFIG_PACKAGE_perf=n
+

+ 3 - 0
devices/meson_meson8b/diy.sh

@@ -12,3 +12,6 @@ svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/meson target/linu
 curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/include/kernel-5.10 -o include/kernel-5.10
 
 svn co https://github.com/openwrt/routing/branches/openwrt-22.03/batman-adv feeds/routing/batman-adv
+
+sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += automount/' target/linux/meson/Makefile
+

+ 14 - 1
devices/meson_meson8b/patches/onecloud.patch

@@ -21,4 +21,17 @@
 +	phy-mode = "rgmii-rxid";
  
  	mdio {
- 		compatible = "snps,dwmac-mdio";
+ 		compatible = "snps,dwmac-mdio";
+
+--- a/package/kernel/linux/modules/netsupport.mk
++++ b/package/kernel/linux/modules/netsupport.mk
+@@ -93,7 +93,8 @@ define KernelPackage/vxlan
+ 	+IPV6:kmod-udptunnel6
+   KCONFIG:=CONFIG_VXLAN
+   FILES:= \
+-	$(LINUX_DIR)/drivers/net/vxlan/vxlan.ko
++	$(LINUX_DIR)/drivers/net/[email protected] \
++	$(LINUX_DIR)/drivers/net/vxlan/[email protected]
+   AUTOLOAD:=$(call AutoLoad,13,vxlan)
+ endef
+ 

+ 1 - 1
devices/ramips_mt7621/patches/02-cr660x.patch

@@ -30,7 +30,7 @@
 +  IMAGE_SIZE := 15808k
 +  DEVICE_VENDOR := JDCloud
 +  DEVICE_MODEL := Luban 鲁班
-+  DEVICE_PACKAGES += kmod-mt7915e uboot-envtools wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server
++  DEVICE_PACKAGES += kmod-mt7915e uboot-envtools  kmod-mmc kmod-sdhci kmod-sdhci-mt7620 kmod-fs-ext4 wpad-mini -wpad-basic-mbedtls -coremark -htop -bash -openssh-sftp-server
 +endef
 +TARGET_DEVICES += jdcloud_luban
 +

+ 2 - 0
devices/rockchip_armv8/.config

@@ -6,6 +6,8 @@ CONFIG_TARGET_ALL_PROFILES=y
 
 CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r6c=n
 CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r6s=n
+CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_radxa_rock-pi-4=n
+CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_pine64_rockpro64=n
 
 CONFIG_PACKAGE_kmod-rtl8821cu=m
 CONFIG_PACKAGE_kmod-rtl88x2bu=m

+ 3 - 0
devices/rockchip_armv8/diy.sh

@@ -14,6 +14,9 @@ rm -rf target/linux/rockchip/patches-5.15/{002-net-usb*,204-rockchip-rk3328*,003
 
 curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -o package/kernel/linux/modules/video.mk
 
+curl -sfL https://raw.githubusercontent.com/icevel/lede-pico3399-ro/master/package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch -o package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch
+curl -sfL https://raw.githubusercontent.com/icevel/lede-pico3399-ro/master/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts -o target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts
+
 sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk
 
 mv -f tmp/r8125 feeds/kiddin9/

+ 108 - 0
devices/rockchip_armv8/patches/pico3399.patch.b

@@ -0,0 +1,108 @@
+From f847e36bfe9d24f6bd86dc52ebf17f0025118cd6 Mon Sep 17 00:00:00 2001
+From: icevel <[email protected]>
+Date: Wed, 1 Feb 2023 17:20:59 +0800
+Subject: [PATCH] add support
+
+---
+ package/boot/uboot-rockchip/Makefile          |  12 +
+ ...99-Add-support-for-rockchip-pico3399.patch | 749 ++++++++++++++++++
+ .../armv8/base-files/etc/board.d/02_network   |   1 +
+ .../boot/dts/rockchip/rk3399-pico3399.dts     | 668 ++++++++++++++++
+ target/linux/rockchip/image/armv8.mk          |  10 +
+ ...99-add-support-for-rockchip-pico3399.patch |  11 +
+ 7 files changed, 1462 insertions(+)
+ create mode 100644 package/boot/uboot-rockchip/patches/308-rockchip-rk3399-Add-support-for-rockchip-pico3399.patch
+ create mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-pico3399.dts
+ create mode 100644 target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch
+
+diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
+index 69ce25dae..283f4821b 100644
+--- a/package/boot/uboot-rockchip/Makefile
++++ b/package/boot/uboot-rockchip/Makefile
+@@ -72,6 +72,17 @@ endef
+ 
+ # RK3399 boards
+ 
++define U-Boot/rockchip-pico3399-rk3399
++  BUILD_SUBTARGET:=armv8
++  NAME:=rockchip pico3399
++  BUILD_DEVICES:= \
++    rockchip_pico3399
++  DEPENDS:=+PACKAGE_u-boot-rockchip-pico3399-rk3399:arm-trusted-firmware-rk3399
++  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
++  ATF:=rk3399_bl31_v1.35.elf
++  USE_RKBIN:=1
++endef
++
+ define U-Boot/guangmiao-g4c-rk3399
+   BUILD_SUBTARGET:=armv8
+   NAME:=GuangMiao G4C
+@@ -308,6 +319,7 @@ UBOOT_TARGETS := \
+   r66s-rk3568 \
+   station-p2-rk3568 \
+   panther-x2-rk3566 \
++  rockchip-pico3399-rk3399 \
+   sharevdi-h3399pc-rk3399 \
+   guangmiao-g4c-rk3399 \
+   nanopi-r4s-rk3399 \
+diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+index 8bdefcbb6..5c0aa413a 100755
+--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
++++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+@@ -39,6 +39,11 @@ rockchip_setup_interfaces()
+ 	friendlyarm,nanopi-r5s)
+ 		ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
+ 		;;
++	ockchip,pico3399)
++		ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
++		ucidef_add_switch "switch0" \
++			"0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
++		;;
+ 	*)
+ 		ucidef_set_interface_lan 'eth0'
+ 		;;
+@@ -88,6 +93,7 @@ rockchip_setup_macs()
+ 	hinlink,opc-h68k|\
+ 	hinlink,opc-h69k|\
+ 	rocktech,mpc1903|\
++	rockchip,pico3399|\
+ 	sharevdi,h3399pc)
+ 		wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0)
+ 		lan_mac=$(macaddr_add "$wan_mac" +1)
+diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk
+index f15f8f26b..19d1eba72 100644
+--- a/target/linux/rockchip/image/armv8.mk
++++ b/target/linux/rockchip/image/armv8.mk
+@@ -192,6 +192,16 @@ define Device/rocktech_mpc1903
+ endef
+ TARGET_DEVICES += rocktech_mpc1903
+ 
++define Device/rockchip_pico3399
++  DEVICE_VENDOR := rockchip
++  DEVICE_MODEL := pico3399
++  SOC := rk3399
++  UBOOT_DEVICE_NAME := rockchip-pico3399-rk3399
++  IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-bin | gzip | append-metadata
++  DEVICE_PACKAGES := kmod-r8169 kmod-r8125 kmod-nvme -urngd
++endef
++TARGET_DEVICES += rockchip_pico3399
++
+ define Device/sharevdi_guangmiao-g4c
+   DEVICE_VENDOR := SHAREVDI
+   DEVICE_MODEL := GuangMiao G4C
+diff --git a/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch b/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch
+new file mode 100644
+index 000000000..ddfa7f575
+--- /dev/null
++++ b/target/linux/rockchip/patches-5.15/213-rockchip-rk3399-add-support-for-rockchip-pico3399.patch
+@@ -0,0 +1,8 @@
++--- a/arch/arm64/boot/dts/rockchip/Makefile
+++++ b/arch/arm64/boot/dts/rockchip/Makefile
++@@ -58,6 +58,7 @@
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
+++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pico3399.dtb
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mpc1903.dtb
++ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-h3399pc.dtb

+ 15 - 17
devices/rockchip_armv8/patches/r6s.patch

@@ -35,8 +35,8 @@
 
 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
 +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
-@@ -19,9 +19,14 @@ rockchip_setup_interfaces()
- 	rocktech,mpc1903|\
+@@ -21,9 +21,14 @@ rockchip_setup_interfaces()
+ 	sharevdi,h3399pc|\
  	sharevdi,guangmiao-g4c|\
  	xunlong,orangepi-r1-plus|\
 -	xunlong,orangepi-r1-plus-lts)
@@ -48,11 +48,11 @@
 +	friendlyarm,nanopi-r6s)
 +		ucidef_set_interfaces_lan_wan "eth1 eth0" "eth2"
 +		;;
- 	hinlink,opc-h68k|\
- 	hinlink,opc-h69k)
- 		ucidef_set_interfaces_lan_wan 'eth1 eth2 eth3' 'eth0'
-@@ -51,10 +56,10 @@ generate_mac_from_mmc_cid()
- 	echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")"
+ 	fastrhino,r66s|\
+ 	firefly,rk3568-roc-pc|\
+ 	friendlyarm,nanopi-r5c|\
+@@ -45,10 +50,10 @@ rockchip_setup_interfaces()
+ 	esac
  }
  
 -nanopi_r4s_get_mac()
@@ -64,7 +64,7 @@
  	local address
  
  	if [ -f "$eeprom_path" ]; then
-@@ -100,8 +105,12 @@ rockchip_setup_macs()
+@@ -94,8 +99,12 @@ rockchip_setup_macs()
  		;;
  	friendlyarm,nanopi-r4s|\
  	friendlyarm,nanopi-r4se)
@@ -77,8 +77,8 @@
 +		wan_mac=$(nanopi_get_mac wan 6-0053)
 +		lan_mac=$(nanopi_get_mac lan 6-0053)
  		;;
- 	xunlong,orangepi-r1-plus|\
- 	xunlong,orangepi-r1-plus-lts)
+ 	friendlyarm,nanopi-r5c|\
+ 	friendlyarm,nanopi-r5s|\
 
 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
 +++ a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
@@ -129,20 +129,18 @@
 
 --- a/target/linux/rockchip/image/Makefile
 +++ b/target/linux/rockchip/image/Makefile
-@@ -79,4 +79,17 @@ endif
+@@ -79,4 +79,15 @@ endif
  
  include $(SUBTARGET).mk
  
 +define Image/Build
-+	if [[ "$(PROFILE_SANITIZED)" == "friendlyarm_nanopi-r6s" || "$(PROFILE_SANITIZED)" == "friendlyarm_nanopi-r6c" || "$(PROFILE_SANITIZED)" == "friendlyarm_nanopc-t6" ]]; then \
++	if [[ "$(PROFILE_SANITIZED)" == "$(PROFILE_SANITIZED)" == "friendlyarm_nanopc-t6" ]]; then \
 +		export IMG_PREFIX="$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))"; \
 +		export BIN_DIR=$(BIN_DIR); \
 +		export TOPDIR=$(TOPDIR); \
-+		cd /www/wwwroot/op.supes.top/bcache/rockchip/armv8/friendlywrt22-rk3588; \
-+		. ../modify_packit.sh; \
-+		./build.sh sd-img; \
-+		[ "$(MORE)" == "eflasher" ] && ./build.sh emmc-img; \
-+		rm -rf $(BIN_DIR)/$(PROFILE_SANITIZED)-squashfs-sysupgrade.img.gz $(BIN_DIR)/images-for-eflasher; \
++		export MORE=$(MORE); \
++		cd /data/packit/friendlywrt22-rk3588; \
++		. ~/packit/packit_nanopi.sh; \
 +	fi
 +endef
 +

+ 5 - 0
devices/rockchip_rk3588_armv8/.config

@@ -5,6 +5,7 @@ CONFIG_TARGET_MULTI_PROFILE=y
 
 CONFIG_TARGET_DEVICE_rockchip_rk3588_armv8_DEVICE_friendlyelec_nanopi-r6c=y
 CONFIG_TARGET_DEVICE_rockchip_rk3588_armv8_DEVICE_friendlyelec_nanopi-r6s=y
+CONFIG_TARGET_DEVICE_rockchip_rk3588_armv8_DEVICE_friendlyelec_nanopc-t6=y
 CONFIG_TARGET_DEVICE_rockchip_rk3588_armv8_DEVICE_xunlong_orangepi-5=y
 CONFIG_TARGET_DEVICE_rockchip_rk3588_armv8_DEVICE_xunlong_orangepi-5-plus=y
 
@@ -19,6 +20,10 @@ CONFIG_PACKAGE_kmod-dm-raid=n
 CONFIG_PACKAGE_kmod-owl-loader=n
 CONFIG_PACKAGE_kmod-ath9k=n
 CONFIG_PACKAGE_kmod-ath9k-htc=n
+CONFIG_PACKAGE_kmod-ramoops=n
+CONFIG_PACKAGE_kmod-pstore=n
+
+# CONFIG_PACKAGE_iptables-mod-conntrack-extra=n
 
 CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

+ 3 - 1
devices/rockchip_rk3588_armv8/diy.sh

@@ -16,7 +16,9 @@ sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk
 
 mv -f target/linux/rockchip target/linux/rockchip_rk3588
 
-rm -rf package/feeds/packages/glib2 package/devel/perf package/feeds/kiddin9/{shortcut-fe,fibocom_QMI_WWAN,oaf,fast-classifier,firewall,rtl88x2bu,rtl8821cu} package/feeds/packages/bluez package/kernel/ksmbd package/feeds/routing/batman-adv
+rm -rf package/devel/perf package/feeds/kiddin9/{shortcut-fe,oaf,fast-classifier,rtl8821cu,rtl88x2bu} package/kernel/rtl8812au-ct package/kernel/ath10k-ct package/feeds/routing/batman-adv
+
+sed -i "/KernelPackage,dma-buf/d" package/kernel/linux/modules/other.mk
 
 sed -i "/friendlyelec/d" package/feeds/kiddin9/base-files/files/lib/preinit/02_sysinfo
 

+ 170 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera1.dtsi

@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+&csi2_dphy0_hw {
+	status = "disabled";
+};
+
+&csi2_dphy0 {
+	status = "disabled";
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi_in_ucam0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&ov13850_out2>;
+				data-lanes = <1 2>;
+			};
+
+			mipi_in_ucam1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&ov13855_out2>;
+				data-lanes = <1 2>;
+			};
+		};
+		port@1 {
+		        reg = <1>;
+		        #address-cells = <1>;
+		        #size-cells = <0>;
+		        csidphy0_out: endpoint@0 {
+		                reg = <0>;
+		                remote-endpoint = <&mipi2_csi2_input>;
+		        };
+		};
+	};
+};
+
+&i2c7 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c7m0_xfer>;
+
+	vm149c_p1: vm149c-p1@c {
+		compatible = "silicon touch,vm149c";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <1>;
+		rockchip,camera-module-facing = "back";
+	};
+
+	ov13850_1: ov13850-1@10 {
+		compatible = "ovti,ov13850";
+		status = "disabled";
+		reg = <0x10>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
+		clock-names = "xvclk";
+		pinctrl-names = "default";
+		pinctrl-0 = <&mipim0_camera3_clk>;
+		reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <0>;
+		rockchip,camera-module-facing = "back";
+		rockchip,camera-module-name = "CMK-CT0116";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&vm149c_p1>;
+		port {
+			ov13850_out2: endpoint {
+				remote-endpoint = <&mipi_in_ucam0>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
+	dw9714_p1: dw9714-p1@c {
+		compatible = "dongwoon,dw9714";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <0>;
+		rockchip,vcm-start-current = <10>;
+		rockchip,vcm-rated-current = <85>;
+		rockchip,vcm-step-mode = <5>;
+		rockchip,camera-module-facing = "back";
+	};
+
+	ov13855_1: ov13855-1@36 {
+		compatible = "ovti,ov13855";
+		status = "disabled";
+		reg = <0x36>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
+		clock-names = "xvclk";
+		pinctrl-names = "default";
+		pinctrl-0 = <&mipim0_camera3_clk>;
+		reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <0>;
+		rockchip,camera-module-facing = "back";
+		rockchip,camera-module-name = "CMK-OT2016-FV1";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&dw9714_p1>;
+		port {
+			ov13855_out2: endpoint {
+				remote-endpoint = <&mipi_in_ucam1>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+};
+
+&mipi2_csi2 {
+	status = "disabled";
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mipi2_csi2_input: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&csidphy0_out>;
+			};
+		};
+		port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mipi2_csi2_output: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&cif_mipi_in2>;
+			};
+		};
+	};
+};
+
+&rkcif_mipi_lvds2 {
+	status = "disabled";
+	port {
+		cif_mipi_in2: endpoint {
+			remote-endpoint = <&mipi2_csi2_output>;
+		};
+	};
+};
+
+&rkcif_mipi_lvds2_sditf {
+	status = "disabled";
+	port {
+		mipi2_lvds_sditf: endpoint {
+			remote-endpoint = <&isp0_vir1>;
+		};
+	};
+};
+
+&rkisp0_vir1 {
+	status = "disabled";
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		isp0_vir1: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&mipi2_lvds_sditf>;
+		};
+	};
+};

+ 182 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera2.dtsi

@@ -0,0 +1,182 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+&csi2_dcphy0 {
+	status = "disabled";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi_in_cam0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&ov13850_out>;
+				data-lanes = <1 2>;
+			};
+
+			mipi_in_cam1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&ov13855_out>;
+				data-lanes = <1 2>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			csidcphy0_out: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&mipi0_csi2_input>;
+			};
+		};
+	};
+};
+
+&i2c7 {
+	status = "okay";
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2c7m0_xfer>;
+
+	vm149c_p2: vm149c-p2@c {
+		compatible = "silicon touch,vm149c";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <1>;
+		rockchip,camera-module-facing = "back";
+	};
+
+	ov13850_2: ov13850-2@10 {
+		compatible = "ovti,ov13850";
+		status = "disabled";
+		reg = <0x10>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+		clock-names = "xvclk";
+                power-domains = <&power RK3588_PD_VI>;
+		pinctrl-names = "default";
+                pinctrl-0 = <&mipim0_camera4_clk>;
+		rockchip,grf = <&sys_grf>;
+		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <0>;
+		rockchip,camera-module-facing = "back";
+		rockchip,camera-module-name = "CMK-CT0116";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&vm149c_p2>;
+		port {
+			ov13850_out: endpoint {
+				remote-endpoint = <&mipi_in_cam0>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
+	dw9714_p2: dw9714-p2@c {
+		compatible = "dongwoon,dw9714";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <0>;
+		rockchip,vcm-start-current = <10>;
+		rockchip,vcm-rated-current = <85>;
+		rockchip,vcm-step-mode = <5>;
+		rockchip,camera-module-facing = "back";
+	};
+
+	ov13855_2: ov13855-2@36 {
+		compatible = "ovti,ov13855";
+		status = "disabled";
+		reg = <0x36>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+		clock-names = "xvclk";
+		power-domains = <&power RK3588_PD_VI>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mipim0_camera4_clk>;
+		rockchip,grf = <&sys_grf>;
+		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <0>;
+		rockchip,camera-module-facing = "back";
+		rockchip,camera-module-name = "CMK-OT2016-FV1";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&dw9714_p2>;
+		port {
+			ov13855_out: endpoint {
+				remote-endpoint = <&mipi_in_cam1>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+};
+
+&mipi0_csi2 {
+	status = "disabled";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi0_csi2_input: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&csidcphy0_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi0_csi2_output: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&cif_mipi_in0>;
+			};
+		};
+	};
+};
+
+&rkcif_mipi_lvds {
+	status = "disabled";
+
+	port {
+		cif_mipi_in0: endpoint {
+			remote-endpoint = <&mipi0_csi2_output>;
+		};
+	};
+};
+
+&rkcif_mipi_lvds_sditf {
+	status = "disabled";
+
+	port {
+		mipi_lvds_sditf: endpoint {
+			remote-endpoint = <&isp1_in1>;
+		};
+	};
+};
+
+&rkisp0_vir0 {
+	status = "disabled";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		isp1_in1: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&mipi_lvds_sditf>;
+		};
+	};
+};

+ 179 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-camera3.dtsi

@@ -0,0 +1,179 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+&csi2_dcphy1 {
+	status = "disabled";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi_in_dcphy0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&ov13850_out1>;
+				data-lanes = <1 2>;
+			};
+
+			mipi_in_dcphy1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&ov13855_out1>;
+				data-lanes = <1 2>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			csidcphy1_out: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&mipi1_csi2_input>;
+			};
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+
+	vm149cp1: vm149c@c {
+		compatible = "silicon touch,vm149c";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <1>;
+		rockchip,camera-module-facing = "front";
+	};
+
+	ov13850_3: ov13850@10 {
+		compatible = "ovti,ov13850";
+		status = "disabled";
+		reg = <0x10>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+		clock-names = "xvclk";
+		pinctrl-names = "default";
+		pinctrl-0 = <&mipim0_camera4_clk>;
+		rockchip,grf = <&sys_grf>;
+		reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <1>;
+		rockchip,camera-module-facing = "front";
+		rockchip,camera-module-name = "CMK-CT0116";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&vm149cp1>;
+		port {
+			ov13850_out1: endpoint {
+				remote-endpoint = <&mipi_in_dcphy0>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
+	dw9714: dw9714@c {
+		compatible = "dongwoon,dw9714";
+		status = "disabled";
+		reg = <0x0c>;
+		rockchip,camera-module-index = <0>;
+		rockchip,vcm-start-current = <10>;
+		rockchip,vcm-rated-current = <85>;
+		rockchip,vcm-step-mode = <5>;
+		rockchip,camera-module-facing = "front";
+	};
+
+	ov13855_3: ov13855@36 {
+		compatible = "ovti,ov13855";
+		status = "disabled";
+		reg = <0x36>;
+		clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+		clock-names = "xvclk";
+		pinctrl-names = "default";
+		pinctrl-0 = <&mipim0_camera4_clk>;
+		rockchip,grf = <&sys_grf>;
+		reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
+		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
+		rockchip,camera-module-index = <1>;
+		rockchip,camera-module-facing = "front";
+		rockchip,camera-module-name = "CMK-OT2016-FV1";
+		rockchip,camera-module-lens-name = "default";
+		lens-focus = <&dw9714>;
+		port {
+			ov13855_out1: endpoint {
+				remote-endpoint = <&mipi_in_dcphy1>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+};
+
+&mipi1_csi2 {
+	status = "disabled";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi1_csi2_input: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&csidcphy1_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			mipi1_csi2_output: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&cif_mipi_in1>;
+			};
+		};
+	};
+};
+
+&rkcif_mipi_lvds1 {
+	status = "disabled";
+
+	port {
+		cif_mipi_in1: endpoint {
+			remote-endpoint = <&mipi1_csi2_output>;
+		};
+	};
+};
+
+&rkcif_mipi_lvds1_sditf {
+	status = "disabled";
+
+        port {
+                mipi1_lvds_sditf: endpoint {
+                        remote-endpoint = <&isp1_in0>;
+                };
+        };
+};
+
+&rkisp1_vir0 {
+	status = "disabled";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		isp1_in0: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&mipi1_lvds_sditf>;
+		};
+	};
+};

+ 101 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-lcd.dtsi

@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+&dsi0 {
+	status = "disabled";
+};
+
+&dsi0_panel {
+	status = "disabled";
+	reset-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>;
+	enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd0_rst_gpio>;
+};
+
+&dsi0_in_vp2 {
+	status = "disabled";
+};
+
+&dsi0_in_vp3 {
+	status = "disabled";
+};
+
+&route_dsi0 {
+	status = "disabled";
+	connect = <&vp3_out_dsi0>;
+};
+
+&mipi_dcphy0 {
+	status = "okay";
+};
+
+&i2c7 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c7m0_xfer>;
+
+	gt9xx_1: touchscreen@14 {
+		compatible = "goodix,gt9271";
+		reg = <0x14>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
+		irq-gpios = <&gpio1 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
+		touchscreen-inverted-x;
+		//touchscreen-inverted-y;
+		touchscreen-swapped-x-y;
+		touchscreen-size-x = <1280>;
+		touchscreen-size-y = <800>;
+		status = "okay";
+	};
+};
+
+
+
+&dsi1 {
+	status = "disabled";
+};
+
+&dsi1_panel {
+	status = "disabled";
+	reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_LOW>;
+	enable-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&lcd1_rst_gpio>;
+};
+
+&dsi1_in_vp2 {
+	status = "disabled";
+};
+
+&dsi1_in_vp3 {
+	status = "disabled";
+};
+
+&route_dsi1 {
+	status = "disabled";
+	connect = <&vp3_out_dsi1>;
+};
+
+&mipi_dcphy1 {
+	status = "okay";
+};
+
+&i2c2 {
+	status = "okay";
+
+	gt9xx_0: touchscreen@14 {
+		compatible = "goodix,gt9271";
+		reg = <0x14>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
+		irq-gpios = <&gpio1 RK_PA7 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
+		touchscreen-inverted-x;
+		//touchscreen-inverted-y;
+		touchscreen-swapped-x-y;
+		touchscreen-size-x = <1280>;
+		touchscreen-size-y = <800>;
+		status = "okay";
+	};
+};

+ 25 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dts

@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include "rk3588s-orangepi-5.dts"
+
+&sata0 {
+	status = "okay";
+};
+
+&pcie2x1l2 {
+	status = "disabled";
+};
+
+&wireless_wlan {
+	status = "disabled";
+};
+
+&wireless_bluetooth {
+	status = "disabled";
+};

+ 454 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-spi.dts

@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include "rk3588s-orangepi-5.dtsi"
+#include "rk3588-linux.dtsi"
+#include "rk3588s-orangepi-5-lcd.dtsi"
+
+#include "rk3588s-orangepi-5-camera1.dtsi"
+#include "rk3588s-orangepi-5-camera2.dtsi"
+#include "rk3588s-orangepi-5-camera3.dtsi"
+
+/ {
+	model = "Orange Pi 5";
+	compatible = "rockchip,rk3588s-orangepi-5", "rockchip,rk3588";
+
+	vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_3v3_sd_s0";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
+		enable-active-low;
+		vin-supply = <&vcc_3v3_s3>;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v1_nldo_s3";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1100000>;
+		regulator-max-microvolt = <1100000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_pcie2x1l2";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		enable-active-high;
+		regulator-boot-on;
+		regulator-always-on;
+		gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <50000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	leds: gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 =<&leds_gpio>;
+		status = "okay";
+
+		led@1 {
+			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+			label = "status_led";
+			linux,default-trigger = "heartbeat";
+			linux,default-trigger-delay-ms = <0>;
+		};
+	};
+};
+
+&gmac1 {
+	/* Use rgmii-rxid mode to disable rx delay inside Soc */
+	phy-mode = "rgmii-rxid";
+	clock_in_out = "output";
+
+	snps,reset-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	/* Reset time is 20ms, 100ms for rtl8211f */
+	snps,reset-delays-us = <0 20000 100000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac1_miim
+	             &gmac1_tx_bus2
+	             &gmac1_rx_bus2
+	             &gmac1_rgmii_clk
+	             &gmac1_rgmii_bus>;
+
+	tx_delay = <0x42>;
+	/* rx_delay = <0x3f>; */
+
+	phy-handle = <&rgmii_phy1>;
+	status = "okay";
+};
+
+&mdio1 {
+	rgmii_phy1: phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0x1>;
+	};
+};
+
+&hdmi0 {
+	enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+	cec-enable;
+	status = "okay";
+};
+
+&hdmi0_in_vp0 {
+	status = "okay";
+};
+
+&hdmi0_sound {
+	status = "okay";
+};
+
+&hdptxphy_hdmi0 {
+	status = "okay";
+};
+
+&route_hdmi0{
+	status = "okay";
+};
+
+&i2s5_8ch {
+	status = "okay";
+};
+
+&i2s1_8ch {
+	status = "okay";
+	rockchip,i2s-tx-route = <3 2 1 0>;
+	rockchip,i2s-rx-route = <1 3 2 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclk
+	             &i2s1m0_lrck
+	             &i2s1m0_sdi1
+	             &i2s1m0_sdo3>;
+};
+
+&i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0m2_xfer>;
+
+	vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_cpu_big0_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
+		compatible = "rockchip,rk8603";
+		reg = <0x43>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_cpu_big1_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+
+	vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_npu_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <950000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+};
+
+/*
+   pin3: GPIO1_B7
+   pin5: GPIO1_B6
+*/
+&i2c5 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c5m3_xfer>;
+};
+
+&uart1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1m1_xfer>;
+};
+
+&pwm13 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm13m2_pins>;
+};
+
+/*
+   pin7: GPIO1_C6
+*/
+&pwm15 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm15m2_pins>;
+};
+
+/*
+   pin11: GPIO4_B2
+   pin13: GPIO4_B3
+*/
+&pwm14 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm14m1_pins>;
+};
+
+&can1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&can1m1_pins>;
+	assigned-clocks = <&cru CLK_CAN1>;
+	assigned-clock-rates = <200000000>;
+};
+
+/*
+   pin15: GPIO0_D4
+   pin12: GPIO0_D5
+*/
+&can2 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&can2m1_pins>;
+	assigned-clocks = <&cru CLK_CAN2>;
+	assigned-clock-rates = <200000000>;
+};
+
+/*
+   pin19: GPIO1_C1
+   pin21: GPIO1_C0
+   pin23: GPIO1_C2
+   pin24: GPIO1_C4
+*/
+&spi4 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi4m0_cs1 &spi4m0_pins>;
+	assigned-clocks = <&cru CLK_SPI4>;
+	assigned-clock-rates = <200000000>;
+	num-cs = <2>;
+
+	spi_dev@1 {
+		compatible = "rockchip,spidev";
+		reg = <1>;
+		spi-max-frequency = <50000000>;
+	};
+};
+
+&i2c3 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c3m0_xfer>;
+};
+
+&uart3 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3m0_xfer>;
+};
+
+&pwm3 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm3m2_pins>;
+	//pinctrl-0 = <&pwm3m0_pins>;
+};
+
+/*
+   pin8:  GPIO4_A3
+   pin10: GPIO4_A4
+*/
+&uart0 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0m2_xfer>;
+};
+
+/*
+   pin16: GPIO1_D3
+   pin18: GPIO1_D2
+*/
+&uart4 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart4m0_xfer>;
+};
+
+&i2c1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	//pinctrl-0 = <&i2c1m4_xfer>;
+	pinctrl-0 = <&i2c1m2_xfer>;
+};
+
+&pwm0 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm0m1_pins>;
+};
+
+/*
+   pin26: GPIO1_A3
+*/
+&pwm1 {
+	status = "disabled";
+	pinctrl-names = "active";
+	//pinctrl-0 = <&pwm1m2_pins>;
+	pinctrl-0 = <&pwm1m1_pins>;
+};
+
+/* watchdog */
+&wdt {
+        status = "okay";
+};
+
+&sfc {
+	status = "okay";
+	max-freq = <100000000>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&fspim0_pins>;
+
+	spi_flash: spi-flash@0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "jedec,spi-nor";
+		reg = <0x0>;
+		spi-max-frequency = <100000000>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <4>;
+		status = "okay";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			uboot@0 {
+				label = "uboot";
+				reg = <0x0 0x200000>;
+			};
+
+			dtb@200000 {
+				label = "dtb";
+				reg = <0x200000 0x40000>;
+			};
+
+			firmware@240000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x240000 0xdc0000>;
+			};
+
+		};
+	};
+};
+
+&mipi_dcphy0 {
+        status = "okay";
+};
+
+&mipi_dcphy1 {
+        status = "okay";
+};
+
+&rkcif {
+	status = "okay";
+};
+
+&rkcif_mmu {
+	status = "okay";
+};
+
+&rkisp0 {
+	status = "okay";
+};
+
+&isp0_mmu {
+	status = "okay";
+};
+
+&rkisp1 {
+	status = "okay";
+};
+
+&isp1_mmu {
+	status = "okay";
+};
+
+&sata0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sata_reset>;
+	status = "disabled";
+};
+
+&pcie2x1l2 {
+	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
+	rockchip,skip-scan-in-resume;
+	status = "okay";
+};
+
+&wireless_wlan {
+	status = "okay";
+};
+
+&wireless_bluetooth {
+	status = "okay";
+};
+
+&pinctrl
+{
+	gpio-func {
+		leds_gpio: leds-gpio {
+			rockchip,pins =
+				<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};

+ 454 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts

@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include "rk3588s-orangepi-5.dtsi"
+#include "rk3588-linux.dtsi"
+#include "rk3588s-orangepi-5-lcd.dtsi"
+
+#include "rk3588s-orangepi-5-camera1.dtsi"
+#include "rk3588s-orangepi-5-camera2.dtsi"
+#include "rk3588s-orangepi-5-camera3.dtsi"
+
+/ {
+	model = "Orange Pi 5";
+	compatible = "rockchip,rk3588s-orangepi-5", "rockchip,rk3588";
+
+	vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_3v3_sd_s0";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
+		enable-active-low;
+		vin-supply = <&vcc_3v3_s3>;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v1_nldo_s3";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1100000>;
+		regulator-max-microvolt = <1100000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_pcie2x1l2";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		enable-active-high;
+		regulator-boot-on;
+		regulator-always-on;
+		gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <50000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	leds: gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 =<&leds_gpio>;
+		status = "okay";
+
+		led@1 {
+			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+			label = "status_led";
+			linux,default-trigger = "heartbeat";
+			linux,default-trigger-delay-ms = <0>;
+		};
+	};
+};
+
+&gmac1 {
+	/* Use rgmii-rxid mode to disable rx delay inside Soc */
+	phy-mode = "rgmii-rxid";
+	clock_in_out = "output";
+
+	snps,reset-gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	/* Reset time is 20ms, 100ms for rtl8211f */
+	snps,reset-delays-us = <0 20000 100000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac1_miim
+	             &gmac1_tx_bus2
+	             &gmac1_rx_bus2
+	             &gmac1_rgmii_clk
+	             &gmac1_rgmii_bus>;
+
+	tx_delay = <0x42>;
+	/* rx_delay = <0x3f>; */
+
+	phy-handle = <&rgmii_phy1>;
+	status = "okay";
+};
+
+&mdio1 {
+	rgmii_phy1: phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0x1>;
+	};
+};
+
+&hdmi0 {
+	enable-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+	cec-enable;
+	status = "okay";
+};
+
+&hdmi0_in_vp0 {
+	status = "okay";
+};
+
+&hdmi0_sound {
+	status = "okay";
+};
+
+&hdptxphy_hdmi0 {
+	status = "okay";
+};
+
+&route_hdmi0{
+	status = "okay";
+};
+
+&i2s5_8ch {
+	status = "okay";
+};
+
+&i2s1_8ch {
+	status = "okay";
+	rockchip,i2s-tx-route = <3 2 1 0>;
+	rockchip,i2s-rx-route = <1 3 2 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclk
+	             &i2s1m0_lrck
+	             &i2s1m0_sdi1
+	             &i2s1m0_sdo3>;
+};
+
+&i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0m2_xfer>;
+
+	vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_cpu_big0_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
+		compatible = "rockchip,rk8603";
+		reg = <0x43>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_cpu_big1_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <1050000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+
+	vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
+		compatible = "rockchip,rk8602";
+		reg = <0x42>;
+		vin-supply = <&vcc5v0_sys>;
+		regulator-compatible = "rk860x-reg";
+		regulator-name = "vdd_npu_s0";
+		regulator-min-microvolt = <550000>;
+		regulator-max-microvolt = <950000>;
+		regulator-ramp-delay = <2300>;
+		rockchip,suspend-voltage-selector = <1>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+};
+
+/*
+   pin3: GPIO1_B7
+   pin5: GPIO1_B6
+*/
+&i2c5 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c5m3_xfer>;
+};
+
+&uart1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1m1_xfer>;
+};
+
+&pwm13 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm13m2_pins>;
+};
+
+/*
+   pin7: GPIO1_C6
+*/
+&pwm15 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm15m2_pins>;
+};
+
+/*
+   pin11: GPIO4_B2
+   pin13: GPIO4_B3
+*/
+&pwm14 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm14m1_pins>;
+};
+
+&can1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&can1m1_pins>;
+	assigned-clocks = <&cru CLK_CAN1>;
+	assigned-clock-rates = <200000000>;
+};
+
+/*
+   pin15: GPIO0_D4
+   pin12: GPIO0_D5
+*/
+&can2 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&can2m1_pins>;
+	assigned-clocks = <&cru CLK_CAN2>;
+	assigned-clock-rates = <200000000>;
+};
+
+/*
+   pin19: GPIO1_C1
+   pin21: GPIO1_C0
+   pin23: GPIO1_C2
+   pin24: GPIO1_C4
+*/
+&spi4 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi4m0_cs1 &spi4m0_pins>;
+	assigned-clocks = <&cru CLK_SPI4>;
+	assigned-clock-rates = <200000000>;
+	num-cs = <2>;
+
+	spi_dev@1 {
+		compatible = "rockchip,spidev";
+		reg = <1>;
+		spi-max-frequency = <50000000>;
+	};
+};
+
+&i2c3 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c3m0_xfer>;
+};
+
+&uart3 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3m0_xfer>;
+};
+
+&pwm3 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm3m2_pins>;
+	//pinctrl-0 = <&pwm3m0_pins>;
+};
+
+/*
+   pin8:  GPIO4_A3
+   pin10: GPIO4_A4
+*/
+&uart0 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0m2_xfer>;
+};
+
+/*
+   pin16: GPIO1_D3
+   pin18: GPIO1_D2
+*/
+&uart4 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart4m0_xfer>;
+};
+
+&i2c1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	//pinctrl-0 = <&i2c1m4_xfer>;
+	pinctrl-0 = <&i2c1m2_xfer>;
+};
+
+&pwm0 {
+	status = "disabled";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm0m1_pins>;
+};
+
+/*
+   pin26: GPIO1_A3
+*/
+&pwm1 {
+	status = "disabled";
+	pinctrl-names = "active";
+	//pinctrl-0 = <&pwm1m2_pins>;
+	pinctrl-0 = <&pwm1m1_pins>;
+};
+
+/* watchdog */
+&wdt {
+	status = "okay";
+};
+
+&sfc {
+	status = "disabled";
+	max-freq = <100000000>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&fspim0_pins>;
+
+	spi_flash: spi-flash@0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "jedec,spi-nor";
+		reg = <0x0>;
+		spi-max-frequency = <100000000>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <4>;
+		status = "disabled";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			uboot@0 {
+				label = "uboot";
+				reg = <0x0 0x200000>;
+			};
+
+			dtb@200000 {
+				label = "dtb";
+				reg = <0x200000 0x40000>;
+			};
+
+			firmware@240000 {
+				//compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x240000 0xdc0000>;
+			};
+
+		};
+	};
+};
+
+&mipi_dcphy0 {
+	status = "okay";
+};
+
+&mipi_dcphy1 {
+	status = "okay";
+};
+
+&rkcif {
+	status = "okay";
+};
+
+&rkcif_mmu {
+	status = "okay";
+};
+
+&rkisp0 {
+	status = "okay";
+};
+
+&isp0_mmu {
+	status = "okay";
+};
+
+&rkisp1 {
+	status = "okay";
+};
+
+&isp1_mmu {
+	status = "okay";
+};
+
+&sata0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sata_reset>;
+	status = "disabled";
+};
+
+&pcie2x1l2 {
+	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
+	rockchip,skip-scan-in-resume;
+	status = "okay";
+};
+
+&wireless_wlan {
+	status = "okay";
+};
+
+&wireless_bluetooth {
+	status = "okay";
+};
+
+&pinctrl
+{
+	gpio-func {
+		leds_gpio: leds-gpio {
+			rockchip,pins =
+				<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};

+ 381 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi

@@ -0,0 +1,381 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+#include "dt-bindings/usb/pd.h"
+#include "rk3588s.dtsi"
+#include "rk3588s-orangepi.dtsi"
+#include "rk3588-rk806-single.dtsi"
+
+/ {
+	combophy_avdd0v85: combophy-avdd0v85 {
+		compatible = "regulator-fixed";
+		regulator-name = "combophy_avdd0v85";
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-min-microvolt = <850000>;
+		regulator-max-microvolt = <850000>;
+		vin-supply = <&vdd_0v85_s0>;
+	};
+
+	combophy_avdd1v8: combophy-avdd1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "combophy_avdd1v8";
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&avcc_1v8_s0>;
+	};
+
+	es8388_sound: es8388-sound {
+		status = "okay";
+		compatible = "rockchip,multicodecs-card";
+		rockchip,card-name = "rockchip-es8388";
+		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
+		io-channels = <&saradc 3>;
+		io-channel-names = "adc-detect";
+		keyup-threshold-microvolt = <1800000>;
+		poll-interval = <100>;
+		rockchip,format = "i2s";
+		rockchip,mclk-fs = <256>;
+		rockchip,cpu = <&i2s1_8ch>;
+		rockchip,codec = <&es8388>;
+		rockchip,audio-routing =
+			"Headphone", "LOUT1",
+			"Headphone", "ROUT1",
+			"Headphone", "Headphone Power",
+			"Headphone", "Headphone Power",
+			"LINPUT1", "Main Mic",
+			"LINPUT2", "Main Mic",
+			"RINPUT1", "Headset Mic",
+			"RINPUT2", "Headset Mic";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hp_det>;
+		play-pause-key {
+			label = "playpause";
+			linux,code = <KEY_PLAYPAUSE>;
+			press-threshold-microvolt = <2000>;
+		};
+	};
+
+	wireless_bluetooth: wireless-bluetooth {
+		compatible = "bluetooth-platdata";
+		clocks = <&hym8563>;
+		clock-names = "ext_clock";
+		uart_rts_gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default", "rts_gpio";
+		pinctrl-0 = <&uart9m2_rtsn>, <&bt_gpio>;
+		pinctrl-1 = <&uart9_gpios>;
+		BT,reset_gpio    = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
+		BT,wake_gpio     = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
+		status = "disabled";
+	};
+
+	wireless_wlan: wireless-wlan {
+		compatible = "wlan-platdata";
+		wifi_chip_type = "ap6275p";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_host_wake_irq>, <&wifi_poweren_gpio>;
+		WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+		WIFI,poweren_gpio = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
+		status = "disabled";
+	};
+
+	vbus5v0_typec: vbus5v0-typec {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus5v0_typec";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+		gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&vcc5v0_usb>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&typec5v_pwren>;
+	};
+};
+
+&pwm6 {
+	status = "okay";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm6m0_pins>;
+};
+
+&pwm2 {
+	status = "okay";
+	pinctrl-names = "active";
+	pinctrl-0 = <&pwm2m0_pins>;
+};
+
+&backlight_1 {
+	pwms = <&pwm6 0 25000 0>;
+	status = "okay";
+};
+
+&backlight {
+	pwms = <&pwm2 0 25000 0>;
+	status = "okay";
+};
+
+&combphy0_ps {
+	status = "okay";
+};
+
+&dp0 {
+	status = "okay";
+};
+
+&dp0_in_vp1 {
+	status = "okay";
+};
+
+&dp0_in_vp2 {
+	status = "disabled";
+};
+
+&dp0_sound{
+	status = "okay";
+};
+
+&spdif_tx2{
+	status = "okay";
+};
+
+&mipi_dcphy0 {
+	status = "okay";
+};
+
+&mipi_dcphy1 {
+	status = "okay";
+};
+
+&i2c6 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c6m3_xfer>;
+
+	es8388: es8388@10 {
+		status = "okay";
+		#sound-dai-cells = <0>;
+		compatible = "everest,es8388", "everest,es8323";
+		reg = <0x10>;
+		clocks = <&cru I2S1_8CH_MCLKOUT>;
+		clock-names = "mclk";
+		assigned-clocks = <&cru I2S1_8CH_MCLKOUT>;
+		assigned-clock-rates = <12288000>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2s1m0_mclk>;
+	};
+
+	usbc0: fusb302@22 {
+		compatible = "fcs,fusb302";
+		reg = <0x22>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usbc0_int>;
+		vbus-supply = <&vbus5v0_typec>;
+		status = "okay";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				usbc0_role_sw: endpoint@0 {
+					remote-endpoint = <&dwc3_0_role_switch>;
+				};
+			};
+		};
+
+		usb_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			data-role = "dual";
+			power-role = "dual";
+			try-power-role = "sink";
+			op-sink-microwatt = <1000000>;
+			sink-pdos =
+				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
+			source-pdos =
+				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+
+			altmodes {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				altmode@0 {
+					reg = <0>;
+					svid = <0xff01>;
+					vdo = <0xffffffff>;
+				};
+			};
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					usbc0_orien_sw: endpoint {
+						remote-endpoint = <&usbdp_phy0_orientation_switch>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+					dp_altmode_mux: endpoint {
+						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
+					};
+				};
+			};
+		};
+	};
+
+	hym8563: hym8563@51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "hym8563";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hym8563_int>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+		wakeup-source;
+	};
+};
+
+&pcie2x1l1 {
+	status = "disabled";
+};
+
+&pcie2x1l2 {
+	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+	rockchip,skip-scan-in-resume;
+	status = "disabled";
+};
+
+&pinctrl {
+	sata {
+		sata_reset:sata-reset{
+			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	hym8563 {
+		hym8563_int: hym8563-int {
+			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	lcd {
+		lcd0_rst_gpio: lcd0-rst-gpio {
+			rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		lcd1_rst_gpio: lcd1-rst-gpio {
+			rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	usb-typec {
+		usbc0_int: usbc0-int {
+			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		typec5v_pwren: typec5v-pwren {
+			rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	wireless-bluetooth {
+		uart9_gpios: uart9-gpios {
+			rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_gpio: bt-gpio {
+			rockchip,pins =
+				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
+				<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	wireless-wlan {
+		wifi_host_wake_irq: wifi-host-wake-irq {
+			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		wifi_poweren_gpio: wifi-poweren-gpio {
+			rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+};
+
+&u2phy0_otg {
+	rockchip,typec-vbus-det;
+	status = "okay";
+};
+
+&uart9 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>;
+};
+
+&usbdp_phy0 {
+	orientation-switch;
+	svid = <0xff01>;
+	sbu1-dc-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
+	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		usbdp_phy0_orientation_switch: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&usbc0_orien_sw>;
+		};
+
+		usbdp_phy0_dp_altmode_mux: endpoint@1 {
+			reg = <1>;
+			remote-endpoint = <&dp_altmode_mux>;
+		};
+	};
+};
+
+&usbdrd_dwc3_0 {
+	status = "okay";
+	dr_mode = "otg";
+	usb-role-switch;
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		dwc3_0_role_switch: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&usbc0_role_sw>;
+		};
+	};
+};
+
+&combphy2_psu {
+        status = "okay";
+};
+
+&usbhost3_0 {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbhost_dwc3_0 {
+	status = "okay";
+};

+ 615 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/files/arch/arm64/boot/dts/rockchip/rk3588s-orangepi.dtsi

@@ -0,0 +1,615 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/input/rk-input.h>
+#include <dt-bindings/display/drm_mipi_dsi.h>
+#include <dt-bindings/display/rockchip_vop.h>
+#include <dt-bindings/sensor-dev.h>
+
+/ {
+	adc_keys: adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 1>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+		poll-interval = <100>;
+
+		vol-up-key {
+			label = "volume up";
+			linux,code = <KEY_VOLUMEUP>;
+			press-threshold-microvolt = <17000>;
+		};
+
+		vol-down-key {
+			label = "volume down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			press-threshold-microvolt = <417000>;
+		};
+
+		menu-key {
+			label = "menu";
+			linux,code = <KEY_MENU>;
+			press-threshold-microvolt = <890000>;
+		};
+
+		back-key {
+			label = "back";
+			linux,code = <KEY_BACK>;
+			press-threshold-microvolt = <1235000>;
+		};
+	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		brightness-levels = <
+			  0  20  20  21  21  22  22  23
+			 23  24  24  25  25  26  26  27
+			 27  28  28  29  29  30  30  31
+			 31  32  32  33  33  34  34  35
+			 35  36  36  37  37  38  38  39
+			 40  41  42  43  44  45  46  47
+			 48  49  50  51  52  53  54  55
+			 56  57  58  59  60  61  62  63
+			 64  65  66  67  68  69  70  71
+			 72  73  74  75  76  77  78  79
+			 80  81  82  83  84  85  86  87
+			 88  89  90  91  92  93  94  95
+			 96  97  98  99 100 101 102 103
+			104 105 106 107 108 109 110 111
+			112 113 114 115 116 117 118 119
+			120 121 122 123 124 125 126 127
+			128 129 130 131 132 133 134 135
+			136 137 138 139 140 141 142 143
+			144 145 146 147 148 149 150 151
+			152 153 154 155 156 157 158 159
+			160 161 162 163 164 165 166 167
+			168 169 170 171 172 173 174 175
+			176 177 178 179 180 181 182 183
+			184 185 186 187 188 189 190 191
+			192 193 194 195 196 197 198 199
+			200 201 202 203 204 205 206 207
+			208 209 210 211 212 213 214 215
+			216 217 218 219 220 221 222 223
+			224 225 226 227 228 229 230 231
+			232 233 234 235 236 237 238 239
+			240 241 242 243 244 245 246 247
+			248 249 250 251 252 253 254 255
+		>;
+		default-brightness-level = <200>;
+	};
+
+	backlight_1: backlight_1 {
+		compatible = "pwm-backlight";
+		brightness-levels = <
+			  0  20  20  21  21  22  22  23
+			 23  24  24  25  25  26  26  27
+			 27  28  28  29  29  30  30  31
+			 31  32  32  33  33  34  34  35
+			 35  36  36  37  37  38  38  39
+			 40  41  42  43  44  45  46  47
+			 48  49  50  51  52  53  54  55
+			 56  57  58  59  60  61  62  63
+			 64  65  66  67  68  69  70  71
+			 72  73  74  75  76  77  78  79
+			 80  81  82  83  84  85  86  87
+			 88  89  90  91  92  93  94  95
+			 96  97  98  99 100 101 102 103
+			104 105 106 107 108 109 110 111
+			112 113 114 115 116 117 118 119
+			120 121 122 123 124 125 126 127
+			128 129 130 131 132 133 134 135
+			136 137 138 139 140 141 142 143
+			144 145 146 147 148 149 150 151
+			152 153 154 155 156 157 158 159
+			160 161 162 163 164 165 166 167
+			168 169 170 171 172 173 174 175
+			176 177 178 179 180 181 182 183
+			184 185 186 187 188 189 190 191
+			192 193 194 195 196 197 198 199
+			200 201 202 203 204 205 206 207
+			208 209 210 211 212 213 214 215
+			216 217 218 219 220 221 222 223
+			224 225 226 227 228 229 230 231
+			232 233 234 235 236 237 238 239
+			240 241 242 243 244 245 246 247
+			248 249 250 251 252 253 254 255
+		>;
+		default-brightness-level = <200>;
+	};
+
+	dp0_sound: dp0-sound {
+		status = "disabled";
+		compatible = "rockchip,hdmi";
+		rockchip,card-name= "rockchip-dp0";
+		rockchip,mclk-fs = <512>;
+		rockchip,cpu = <&spdif_tx2>;
+		rockchip,codec = <&dp0 1>;
+		rockchip,jack-det;
+	};
+
+	hdmi0_sound: hdmi0-sound {
+		status = "disabled";
+		compatible = "rockchip,hdmi";
+		rockchip,mclk-fs = <128>;
+		rockchip,card-name = "rockchip-hdmi0";
+		rockchip,cpu = <&i2s5_8ch>;
+		rockchip,codec = <&hdmi0>;
+		rockchip,jack-det;
+	};
+
+	spdif_tx1_dc: spdif-tx1-dc {
+		status = "disabled";
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+	};
+
+	spdif_tx1_sound: spdif-tx1-sound {
+		status = "disabled";
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "rockchip,spdif-tx1";
+		simple-audio-card,cpu {
+			sound-dai = <&spdif_tx1>;
+		};
+		simple-audio-card,codec {
+			sound-dai = <&spdif_tx1_dc>;
+		};
+	};
+
+	test-power {
+		status = "okay";
+	};
+
+	vcc12v_dcin: vcc12v-dcin {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc12v_dcin";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
+	vcc5v0_sys: vcc5v0-sys {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc12v_dcin>;
+	};
+
+	vcc5v0_usbdcin: vcc5v0-usbdcin {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usbdcin";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc12v_dcin>;
+	};
+
+	vcc5v0_usb: vcc5v0-usb {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usbdcin>;
+	};
+};
+
+&av1d {
+	status = "okay";
+};
+
+&av1d_mmu {
+	status = "okay";
+};
+
+&combphy0_ps {
+	status = "okay";
+};
+
+&combphy2_psu {
+	status = "okay";
+};
+
+&cpu_l0 {
+	cpu-supply = <&vdd_cpu_lit_s0>;
+	mem-supply = <&vdd_cpu_lit_mem_s0>;
+};
+
+&cpu_b0 {
+	cpu-supply = <&vdd_cpu_big0_s0>;
+	mem-supply = <&vdd_cpu_big0_mem_s0>;
+};
+
+&cpu_b2 {
+	cpu-supply = <&vdd_cpu_big1_s0>;
+	mem-supply = <&vdd_cpu_big1_mem_s0>;
+};
+
+&dsi0 {
+	status = "okay";
+	//rockchip,lane-rate = <1000>;
+	dsi0_panel: panel@0 {
+		status = "okay";
+		compatible = "innolux,afj101-ba2131";
+		reg = <0>;
+		backlight = <&backlight>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				panel_in_dsi: endpoint {
+					remote-endpoint = <&dsi_out_panel>;
+				};
+			};
+		};
+	};
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+			dsi_out_panel: endpoint {
+				remote-endpoint = <&panel_in_dsi>;
+			};
+		};
+	};
+
+};
+
+&dsi1 {
+	status = "okay";
+	//rockchip,lane-rate = <1000>;
+	dsi1_panel: panel@0 {
+		status = "okay";
+		compatible = "innolux,afj101-ba2131";
+		reg = <0>;
+		backlight = <&backlight_1>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				panel_in_dsi1: endpoint {
+					remote-endpoint = <&dsi1_out_panel>;
+				};
+			};
+		};
+	};
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+			dsi1_out_panel: endpoint {
+				remote-endpoint = <&panel_in_dsi1>;
+			};
+		};
+	};
+
+};
+
+&gpu {
+	mali-supply = <&vdd_gpu_s0>;
+	mem-supply = <&vdd_gpu_mem_s0>;
+	status = "okay";
+};
+
+&i2s0_8ch {
+	status = "okay";
+	pinctrl-0 = <&i2s0_lrck
+		     &i2s0_sclk
+		     &i2s0_sdi0
+		     &i2s0_sdo0>;
+};
+
+&iep {
+	status = "okay";
+};
+
+&iep_mmu {
+	status = "okay";
+};
+
+&jpegd {
+	status = "okay";
+};
+
+&jpegd_mmu {
+	status = "okay";
+};
+
+&jpege_ccu {
+	status = "okay";
+};
+
+&jpege0 {
+	status = "okay";
+};
+
+&jpege0_mmu {
+	status = "okay";
+};
+
+&jpege1 {
+	status = "okay";
+};
+
+&jpege1_mmu {
+	status = "okay";
+};
+
+&jpege2 {
+	status = "okay";
+};
+
+&jpege2_mmu {
+	status = "okay";
+};
+
+&jpege3 {
+	status = "okay";
+};
+
+&jpege3_mmu {
+	status = "okay";
+};
+
+&mpp_srv {
+	status = "okay";
+};
+
+&rga3_core0 {
+	status = "okay";
+};
+
+&rga3_0_mmu {
+	status = "okay";
+};
+
+&rga3_core1 {
+	status = "okay";
+};
+
+&rga3_1_mmu {
+	status = "okay";
+};
+
+&rga2 {
+	status = "okay";
+};
+
+&rknpu {
+	rknpu-supply = <&vdd_npu_s0>;
+	mem-supply = <&vdd_npu_mem_s0>;
+	status = "okay";
+};
+
+&rknpu_mmu {
+	status = "okay";
+};
+
+&rkvdec_ccu {
+	status = "okay";
+};
+
+&rkvdec0 {
+	status = "okay";
+};
+
+&rkvdec0_mmu {
+	status = "okay";
+};
+
+&rkvdec1 {
+	status = "okay";
+};
+
+&rkvdec1_mmu {
+	status = "okay";
+};
+
+&rkvenc_ccu {
+	status = "okay";
+};
+
+&rkvenc0 {
+	status = "okay";
+};
+
+&rkvenc0_mmu {
+	status = "okay";
+};
+
+&rkvenc1 {
+	status = "okay";
+};
+
+&rkvenc1_mmu {
+	status = "okay";
+};
+
+&rockchip_suspend {
+	status = "okay";
+	rockchip,sleep-debug-en = <1>;
+};
+
+&saradc {
+	status = "okay";
+	vref-supply = <&vcc_1v8_s0>;
+};
+
+&sdhci {
+	bus-width = <8>;
+	no-sdio;
+	no-sd;
+	non-removable;
+	max-frequency = <200000000>;
+	mmc-hs400-1_8v;
+	mmc-hs400-enhanced-strobe;
+	status = "disabled";
+};
+
+&sdmmc {
+	max-frequency = <150000000>;
+	no-sdio;
+	no-mmc;
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	disable-wp;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc_3v3_sd_s0>;
+	vqmmc-supply = <&vccio_sd_s0>;
+	status = "okay";
+};
+
+&tsadc {
+	status = "okay";
+};
+
+&u2phy0 {
+	status = "okay";
+};
+
+&u2phy2 {
+	status = "okay";
+};
+
+&u2phy3 {
+	status = "okay";
+};
+
+&u2phy0_otg {
+	status = "okay";
+};
+
+&u2phy2_host {
+	status = "okay";
+};
+
+&u2phy3_host {
+	status = "okay";
+};
+
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_host0_ohci {
+	status = "okay";
+};
+
+&usb_host1_ehci {
+	status = "okay";
+};
+
+&usb_host1_ohci {
+	status = "okay";
+};
+
+&usbdp_phy0 {
+	status = "okay";
+};
+
+&usbdp_phy0_dp {
+	status = "okay";
+};
+
+&usbdp_phy0_u3 {
+	status = "okay";
+};
+
+&usbdrd3_0 {
+	status = "okay";
+};
+
+&usbdrd_dwc3_0 {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbhost3_0 {
+	status = "okay";
+};
+
+&usbhost_dwc3_0 {
+	status = "okay";
+};
+
+&vdpu {
+	status = "okay";
+};
+
+&vdpu_mmu {
+	status = "okay";
+};
+
+&vop {
+	status = "okay";
+	disable-win-move;
+	assigned-clocks = <&cru ACLK_VOP>;
+	assigned-clock-rates = <800000000>;
+};
+
+&vop_mmu {
+	status = "okay";
+};
+
+&vepu {
+	status = "okay";
+};
+
+/* vp0 & vp1 splice for 8K output */
+&vp0 {
+	cursor-win-id=<ROCKCHIP_VOP2_ESMART0>;
+	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART0>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER0>;
+};
+
+&vp1 {
+	cursor-win-id=<ROCKCHIP_VOP2_ESMART1>;
+	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART1>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER1>;
+};
+
+&vp2 {
+	cursor-win-id=<ROCKCHIP_VOP2_ESMART2>;
+	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART2>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER2>;
+};
+
+&vp3 {
+	cursor-win-id=<ROCKCHIP_VOP2_ESMART3>;
+	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART3>;
+	rockchip,primary-plane = <ROCKCHIP_VOP2_CLUSTER3>;
+};
+
+/* Fix tty terminal out of screen, and most dclk of resolutions was not supported in hdmiphy clock from parent clock by default */
+&display_subsystem {
+	clocks = <&hdptxphy_hdmi_clk0>;
+	clock-names = "hdmi0_phy_pll";
+};

+ 14 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/02-arm64-dts-rockchip-ad-orange-pi-5.patch

@@ -0,0 +1,14 @@
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -186,8 +186,11 @@
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb8-lp4x-v10.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5-spi.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5-sata.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-rk806-single-v10.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb
+ 
+ endif

+ 34 - 0
devices/rockchip_rk3588_armv8/diy/target/linux/rockchip_rk3588/patches-5.10/03-fix.patch

@@ -0,0 +1,34 @@
+--- a/net/netfilter/xt_connmark.c
++++ b/net/netfilter/xt_connmark.c
+@@ -118,14 +118,6 @@
+ 	return connmark_tg_shift(skb, &info3);
+ }
+ 
+-static unsigned int
+-connmark_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
+-+{
+-	const struct xt_connmark_tginfo3 *info = par->targinfo;
+-
+-	return connmark_tg_shift(skb, info);
+-}
+-
+ static int connmark_tg_check(const struct xt_tgchk_param *par)
+ {
+ 	int ret;
+@@ -192,16 +184,6 @@
+ 		.targetsize     = sizeof(struct xt_connmark_tginfo2),
+ 		.destroy        = connmark_tg_destroy,
+ 		.me             = THIS_MODULE,
+-	},
+-	{
+-		.name           = "CONNMARK",
+-		.revision       = 3,
+-		.family         = NFPROTO_UNSPEC,
+-		.checkentry     = connmark_tg_check,
+-		.target         = connmark_tg_v3,
+-		.targetsize     = sizeof(struct xt_connmark_tginfo3),
+-		.destroy        = connmark_tg_destroy,
+-		.me             = THIS_MODULE,
+ 	}
+ };
+ 

+ 47 - 1
devices/rockchip_rk3588_armv8/patches/fix.patch

@@ -20,4 +20,50 @@
 +  BUILD_TARGET:=rockchip_rk3588
    UENV:=default
    HIDDEN:=1
- endef
+ endef
+
+new file mode 100644
+index 000000000..ddfa7f575
+--- /dev/null
++++ b/target/linux/rockchip_rk3588/patches-5.10/199-fix_pthread_once_error.patch
+@@ -0,0 +1,11 @@
++--- a/scripts/Makefile
+++++ b/scripts/Makefile
++@@ -22,7 +22,7 @@
++ HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
++ HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
++ HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
++-HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
+++HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS) -lpthread
++ 
++ ifdef CONFIG_UNWINDER_ORC
++ ifeq ($(ARCH),x86_64)
+
+--- a/package/kernel/linux/modules/netfilter.mk
++++ b/package/kernel/linux/modules/netfilter.mk
+@@ -39,6 +39,17 @@ endef
+ 
+ $(eval $(call KernelPackage,nf-reject6))
+ 
++define KernelPackage/nf-conncount
++  SUBMENU:=$(NF_MENU)
++  TITLE:=Netfilter conncount support
++  KCONFIG:=$(KCONFIG_NF_CONNCOUNT)
++  HIDDEN:=1
++  DEPENDS:=+kmod-nf-conntrack
++  FILES:=$(foreach mod,$(NF_CONNCOUNT-m),$(LINUX_DIR)/net/$(mod).ko)
++  AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNCOUNT-m)))
++endef
++
++$(eval $(call KernelPackage,nf-conncount))
+ 
+ define KernelPackage/nf-ipt
+   SUBMENU:=$(NF_MENU)
+@@ -236,6 +247,7 @@ $(eval $(call KernelPackage,ipt-conntrack))
+ 
+ define KernelPackage/ipt-conntrack-extra
+   TITLE:=Extra connection tracking modules
++  DEPENDS:=+kmod-nf-conncount
+   KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
+   FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
+   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_EXTRA-m)))

+ 69 - 0
devices/rockchip_rk3588_armv8/patches/orangepi-5.patch

@@ -0,0 +1,69 @@
+--- a/package/boot/uboot-rockchip/Makefile
++++ b/package/boot/uboot-rockchip/Makefile
+@@ -175,6 +175,19 @@ define U-Boot/nanopi-r6s-rk3588
+ 
+ endef
+ 
++define U-Boot/orangepi-5-rk3588
++  BUILD_SUBTARGET:=armv8
++  NAME:=ORANGEPI-5
++  BUILD_DEVICES:= \
++    xunlong_orangepi-5
++  DEPENDS:=+PACKAGE_u-boot-orangepi-5-rk3588:arm-trusted-firmware-rockchip
++  PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
++  DEVICE_DTS := rk3588-nanopi-r6c.dts
++  UBOOT_CONFIG:= nanopi-r6c-rk3588
++  ATF:=rk3588_bl31.elf
++  DDR_3588:=$(1)
++endef
++
+ define U-Boot/orangepi-5-plus-rk3588
+   BUILD_SUBTARGET:=armv8
+   NAME:=ORANGEPI-5-PLUS
+@@ -204,6 +217,7 @@ endef
+ UBOOT_TARGETS := \
+   nanopi-r6c-rk3588 \
+   nanopi-r6s-rk3588 \
++   orangepi-5-rk3588 \
+   orangepi-5-plus-rk3588 \
+   rock-5b-rk3588 \
+   bpi-r2-pro-rk3568 \
+
+--- a/target/linux/rockchip_rk3588/armv8/base-files/etc/board.d/02_network
++++ b/target/linux/rockchip_rk3588/armv8/base-files/etc/board.d/02_network
+@@ -71,6 +71,7 @@ rockchip_setup_macs()
+ 	friendlyelec,nanopi-r6c|\
+ 	friendlyelec,nanopi-r6s|\
+ 	friendlyarm,nanopi-r4s|\
++	rockchip,rk3588s-orangepi-5|\
+ 	rockchip,rk3588-orangepi-5-plus)
+ 		wan_mac=$(nanopi_r4s_get_mac wan)
+ 		lan_mac=$(nanopi_r4s_get_mac lan)
+
+--- a/target/linux/rockchip_rk3588/image/armv8.mk
++++ b/target/linux/rockchip_rk3588/image/armv8.mk
+@@ -53,6 +53,23 @@ define Device/friendlyelec_nanopi-r6s
+ endef
+ TARGET_DEVICES += friendlyelec_nanopi-r6s
+ 
++define Device/xunlong_orangepi-5
++  DEVICE_VENDOR := XunLong
++  DEVICE_MODEL := Orange Pi 5
++  SOC := rk3588s
++  UBOOT_DEVICE_NAME := orangepi-5-rk3588
++  SUPPORTED_DEVICES := rockchip,rk3588s-orangepi-5
++  IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r6c | pine64-img | gzip | append-metadata
++ DEVICE_PACKAGES := \
++	blkid block-mount blockd btrfs-progs f2fs-tools f2fsck fdisk fixparts fstools gdisk \
++	kmod-ata-ahci kmod-ata-core kmod-fs-autofs4 kmod-fs-btrfs kmod-fs-exfat kmod-fs-exportfs luci-app-ttyd \
++	kmod-fs-ext4 kmod-fs-squashfs kmod-nvme kmod-usb-net-rtl8152 kmod-usb-storage kmod-usb-storage-extras kmod-usb-storage-uas \
++	kmod-usb-xhci-hcd kmod-usb3 losetup lsblk luci luci-proto-wireguard mkf2fs mount-utils parted partx-util pciutils resize2fs \
++	kmod-r8125 usbutils wget-ssl smartmontools luci-app-statistics collectd-mod-cpufreq collectd-mod-sensors collectd-mod-thermal \
++	collectd-mod-conntrack collectd-mod-irq dnsmasq-full -dnsmasq ethtool iperf3-ssl bash irqbalance
++endef
++TARGET_DEVICES += xunlong_orangepi-5
++
+ define Device/xunlong_orangepi-5-plus
+   DEVICE_VENDOR := XunLong
+   DEVICE_MODEL := OrangePi 5 Plus
+

+ 1 - 1
devices/rockchip_rk3588_armv8/settings.ini

@@ -1,2 +1,2 @@
 REPO_URL="https://github.com/mj22226/openwrt"
-REPO_BRANCH="rk3588-bsp"
+REPO_BRANCH="nanopi-r6c/r6s"