[
  {
    "path": ".github/.gitkeep",
    "content": ""
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n---\n\n**Device Information | 设备信息**\n - SOC: [e.g. S095x3]\n - Model [e.g. HK1]\n\n**Armbian Version | 系统版本**\n - Kernel Version: [e.g. 6.18.16]\n - Release: [e.g. resolute/trixie]\n\n**Describe the bug | 问题描述**\nAll issues will only remain open for one week to prioritize resolving them.\nAfter that period, they will be closed but can still continue to be discussed in the thread.\n所有的问题都只保留一周的开启状态供重点关注解决，超时将关闭，但仍然可以长期继续跟帖讨论。\n\nPlease provide a detailed description of the issue and, if necessary, attach a screenshot.\n详细描述问题，并在必要时附上屏幕截图。\n\n\n"
  },
  {
    "path": ".github/workflows/build-armbian-arm64-docker-image.yml",
    "content": "#=====================================================================================\n# https://github.com/ophub/amlogic-s9xxx-armbian\n# Description: Build and publish Armbian arm64 Docker image\n# Instructions: https://github.com/docker/build-push-action\n# Build and Push to: https://hub.docker.com/\n#=====================================================================================\n\nname: Build Armbian arm64 Docker image\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      source_branch:\n        description: \"Select the source branch\"\n        required: false\n        default: \"trixie\"\n        type: choice\n        options:\n          - trixie\n          - bookworm\n          - resolute\n          - noble\n      docker_img:\n        description: \"Set the docker image\"\n        required: false\n        default: \"ophub/armbian\"\n        type: choice\n        options:\n          - ophub/armbian\n\nenv:\n  TZ: Etc/UTC\n  MAKE_DOCKER_SH: compile-kernel/tools/script/docker/build_armbian_docker_image.sh\n\njobs:\n  build:\n    runs-on: ubuntu-24.04-arm\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Download Armbian rootfs file [ ${{ inputs.source_branch }} ]\n        id: down\n        if: (!cancelled())\n        run: |\n          # Retrieve the latest Armbian rootfs file from releases\n          latest_version=$(curl -s \\\n              -H \"Accept: application/vnd.github+json\" \\\n              -H \"Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}\" \\\n              https://api.github.com/repos/${{ github.repository }}/releases?per_page=20 | \\\n              jq -r --arg RTK \"Armbian_${{ inputs.source_branch }}_arm64_\" \\\n              --arg BOARD \"rootfs\" \\\n              '[.[] | select(.tag_name | contains($RTK)) |\n              {tag: .tag_name} + (.assets[] | select(.name | contains($BOARD) and endswith(\".tar.gz\")) |\n              {data: .updated_at, url: .url, name: .name})] |\n              sort_by(.data) |\n              reverse |\n              .[0]')\n\n          [[ -z \"${latest_version}\" || \"${latest_version}\" == \"null\" ]] && {\n              echo \"Error: Failed to resolve Armbian rootfs download URL.\"\n              exit 1\n          }\n\n          # Extract download URL, filename, and release tag\n          latest_url=\"$(echo ${latest_version} | jq -r '.url')\"\n          armbian_filename=\"$(echo ${latest_version} | jq -r '.name')\"\n          release_tag=\"$(echo ${latest_version} | jq -r '.tag')\"\n          echo \"Matched release tag: ${release_tag}\"\n          echo \"build_tag=${release_tag}\" >> ${GITHUB_OUTPUT}\n\n          # Download asset via GitHub API (binary stream)\n          echo \"Downloading: ${armbian_filename}\"\n          [[ -d \"armbian\" ]] || mkdir -p armbian\n          curl -fsSL \\\n               -H \"Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}\" \\\n               -H \"Accept: application/octet-stream\" \\\n               \"${latest_url}\" \\\n               -o \"armbian/${armbian_filename}\"\n          [[ \"${?}\" -ne \"0\" ]] && echo \"Error: Download failed.\" && exit 1\n\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Build the Docker image\n        id: make\n        if: ${{ steps.down.outputs.status == 'success' && !cancelled() }}\n        run: |\n          chmod +x ${MAKE_DOCKER_SH}\n          ${MAKE_DOCKER_SH} ${{ inputs.source_branch }} arm64\n\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Upload rebuilt images to Release\n        uses: ncipollo/release-action@main\n        if: ${{ steps.make.outputs.status == 'success' && !cancelled() }}\n        with:\n          tag: ${{ steps.down.outputs.build_tag }}\n          artifacts: out/*.tar.gz\n          allowUpdates: true\n          removeArtifacts: false\n          replacesArtifacts: true\n          makeLatest: true\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            ### Armbian Image Information\n            - Default username: `root`\n            - Default password: `1234`\n            - Install command: `armbian-install`\n            - Update command: `armbian-update`\n            ### Applicable Platform\n            - 🐧 `arm64`\n            - 🐋 Docker image: https://hub.docker.com/u/ophub\n\n      - name: Login to Docker Hub\n        id: login\n        if: ${{ steps.make.outputs.status == 'success' && !cancelled() }}\n        uses: docker/login-action@v4\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_PASSWORD }}\n\n      - name: Load and push image to Docker Hub\n        id: push\n        if: ${{ steps.make.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Load the offline Docker image built by build_armbian_docker_image.sh\n          offline_image=\"$(ls out/*.tar.gz 2>/dev/null | head -n 1)\"\n          [[ -z \"${offline_image}\" ]] && echo \"Error: No offline image found.\" && exit 1\n          loaded_image=\"$(docker load -i \"${offline_image}\" | grep -oP 'Loaded image: \\K.*')\"\n          [[ -z \"${loaded_image}\" ]] && echo \"Error: Failed to load Docker image.\" && exit 1\n          echo \"Loaded image: ${loaded_image}\"\n\n          # Tag for Docker Hub\n          docker tag \"${loaded_image}\" \"${{ inputs.docker_img }}-${{ inputs.source_branch }}:arm64\"\n          docker tag \"${loaded_image}\" \"${{ inputs.docker_img }}-${{ inputs.source_branch }}:latest\"\n\n          # Push to Docker Hub\n          docker push \"${{ inputs.docker_img }}-${{ inputs.source_branch }}:arm64\"\n          docker push \"${{ inputs.docker_img }}-${{ inputs.source_branch }}:latest\"\n\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n"
  },
  {
    "path": ".github/workflows/build-armbian-arm64-server-image.yml",
    "content": "#==========================================================================\n# Description: Build Armbian arm64 server image\n# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian\n#==========================================================================\n\nname: Build Armbian arm64 server image\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      set_release:\n        description: \"Select OS Release.\"\n        required: false\n        default: \"trixie\"\n        type: choice\n        options:\n          - trixie\n          - bookworm\n          - resolute\n          - noble\n      armbian_board:\n        description: \"Select device board.\"\n        required: false\n        default: \"all\"\n        type: choice\n        options:\n          - all\n          - first50\n          - range50_100\n          - range100_150\n          - last20\n          - a311d-oes_s922x-oes-plus_wxy-oect\n          - nsy-g16-plus_nsy-g68-plus_bdy-g18-pro\n          - s905d_s905x3_s912_s922x-ct2000\n          - a311d\n          - a311d-oes\n          - alark35-3500\n          - anas3035\n          - aio-3399b\n          - aio-3399c\n          - aio-3399c-ai\n          - bdkj-bd-one\n          - bdy-g18-pro\n          - beikeyun\n          - boca-tcn100\n          - cd1000\n          - chainedbox\n          - cm3588-nas\n          - crrc\n          - dc-a588\n          - dg3399\n          - dg-tn3568\n          - dlfr100\n          - e20c\n          - e25\n          - eaidk-610\n          - emb3531\n          - fine3399\n          - firefly-jd4\n          - firefly-rk3399\n          - fmx1-pro\n          - fmx1-pro-b\n          - gea-6319\n          - gzpeite-p01\n          - h28k\n          - h618-devboard\n          - h66k\n          - h68k\n          - h69k\n          - h88k\n          - h88k-v3\n          - h96-max-m2\n          - hk1-rbox-k8s\n          - hs530r\n          - ht2\n          - hugsun-x99\n          - ipc-r\n          - jp-tvbox\n          - king3399\n          - kylin3399\n          - lckfb-tspi\n          - leez\n          - lx-r3s\n          - lyt-t68m\n          - lz-d3568\n          - lz-d3588\n          - lz-k3568\n          - mrkaio-m68s\n          - nanopc-t4\n          - nanopc-t6\n          - nanopi-m5\n          - nanopi-r5c\n          - nanopi-r5s\n          - nsy-g16-plus\n          - nsy-g68-plus\n          - orangepi-3b\n          - orangepi-5-plus\n          - orangepi-5b\n          - orangepi-zero3\n          - panther-x2\n          - photonicat\n          - r66s\n          - r68s\n          - renegade-rk3328\n          - rk3318-box\n          - rock-5-itx\n          - rock5b\n          - rock5c\n          - ruisen-box\n          - s905\n          - s905-beelink-mini\n          - s905-mxqpro-plus\n          - s905d\n          - s905d-ki-pro\n          - s905d-sml5442tw\n          - s905l\n          - s905l-aurora-1s\n          - s905l-b860av21u\n          - s905l-mg101\n          - s905l2\n          - s905l2-e900v21e\n          - s905l2-wojia\n          - s905l3\n          - s905l3-cm211\n          - s905l3-unt400g1\n          - s905l3-unt402a\n          - s905l3a\n          - s905l3a-cm311\n          - s905l3a-m401a\n          - s905l3b\n          - s905l3b-e900v21d\n          - s905l3b-e900v22d\n          - s905l3b-e900v22e\n          - s905l3b-ip103h\n          - s905l3b-rg020et-ca\n          - s905l3b-unt403a\n          - s905lb-ipbs9505\n          - s905lb-q96-mini\n          - s905lb-r3300l\n          - s905mb\n          - s905w\n          - s905w-w95\n          - s905w-x96-mini\n          - s905w-x96w\n          - s905x\n          - s905x-b860h\n          - s905x-nexbox-a95x\n          - s905x-t95\n          - s905x-tbee\n          - s905x-tx9\n          - s905x2\n          - s905x2-km3\n          - s905x2-x96max-2g\n          - s905x2-hg680fj\n          - s905x3\n          - s905x3-2101\n          - s905x3-a100\n          - s905x3-a95xf3\n          - s905x3-a95xf3-gb\n          - s905x3-b\n          - s905x3-h96max\n          - s905x3-hk1\n          - s905x3-ip1001m\n          - s905x3-q1\n          - s905x3-q2\n          - s905x3-tox1\n          - s905x3-tx3\n          - s905x3-tx3-bz\n          - s905x3-ugoosx3\n          - s905x3-whale\n          - s905x3-x88-pro-x3\n          - s905x3-x96air\n          - s905x3-x96air-gb\n          - s905x3-x96max\n          - s912\n          - s912-h96pro-plus\n          - s912-m8s-pro\n          - s912-nexbox-a1\n          - s912-nexbox-a2\n          - s912-onecloudpro\n          - s912-phicomm-t1\n          - s912-t95z-plus\n          - s912-tx8-max\n          - s912-tx9-pro-2g\n          - s912-tx9-pro-3g\n          - s912-x92\n          - s912-zyxq-fake\n          - s922x\n          - s922x-ct2000\n          - s922x-gtking\n          - s922x-gtkingpro-h\n          - s922x-odroid-n2\n          - s922x-oes-plus\n          - s922x-reva\n          - s922x-ugoos-am6\n          - seewo-sv21\n          - smart-am40\n          - smart-am60\n          - station-m1\n          - station-m2\n          - station-p2\n          - sv-33a6x\n          - sv-33a6x-vpu\n          - swan1-w28\n          - sw799\n          - taram\n          - tanix-tx6\n          - tb-ls3399\n          - tn3399\n          - tpm312\n          - tqc-a01\n          - tvi3315a\n          - vplus\n          - wocyber-a3\n          - wxy-oect\n          - wxy-oect-mod\n          - xiaobao\n          - yskj\n          - zcube1-max\n          - zk-r39a\n          - zysj\n      armbian_kernel:\n        description: \"Select kernel version.\"\n        required: false\n        default: \"6.12.y_6.18.y\"\n        type: choice\n        options:\n          - 5.10.y\n          - 5.15.y\n          - 6.1.y\n          - 6.6.y\n          - 6.12.y\n          - 6.18.y\n          - 5.10.y_5.15.y\n          - 6.1.y_6.6.y\n          - 6.12.y_6.18.y\n          - 6.1.y_6.12.y\n          - 6.1.y_6.18.y\n      auto_kernel:\n        description: \"Auto use the latest kernel.\"\n        required: false\n        default: true\n        type: boolean\n      kernel_repo:\n        description: \"Set the kernel repository.\"\n        required: false\n        default: \"ophub/kernel\"\n        type: choice\n        options:\n          - ophub/kernel\n      kernel_usage:\n        description: \"Set the tags of the stable kernel.\"\n        required: false\n        default: \"stable\"\n        type: choice\n        options:\n          - stable\n          - flippy\n          - beta\n      armbian_fstype:\n        description: \"Select armbian rootfs type.\"\n        required: false\n        default: \"ext4\"\n        type: choice\n        options:\n          - ext4\n          - btrfs\n      armbian_edition:\n        description: \"Select image edition type.\"\n        required: false\n        default: \"server\"\n        type: choice\n        options:\n          - server\n          - desktop\n          - beta\n      builder_name:\n        description: \"Set Armbian builder signature.\"\n        required: false\n        default: \"ophub\"\n        type: choice\n        options:\n          - ophub\n          - angel\n\nenv:\n  TZ: Etc/UTC\n  ROOTFS_SCRIPT: compile-kernel/tools/script/docker/build_armbian_rootfs_file.sh\n\njobs:\n  build:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the build environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          docker rmi -f $(docker images -q) 2>/dev/null || true\n          [[ -n \"${AGENT_TOOLSDIRECTORY}\" ]] && sudo rm -rf \"${AGENT_TOOLSDIRECTORY}\"\n          sudo rm -rf /usr/share/dotnet /usr/local/lib/android 2>/dev/null\n          sudo swapoff -a\n          sudo rm -f /swapfile /mnt/swapfile\n          sudo -E apt-get -y update\n          sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true\n          sudo -E apt-get -y install $(curl -fsSL https://ophub.org/ubuntu2404-build-armbian-depends)\n          sudo -E systemctl daemon-reload\n          #sudo -E apt-get -y full-upgrade\n          sudo -E apt-get -y autoremove --purge\n          sudo -E apt-get clean\n          sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}\n          sudo rm -rf ~/{.cargo,.dotnet,.rustup}\n          sudo -E timedatectl set-timezone \"${TZ:-Etc/UTC}\"\n          sudo -E ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n          sudo -E timedatectl set-ntp true\n          date -u\n          timedatectl status || true\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Create virtual disk for extended storage\n        run: |\n          mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n          root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n          sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n          sudo truncate -s \"${root_size}\"G /root.img\n          sudo losetup /dev/loop6 /mnt/mnt.img\n          sudo losetup /dev/loop7 /root.img\n          sudo pvcreate /dev/loop6\n          sudo pvcreate /dev/loop7\n          sudo vgcreate github /dev/loop6 /dev/loop7\n          sudo lvcreate -n runner -l 100%FREE github\n          sudo mkfs.xfs -f -i sparse=0 -b size=4096 /dev/github/runner\n          sudo mkdir -p /builder\n          sudo mount /dev/github/runner /builder\n          sudo chown -R runner:runner /builder\n          df -Th\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Download Armbian source code\n        id: down\n        working-directory: /builder\n        if: ${{ steps.init.outputs.status == 'success' && !cancelled() }}\n        run: |\n          df -hT ${PWD}\n          git clone -q --single-branch --depth=1 --branch=main https://github.com/armbian/build.git build\n          ln -sf /builder/build ${{ github.workspace }}/build\n          ln -sf /builder/build /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/build\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Compile Armbian [ ${{ inputs.set_release }} ]\n        id: compile\n        working-directory: /builder\n        if: ${{ steps.down.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Enable QEMU emulation for ARM cross-compilation\n          docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 2>/dev/null || true\n          # Compile options reference: https://docs.armbian.com/Developer-Guide_Build-Options\n          cd build/\n              ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=odroidn2 BRANCH=current BUILD_MINIMAL=no \\\n                           BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \\\n                           COMPRESS_OUTPUTIMAGE=\"sha\" SHARE_LOG=yes\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Organize output files and reclaim disk space\n        id: clean\n        if: ${{ steps.compile.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Extract essential artifacts and remove build files\n          chmod +x ${ROOTFS_SCRIPT}\n          ${ROOTFS_SCRIPT} -v ${{ inputs.set_release }} -s true -c true -k true -p arm64\n\n          # Remove build files while preserving output\n          cd build/\n          rm -rf $(ls . | grep -v \"^output$\" | xargs) 2>/dev/null\n\n          # Display disk usage after cleanup\n          df -hT ${PWD}\n          echo \"build_tag=Armbian_${{ inputs.set_release }}_arm64_${{ inputs.armbian_edition }}_$(date +\"%Y.%m\")\" >> ${GITHUB_ENV}\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Upload Armbian image to Release\n        uses: ncipollo/release-action@main\n        if: ${{ steps.clean.outputs.status == 'success' && !cancelled() }}\n        with:\n          tag: ${{ env.build_tag }}\n          artifacts: build/output/images/*\n          allowUpdates: true\n          makeLatest: true\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Rebuild Armbian for target boards\n        uses: ophub/amlogic-s9xxx-armbian@main\n        if: ${{ steps.clean.outputs.status == 'success' && !cancelled() }}\n        with:\n          build_target: armbian\n          armbian_path: build/output/images/*.img.gz\n          armbian_board: ${{ inputs.armbian_board }}\n          armbian_kernel: ${{ inputs.armbian_kernel }}\n          auto_kernel: ${{ inputs.auto_kernel }}\n          kernel_repo: ${{ inputs.kernel_repo }}\n          kernel_usage: ${{ inputs.kernel_usage }}\n          armbian_fstype: ${{ inputs.armbian_fstype }}\n          builder_name: ${{ inputs.builder_name }}\n\n      - name: Upload rebuilt images to Release\n        uses: ncipollo/release-action@main\n        if: ${{ env.PACKAGED_STATUS == 'success' && !cancelled() }}\n        with:\n          tag: ${{ env.build_tag }}\n          artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n          allowUpdates: true\n          removeArtifacts: false\n          replacesArtifacts: true\n          makeLatest: true\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            ### Armbian Image Information\n            - Default username: `root`\n            - Default password: `1234`\n            - Install command: `armbian-install`\n            - Update command: `armbian-update`\n            ### Applicable Platform\n            - 🐧 `arm64`\n            - 🐋 Docker image: https://hub.docker.com/u/ophub\n"
  },
  {
    "path": ".github/workflows/build-armbian-using-official-image.yml",
    "content": "#==========================================================================\n# Description: Build Armbian from official upstream images\n# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian\n#==========================================================================\n\nname: Build Armbian from official images\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      armbian_url:\n        description: \"Set the Armbian source image URL.\"\n        required: false\n        default: \"\"\n      armbian_board:\n        description: \"Select device board.\"\n        required: false\n        default: \"all\"\n        type: choice\n        options:\n          - all\n          - first50\n          - range50_100\n          - range100_150\n          - last20\n          - a311d-oes_s922x-oes-plus_wxy-oect\n          - nsy-g16-plus_nsy-g68-plus_bdy-g18-pro\n          - s905d_s905x3_s912_s922x-ct2000\n          - a311d\n          - a311d-oes\n          - alark35-3500\n          - anas3035\n          - aio-3399b\n          - aio-3399c\n          - aio-3399c-ai\n          - bdkj-bd-one\n          - bdy-g18-pro\n          - beikeyun\n          - boca-tcn100\n          - cd1000\n          - chainedbox\n          - cm3588-nas\n          - crrc\n          - dc-a588\n          - dg3399\n          - dg-tn3568\n          - dlfr100\n          - e20c\n          - e25\n          - eaidk-610\n          - emb3531\n          - fine3399\n          - firefly-jd4\n          - firefly-rk3399\n          - fmx1-pro\n          - fmx1-pro-b\n          - gea-6319\n          - gzpeite-p01\n          - h28k\n          - h618-devboard\n          - h66k\n          - h68k\n          - h69k\n          - h88k\n          - h88k-v3\n          - h96-max-m2\n          - hk1-rbox-k8s\n          - hs530r\n          - ht2\n          - hugsun-x99\n          - ipc-r\n          - jp-tvbox\n          - king3399\n          - kylin3399\n          - lckfb-tspi\n          - leez\n          - lx-r3s\n          - lyt-t68m\n          - lz-d3568\n          - lz-d3588\n          - lz-k3568\n          - mrkaio-m68s\n          - nanopc-t4\n          - nanopc-t6\n          - nanopi-m5\n          - nanopi-r5c\n          - nanopi-r5s\n          - nsy-g16-plus\n          - nsy-g68-plus\n          - orangepi-3b\n          - orangepi-5-plus\n          - orangepi-5b\n          - orangepi-zero3\n          - panther-x2\n          - photonicat\n          - r66s\n          - r68s\n          - renegade-rk3328\n          - rk3318-box\n          - rock-5-itx\n          - rock5b\n          - rock5c\n          - ruisen-box\n          - s905\n          - s905-beelink-mini\n          - s905-mxqpro-plus\n          - s905d\n          - s905d-ki-pro\n          - s905d-sml5442tw\n          - s905l\n          - s905l-aurora-1s\n          - s905l-b860av21u\n          - s905l-mg101\n          - s905l2\n          - s905l2-e900v21e\n          - s905l2-wojia\n          - s905l3\n          - s905l3-cm211\n          - s905l3-unt400g1\n          - s905l3-unt402a\n          - s905l3a\n          - s905l3a-cm311\n          - s905l3a-m401a\n          - s905l3b\n          - s905l3b-e900v21d\n          - s905l3b-e900v22d\n          - s905l3b-e900v22e\n          - s905l3b-ip103h\n          - s905l3b-rg020et-ca\n          - s905l3b-unt403a\n          - s905lb-ipbs9505\n          - s905lb-q96-mini\n          - s905lb-r3300l\n          - s905mb\n          - s905w\n          - s905w-w95\n          - s905w-x96-mini\n          - s905w-x96w\n          - s905x\n          - s905x-b860h\n          - s905x-nexbox-a95x\n          - s905x-t95\n          - s905x-tbee\n          - s905x-tx9\n          - s905x2\n          - s905x2-km3\n          - s905x2-x96max-2g\n          - s905x2-hg680fj\n          - s905x3\n          - s905x3-2101\n          - s905x3-a100\n          - s905x3-a95xf3\n          - s905x3-a95xf3-gb\n          - s905x3-b\n          - s905x3-h96max\n          - s905x3-hk1\n          - s905x3-ip1001m\n          - s905x3-q1\n          - s905x3-q2\n          - s905x3-tox1\n          - s905x3-tx3\n          - s905x3-tx3-bz\n          - s905x3-ugoosx3\n          - s905x3-whale\n          - s905x3-x88-pro-x3\n          - s905x3-x96air\n          - s905x3-x96air-gb\n          - s905x3-x96max\n          - s912\n          - s912-h96pro-plus\n          - s912-m8s-pro\n          - s912-nexbox-a1\n          - s912-nexbox-a2\n          - s912-onecloudpro\n          - s912-phicomm-t1\n          - s912-t95z-plus\n          - s912-tx8-max\n          - s912-tx9-pro-2g\n          - s912-tx9-pro-3g\n          - s912-x92\n          - s912-zyxq-fake\n          - s922x\n          - s922x-ct2000\n          - s922x-gtking\n          - s922x-gtkingpro-h\n          - s922x-odroid-n2\n          - s922x-oes-plus\n          - s922x-reva\n          - s922x-ugoos-am6\n          - seewo-sv21\n          - smart-am40\n          - smart-am60\n          - station-m1\n          - station-m2\n          - station-p2\n          - sv-33a6x\n          - sv-33a6x-vpu\n          - swan1-w28\n          - sw799\n          - taram\n          - tanix-tx6\n          - tb-ls3399\n          - tn3399\n          - tpm312\n          - tqc-a01\n          - tvi3315a\n          - vplus\n          - wocyber-a3\n          - wxy-oect\n          - wxy-oect-mod\n          - xiaobao\n          - yskj\n          - zcube1-max\n          - zk-r39a\n          - zysj\n      armbian_kernel:\n        description: \"Select kernel version.\"\n        required: false\n        default: \"6.12.y_6.18.y\"\n        type: choice\n        options:\n          - 5.10.y\n          - 5.15.y\n          - 6.1.y\n          - 6.6.y\n          - 6.12.y\n          - 6.18.y\n          - 5.10.y_5.15.y\n          - 6.1.y_6.6.y\n          - 6.12.y_6.18.y\n          - 6.1.y_6.12.y\n          - 6.1.y_6.18.y\n      auto_kernel:\n        description: \"Auto use the latest kernel.\"\n        required: false\n        default: true\n        type: boolean\n      kernel_repo:\n        description: \"Set the kernel repository.\"\n        required: false\n        default: \"ophub/kernel\"\n        type: choice\n        options:\n          - ophub/kernel\n      kernel_usage:\n        description: \"Set the tags of the stable kernel.\"\n        required: false\n        default: \"stable\"\n        type: choice\n        options:\n          - stable\n          - flippy\n          - beta\n      armbian_fstype:\n        description: \"Set armbian rootfs type.\"\n        required: false\n        default: \"ext4\"\n        type: choice\n        options:\n          - ext4\n          - btrfs\n      armbian_edition:\n        description: \"Select image edition type.\"\n        required: false\n        default: \"server\"\n        type: choice\n        options:\n          - server\n          - desktop\n          - beta\n      builder_name:\n        description: \"Set Armbian builder signature.\"\n        required: false\n        default: \"ophub\"\n        type: choice\n        options:\n          - ophub\n          - angel\n          - yourname\n\nenv:\n  TZ: Etc/UTC\n\njobs:\n  build:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the build environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          docker rmi -f $(docker images -q) 2>/dev/null || true\n          [[ -n \"${AGENT_TOOLSDIRECTORY}\" ]] && sudo rm -rf \"${AGENT_TOOLSDIRECTORY}\"\n          sudo rm -rf /usr/share/dotnet /usr/local/lib/android 2>/dev/null\n          sudo swapoff -a\n          sudo rm -f /swapfile /mnt/swapfile\n          sudo -E apt-get -y update\n          sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true\n          sudo -E apt-get -y install $(curl -fsSL https://ophub.org/ubuntu2404-build-armbian-depends)\n          sudo -E systemctl daemon-reload\n          #sudo -E apt-get -y full-upgrade\n          sudo -E apt-get -y autoremove --purge\n          sudo -E apt-get clean\n          sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}\n          sudo rm -rf ~/{.cargo,.dotnet,.rustup}\n          sudo -E timedatectl set-timezone \"${TZ:-Etc/UTC}\"\n          sudo -E ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n          sudo -E timedatectl set-ntp true\n          date -u\n          timedatectl status || true\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Create virtual disk for extended storage\n        run: |\n          mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n          root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n          sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n          sudo truncate -s \"${root_size}\"G /root.img\n          sudo losetup /dev/loop6 /mnt/mnt.img\n          sudo losetup /dev/loop7 /root.img\n          sudo pvcreate /dev/loop6\n          sudo pvcreate /dev/loop7\n          sudo vgcreate github /dev/loop6 /dev/loop7\n          sudo lvcreate -n runner -l 100%FREE github\n          sudo mkfs.xfs -f -i sparse=0 -b size=4096 /dev/github/runner\n          sudo mkdir -p /builder\n          sudo mount /dev/github/runner /builder\n          sudo chown -R runner:runner /builder\n          df -Th\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Set Armbian download source\n        id: down\n        working-directory: /builder\n        run: |\n          # Resolve the Armbian image download URL\n          armbian_url=\"${{ inputs.armbian_url }}\"\n          if  [[ -z \"${armbian_url}\" ]]; then\n              armbian_site=\"https://armbian.tnahosting.net/dl/odroidn2/archive/\"\n              armbian_name=\"Armbian.*noble.*.img.xz\"\n              armbian_file=$(curl -s \"${armbian_site}\" | grep -oE \"${armbian_name}\" | head -n 1)\n              if [[ -n \"${armbian_file}\" ]]; then\n                  armbian_url=\"${armbian_site}${armbian_file}\"\n              else\n                  echo -e \"Error: No valid Armbian image found at: [ ${armbian_site} ]\"\n                  exit 1\n              fi\n          fi\n          echo \"ARMBIAN_URL=${armbian_url}\" >> ${GITHUB_ENV}\n\n          # Detect the OS release name from the URL\n          set_release=\"\"\n          ARR_RELEASE=(\"resolute\" \"noble\" \"trixie\" \"bookworm\")\n          i=1\n          for r in ${ARR_RELEASE[*]}; do\n              if [[ \"${armbian_url}\" == *\"${r}\"* ]]; then\n                  set_release=\"_${r}\"\n                  break\n              fi\n              let i++\n          done\n\n          mkdir -p /builder/build\n          ln -sf /builder/build ${{ github.workspace }}/build\n          ln -sf /builder/build /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/build\n\n          sudo timedatectl set-timezone \"${TZ}\"\n          echo \"build_tag=Armbian${set_release}_arm64_${{ inputs.armbian_edition }}_$(date +\"%Y.%m\")\" >> ${GITHUB_ENV}\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Rebuild Armbian for target boards\n        uses: ophub/amlogic-s9xxx-armbian@main\n        if: ${{ env.ARMBIAN_URL != '' && !cancelled() }}\n        with:\n          build_target: armbian\n          armbian_path: ${{ env.ARMBIAN_URL }}\n          armbian_board: ${{ inputs.armbian_board }}\n          armbian_kernel: ${{ inputs.armbian_kernel }}\n          auto_kernel: ${{ inputs.auto_kernel }}\n          kernel_repo: ${{ inputs.kernel_repo }}\n          kernel_usage: ${{ inputs.kernel_usage }}\n          armbian_fstype: ${{ inputs.armbian_fstype }}\n          builder_name: ${{ inputs.builder_name }}\n\n      - name: Upload Armbian images to Release\n        uses: ncipollo/release-action@main\n        if: ${{ env.PACKAGED_STATUS == 'success' && !cancelled() }}\n        with:\n          tag: ${{ env.build_tag }}\n          artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n          allowUpdates: true\n          removeArtifacts: false\n          replacesArtifacts: true\n          makeLatest: true\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            ### Armbian Image Information\n            - Default username: `root`\n            - Default password: `1234`\n            - Install command: `armbian-install`\n            - Update command: `armbian-update`\n            ### Applicable Platform\n            - 🐧 `arm64`\n            - 🐋 Docker image: https://hub.docker.com/u/ophub\n"
  },
  {
    "path": ".github/workflows/build-armbian-using-releases-files.yml",
    "content": "#==========================================================================\n# Description: Build Armbian using releases files\n# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian\n#==========================================================================\n\nname: Build Armbian using releases files\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      set_release:\n        description: \"Select OS Release.\"\n        required: false\n        default: \"trixie\"\n        type: choice\n        options:\n          - trixie\n          - bookworm\n          - resolute\n          - noble\n      armbian_board:\n        description: \"Select device board.\"\n        required: false\n        default: \"all\"\n        type: choice\n        options:\n          - all\n          - first50\n          - range50_100\n          - range100_150\n          - last20\n          - a311d-oes_s922x-oes-plus_wxy-oect\n          - nsy-g16-plus_nsy-g68-plus_bdy-g18-pro\n          - s905d_s905x3_s912_s922x-ct2000\n          - a311d\n          - a311d-oes\n          - alark35-3500\n          - anas3035\n          - aio-3399b\n          - aio-3399c\n          - aio-3399c-ai\n          - bdkj-bd-one\n          - bdy-g18-pro\n          - beikeyun\n          - boca-tcn100\n          - cd1000\n          - chainedbox\n          - cm3588-nas\n          - crrc\n          - dc-a588\n          - dg3399\n          - dg-tn3568\n          - dlfr100\n          - e20c\n          - e25\n          - eaidk-610\n          - emb3531\n          - fine3399\n          - firefly-jd4\n          - firefly-rk3399\n          - fmx1-pro\n          - fmx1-pro-b\n          - gea-6319\n          - gzpeite-p01\n          - h28k\n          - h618-devboard\n          - h66k\n          - h68k\n          - h69k\n          - h88k\n          - h88k-v3\n          - h96-max-m2\n          - hk1-rbox-k8s\n          - hs530r\n          - ht2\n          - hugsun-x99\n          - ipc-r\n          - jp-tvbox\n          - king3399\n          - kylin3399\n          - lckfb-tspi\n          - leez\n          - lx-r3s\n          - lyt-t68m\n          - lz-d3568\n          - lz-d3588\n          - lz-k3568\n          - mrkaio-m68s\n          - nanopc-t4\n          - nanopc-t6\n          - nanopi-m5\n          - nanopi-r5c\n          - nanopi-r5s\n          - nsy-g16-plus\n          - nsy-g68-plus\n          - orangepi-3b\n          - orangepi-5-plus\n          - orangepi-5b\n          - orangepi-zero3\n          - panther-x2\n          - photonicat\n          - r66s\n          - r68s\n          - renegade-rk3328\n          - rk3318-box\n          - rock-5-itx\n          - rock5b\n          - rock5c\n          - ruisen-box\n          - s905\n          - s905-beelink-mini\n          - s905-mxqpro-plus\n          - s905d\n          - s905d-ki-pro\n          - s905d-sml5442tw\n          - s905l\n          - s905l-aurora-1s\n          - s905l-b860av21u\n          - s905l-mg101\n          - s905l2\n          - s905l2-e900v21e\n          - s905l2-wojia\n          - s905l3\n          - s905l3-cm211\n          - s905l3-unt400g1\n          - s905l3-unt402a\n          - s905l3a\n          - s905l3a-cm311\n          - s905l3a-m401a\n          - s905l3b\n          - s905l3b-e900v21d\n          - s905l3b-e900v22d\n          - s905l3b-e900v22e\n          - s905l3b-ip103h\n          - s905l3b-rg020et-ca\n          - s905l3b-unt403a\n          - s905lb-ipbs9505\n          - s905lb-q96-mini\n          - s905lb-r3300l\n          - s905mb\n          - s905w\n          - s905w-w95\n          - s905w-x96-mini\n          - s905w-x96w\n          - s905x\n          - s905x-b860h\n          - s905x-nexbox-a95x\n          - s905x-t95\n          - s905x-tbee\n          - s905x-tx9\n          - s905x2\n          - s905x2-km3\n          - s905x2-x96max-2g\n          - s905x2-hg680fj\n          - s905x3\n          - s905x3-2101\n          - s905x3-a100\n          - s905x3-a95xf3\n          - s905x3-a95xf3-gb\n          - s905x3-b\n          - s905x3-h96max\n          - s905x3-hk1\n          - s905x3-ip1001m\n          - s905x3-q1\n          - s905x3-q2\n          - s905x3-tox1\n          - s905x3-tx3\n          - s905x3-tx3-bz\n          - s905x3-ugoosx3\n          - s905x3-whale\n          - s905x3-x88-pro-x3\n          - s905x3-x96air\n          - s905x3-x96air-gb\n          - s905x3-x96max\n          - s912\n          - s912-h96pro-plus\n          - s912-m8s-pro\n          - s912-nexbox-a1\n          - s912-nexbox-a2\n          - s912-onecloudpro\n          - s912-phicomm-t1\n          - s912-t95z-plus\n          - s912-tx8-max\n          - s912-tx9-pro-2g\n          - s912-tx9-pro-3g\n          - s912-x92\n          - s912-zyxq-fake\n          - s922x\n          - s922x-ct2000\n          - s922x-gtking\n          - s922x-gtkingpro-h\n          - s922x-odroid-n2\n          - s922x-oes-plus\n          - s922x-reva\n          - s922x-ugoos-am6\n          - seewo-sv21\n          - smart-am40\n          - smart-am60\n          - station-m1\n          - station-m2\n          - station-p2\n          - sv-33a6x\n          - sv-33a6x-vpu\n          - swan1-w28\n          - sw799\n          - taram\n          - tanix-tx6\n          - tb-ls3399\n          - tn3399\n          - tpm312\n          - tqc-a01\n          - tvi3315a\n          - vplus\n          - wocyber-a3\n          - wxy-oect\n          - wxy-oect-mod\n          - xiaobao\n          - yskj\n          - zcube1-max\n          - zk-r39a\n          - zysj\n      armbian_kernel:\n        description: \"Select kernel version.\"\n        required: false\n        default: \"6.12.y_6.18.y\"\n        type: choice\n        options:\n          - 5.10.y\n          - 5.15.y\n          - 6.1.y\n          - 6.6.y\n          - 6.12.y\n          - 6.18.y\n          - 5.10.y_5.15.y\n          - 6.1.y_6.6.y\n          - 6.12.y_6.18.y\n          - 6.1.y_6.12.y\n          - 6.1.y_6.18.y\n      auto_kernel:\n        description: \"Auto use the latest kernel.\"\n        required: false\n        default: true\n        type: boolean\n      kernel_repo:\n        description: \"Set the kernel repository.\"\n        required: false\n        default: \"ophub/kernel\"\n        type: choice\n        options:\n          - ophub/kernel\n      kernel_usage:\n        description: \"Set the tags of the stable kernel.\"\n        required: false\n        default: \"stable\"\n        type: choice\n        options:\n          - stable\n          - flippy\n          - beta\n      armbian_fstype:\n        description: \"Select armbian rootfs type.\"\n        required: false\n        default: \"ext4\"\n        type: choice\n        options:\n          - ext4\n          - btrfs\n      armbian_edition:\n        description: \"Select image edition type.\"\n        required: false\n        default: \"server\"\n        type: choice\n        options:\n          - server\n          - desktop\n          - beta\n      builder_name:\n        description: \"Set Armbian builder signature.\"\n        required: false\n        default: \"ophub\"\n        type: choice\n        options:\n          - ophub\n          - angel\n\nenv:\n  TZ: Etc/UTC\n\njobs:\n  build:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the build environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          docker rmi -f $(docker images -q) 2>/dev/null || true\n          [[ -n \"${AGENT_TOOLSDIRECTORY}\" ]] && sudo rm -rf \"${AGENT_TOOLSDIRECTORY}\"\n          sudo rm -rf /usr/share/dotnet /usr/local/lib/android 2>/dev/null\n          sudo swapoff -a\n          sudo rm -f /swapfile /mnt/swapfile\n          sudo -E apt-get -y update\n          sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true\n          sudo -E apt-get -y install $(curl -fsSL https://ophub.org/ubuntu2404-build-armbian-depends)\n          sudo -E systemctl daemon-reload\n          #sudo -E apt-get -y full-upgrade\n          sudo -E apt-get -y autoremove --purge\n          sudo -E apt-get clean\n          sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}\n          sudo rm -rf ~/{.cargo,.dotnet,.rustup}\n          sudo -E timedatectl set-timezone \"${TZ:-Etc/UTC}\"\n          sudo -E ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n          sudo -E timedatectl set-ntp true\n          date -u\n          timedatectl status || true\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Create virtual disk for extended storage\n        run: |\n          mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n          root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n          sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n          sudo truncate -s \"${root_size}\"G /root.img\n          sudo losetup /dev/loop6 /mnt/mnt.img\n          sudo losetup /dev/loop7 /root.img\n          sudo pvcreate /dev/loop6\n          sudo pvcreate /dev/loop7\n          sudo vgcreate github /dev/loop6 /dev/loop7\n          sudo lvcreate -n runner -l 100%FREE github\n          sudo mkfs.xfs -f -i sparse=0 -b size=4096 /dev/github/runner\n          sudo mkdir -p /builder\n          sudo mount /dev/github/runner /builder\n          sudo chown -R runner:runner /builder\n          df -Th\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Download Armbian from Releases\n        id: down\n        working-directory: /builder\n        if: ${{ steps.init.outputs.status == 'success' && !cancelled() }}\n        run: |\n          armbian_buildpath=\"build/output/images\"\n          [[ -d \"${armbian_buildpath}\" ]] || mkdir -p \"${armbian_buildpath}\"\n          ln -sf /builder/build ${{ github.workspace }}/build\n          ln -sf /builder/build /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/build\n\n          # Query the latest release asset via GitHub API\n          latest_version=$(curl -s \\\n              -H \"Accept: application/vnd.github+json\" \\\n              -H \"Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}\" \\\n              https://api.github.com/repos/${{ github.repository }}/releases?per_page=20 | \\\n              jq -r --arg RTK \"Armbian_${{ inputs.set_release }}_arm64_\" \\\n              --arg BOARD \"-trunk_\" \\\n              '[.[] | select(.tag_name | contains($RTK))] |\n              map(.assets[] | select(.name | contains($BOARD) and endswith(\".img.gz\"))) |\n              sort_by(.updated_at) |\n              reverse |\n              .[0] |\n              {data: .updated_at, url: .url, name: .name}')\n\n          [[ -z \"${latest_version}\" || \"${latest_version}\" == \"null\" ]] && {\n              echo \"Error: Failed to resolve Armbian image download URL.\"\n              exit 1\n          }\n\n          # Extract download URL and filename\n          latest_url=\"$(echo ${latest_version} | jq -r '.url')\"\n          armbian_filename=\"$(echo ${latest_version} | jq -r '.name')\"\n\n          # Download asset via GitHub API (binary stream)\n          echo \"Downloading: ${armbian_filename}\"\n          curl -fsSL \\\n               -H \"Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}\" \\\n               -H \"Accept: application/octet-stream\" \\\n               \"${latest_url}\" \\\n               -o \"${armbian_buildpath}/${armbian_filename}\"\n          [[ \"${?}\" -ne \"0\" ]] && echo \"Error: Download failed.\" && exit 1\n\n          # Decompress the image\n          cd \"${armbian_buildpath}\" && gzip -df *.img.gz && sync\n\n          echo \"build_tag=Armbian_${{ inputs.set_release }}_arm64_${{ inputs.armbian_edition }}_$(date +\"%Y.%m\")\" >> ${GITHUB_ENV}\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Rebuild Armbian [ ${{ inputs.set_release }} ]\n        uses: ophub/amlogic-s9xxx-armbian@main\n        if: ${{ steps.down.outputs.status == 'success' && !cancelled() }}\n        with:\n          build_target: armbian\n          armbian_path: build/output/images/*.img\n          armbian_board: ${{ inputs.armbian_board }}\n          armbian_kernel: ${{ inputs.armbian_kernel }}\n          auto_kernel: ${{ inputs.auto_kernel }}\n          kernel_repo: ${{ inputs.kernel_repo }}\n          kernel_usage: ${{ inputs.kernel_usage }}\n          armbian_fstype: ${{ inputs.armbian_fstype }}\n          builder_name: ${{ inputs.builder_name }}\n\n      - name: Upload Armbian images to Release\n        uses: ncipollo/release-action@main\n        if: ${{ env.PACKAGED_STATUS == 'success' && !cancelled() }}\n        with:\n          tag: ${{ env.build_tag }}\n          artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n          allowUpdates: true\n          removeArtifacts: false\n          replacesArtifacts: true\n          makeLatest: true\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            ### Armbian Image Information\n            - Default username: `root`\n            - Default password: `1234`\n            - Install command: `armbian-install`\n            - Update command: `armbian-update`\n            ### Applicable Platform\n            - 🐧 `arm64`\n            - 🐋 Docker image: https://hub.docker.com/u/ophub\n"
  },
  {
    "path": ".github/workflows/build-armbian-x86-server-image.yml",
    "content": "#==========================================================================\n# Description: Build Armbian x86 server image\n# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian\n#==========================================================================\n\nname: Build Armbian x86 server image\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      set_release:\n        description: \"Select OS Release.\"\n        required: false\n        default: \"noble\"\n        type: choice\n        options:\n          - trixie\n          - bookworm\n          - resolute\n          - noble\n      publish_docker:\n        description: \"Publish Docker image\"\n        required: false\n        default: \"ophub/armbian\"\n        type: choice\n        options:\n          - ophub/armbian\n          - none\n\nenv:\n  TZ: Etc/UTC\n  ROOTFS_SCRIPT: compile-kernel/tools/script/docker/build_armbian_rootfs_file.sh\n  MAKE_DOCKER_SH: compile-kernel/tools/script/docker/build_armbian_docker_image.sh\n\njobs:\n  build:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the build environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          docker rmi -f $(docker images -q) 2>/dev/null || true\n          [[ -n \"${AGENT_TOOLSDIRECTORY}\" ]] && sudo rm -rf \"${AGENT_TOOLSDIRECTORY}\"\n          sudo rm -rf /usr/share/dotnet /usr/local/lib/android 2>/dev/null\n          sudo swapoff -a\n          sudo rm -f /swapfile /mnt/swapfile\n          sudo -E apt-get -y update\n          sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true\n          sudo -E apt-get -y install $(curl -fsSL https://ophub.org/ubuntu2404-build-armbian-depends)\n          sudo -E systemctl daemon-reload\n          #sudo -E apt-get -y full-upgrade\n          sudo -E apt-get -y autoremove --purge\n          sudo -E apt-get clean\n          sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}\n          sudo rm -rf ~/{.cargo,.dotnet,.rustup}\n          sudo -E timedatectl set-timezone \"${TZ:-Etc/UTC}\"\n          sudo -E ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n          sudo -E timedatectl set-ntp true\n          date -u\n          timedatectl status || true\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Create virtual disk for extended storage\n        run: |\n          mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n          root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n          sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n          sudo truncate -s \"${root_size}\"G /root.img\n          sudo losetup /dev/loop6 /mnt/mnt.img\n          sudo losetup /dev/loop7 /root.img\n          sudo pvcreate /dev/loop6\n          sudo pvcreate /dev/loop7\n          sudo vgcreate github /dev/loop6 /dev/loop7\n          sudo lvcreate -n runner -l 100%FREE github\n          sudo mkfs.xfs -f -i sparse=0 -b size=4096 /dev/github/runner\n          sudo mkdir -p /builder\n          sudo mount /dev/github/runner /builder\n          sudo chown -R runner:runner /builder\n          df -Th\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Download source code\n        id: down\n        working-directory: /builder\n        if: ${{ steps.init.outputs.status == 'success' && !cancelled() }}\n        run: |\n          df -hT ${PWD}\n          git clone -q --single-branch --depth=1 --branch=main https://github.com/armbian/build.git build\n          ln -sf /builder/build ${{ github.workspace }}/build\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Compile Armbian [ ${{ inputs.set_release }} ]\n        id: compile\n        working-directory: /builder\n        if: ${{ steps.down.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Enable QEMU emulation for ARM cross-compilation\n          docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 2>/dev/null || true\n          # Compile options reference: https://docs.armbian.com/Developer-Guide_Build-Options\n          cd build/\n              ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=uefi-x86 BRANCH=current BUILD_MINIMAL=no \\\n                           BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \\\n                           COMPRESS_OUTPUTIMAGE=\"sha\" SHARE_LOG=yes\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Organize output files and reclaim disk space\n        id: clean\n        if: ${{ steps.compile.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Extract essential artifacts and remove build files\n          chmod +x ${ROOTFS_SCRIPT}\n          ${ROOTFS_SCRIPT} -v ${{ inputs.set_release }} -s true -c true -k false -p amd64\n          # Remove build files while preserving output\n          [[ -d \"armbian\" ]] || mkdir armbian\n          cp -af build/output/images/* armbian/\n          rm -rf build\n          # Display disk usage after cleanup\n          df -hT ${PWD}\n          echo \"build_tag=Armbian_amd64_server_$(date +\"%Y.%m\")\" >> ${GITHUB_ENV}\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Build the Docker image\n        id: makedocker\n        if: ${{ inputs.publish_docker != 'none' && !cancelled() }}\n        run: |\n          chmod +x ${MAKE_DOCKER_SH}\n          ${MAKE_DOCKER_SH} ${{ inputs.set_release }} amd64\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Upload Armbian image to Release\n        uses: ncipollo/release-action@main\n        if: ${{ steps.clean.outputs.status == 'success' && !cancelled() }}\n        with:\n          tag: ${{ env.build_tag }}\n          artifacts: \"armbian/*,out/*\"\n          allowUpdates: true\n          makeLatest: false\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            ### Armbian Image Information\n            - Default username: `root`\n            - Default password: `1234`\n            ### Applicable Platform\n            - 💻 `amd64(uefi-x86)`\n            - 🐋 Docker image: https://hub.docker.com/u/ophub\n\n      - name: Login to Docker Hub\n        id: login\n        if: ${{ steps.makedocker.outputs.status == 'success' && !cancelled() }}\n        uses: docker/login-action@v4\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_PASSWORD }}\n\n      - name: Load and push image to Docker Hub\n        id: push\n        if: ${{ steps.makedocker.outputs.status == 'success' && !cancelled() }}\n        run: |\n          # Load the offline Docker image built by build_armbian_docker_image.sh\n          offline_image=\"$(ls out/*.tar.gz 2>/dev/null | head -n 1)\"\n          [[ -z \"${offline_image}\" ]] && echo \"Error: No offline image found.\" && exit 1\n          loaded_image=\"$(docker load -i \"${offline_image}\" | grep -oP 'Loaded image: \\K.*')\"\n          [[ -z \"${loaded_image}\" ]] && echo \"Error: Failed to load Docker image.\" && exit 1\n          echo \"Loaded image: ${loaded_image}\"\n\n          # Tag for Docker Hub\n          docker tag \"${loaded_image}\" \"${{ inputs.publish_docker }}-${{ inputs.set_release }}:amd64\"\n\n          # Push to Docker Hub\n          docker push \"${{ inputs.publish_docker }}-${{ inputs.set_release }}:amd64\"\n\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n"
  },
  {
    "path": ".github/workflows/compile-kernel.yml",
    "content": "#==========================================================================\n# Description: Compile the kernel\n# Copyright (C) 2021 https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian\n#==========================================================================\n\nname: Compile the kernel\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      kernel_source:\n        description: \"Select the kernel source\"\n        required: false\n        default: \"unifreq\"\n        type: choice\n        options:\n          - unifreq\n          - ophub\n      kernel_version:\n        description: \"Select kernel version\"\n        required: false\n        default: \"6.12.y\"\n        type: choice\n        options:\n          - 5.10.y\n          - 5.15.y\n          - 6.1.y\n          - 6.6.y\n          - 6.12.y\n          - 6.18.y\n      kernel_auto:\n        description: \"Auto use the latest kernel\"\n        required: false\n        default: true\n        type: boolean\n      delete_source:\n        description: \"Delete source after compilation\"\n        required: false\n        default: true\n        type: boolean\n      kernel_package:\n        description: \"Select compile package list\"\n        required: false\n        default: \"all\"\n        type: choice\n        options:\n          - all\n          - dtbs\n      kernel_toolchain:\n        description: \"Select the compilation toolchain\"\n        required: false\n        default: \"gcc\"\n        type: choice\n        options:\n          - clang\n          - gcc\n          - gcc-15.2\n          - gcc-14.3\n          - gcc-14.2\n      ccache_clear:\n        description: \"Set whether to clear the cache\"\n        required: false\n        default: false\n        type: boolean\n      docker_image:\n        description: \"Select Armbian docker image\"\n        required: false\n        default: \"trixie\"\n        type: choice\n        options:\n          - trixie\n          - bookworm\n          - resolute\n          - noble\n      kernel_sign:\n        description: \"Set the kernel custom signature\"\n        required: false\n        default: \"-ophub\"\n        type: choice\n        options:\n          - -ophub\n          - -yourname\n\nenv:\n  TZ: Etc/UTC\n\njobs:\n  build:\n    runs-on: ubuntu-24.04-arm\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the build environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          docker rmi -f $(docker images -q) 2>/dev/null || true\n          [[ -n \"${AGENT_TOOLSDIRECTORY}\" ]] && sudo rm -rf \"${AGENT_TOOLSDIRECTORY}\"\n          sudo rm -rf /usr/share/dotnet /usr/local/lib/android 2>/dev/null\n          sudo swapoff -a\n          sudo rm -f /swapfile /mnt/swapfile\n          sudo -E apt-get -y update\n          sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true\n          sudo -E apt-get -y install $(curl -fsSL https://ophub.org/ubuntu2404-build-armbian-depends)\n          sudo -E systemctl daemon-reload\n          #sudo -E apt-get -y full-upgrade\n          sudo -E apt-get -y autoremove --purge\n          sudo -E apt-get clean\n          sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}\n          sudo rm -rf ~/{.cargo,.dotnet,.rustup}\n          sudo -E timedatectl set-timezone \"${TZ:-Etc/UTC}\"\n          sudo -E ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n          sudo -E timedatectl set-ntp true\n          date -u\n          timedatectl status || true\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Create virtual disk for extended storage\n        id: disk\n        run: |\n          mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n          root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n          sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n          sudo truncate -s \"${root_size}\"G /root.img\n          sudo losetup /dev/loop6 /mnt/mnt.img\n          sudo losetup /dev/loop7 /root.img\n          sudo pvcreate /dev/loop6\n          sudo pvcreate /dev/loop7\n          sudo vgcreate github /dev/loop6 /dev/loop7\n          sudo lvcreate -n runner -l 100%FREE github\n          sudo mkfs.xfs -f -i sparse=0 -b size=4096 /dev/github/runner\n          sudo mkdir -p /builder\n          sudo mount /dev/github/runner /builder\n          sudo chown -R runner:runner /builder\n          df -Th\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Get kernel source commit hash\n        id: kernelhash\n        run: |\n          # Get the latest source hash from the kernel repository\n          api_url=\"https://api.github.com/repos/${{ inputs.kernel_source }}/linux-${{ inputs.kernel_version }}/git/ref/heads/main\"\n          source_hash=$(curl -fsSL -m 20 \\\n              -H \"Accept: application/vnd.github+json\" \\\n              -H \"Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}\" \\\n              ${api_url} |\n              jq -r '.object.sha'\n          )\n          [[ -z \"${source_hash}\" || \"${source_hash}\" == \"null\" ]] && source_hash=\"${{ github.sha }}\"\n          echo \"source_hash=${source_hash}\" >> ${GITHUB_ENV}\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Cache ccache\n        uses: actions/cache@v5\n        with:\n          path: /builder/ccache\n          key: kernel-${{ inputs.kernel_toolchain }}-${{ inputs.kernel_version }}-${{ env.source_hash }}\n          restore-keys: |\n            kernel-${{ inputs.kernel_toolchain }}-${{ inputs.kernel_version }}-\n\n      - name: Compile the kernel [ ${{ inputs.kernel_version }} ]\n        uses: ophub/amlogic-s9xxx-armbian@main\n        if: ${{ steps.disk.outputs.status == 'success' && !cancelled() }}\n        with:\n          build_target: kernel\n          kernel_source: ${{ inputs.kernel_source }}\n          kernel_version: ${{ inputs.kernel_version }}\n          kernel_auto: ${{ inputs.kernel_auto }}\n          delete_source: ${{ inputs.delete_source }}\n          kernel_package: ${{ inputs.kernel_package }}\n          kernel_sign: ${{ inputs.kernel_sign }}\n          kernel_toolchain: ${{ inputs.kernel_toolchain }}\n          ccache_clear: ${{ inputs.ccache_clear }}\n          docker_hostpath: /builder\n          docker_image: ophub/armbian-${{ inputs.docker_image }}:arm64\n\n      - name: Upload Kernel to Release\n        uses: ncipollo/release-action@main\n        if: ${{ env.PACKAGED_STATUS == 'success' && !cancelled() }}\n        with:\n          tag: kernel_stable\n          artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n          allowUpdates: true\n          removeArtifacts: false\n          replacesArtifacts: true\n          makeLatest: false\n          token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            - These are Mainline LTS(Long Term Support) kernels that provide `stable` support for Armbian.\n            - It works with most `Amlogic`, `Rockchip`, and `Allwinner` devices. For specific details, please refer to the instructions on the homepage of repository.\n            - Dedicated BSP kernels for other Rockchip and Allwinner devices can be downloaded from the [ophub/kernel](https://github.com/ophub/kernel) repository.\n            - 这些是主线 LTS（长期支持）内核，为 Armbian 提供`稳定`的支持。\n            - 适用于 `amlogic`，`rockchip`，`allwinner` 的大部分设备，具体可以参考仓库首页的说明。\n            - 其他的 Rockchip 和 Allwinner 设备专用 BSP 内核可以在 [ophub/kernel](https://github.com/ophub/kernel) 仓库里下载使用。\n"
  },
  {
    "path": ".github/workflows/delete-older-releases-workflows.yml",
    "content": "#==========================================================================\n# https://github.com/ophub/amlogic-s9xxx-armbian\n# Description: Delete older releases and workflows runs\n#==========================================================================\n\nname: Delete older releases and workflows\n\non:\n  repository_dispatch:\n  workflow_dispatch:\n    inputs:\n      delete_releases:\n        description: \"Delete Releases file?\"\n        required: true\n        default: true\n        type: boolean\n      delete_tags:\n        description: \"Delete related Tags?\"\n        required: false\n        default: true\n        type: boolean\n      prerelease_option:\n        description: \"Whether to differentiate pre-release.\"\n        required: false\n        default: \"all\"\n        type: choice\n        options:\n          - all\n          - true\n          - false\n      releases_keep_latest:\n        description: \"How many latest releases to keep.\"\n        required: false\n        default: \"2\"\n        type: choice\n        options:\n          - 30\n          - 20\n          - 10\n          - 9\n          - 8\n          - 7\n          - 6\n          - 5\n          - 4\n          - 3\n          - 2\n          - 1\n          - 0\n      releases_keep_keyword:\n        description: \"Keyword of the keep releases.\"\n        required: false\n        default: \"v0/server_/kernel_\"\n      delete_workflows:\n        description: \"Delete workflows records?\"\n        required: true\n        default: true\n        type: boolean\n      workflows_keep_day:\n        description: \"Days to keep workflows.\"\n        required: false\n        default: \"1\"\n        type: choice\n        options:\n          - 30\n          - 20\n          - 10\n          - 9\n          - 8\n          - 7\n          - 6\n          - 5\n          - 4\n          - 3\n          - 2\n          - 1\n          - 0\n      workflows_keep_keyword:\n        description: \"keywords for keep workflows.\"\n        required: false\n        default: \"\"\n      out_log:\n        description: \"Output detailed JSON logs.\"\n        required: false\n        default: true\n        type: boolean\n\nenv:\n  TZ: Etc/UTC\n\njobs:\n  build:\n    runs-on: ubuntu-24.04-arm\n    if: ${{ github.event.repository.owner.id == github.event.sender.id }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Initialize the environment\n        id: init\n        env:\n          DEBIAN_FRONTEND: noninteractive\n        run: |\n          sudo timedatectl set-timezone \"${TZ}\"\n          echo \"status=success\" >> ${GITHUB_OUTPUT}\n\n      - name: Delete releases and workflows runs\n        uses: ophub/delete-releases-workflows@main\n        with:\n          delete_releases: ${{ inputs.delete_releases }}\n          delete_tags: ${{ inputs.delete_tags }}\n          prerelease_option: ${{ inputs.prerelease_option }}\n          releases_keep_latest: ${{ inputs.releases_keep_latest }}\n          releases_keep_keyword: ${{ inputs.releases_keep_keyword }}\n          delete_workflows: ${{ inputs.delete_workflows }}\n          workflows_keep_day: ${{ inputs.workflows_keep_day }}\n          workflows_keep_keyword: ${{ inputs.workflows_keep_keyword }}\n          out_log: ${{ inputs.out_log }}\n          gh_token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "!.gitignore\n/build\n/tmp_dir\n/build-armbian/kernel\n/build-armbian/u-boot\n/compile-kernel/kernel\n/compile-kernel/output\n/compile-kernel/tools/armbian\n.DS_Store\nnpm-debug.log*\n*.rej\n*.orig\n*~\n\\#*#\n"
  },
  {
    "path": "CONTRIBUTORS.md",
    "content": "# Armbian Contributors\n\nFirst of all, thanks to [150balbes](https://github.com/150balbes) for the outstanding contributions and the solid foundation laid for running Armbian on Amlogic TV boxes. The [Armbian](https://github.com/armbian/build) system compiled here directly uses the latest official source code for real-time compilation. The program's design draws on tutorials from authors such as [ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box). Thank you all for your dedication and sharing, enabling us to run the Armbian system on more devices.\n\nThe [u-boot](https://github.com/ophub/u-boot), [kernel](https://github.com/ophub/kernel), and other resources used in this system are primarily derived from the [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) project. Some files were contributed by users through [Pull Requests](https://github.com/ophub/amlogic-s9xxx-armbian/pulls) and [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) in projects such as [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic), [u-boot](https://github.com/ophub/u-boot), and [kernel](https://github.com/ophub/kernel). To acknowledge these pioneers and contributors, their contributions have been recorded in this document since the repository's creation on `2021-09-19`. Thanks again to everyone for breathing new life and purpose into these devices.\n\n| Innovation and Contributors | Record of Achievements |\n| ---- | ---- |\n| [150balbes](https://github.com/150balbes) | Made outstanding contributions and laid a solid foundation for running Armbian on Amlogic TV boxes. |\n| [unifreq](https://github.com/unifreq) | Developed numerous Armbian and OpenWrt systems, provided boot and firmware build solutions for SoCs ranging from s905d to s922x and beyond, and shared extensive resources and tutorials. The [u-boot](https://github.com/ophub/u-boot), [kernel](https://github.com/ophub/kernel), and other resources used on this site are fully based on his work. He opened the door to the world of Armbian and OpenWrt on TV boxes. |\n| [NewbieOrange](https://github.com/NewbieOrange) | 01. [2021-11-14] He provided the `meson-gxm-t95z-plus.dtb` file and [usage method](build-armbian/armbian-files/platform-files/amlogic/bootfs/extlinux/) of the new device `T95Z-Plus` in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/22#issuecomment-968260448); Shared the `meson-gxl-s905l2-p281.dtb` file of s905l2 (p281 board) in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/29). Now called `meson-gxl-s905l2-x7-5g.dtb` |\n| [pulpoff](https://github.com/pulpoff) | 02. [2021-11-24] He shared how to adjust [dtb freq](https://github.com/armbian/build/commit/d0831a7ce191759011d8a0f23019acebc2348149) and add new [display resolution](https://github.com/tobetter/linux/commit/248da29964751908c36e2c5558385ec09aed87ad) in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/31#issuecomment-974982500), and provided test firmware [download](https://vp5.net/king/); In [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/36), the test method for `supporting sound` is shared; In [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/34), the test method for `enabling Bluetooth` is shared. |\n| [flymike](https://github.com/flymike) | 03. [2021-12-28] He shared the available `meson-gxbb-vega-s95-telos.dtb` and `u-boot-s905.bin` of the `Beelink-Mini-MX 2G` `s905` box in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/57) |\n| [martinlanger90](https://github.com/martinlanger90) | 04. [2022-01-01] He tested and shared the `MECOOL-KI-Pro 2G/16G` `s905d` box using armbian system in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59). The available dtb is `meson-gxl-s905d-mecool-ki-pro.dtb`, u-boot is `u-boot-p201.bin`, and it can be used in `5.4`, `5.10`, and `5.15` kernels. |\n| [ErikPelli](https://github.com/ErikPelli) | 05. [2022-01-14] He reported in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1013071513) that [Tanix-TX92](http://www.tanix-box.com/project-view/tanix-tx92-android-tv-box-powered-amlogic-s912/) and [VORKE-Z6-Plus](http://www.vorke.com/project/vorke-z6-2/) boxes can use the same configuration as [H96-Pro-Plus](https://www.gearbest.com/tv-box-mini-pc/pp_503486.html), and support writing to `eMMC` for use. Supports the use of `mouse` and `keyboard` under the `5.10 kernel`.  |\n| [JFLim1](https://github.com/JFLim1) | 06. [2022-01-15] He shared the available `dtb` and `u-boot` of the `Beelink-GT-King-Pro (Revision A, Serial #SA9HH...)` `s922x` box in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1012127495). After his tests, it was finally determined that the combination of `meson-g12b-gtking-pro.dtb` and `u-boot-gtkingpro-rev-a.bin` could be used. Mouse, keyboard, bluetooth, wireless are normal. |\n| [flymike](https://github.com/flymike) | 07. [2022-01-16] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/79), in the `MECOOL-KM3-4G` `s905x2` box, the combination of `meson-g12a-sei510.dtb` and `u-boot-x96max.bin` can be used normally, supporting the `5.10 kernel`. Network, bluetooth, wireless are normal. |\n| [JFLim1](https://github.com/JFLim1) | 08. [2022-01-18] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/81), He provided a solution to the `black screen` of the `gtking-pro-rev-a` box by disabling the `/etc/udev/rules.d/hdmi.rules` file. |\n| [DiogoSilva48](https://github.com/DiogoSilva48) | 09. [2022-02-02] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/98), The `tbee-box` can use the default firmware of the `s905x`. He provided two ways to enable `wifi`. |\n| [darkliang](https://github.com/darkliang) | 10. [2022-02-18] He submitted support for `Khadas-VIM3` box with SoC `A311D` in [Pull](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/210), provided mainline U-BOOT file(`khadas-vim3-u-boot.sd.bin`) and configuration information. After his feedback, this box supports writing to `eMMC` and supports `5.4.y` and `5.10.y` kernels. |\n| [atsdai](https://github.com/atsdai) | 11. [2022-03-01] He feedback the `Beelink-Mini-MX-2G` RTL8211F Ethernet TX fix in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127). Now [unifreq](https://github.com/unifreq) has added this scheme to the default kernel ([5.4](https://github.com/unifreq/linux-5.4.y/commit/456817db17ec67621d347963e2100a331b5a089d) / [5.10](https://github.com/unifreq/linux-5.10.y/commit/86fb0e941db620ff8851ec95100d414dc95f13ad) / [5.15](https://github.com/unifreq/linux-5.15.y/commit/c4d36d65651570e0ef2d00541e3b9058f2182e93) / [5.16](https://github.com/unifreq/linux-5.16.y/commit/2cc6ab2ced2221235e39ef33e83b62b55bc3b28b) have been added), the name is: `meson-gxbb-beelink-mini-mx.dtb` |\n| [Calmact](https://github.com/Calmact/e900v22c) | 12. [2022-03-02] He shared the solution of using Armbian system in `Skyworth E900V22C/D` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/129). After testing, the kernel 5.15 support `booting from USB` for use, support `100Mb wired network`, no wireless and Bluetooth. He plans to provide more support for this device, you can check the latest progress in his repository. |\n| [danboid](https://github.com/danboid) | 13. [2022-03-09] He shared the `openvfd LED display driver and related resources` in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/143). After debugging and sharing by [unifreq](https://github.com/unifreq), it is now [supported](build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) to be used in six devices through the [armbian-openvfd](build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd) command. |\n| [parkjw0117](https://github.com/parkjw0117) | 14. [2022-03-12] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), in the `Mecool-M8S-PRO-L` `s912` box, the combination of `meson-gxm-q201.dtb` and `u-boot-s905x-s912.bin` can be used normally, supporting the `5.4/5.10 kernel`. The wired network is normal. Wireless and Bluetooth are not available. |\n| [lx7741](https://github.com/lx7741) | 15. [2022-03-23] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/192), in the `X96 Air` `s905x3` box, the `x96air.conf` can be used normally. Same configuration as x96max.conf |\n| [danboid](https://github.com/danboid) | 16. [2022-04-13] In [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/234) he shares the how-to to disable the IR receiver |\n| [KryptonLee](https://github.com/KryptonLee) | 17. [2022-04-22] He developed and shared `u-boot-e900v22c.bin` and `e900v22c-u-boot.bin.sd.bin`. After his test, the firmware that supports `e900v22c/d` is written to `eMMC` for use. |\n| [lanyucomputer](https://github.com/lanyucomputer) | 18. [2022-04-22] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/253), Determined the `octopus-planet (fake)` usage scheme, added the corresponding `bootloader` (`bl-fake-octopus-planet.bin`) and `armbian-install` options. |\n| [rapdodge](https://github.com/rapdodge) | 19. [2022-04-24] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/262), `HG680P(s905x)` box can be installed in eMMC, dtb uses `meson-gxl-s905x-p212.dtb` file, u-boot uses `u-boot-p212.bin` file, can use `5.4.y/5.15.y` kernels. The 100Mb wired network works fine. |\n| [psergeevich](https://github.com/psergeevich) | 20. [2022-04-27] Thanks to him for providing detailed motherboard layout, phy pin level test, iperf3 test and other very detailed test reports for x96max plus v5.1 (ip1001m phy) in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/258). The parameter scheme of `meson-sm1-x96-max-plus-ip1001m.dtb` is finally determined. Thanks to [unifreq](https://github.com/unifreq) for all the technical guidance and [kernel](https://github.com/unifreq/linux-5.15.y/commit/bca00ac86c16105b3f359bcb4e6c5d4011ae26b8) support for this NIC, which has now been added to his kernel repository. |\n| [chris4git](https://github.com/chris4git) | 21. [2022-05-07] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/285), added support for the use of `T95(s905x)` devices, and the corresponding `t95.conf` LED file. |\n| [Smim0](https://github.com/Smim0) | 22. [2022-05-18] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/315), added support for the use of `TX9-Pro(s912)(3G+32G+1Gb)` devices. Thanks to [unifreq](https://github.com/unifreq) for adding a dedicated dtb with `wifi` module for the device: `meson-gxm-tx9-pro.dtb` |\n| [kodokskoprol](https://github.com/kodokskoprol) | 23. [2022-05-29] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), `A95X(s912)` and `Nexbox A1(s912)` devices can use gigabit wired (`meson-gxm-nexbox-a1.dtb, u-boot-p212.bin`) normally, support kernels such as `5.10.y` and `5.15.y` etc. but the wireless network cannot be used (`ath10k`, `qca9377` chip, the wireless module is `Fn-Link 8223A-SR C07001 1727`) |\n| [danboid](https://github.com/danboid) | 24. [2022-06-08] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/366), `X96 Max Plus Q2(s905x3)` and `X96 Air Q1000(s905x3)` devices can use gigabit wired, Wireless and Bluetooth(qca9377) normally. According to his shared results, now `meson-sm1-x96-max-plus-q2.dtb` has been added to unifreq's 5.4.y, 5.10.y and [5.15.y](https://github.com/unifreq/linux-5.15.y/commit/5ed890ac09aaec7c0f2f2fc43a92212eaace41ac) series of kernels. |\n| [SajjadSabzkar](https://github.com/SajjadSabzkar) | 25. [2022-06-15] Thanks for adding the question template in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/374). |\n| [yujincheng08](https://github.com/yujincheng08) | 26. [2022-06-16] He added choice and boolean options to Actions in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/377) to make the operation more convenient. |\n| sibondt | 27. [2022-07-16] He shared the `meson-gxm-nexbox-a2.dts` file of the `Nexbox A95X A2(s912)`, and he tested the Gigabit wired network, wireless, and bluetooth all working fine. He also reported that `B860H(s905x)` can be installed in emmc for use, dtb uses `meson-gxl-s905x-b860h.dtb` , and u-boot uses `u-boot-p212.bin` file. |\n| [Fengke6](https://github.com/Fengke6) | 28. [2022-08-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/500), the `Tanix TX8 Max(s912)` box can be used normally, and the Gigabit wired, wireless, and Bluetooth all work normally, use `meson-gxm-tx8-max.dtb` file. |\n| [xcray](https://github.com/xcray) | 29. [2022-08-27] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), A secure partition has been added to the `CM311-1a-YST(s905l3a)` box, and the data read and write operation errors under the btrfs partition have been resolved after testing. |\n| [d5stick](https://github.com/d5stick) | 30. [2022-08-30] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/525), Added `Vontar X92(s912)` box support, Gigabit wired, wireless, bluetooth works fine. Added corresponding `meson-gxm-x92.dtb` support. |\n| [livelier](https://github.com/livelier) | 31. [2022-09-01] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/506), Added `Tencent Aurora 3Pro(s905x3-b)` box support, Gigabit wired, wireless, bluetooth works fine. Added corresponding `meson-sm1-skyworth-lb2004-a4091.dtb` support. |\n| [xcray](https://github.com/xcray) | 32. [2022-09-16] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/557), Added `Bluetooth` support for `CM311-1a-YST (s905l3a)`, `enhanced` wired network stability, and added dedicated `meson-g12a-s905l3a-cm311.dtb` file. |\n| [skysurf](https://github.com/skysurf) | 33. [2022-09-23] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/570), `W95(s905w)` box can be installed in eMMC, dtb uses `meson-gxl-s905w-p281.dtb` file. |\n| [janko888](https://github.com/janko888/MBH-M30xA) | 34. [2022-10-10] After his test feedback in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/615), add `M302A/M304A(s905l3-b)` box, can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file. |\n| [livelier](https://github.com/livelier) | 35. [2022-10-13] After his shared and test feedback in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/619) and [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/736), add `Tencent Aurora 3Pro (s905x3-b)` box, dtb uses `meson-sm1-skyworth-lb2004-a4091.dtb` file, UBOOT_OVERLOAD is `u-boot-skyworth-lb2004.bin` file, MAINLINE_UBOOT is `skyworth-lb2004-u-boot.bin.sd.bin`, can be installed in eMMC, bluetooth and wireless use normally. supports `5.10.y`, `5.15.y`, `5.19.y` kernels and adds box partition table. |\n| [TThanhXuan](https://github.com/TThanhXuan) | 36. [2022-10-16] According to his guidance, the `max-frequency` of eMMC is lowered so that the `X96 mini(s905w)` box can correctly identify the eMMC partition. After [box-automation1](https://github.com/box-automation1) test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/621), can be installed in eMMC, dtb uses `meson-gxl-s905w-x96-mini.dtb` file.  |\n| [skysurf](https://github.com/skysurf) | 37. [2022-10-26] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), `MGV2000(s905l2)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, The 100Mb wired network works fine. |\n| [thumsl](https://github.com/thumsl) | 38. [2022-10-28] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/645), `TX9(s905x)` box can be installed in eMMC, dtb uses `meson-gxl-s905x-tx9.dtb` file. He added wireless drivers and dts file for this device. The 100Mb wired network, wireless and bluetooth works fine. |\n| [7Ji](https://github.com/7Ji) | 39. [2022-11-10] He shared the [ampart](https://github.com/7Ji/ampart/) partition tool developed by himself in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/689), which supports eMMC partition table adjustment of `Amlogic series devices`, and realizes all the space after `117 MiB`. This tool has now become the default tool for Armbian systems. |\n| [puccio823](https://github.com/puccio823) | 40. [2022-11-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), `Sunvell T95M(s905)` box can be uses `meson-gxbb-p201.dtb` file. The 100Mb wired network works fine. |\n| [birdxs](https://github.com/birdxs) | 41. [2022-11-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/522), `Phicomm-T1(s912)` box can be installed in eMMC, dtb uses `meson-gxm-phicomm-t1.dtb` file. The 100Mb wired network, wireless, bluetooth works fine. |\n| [marchmin](https://github.com/marchmin) | 42. [2022-11-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), `Wojia-TV-IPBS9505(s905l2)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-ipbs9505.dtb` file. The 100Mb wired network works fine. |\n| [janko888](https://github.com/janko888) | 43. [2022-11-27] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/732) and Configuration submitted in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/735), `M401A(s905l3a)` box can be installed in eMMC, dtb uses `meson-g12a-s905l3a-m401a.dtb` file. The 100Mb wired network works fine. |\n| [CarlKuhligk](https://github.com/CarlKuhligk) | 44. [2022-11-27] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), `Q96 mini(s905lb)` box can be installed in eMMC, dtb uses `meson-gxl-s905x-p212.dtb` file. The 100Mb wired network works fine. |\n| [rainups](https://github.com/rainups) | 45. [2022-11-29] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/740), added support for the use of `TX9-Pro(s912)(2G+16G+100Mb)` devices, dtb uses `meson-gxm-q201.dtb` file, and u-boot uses `u-boot-p212.bin` file.  |\n| [yangzhuang2333](https://github.com/yangzhuang2333) | 46. [2022-12-03] According to his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/741), added support for the use of `ZTE-B863AV3.2-M(s905l3a)` devices, First flash the Android system of `M401A(s905l3a)`, and use the same configuration, select `btrfs` format to write to eMMC. dtb uses `meson-g12a-s905l3a-m401a.dtb` file, and u-boot uses `u-boot-e900v22c.bin` file.  |\n| [ours1505](https://github.com/ours1505) | 47. [2022-12-05] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/763), `CM311-1(s905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-p212.bin` file. The 100Mb wired network works fine. |\n| [dicsonpan](https://github.com/dicsonpan) | 48. [2022-12-07] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/779), `X96-Max-A100(s905x3)` box can be installed in eMMC, dtb uses `meson-sm1-sei610.dtb` file, and u-boot uses `u-boot-x96maxplus.bin` file. The 100Mb wired network, wireless and bluetooth works fine. |\n| [livelier](https://github.com/livelier) | 49. [2022-12-09] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/782), `Ugoos-X3(s905x3)` box can be installed in eMMC, It can be used on the device with `the bootloader lock`. He shared the developed `ugoos-x3-u-boot.bin.sd.bin` and `u-boot-ugoos-x3.bin` files in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/786). |\n| [mreser99](https://github.com/mreser99) | 50. [2022-12-10] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/351), `Tanix-Tx5-Max(S905x2)` box can be installed in eMMC, dtb uses `meson-g12a-x96-max.dtb` file, and u-boot uses `u-boot-x96max.bin` file, and MAINLINE_UBOOT uses `x96max-u-boot.bin.sd.bin` file. The 1Gb wired network works fine. |\n| [tv4you2016](https://github.com/tv4you2016) | 51. [2022-12-10] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/788), `X96 Max+ Q1(S905x3)` box can be installed in eMMC, dtb uses `meson-sm1-x96-max-plus-q1.dtb` file, and u-boot uses `u-boot-x96max.bin` file. The 100Mb wired network works fine. |\n| [RomanKozyrev](https://github.com/RomanKozyrev) | 52. [2022-12-24] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/851), `A95X-F2(S905x2)` box can be installed in eMMC, dtb uses `meson-g12a-x96-max-rmii.dtb` file, and u-boot uses `u-boot-x96max.bin` file. The 100Mb wired network works fine. |\n| [trvqhuy](https://github.com/trvqhuy) | 53. [2023-01-10] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/909), `X96-Max+ 100W(S905x3)` box can be installed in eMMC, dtb uses `meson-sm1-x96-air.dtb` file, and u-boot uses `u-boot-x96maxplus.bin` file. The 100Mb wired network works fine. |\n| [texaszc](https://github.com/texaszc) | 54. [2023-01-14] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921), `MGV3000(S905l3)` box can be installed in eMMC, kernel uses `5.15.y`, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine. |\n| [tuzhis](https://github.com/tuzhis) | 55. [2023-01-18] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/939), `E900V22E(S905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-e900v22e.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine (Need to flash to `Android 9` system). |\n| [OPMonday](https://github.com/OPMonday) | 56. [2023-01-24] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), `UNT403A(S905l3a)` box can be installed in eMMC, dtb uses `meson-g12a-s905l3a-m401a.dtb` file, and u-boot uses `u-boot-e900v22c.bin` file. The 100Mb wired network works fine. |\n| [1904688138](https://github.com/1904688138) | 57. [2023-01-27] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/978), `HG680-LC(S905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-p212.bin` file. The 100Mb wired network works fine. |\n| [13584452567](https://github.com/13584452567) | 58. [2023-02-01] He shared his support for `eaidk-610(rk3399)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), This device can be installed in eMMC, dtb uses `rk3399-eaidk-610.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [JordanPlayz158](https://github.com/JordanPlayz158) | 59. [2023-02-02] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/988), `X88 King(S922x)` can use the same configuration as `GT-King-Pro(S922x)`, Gigabit wired and Bluetooth work fine. But USB (keyboard, mouse, etc.) won't work. |\n| [7Ji](https://github.com/7Ji) | 60. [2023-02-02] He shared his support for `BesTV R3300L(s905lb)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), This device can be installed in eMMC, dtb uses `meson-gxl-s905x-p212.dtb` file, MAINLINE_UBOOT uses `r3300l-u-boot.bin.sd.bin` file, UBOOT_OVERLOAD uses `u-boot-r3300l.bin` file. The 100Mb wired works fine. He also shared some source code for [making u-boot](https://github.com/7Ji/u-boot), how to use the [ampart tool](https://github.com/7Ji/ampart), etc. For details, see Pull Merge Information. |\n| [d5stick](https://github.com/d5stick) | 61. [2023-02-04] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1006), `Vontar-X3(S905x3)` box can be installed in eMMC, dtb uses `meson-sm1-hk1box-vontar-x3.dtb` file, and u-boot uses `u-boot-x96maxplus.bin` file. The Gigabit wired network works fine. When using it, you need to flash into the Android system of HK1-Box(s905x3). |\n| [daniyo27](https://github.com/daniyo27) | 62. [2023-02-12] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1044), `X96W/FunTV(S905w)` box can be installed in eMMC, dtb uses `meson-gxl-s905w-x96w.dtb` file. The 100Mb wired network, Wifi and Bluetooth all works fine. |\n| [piotrekcrash](https://github.com/piotrekcrash) | 63. [2023-02-14] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1062), `Tx3-mini(s905w)` box can be installed in eMMC, dtb uses `meson-gxl-s905w-tx3-mini.dtb` file and u-boot use `u-boot-s905x-s912.bin` file. The 100Mb wired network. |\n| [13584452567](https://github.com/13584452567) | 64. [2023-02-19] He shared his support for `king3399(rk3399)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), This device can be installed in eMMC, dtb uses `rk3399-king3399.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [irfanjunaid](https://github.com/irfanjunaid) | 65. [2023-02-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1077), `TX3-BZ(s905x3)` box can be installed in eMMC, dtb uses `meson-sm1-tx3-bz.dtb` file, Mainline u-boot is required. The 100Mb wired network, Wifi and Bluetooth all works fine. |\n| [13584452567](https://github.com/13584452567) | 66. [2023-02-22] He shared his support for `tn3399(rk3399)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), This device can be installed in eMMC, dtb uses `rk3399-tn3399.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [yu13740000](https://github.com/yu13740000) | 67. [2023-02-23] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1100), `Vplus(allwinner-h6)` can start from `USB`, use `armbian-install` to write eMMC, and use `armbian-update` to update the kernel and use it normal. The u-boot and other resources used are from the OpenWrt project repository of [unifreq](https://github.com/unifreq/openwrt_packit). |\n| [13584452567](https://github.com/13584452567) | 68. [2023-02-27] He shared his support for `TQC-A01(allwinner-h6)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1111), This device can be installed in eMMC, dtb uses `sun50i-h6-tqc-a01.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [yhxxm](https://github.com/yhxxm) | 69. [2023-03-03] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921#issuecomment-1453143251), `M401A(s905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-p212.bin` file. The 100Mb wired network. |\n| [13584452567](https://github.com/13584452567) | 70. [2023-03-04] He shared his support for `KYLIN3399(rk3399)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), This device can be installed in eMMC, dtb uses `rk3399-kylin3399.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [salsabilng](https://github.com/salsabilng) | 71. [2023-03-04] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1086), He provided bluetooth support for `X96 Max+ 2101(s905x3)` box, can be installed in eMMC, dtb uses `meson-sm1-x96-max-plus-2101.dtb` file, and u-boot uses `u-boot-x96maxplus.bin` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [Choomai](https://github.com/Choomai) | 72. [2023-03-08] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1140), `MXQ-Pro-4K(s905w)` box can be installed in eMMC, dtb uses `meson-gxl-s905w-x96w.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network. |\n| [gbsadmin](https://github.com/gbsadmin) | 73. [2023-03-10] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1154), `Hisense-IP103H(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. He also tested several other possible combinations. The 100Mb wired network. |\n| [God-JohnDiamond](https://github.com/God-JohnDiamond) | 74. [2023-03-18] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1180), `CM211-1(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network. |\n| [ketaksaan](https://github.com/ketaksaan) | 75. [2023-03-18] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1181), `Infinity-B32(s905x3)` box can be installed in eMMC, dtb uses `meson-sm1-h96-max-x3.dtb` file, and u-boot uses `u-boot-x96maxplus.bin` file. The Gigabit wired network and wireless works fine. |\n| [taotao108](https://github.com/taotao108) | 76. [2023-03-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), `SumaVision-Q7(s905lb)` box dtb uses `meson-gxl-s905x-p212.dtb` file, and u-boot uses `u-boot-r3300l.bin` file. The 100Mb wired network and wireless works fine. |\n| [qianbinbin](https://github.com/qianbinbin) | 77. [2023-03-21] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175), `SumaVision-Q5(s905)` box need use `/boot/extlinux/extlinux.conf` file, dtb uses `meson-gxbb-p201.dtb` file, and u-boot uses `u-boot-s905.bin` file. The 100Mb wired network works fine. |\n| [champion0117](https://github.com/champion0117) | 78. [2023-03-22] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/405), `M301A(s905l2)` box can be installed in eMMC(Downclock to 26Mhz), dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine. |\n| [buglloc](https://github.com/buglloc) | 79. [2023-03-26] He shared his support for `NanoPi-R5S(rk3568)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), dtb uses `rk3568-nanopi-r5.dtb` file. The Gigabit wired, wireless, bluetooth works fine. |\n| [13584452567](https://github.com/13584452567) | 80. [2023-04-05] He shared his support for `ZCube1-Max(rk3399)` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), This device can be installed in eMMC, dtb uses `rk3399-hugsun-zm.dtb` file. The Gigabit wired works fine. |\n| [piaoliuchong](https://github.com/piaoliuchong) | 81. [2023-04-07] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1256), `E900V22D(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine. |\n| [signigelchan](https://github.com/signigelchan) | 82. [2023-04-13] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1277), `UNT400G1(s905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, u-boot uses `u-boot-s905x-s912.bin` file, and use `extlinux.conf`. The 100Mb wired network works fine. |\n| [lovl88](https://github.com/lovl88) | 83. [2023-04-13] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1278), `E900v21E(s905l2)` dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, u-boot uses `u-boot-s905x-s912.bin` file, and use `extlinux.conf`. The 100Mb wired network works fine. |\n| [peagsus](https://github.com/peagsus) | 84. [2023-04-13] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1268), `CM311-1(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, u-boot uses `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine. |\n| [GD2021](https://github.com/GD2021) | 85. [2023-04-13] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1280), `CRRC(rk3399)` box can be installed in eMMC, dtb uses `rk3399-crrc.dtb` file. The Gigabit wired network works fine. |\n| [giovEra](https://github.com/giovEra) | 86. [2023-04-23] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), `Station-M1,Bqeel-MVR9(rk3328)` box can be installed in eMMC, dtb uses `rk3328-box-trn9.dtb` file. The Gigabit wired network works fine. |\n| [Ivanriver](https://github.com/Ivanriver) | 87. [2023-04-23] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1318), `CM211-1(s905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, u-boot uses `u-boot-p212.bin` file. The 100Mb wired network works fine. |\n| [GD2021](https://github.com/GD2021) | 88. [2023-04-23] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1317), `SMART-AM40(rk3399)` box can be installed in eMMC, dtb uses `rk3399-smart-am40.dtb` file. The Gigabit wired network works fine. |\n| [inoeud](https://github.com/inoeud) | 89. [2023-04-24] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1326), `SW799(rk3399)` box can be installed in eMMC, dtb uses `rk3399-bozz-sw799.dtb` file. The Gigabit wired network works fine. |\n| [tdleiyao](https://github.com/tdleiyao) | 90. [2023-04-25] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), `Panther-X2(rk3566)` box can be installed in eMMC, dtb uses `rk3566-panther-x2.dtb` file. The Gigabit wired network works fine. |\n| [Jeagarm](https://github.com/Jeagarm) | 91. [2023-04-25] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1332), `TY1608(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, u-boot uses `u-boot-s905x-s912.bin` file, and Android 9.0 system. The 100Mb wired network works fine. |\n| [gwx11111111](https://github.com/gwx11111111) | 92. [2023-05-04] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), `Beelink-IPC-R(rk3588)` box can be installed in eMMC, dtb uses `rk3588-nvr-demo-v10-android.dtb` file, Bluetooth and wireless are working properly, and `4*1G` + `2*2.5G` network cards are working fine. |\n| [GD2021](https://github.com/GD2021) | 93. [2023-05-09] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380), `ZYSJ(rk3399)` box can be installed in eMMC, dtb uses `rk3399-zysj.dtb` file. The Gigabit wired network works fine. The source of `zysj-rk3399_defconfig(u-boot)` and `k3399-zysj.dts` used is [cm9vdA/build-linux](https://github.com/cm9vdA/build-linux) repository. |\n| [9runner](https://github.com/9runner) | 94. [2023-05-18] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1166), `Whale(s905x3)` box can be installed in eMMC. You can use the same configuration as `x96-max+(s905x3)`. When using the `6.1.y` kernel series, it is necessary to use the mainline u-boot (`armbian-install -m yes`). The Gigabit wired network works fine. |\n| [shuye1728](https://github.com/shuye1728) | 95. [2023-05-18] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1405), `XiaoMI-3S(s905x)` box can use the `T95(s905x)` image. This device does not have an Ethernet port and can be used `wirelessly`. It can be written to eMMC for use, and the 6.1.y series kernel can also be used. |\n| [Drafteed](https://github.com/Drafteed) | 96. [2023-06-13] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1480), `X96(s905x)` box can use the `T95(s905x)` image. It can be written to eMMC for use, and the 6.1.y series kernel can also be used. |\n| [orientzane](https://github.com/orientzane) | 97. [2023-06-14] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), the `UNT402A(s905l3)` box can use the default image for `s905l3` and is compatible with the 5.15.y and 6.1.y series kernels. Currently, it can only be used with `USB` and is unable to write to NAND storage. |\n| [lauren12133](https://github.com/lauren12133) | 98. [2023-06-20] After his test feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1492), `DG-3399(rk3399)` box can be installed in eMMC, dtb uses `rk3399-dg3399.dtb` file. The Gigabit wired network works fine. |\n| [janko888](https://github.com/janko888) | 99. [2023-06-22] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481) and [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1499), the `UNT402A(s905l)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, and u-boot use `u-boot-p212.bin`. The 100Mb wired network works fine. |\n| [w2xg2022](https://github.com/w2xg2022) | 100. [2023-06-27] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1512), the `ZXV10-BV310(s905l3)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, and u-boot use `u-boot-s905x-s912.bin`. The 100Mb wired network works fine. |\n| [yu6zhou](https://github.com/yu6zhou) | 101. [2023-06-27] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1508), the `CM311-1a-CH(s905l3a)` box can be installed in eMMC, dtb uses `meson-g12a-s905l3a-e900v22c.dtb` file, and u-boot use `u-boot-e900v22c.bin`. The 100Mb wired network works fine. |\n| [hzlyu123](https://github.com/hzlyu123) | 102. [2023-06-29] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/444), the `M201-S(s905l)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-m302a.dtb` file, and u-boot use `u-boot-p212.bin`. The 100Mb wired network works fine. |\n| [WallcroftUK](https://github.com/WallcroftUK) | 103. [2023-06-30] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/451), the `SmartLabs SML-5442TW(s905d)` box can be installed in eMMC, dtb uses `meson-gxl-s905d-sml5442tw.dtb` file, and u-boot use `u-boot-s905x-s912.bin`. The 100Mb wired network works fine. |\n| [jietech17](https://github.com/jietech17) | 104. [2023-06-30] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1514), the `e900v21e(s905l3b)` box can be installed in eMMC, dtb uses `meson-gxl-s905l3b-e900v22e.dtb` file, and u-boot use `u-boot-s905x-s912.bin`. The 100Mb wired network works fine. |\n| [orientzane](https://github.com/orientzane) | 105. [2023-07-05] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1520), the `IP112H(s905l3a)` box dtb uses `meson-g12a-s905l3a-e900v22c.dtb` file, and u-boot use `u-boot-e900v22c.bin`. The 100Mb wired network and Bluetooth works fine. |\n| [rongchuan17](https://github.com/rongchuan17) | 106. [2023-07-17] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1549) and [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1556), the `Emb3531(rk3399)` box dtb uses `rk3399-emb3531.dtb` file. The Gigabit wired network works fine. |\n| [aaftio](https://github.com/aaftio) | 107. [2023-07-25] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1568), the `TY1608(s905l3b)` box dtb uses `meson-gxl-s905l2-x7-5g.dtb` file, and u-boot use `u-boot-s905x-s912.bin`. The 100Mb wired network and Bluetooth works fine. |\n| [aaftio](https://github.com/aaftio) | 108. [2023-07-25] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), the `MG101(s905lb)` box dtb uses `meson-gxl-s905x-p212.dtb` file, and u-boot use `u-boot-r3300l.bin`. The 100Mb wired network and Bluetooth works fine. |\n| [inoeud](https://github.com/inoeud) | 109. [2023-08-12] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609), the `Leez-p710(rk3399)` box dtb uses `rk3399-leez-p710.dtb` file. The Gigabit wired network and Bluetooth works fine. |\n| [locAtt](https://github.com/locAtt) | 110. [2023-08-15] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1613), the `MGV2000(s905l3b)` box dtb uses `meson-gxl-s905l3b-e900v22e.dtb` file, u-boot use `u-boot-s905x-s912.bin` file. Using the 5.15.y kernel, it is possible to write to eMMC for usage. The 6.1.y kernel can only be used when running from USB. The 100Mb wired network works fine. |\n| [aolin2000](https://github.com/aolin2000) | 111. [2023-08-15] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1598), the `B860AV-2.1M(s905l3b)` box dtb uses `meson-gxl-s905l3b-m302a.dtb` file, u-boot use `u-boot-s905x-s912.bin` file. The 100Mb wired network works fine. |\n| [araczkowski](https://github.com/araczkowski) | 112. [2023-08-18] According to his feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), the `X88-Pro-X3(s905x3)` box dtb uses `meson-sm1-x88-pro-x3.dtb` file, u-boot use `u-boot-x96maxplus.bin` and `x96maxplus-u-boot.bin.sd.bin` files. Gigabit wired, wireless, and Bluetooth are functioning properly. |\n| [kongjun0](https://github.com/kongjun0) | 113. [2023-08-18] According to his feedback in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), the `NanoPi-R5C(rk3568)` box dtb uses `rk3568-nanopi-r5c.dtb` file. The Gigabit wired network works fine. The `u-boot` and `dtb` used are from the project [inindev/nanopi-r5](https://github.com/inindev/nanopi-r5). |\n| [13584452567](https://github.com/13584452567) | 114. [2023-08-21] According to his feedback in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) request, the `TQC-A01(h6)` box has received support. The used dtb is `sun50i-h6-tqc-a01.dtb`, and the u-boot version is `u-boot-sunxi-with-spl.bin`. The 100Mbps wired network works fine. |\n| [shijifeizhai](https://github.com/shijifeizhai) | 115. [2023-08-23] According to his feedback in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1644) request, the `S65(s905m-b)` box has received support. The used dtb is `meson-gxl-s905x-p212.dtb`, and the u-boot version is `u-boot-r3300l.bin`. The 100Mbps wired network works fine. |\n| [13584452567](https://github.com/13584452567) | 116. [2023-09-06] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687) request, the `tvi3315a(rk3399)` box has received support. The used dtb is `rk3399-tvi3315a.dtb`. The Gigabit wired network works fine. |\n| [khancyr](https://github.com/khancyr) | 117. [2023-09-11] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1714) request, the `nexbox-a95x(s905x)` box has received support. The used dtb is `meson-gxl-s905x-nexbox-a95x.dtb`, and u-boot is `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [yycvip](https://github.com/yycvip) | 118. [2023-09-18] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1712) request, the `unt403a(s905l3b)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, and u-boot is `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [doyoman](https://github.com/doyoman) | 119. [2023-09-23] Based on the feedback he provided in the [chat group](https://github.com/ophub/amlogic-s9xxx-armbian/issues/852), `Beikeyun(rk3328)` has implemented a `new u-boot` scheme and `GPT` partition format for their devices, allowing for smooth startup and operation. Both MSDOS and GPT formats are supported for partitioning. |\n| [liaoya](https://github.com/liaoya) | 120. [2023-10-19] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491) request, the `firefly(rk3399)` box has received support. The used dtb is `rk3399-firefly.dtb`. The Gigabit wired network works fine. The DTS and U-Boot used are from `150balbes` |\n| [r1172464137](https://github.com/r1172464137) | 121. [2023-10-28] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1790) request, the `Fine3399(rk3399)` box has received support. The used dtb is `rk3399-fine3399.dtb`. The Gigabit wired network works fine. The DTS and U-Boot used are from [cm9vdA/build-linux](https://github.com/cm9vdA/build-linux) |\n| [foobarjimmy](https://github.com/foobarjimmy) | 122. [2023-10-31] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1817) request, the `M411A(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, and u-boot is `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [foobarjimmy](https://github.com/foobarjimmy) | 123. [2023-11-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1826) request, the `MiBox-4C(s905l-s)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb` / `meson-gxl-s905l-venz-v10.dtb` / `meson-gxl-s905l2-x7-5g.dtb`, and u-boot is `u-boot-p212.bin` / `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [sleepwalkera](https://github.com/sleepwalkera) | 124. [2023-11-08] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1839) request, the `MGV2000-K(s905l2)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, and u-boot is `u-boot-s905x-s912.bin`. The 100Mbps wired network works and Bluetooth fine. |\n| [shijifeizhai](https://github.com/shijifeizhai) | 125. [2023-11-15] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1860) request, the `RG020ET-CA(s905l3b)` box has received support. The used dtb is `meson-gxl-s905l3b-e900v22e.dtb`, and u-boot is `u-boot-s905x-s912.bin`, boot config use `extlinux.conf`. The 100Mbps wired network works fine. |\n| [sehczaa](https://github.com/sehczaa) | 126. [2023-11-16] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) request, the `Renegade(RK3328)` box has received support. The used dtb is `rk3328-roc-cc.dtb`. The Gigabit wired network works fine. |\n| [unifreq](https://github.com/unifreq) | 127. [2023-11-16] Support for the `jp-tvbox(rk3566)` device has been added using configuration files such as dtb from `unifreq`, used dtb is `rk3566-jp-tvbox.dtb`. It includes support for the `SATA` interface, and the Gigabit Ethernet is functioning properly. Your feedback on the usage in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) is welcome. |\n| [unifreq](https://github.com/unifreq) | 128. [2023-11-18] Support for `HLink-h28k/h66k/h68k/h69k/h88k/h88k-v3` devices has been added to the series of files, including u-boot and dtb, etc. developed by `unifreq`. We welcome feedback on usage in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726) location. |\n| [phuonganh2601](https://github.com/phuonganh2601) | 129. [2023-11-21] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1882) request, the `TX3-Mini(s912)` box has received support. The used dtb is `meson-gxm-q201.dtb`, and u-boot is `u-boot-s905x-s912.bin`, boot config use `extlinux.conf`. The 100Mbps wired network works fine. |\n| [dz515704201](https://github.com/dz515704201) | 130. [2023-12-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1912) request, the `MG101(s905l)` box has received support. The used dtb is `meson-gxl-s905l-venz-v10.dtb`, and u-boot is `u-boot-p212.bin`. The 100Mbps wired network and HDMI works fine. |\n| [chiqianjiqi](https://github.com/chiqianjiqi) | 131. [2024-01-11] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2012) request, the `ZXV10 B860AV3.2-M(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [sehczaa](https://github.com/sehczaa) | 132. [2024-01-13] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017) request, the `Seewo-sv21(rk3568)` box has received support. The used dtb is `rk3568-seewo-sv21.dtb`. Two Gigabit wired network works fine. |\n| [kuuer](https://github.com/kuuer) | 133. [2024-01-19] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2026) request, the `LX-R3S(rk3399)` box has received support. The used dtb is `rk3399-lx-r3s.dtb`. The Gigabit wired network works fine. |\n| [kuuer](https://github.com/kuuer) | 134. [2024-01-24] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2050) request, the `hugsun-x99(rk3399)` box has received support. The used dtb is `rk3399-hugsun-x99.dtb`. The Gigabit wired network works fine. |\n| [Cp0204](https://github.com/Cp0204) | 135. [2024-01-29] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2058) request, the `E900V22D-2(S905L3)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [yicheng42](https://github.com/yicheng42) | 136. [2024-02-22] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2101) request, the `MiBox-4(S905L)` box has received support. The used dtb is `meson-gxl-s905l-venz-v10.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [shijifeizhai](https://github.com/shijifeizhai) | 137. [2024-03-02] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127) request, the `e900v21d(S905L2)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [shijifeizhai](https://github.com/shijifeizhai) | 138. [2024-03-02] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127) request, the `s65(S905LB)` box has received support. The used dtb is `meson-gxl-s905x-p212.dtb`, u-boot used `u-boot-r3300l.bin`. The 100Mbps wired network works fine. |\n| [13584452567](https://github.com/13584452567) | 139. [2024-03-02] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2129) request, the `rk3318-box(rk3318)` box has received support. The used dtb is `rk3318-box.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [chute8427](https://github.com/chute8427) | 140. [2024-03-10] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2146) request, the `tb-ls3399(rk3399)` box has received support. The used dtb is `rk3399-tb-ls3399.dtb`, u-boot used `uboot.img`, `trust.bin` and `idbloader.bin`. The Gigabit wired network works fine. |\n| [bnaand](https://github.com/bnaand) | 141. [2024-03-12] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155) request, the `Mrkaio-m68s(rk3568)` box has received support. The used dtb is `rk3568-mrkaio-m68s.dtb`, u-boot used `u-boot.itb`, `idbloader.img`. The Gigabit wired network works fine. |\n| [haochn](https://github.com/haochn) | 142. [2024-03-24] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2188) request, the `CM201-1-YS(s095l2)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-s905x-s912.bin`, boot config add `extlinux.conf`. The 100Mbps wired network works fine. |\n| [wgbingo](https://github.com/wgbingo) | 143. [2024-04-04] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2209) request, the `CM201-1-YS(s095l3b)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [longjuanfeng05](https://github.com/longjuanfeng05) | 144. [2024-04-15] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2241) request, the `OneCloudPro-V1.1_V1.2(s912)` box has received support. The used dtb is `meson-gxm-octopus-planet.dtb`, u-boot used `u-boot-zyxq.bin`. The Gigabit wired network works fine. |\n| [shuzhizhi](https://github.com/shuzhizhi) | 145. [2024-04-26] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2273) request, the `ZXV10-B860AV2.1-U(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [hunter24099](https://github.com/hunter24099) | 146. [2024-04-27] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2246) request, the `Hisense-hs530r(rk3399)` box has received support. The used dtb is `rk3399-hs530r.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [Pat-78](https://github.com/Pat-78) | 147. [2024-05-01] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2282) request, the `A95X-F3-Air(s905x3)` box has received support. The used dtb is `meson-sm1-a95xf3-air.dtb`, u-boot used `u-boot-x96maxplus.bin`. The 100Mbps wired network works fine. |\n| [AboutCXJ](https://github.com/AboutCXJ) | 148. [2024-05-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2292) request, the `B863AV3.1-M2(s905l3ab)` box has received support. The used dtb is `meson-g12a-s905l3a-e900v22c.dtb`, u-boot used `u-boot-e900v22c.bin`. The 100Mbps wired network works fine. |\n| [unifreq](https://github.com/unifreq) | 149. [2024-05-19] Copied u-boot and other relevant information from [unifreq's](https://github.com/unifreq) repository for radxa `rock5c(rk3588s)` & `e20c(rk3528)`, and added support for these two devices. |\n| [Jstzo2u](https://github.com/Jstzo2u) | 150. [2024-06-01] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2341) request, the `E900V21C(s905l)` box has received support. The used dtb is `meson-gxl-s905l-venz-v10.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [shirakawa-poi](https://github.com/shirakawa-poi) | 151. [2024-06-02] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2347) request, the `UNT402A(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [shijifeizhai](https://github.com/shijifeizhai) | 151. [2024-06-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2357) request, the `IP108H-53u1m(s905l)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [yonggedebaqi](https://github.com/yonggedebaqi) | 152. [2024-07-01] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400) request, the `Orange-Pi-5-Plus(rk3588)` box has received support. The used dtb is `rk3588-orangepi-5-plus.dtb`, u-boot is the same as rock5b(rk3588). The 2.5-Gigabit wired network works fine. |\n| [wanglixiang90](https://github.com/wanglixiang90) | 153. [2024-07-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2403) request, the `Tpm312(rk3588)` box has received support. The used dtb is `rk3399-tpm312.dtb`. The Gigabit wired network works fine. |\n| [dy008](https://github.com/dy008) | 154. [2024-07-05] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407) request, the `Swan1-w28(rk3568)` box has received support. The used dtb is `rk3568-swan1-w28.dtb`. The Gigabit wired network works fine. |\n| [d5stick](https://github.com/d5stick) | 155. [2024-07-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404) request, the `H96-Max-M2(rk3528)` box has received support. The used dtb is `rk3528-mangopi-m28k.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [Leona233](https://github.com/Leona233) | 156. [2024-07-26] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2447) request, the `E900V21D(s905l3b)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [hunter24099](https://github.com/hunter24099) | 157. [2024-07-26] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2446) request, the `ZK-rk39a(rk3399)` box has received support. The used dtb is `rk3399-zk-r39a.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The Gigabit wired network works fine. |\n| [Hx0531](https://github.com/Hx0531) | 158. [2024-08-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) request, the `IPBS9505(s905lb)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [DavidTsou](https://github.com/DavidTsou) | 159. [2024-08-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2465) request, the `Tencent-Aurora-1s(s905l)` box has received support. The used dtb is `meson-gxl-s905x-p212.dtb`, u-boot used `u-boot-s905x-s912.bin`. The wireless network works fine. |\n| [qfnuzlr](https://github.com/qfnuzlr) | 160. [2024-08-19] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2491) request, the `B860AV2.1(s905l)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [Xianleewu](https://github.com/Xianleewu) | 161. [2024-08-29] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508) request, we also thank [ysuolmai](https://github.com/ysuolmai) for providing relevant information and feedback. the `ruisen-box(rk3568)` box has received support. The used dtb is `rk3568-ruisen-box.dtb`, u-boot used `bootloader.bin`. The 2x1Gigabit wired network works fine. |\n| [ccu6](https://github.com/ccu6) | 162. [2024-09-10] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538) request. the `lckfb-tspi(rk3566)` box has received support. The used dtb is `rk3566-taishanpi-v10.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [DavidTsou](https://github.com/DavidTsou) | 163. [2024-09-10] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2499) request. the `ZXV10-B860AV2.1U(s905l)` box has received support. The used dtb is `meson-gxl-s905x-tx9.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [tinytinycn](https://github.com/tinytinycn) | 164. [2024-09-26] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539) request. the `CM201-1-6-YS(s905l3)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [ASFLY61](https://github.com/ASFLY61) | 165. [2024-10-06] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2585) request. the `HM201(s905l)` box has received support. The used dtb is `meson-gxl-s905x-tx9.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [w2xg2022](https://github.com/w2xg2022) | 166. [2024-10-21] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2598) request. the `IP108H(s905l2)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [w2xg2022](https://github.com/w2xg2022) | 167. [2024-10-29] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2616) request. the `MGV2000-CW(s905l2)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [bambizlu](https://github.com/bambizlu) | 168. [2024-11-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2625) request. the `UNT400G(s905l3)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [bambizlu](https://github.com/bambizlu) | 169. [2024-11-24] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2658) request. the `IP108H(s905l3)` box has received support. The used dtb is `meson-gxl-s905l2-x7-5g.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [stevenliuit](https://github.com/stevenliuit) | 170. [2024-11-27] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661) request. the `DG-TN3568(rk3568)` box has received support. The used dtb is `rk3568-dg-tn3568.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [doyoman](https://github.com/doyoman) | 171. [2024-12-05] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2691) request. the `Fmx1-Pro(rk3399)` box has received support. The used dtb is `rk3399-fmx1-pro.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [zakuwaki](https://github.com/zakuwaki) | 172. [2024-12-06] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2673) request. the `yskj(rk3399)` box has received support. The used dtb is `rk3399-yskj.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The Gigabit wired network works fine. |\n| [andyfanybo](https://github.com/andyfanybo) | 173. [2025-01-18] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736) request. the `WXY-OEC-turbo-4g(Replaced-Chip-and-eMMC)(rk3566)` box has received support. The used dtb is `rk3566-wxy-oec-turbo-4g.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [dy008](https://github.com/dy008) | 174. [2025-03-01] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817) request. the `Smart-Am60(rk3588)` box has received support. The used dtb is `rk3588-smart-am60.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [stevenliuit](https://github.com/stevenliuit) | 175. [2025-04-15] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911) request. the `Alark35-3500(rk3568)` box has received support. The used dtb is `rk3568-alark35-3500.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 100Mbps wired network works fine. |\n| [loadnl](https://github.com/loadnl) | 176. [2025-05-20] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/748) request. the `Sv-33a6x(rk3399)` box has received support. The used dtb is `rk3399-sv-33a6x.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [Kwonelee](https://github.com/Kwonelee) | 177. [2025-06-06] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744) request. the `Station-M2(rk3566)` box has received support. The used dtb is `rk3566-roc-pc.dtb`, u-boot used `u-boot.bin`. The Gigabit wired network works fine. |\n| BeiXiang | 178. [2025-06-15] According to the contribution shared by `BeiXiang`, support for the `wxy-oes (a311d)` device has been provided. You can join the discussion in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666) section. this box has received support. The used dtb is `meson-g12b-oes.dtb`. The Gigabit wired network works fine. |\n| [dd-ray](https://github.com/dd-ray) | 179. [2025-06-29] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736) request. the `WXY-OEC-turbo-4g(Original-Edition)(rk3566)` box has received support. The used dtb is `rk3566-wxy-oec-turbo-4g.dtb`, u-boot used `bootloader.bin`. The SATA and Gigabit wired network works fine. |\n| [caojiezi2003](https://github.com/caojiezi2003) | 180. [2025-07-20] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029) request. the `WXY-OES-Plus(s922x)` box has received support. The used dtb is `meson-g12b-oes-plus.dtb`. The 3xSATA and 1xGigabit/1x300M wired network works fine. This DTB was designed through reverse engineering based on the `kaitian888` DTB. Thanks to extensive testing and feedback from `retro98boy`, `zjycb`, `caojiezi2003`, `yesterday666`, `yaodmin`, and others, we finally arrived at a fully functional version. Sincere thanks to all these contributors for their valuable support. |\n| [lighthx](https://github.com/lighthx) | 181. [2025-07-27] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052) request. the `Orangepi-5B(rk3588s)` box has received support. The used dtb is `rk3588s-orangepi-5b.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [JiaHeWG](https://github.com/JiaHeWG) | 182. [2025-07-30] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3055) request. the `M301A(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-p212.bin`. The 100Mbps wired network works fine. |\n| [bluemeda](https://github.com/bluemeda) | 183. [2025-08-16] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3089) request. the `HG680-FJ(s905x2)` box has received support. The used dtb is `meson-g12a-hg680-fj.dtb`, u-boot used `u-boot-x96max.bin`. The 100Mbps wired network works fine. |\n| [Arthur97172](https://github.com/Arthur97172) | 184. [2025-09-11] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978) request. the `Wocyber-A3(rk3568)` box has received support. The used dtb is `rk3568-wocyber-a3.dts`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [sib0ndt](https://github.com/sib0ndt) | 185. [2025-10-09] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827) request. the `Photonicat(rk3568)` box has received support. The used dtb is `rk3568-photonicat.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The Gigabit wired network works fine. |\n| [fgpx78](https://github.com/fgpx78) | 186. [2025-11-25] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3245) request. the `MeCool-m8s-pro-W(s905w)` box has received support. The used dtb is `meson-gxl-s905w-tx3-mini.dtb`, u-boot used `u-boot-s905x-s912.bin`. The Gigabit wired network works fine. |\n| [rickmschulz](https://github.com/rickmschulz) | 187. [2025-12-02] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3256) request. the `BTV9(s905x)` box has received support. The used dtb is `meson-gxl-s905x-p212.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [liubei1998](https://github.com/liubei1998) | 188. [2025-12-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845) request. the `nsy-g68-plus(rk3568)` box has received support. The used dtb is `rk3568-nsy-g68-plus.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 5xGigabit wired network works fine, Wireless works normally. |\n| [linai081795](https://github.com/linai081795) | 189. [2025-12-12] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/847) request. the `bdy-g18-pro(rk3568)` box has received support. The used dtb is `rk3568-bdy-g18-pro.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 5xGigabit wired network works fine, Wireless works normally. |\n| [xiaomeng9597](https://github.com/xiaomeng9597) | 190. [2025-12-12] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845) request. the `nsy-g16-plus(rk3568)` box has received support. The used dtb is `rk3568-nsy-g16-plus.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 5xGigabit wired network works fine, Wireless works normally. |\n| [siliconbanana](https://github.com/siliconbanana) | 191. [2025-12-13] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3272) request. the `M411A(s905l3b)` box has received support. The used dtb is `meson-gxl-s905l3b-e900v22e.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [Eksol](https://github.com/Eksol) | 192. [2025-12-19] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3282) request. the `Tanix-TX9S(s912)` box has received support. The used dtb is `meson-gxm-octopus-planet.dtb`, u-boot used `u-boot-zyxq.bin`. The Gigabit wired network works fine. |\n| [lakalin](https://github.com/lakalin) | 193. [2025-12-26] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3221) request. the `Gzpeite-P01(rk3568)` box has received support. The used dtb is `rk3568-gzpeite.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 2xGigabit wired network works fine. |\n| [dengweiwen](https://github.com/dengweiwen) | 194. [2026-01-08] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3306) request. the `CM3588-NAS(rk3588)` box has received support. The used dtb is `rk3588-friendlyelec-cm3588-nas.dtb`, u-boot used `u-boot-rockchip.bin`. The 1xGigabit wired network works fine. |\n| [xzq849](https://github.com/xzq849) | 195. [2026-01-13] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/158) request. the `Orange-Pi-Zero3(H618)` box has received support. The used dtb is `sun50i-h618-orangepi-zero3.dtb`, u-boot used `u-boot-sunxi-with-spl.bin`. The 1xGigabit wired network works fine. |\n| [Haaooo](https://github.com/Haaooo) | 196. [2026-01-18] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3207) request. the `NanoPi-m5(rk3576)` box has received support. The used dtb is `rk3576-nanopi-m5.dtb`, u-boot used `u-boot-rockchip.bin`. The 2xGigabit wired network works fine. |\n| [chongshengB](https://github.com/chongshengB) | 197. [2026-01-20] According to his sharing in the [Pull](https://github.com/ophub/u-boot/pull/28) request. the `TaraM(rk3399)` box has received support. The used dtb is `rk3399-taram.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1xGigabit wired network works fine. |\n| [chengdataon-source](https://github.com/chengdataon-source) | 198. [2026-01-21] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/250) request. the `Fmx1-Pro-B(rk3399)` box has received support. The used dtb is `rk3399-fmx1-pro-b.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1xGigabit wired network works fine. |\n| [GinRyan](https://github.com/GinRyan) | 199. [2026-01-22] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/261) request. the `Orange-Pi-3B(rk3566)` box has received support. The used dtb is `rk3566-orangepi-3b.dtb`, u-boot used `u-boot-rockchip.bin`. The 1xGigabit wired network works fine. |\n| [siasbaily](https://github.com/siasbaily) | 200. [2026-01-23] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/271) request. the `OES-Plus-V2.1(s922x)` box has received support. The used dtb is `meson-g12b-s922x-oes-plus-v2.dtb`, u-boot used `u-boot-s905x2-s922.bin`. The 1xGigabit wired network works fine. |\n| [cnMeeko](https://github.com/cnMeeko) | 201. [2026-02-01] According to his sharing in the [Pull](https://github.com/ophub/u-boot/pull/30) request. the `NanoPC-T4(rk3399)` box has received support. The used dtb is `rk3399-nanopc-t4.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1xGigabit wired network works fine. |\n| [a1303045940](https://github.com/a1303045940) | 202. [2026-02-01] According to his sharing in the [Pull](https://github.com/ophub/u-boot/pull/29) request. the `BDKJ-One(rk3568)` box has received support. The used dtb is `rk3568-bd-one.dtb`, u-boot used `idbloader.img`, `u-boot.itb`. The 5xGigabit wired network works fine. |\n| [Javier-Huang](https://github.com/Javier-Huang) | 203. [2026-02-02] According to his sharing in the [Pull](https://github.com/ophub/fnnas/pull/350) request. the `Station-P2(rk3568)` box has received support. The used dtb is `rk3568-roc-pc.dtb`, u-boot used `u-boot-rockchip.bin`. The 2xGigabit wired network works fine. |\n| [lentll](https://github.com/lentll) | 204. [2026-02-02] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/355) request. the `Rock-5-ITX(rk3588)` box has received support. The used dtb is `rk3588-rock-5-itx.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 2x2.5Gigabit wired network works fine. |\n| [maxwell-hub](https://github.com/maxwell-hub) | 205. [2026-02-03] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3354) request. the `Firefly-Core-3399-JD4(rk3399)` box has received support. The used dtb is `rk3399-firefly-core-3399-jd4.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1Gigabit wired network works fine. |\n| [shanshuise](https://github.com/shanshuise) | 206. [2026-02-05] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3339) request. the `AIO-3399C(rk3399)` box has received support. The used dtb is `rk3399-aio-3399c.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1Gigabit wired network works fine. |\n| [jun9100](https://github.com/jun9100) | 207. [2026-02-09] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3339) request. the `AIO-3399C(AI)(rk3399)` box has received support. The used dtb is `rk3399-aio-3399c-ai.dtb`, u-boot used `trust.bin`, `uboot.img` and `idbloader.bin`. The 1Gigabit wired network works fine. |\n| [MaxCrazy1101](https://github.com/MaxCrazy1101) | 208. [2026-02-12] According to his sharing in the [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3387) request. the `LZ-D3568(rk3568)` box has received support. The used dtb is `rk3568-lz-d3568-v3.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 1Gigabit wired network works fine. |\n| [Crazh3](https://github.com/Crazh3) | 209. [2026-03-05] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3328) request. the `LZ-D3588(rk3588)` box has received support. The used dtb is `rk3588-lz-d3588.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 2x1Gigabit wired network works fine. |\n| [xf110](https://github.com/xf110) | 210. [2026-03-10] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/464) request. the `HK1-Rbox-K8S(rk3528)` box has received support. The used dtb is `rk3528-hk1-rbox-k8s.dtb`, u-boot used `bootloader.bin`. The 100Mbps wired network works fine. |\n| [xf110](https://github.com/xf110) | 211. [2026-03-10] According to his sharing in the [Issues](https://github.com/ophub/fnnas/issues/464) request. the `HT2(rk3528)` box has received support. The used dtb is `rk3528-ht2.dtb`, u-boot used `bootloader.bin`. The 1Gigabit wired network works fine. |\n| [MikuChat](https://github.com/MikuChat) | 212. [2026-03-15] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3372) request. the `Sv-33a6x(VPU)(rk3399)` box has received support. The used dtb is `rk3399-sv-33a6x-vpu.dtb`, u-boot used `u-boot-rockchip.bin`. The 1Gigabit wired network works fine. |\n| [LSP0123](https://github.com/LSP0123) | 213. [2026-03-16] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3302) request. the `Inspur-CD1000-Cloud-PC(rk3528)` box has received support. The used dtb is `rk3528-cd1000.dtb`, u-boot used `bootloader.bin`. The 100Mbps wired network works fine. |\n| [itdoginfo](https://github.com/itdoginfo) | 214. [2026-03-16] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3432) request. the `UNT400G(s905l3)` box has received support. The used dtb is `meson-gxl-s905l3b-m302a.dtb`, u-boot used `u-boot-s905x-s912.bin`. The 100Mbps wired network works fine. |\n| [nblky](https://github.com/nblky) | 215. [2026-03-19] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3437) request. the `Boca-tcn100(rk3588s)` box has received support. The used dtb is `rk3588s-boca-tcn100.dtb`, u-boot used `u-boot.itb` and `idbloader.img`. The 1Gigabit wired network works fine. |\n| [infirms](https://github.com/infirms) | 216. [2026-03-20] According to his sharing in the [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3441) request. the `TOX1(s905x3)` box has received support. The used dtb is `meson-sm1-tox1.dtb`, u-boot used `u-boot-x96maxplus.bin`. The 1Gigabit wired network and the RTL8822BS wireless are working fine. |\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "README.cn.md",
    "content": "<div align=\"center\">\n    <img alt=\"Armbian\" src=\"https://github.com/user-attachments/assets/74e55052-031b-48f8-9aca-e5f1dd9e256a\" />\n</div>\n\n# Armbian / 岸边\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nArmbian（中文名：岸边）是基于 Debian/Ubuntu 构建的专为 ARM 芯片设计的轻量级 Linux 发行版。Armbian 系统精简、清洁，100% 兼容并继承了 Debian/Ubuntu 的功能与丰富的软件生态，可以安全稳定地运行在 TF/SD/USB 及设备的 eMMC 存储中。本项目保留了 Armbian 官方系统的完整性，并进一步拓展了对电视盒子等非官方支持设备的适配，同时增加了一系列便捷操作指令。现在你可以将电视盒子的安卓 TV 系统替换为 Armbian，使其成为一台功能强大的服务器。\n\n本项目依托众多[贡献者](CONTRIBUTORS.md)的力量，为 `Amlogic`、`Rockchip` 和 `Allwinner` 平台的设备构建 Armbian 系统，支持写入 eMMC 使用、更新内核等功能。详细使用方法请参见 [Armbian 使用文档](./documents/README.cn.md)。最新的 Armbian 系统可在 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中下载。欢迎 `Fork` 并进行个性化定制。如果对你有帮助，请点击仓库右上角的 `Star` 表示支持。\n\n## Armbian 系统默认信息\n\n| 系统名称        | 默认账号 | 默认密码  | SSH 端口 | IP 地址 |\n| -------------- | ------- | ------- | ------- | ------- |\n| 🐧 [Armbian.OS](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | root | 1234 | 22 | 从路由器获取 |\n| 🐋 [Armbian.Docker](https://hub.docker.com/u/ophub) | root | 1234 | 22 | 静态 MacVLAN IP |\n\n## 支持的设备列表\n\n⬆️ 各平台（晶晨/瑞芯微/全志）型号均按 SoC 性能由高至低排列。\n\n| SoC  | [设备](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | [内核](https://github.com/ophub/kernel) |\n| ---- | ---- | ---- |\n| a311d | [Khadas-VIM3](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/99), [WXY-OES](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s922x | [Beelink-GT-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/370), [Beelink-GT-King-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/707), [Ugoos-AM6-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/464), [ODROID-N2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/201), [X88-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/988), [Ali-CT2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1150), [WXY-OES-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x3 | [X96-Max+](https://github.com/ophub/amlogic-s9xxx-armbian/issues/351), [HK1-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/414), [Vontar-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1006), [H96-Max-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1250), [Ugoos-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/782), [TX3(QZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/644), [TX3(BZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1077), [X96-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/366), [X96-Max+_A100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/779), [A95X-F3-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2282), [Tencent-Aurora-3Pro(s905x3-b)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/506), [X96-Max+Q1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/788), [X96-Max+100W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/909), [X96-Max+_2101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1086), [Infinity-B32](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1181), [Whale](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1166), [X88-Pro-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [X99-Max-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [Transpeed-X3-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [TOX1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3441) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x2 | [X96Max-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/453), [X96Max-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/95), [MECOOL-KM3-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/79), [Tanix-Tx5-Max](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/351), [A95X-F2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/851), [HG680-FJ](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3089) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c), [CM311-1a-YST](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/732), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [UNT413A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [ZTE-B863AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/741), [CM311-1a-CH](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1508), [IP112H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1520), [B863AV3.1-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2292) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3b | [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2209), [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1180), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1268), [E900V21D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2447), [E900V22D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1256), [E900V21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1514), [E900V22E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/939), [M302A/M304A](https://github.com/ophub/amlogic-s9xxx-armbian/pull/615), [Hisense-IP103H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1154), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1332), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1568), [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1613), [B860AV-2.1M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1598), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1712), [RG020ET-CA](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1860), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3272) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3 | [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1318), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/763), [HG680-LC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/978), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921#issuecomment-1453143251), [UNT400G1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1277), [UNT400G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2625), [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [ZXV10-BV310](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1512), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1817), [ZXV10-B860AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2012), [ZXV10-B860AV2.1-U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2273), [E900V22D-2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2058), [CM201-1-6-YS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [M301A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3055) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s912 | [Tanix-TX8-Max](https://github.com/ophub/amlogic-s9xxx-armbian/issues/500), [Tanix-TX9-Pro(3G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/315), [Tanix-TX9-Pro(2G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/740), [Tanix-TX92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1012790770), [Tanix-TX9S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3282), [Nexbox-A1](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [Nexbox-A95X-A2](https://www.cafago.com/en/p-v2979eu-2g.html),  [A95X](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [H96-Pro-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1013071513), [VORKE-Z6-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72), [Mecool-M8S-PRO-L](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), [Vontar-X92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/525), [T95Z-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/668), [Octopus-Planet](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1020), [Phicomm-T1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/522), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1882), [OneCloudPro-V1.1_V1.2](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2241) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905d | [MECOOL-KI-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59), [Phicomm-N1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/925), [SML-5442TW](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/451) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x | [HG680P](https://github.com/ophub/amlogic-s9xxx-armbian/issues/262), [B860H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/60), [TBee-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/98), [T95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/285), [TX9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/645), [XiaoMI-3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1405), [X96](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1480), [Nexbox-a95x](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1714), [BTV9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3256) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905mb | [S65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1644) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l | [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [M201-S](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/444), [MiBox-4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2101), [MiBox-4C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1826), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1912), [E900V21C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2341), [IP108H-53u1m](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2357), [Tencent-Aurora-1s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2465), [B860AV2.1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2491), [B860AV2.1U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2499), [HM201](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2585) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l2 | [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [MGV2000-K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1839), [MGV3000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921), [Wojia-TV-IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [M301A](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/405), [E900v21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1278), [e900v21d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127), [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2188), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2598), [MGV2000-CW](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2616) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128), [IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905w | [X96-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/621), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1062), [W95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/570), [X96W/FunTV](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1044), [MXQ-Pro-4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1140), [MeCool-m8s-pro-W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3245) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3588(s) | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Radxa-Rock5C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [Orange-Pi-5-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [NanoPC-T6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2453), [Smart-Am60](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817), [DC-A588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2988), [Orangepi-5B](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052), [CM3588-NAS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3306), [Rock-5-ITX](https://github.com/ophub/fnnas/issues/355), [LZ-D3588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3328), [Boca-tcn100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3437) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) |\n| rk3576 | [NanoPi-m5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3207) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3399 | [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [CRRC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1280), [SMART-AM40](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1317), [SW799](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1326), [ZYSJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380), [DG-3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1492), [DLFR100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522), [Emb3531](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1549), [Leez-p710](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698), [Fine3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1790), [Firefly-RK3399](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491), [LX-R3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2026), [Hugsun-x99](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2050), [Tb-ls3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2146), [Hisense-hs530r](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/572), [Tpm312](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2403), [ZK-rk39a](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2446), [YSKJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2673), [Fmx1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2691), [Fmx1-Pro-B](https://github.com/ophub/fnnas/issues/250), [Sv-33a6x](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/748), [Sv-33a6x(VPU)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3372), [AIO-3399B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3185), [AIO-3399C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3339), [AIO-3399C(AI)](https://github.com/ophub/fnnas/issues/108), [TaraM](https://github.com/ophub/u-boot/pull/28), [NanoPC-T4](https://github.com/ophub/u-boot/pull/30), [Firefly-Core-3399-JD4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3354), [GEA-6319](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3383) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155), [Swan1-w28](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407), [Ruisen-box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508), [DG-TN3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661), [Alark35-3500](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911), [MMBox-Anas3035](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2995), [Wocyber-A3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978), [Photonicat](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827), [NSY-G16-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [NSY-G68-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [BDY-G18-Pro](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/847), [Gzpeite-P01](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3221), [LZ-D3568](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3387), [LZ-K3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3304), [BDKJ-One](https://github.com/ophub/u-boot/pull/29), [Station-P2](https://github.com/ophub/fnnas/pull/350), [Lyt-t68m](https://github.com/ophub/fnnas/issues/435) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867), [LCKFB-Taishan-Pi](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538), [WXY-OEC-turbo-4g](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736), [Station-M2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744), [Orange-Pi-3B](https://github.com/ophub/fnnas/issues/261) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726), [Radxa-E20C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [H96-Max-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404), [HK1-Rbox-K8S](https://github.com/ophub/fnnas/issues/464), [HT2](https://github.com/ophub/fnnas/issues/464), [CD1000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3302) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) |\n| rk3328 | [BeikeYun](https://github.com/ophub/amlogic-s9xxx-armbian/issues/852), [Chainedbox-L1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1680), [Station-M1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Bqeel-MVR9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Renegade/Firefly](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3318 | [RX3318-Box](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2129) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h6 | [Vplus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1100), [Tanix-TX6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1120), [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) | [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6)<br>[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h618 | [OrangePi-Zero3](https://github.com/ophub/fnnas/issues/158), [H618-DevBoard](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3434) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n\n> [!TIP]\n> 目前 [s905 的盒子](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1173)仅支持在 `TF/SD/USB` 中使用，其他型号的盒子均支持写入 `EMMC`。更多信息请查阅 [✅支持的设备列表说明](build-armbian/armbian-files/common-files/etc/model_database.conf)。添加新设备支持可参考说明文档 12.15 章节的方法：[添加新的支持设备](documents/README.cn.md#1215-如何添加新的支持设备)。使用前请先阅读 [Armbian 使用文档](./documents/README.cn.md)，常见问题均已提供解决方案。\n\n## 安装及升级 Armbian 的相关说明\n\n请选择与你的设备型号对应的 Armbian 系统，不同设备的使用方法请参考对应的说明文档。\n\n- ### 安装 Armbian 到 EMMC\n\n1. `Rockchip` 平台的安装方法请查看说明文档中的 [第 8 章节](documents/README.cn.md#8-安装-armbian-到-emmc)。\n\n2. `Amlogic` 和 `Allwinner` 平台，使用 [Rufus](https://rufus.ie/) 或者 [balenaEtcher](https://www.balena.io/etcher/) 等工具将系统写入 USB 里，然后把写好系统的 USB 插入盒子。登录 Armbian 系统 (默认用户: root, 默认密码: 1234) → 输入命令：\n\n```shell\narmbian-install\n```\n\n| 可选参数  | 默认值   | 选项     | 说明                |\n| -------  | ------- | ------  | -----------------   |\n| -m       | no      | yes/no  | 使用主线 u-boot |\n| -a       | yes     | yes/no  | 使用 [ampart](https://github.com/7Ji/ampart) 分区表调整工具 |\n| -l       | no      | yes/no  | 显示全部设备列表 |\n\n示例：`armbian-install -m yes -a no`\n\n- ### 更新 Armbian 内核\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\n# 使用 root 用户运行 (sudo -i)\n# 如果不指定参数，将更新为最新版本。\narmbian-update\n```\n\n| 可选参数  | 默认值        | 选项           | 说明                              |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r       | ophub/kernel | `<owner>/<repo>` | 设置从 github.com 下载内核的仓库  |\n| -u       | 自动识别    | stable/flippy/beta/rk3588/rk35xx/h6 | 设置使用的内核的 [tags 后缀](https://github.com/ophub/kernel/releases) |\n| -k       | 最新版        | 内核版本       | 设置[内核版本](https://github.com/ophub/kernel/releases/tag/kernel_stable)  |\n| -b       | yes          | yes/no        | 更新内核时自动备份当前使用的内核    |\n| -d       | deb          | tar/deb       | 设置首选的内核包格式。若指定格式不存在，脚本将自动尝试另一种格式。如需编译自定义驱动，推荐使用 `deb` 格式。 |\n| -m       | no           | yes/no        | 使用主线 u-boot                    |\n| -s       | 无           | 无/磁盘名称     | [SOS] 恢复 eMMC/NVMe/sdX 等磁盘中的系统内核 |\n| -h       | 无           | 无             | 查看帮助信息                       |\n\n示例：`armbian-update -k 5.15 -u stable -d deb`\n\n通过 `-k` 参数指定内核版本时，可以精确指定具体版本号，例如：`armbian-update -k 5.15.50`；也可以模糊指定内核系列，例如：`armbian-update -k 5.15`。模糊指定时将自动使用该系列的最新版本。\n\n更新内核时会自动备份当前使用的内核，备份存储在 `/ddbr/backup` 目录中，保留最近 3 个版本。若新安装的内核不稳定，可随时恢复到备份版本。若更新内核后系统无法启动，可通过 `armbian-update -s` 恢复系统内核。更多详情请参见[帮助文档](documents/README.cn.md#10-更新-armbian-内核)。\n\n- ### 更换 Armbian 源\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-apt\n```\n\n根据你所在的国家或地区选择合适的软件源，可以显著提升软件下载速度。更多说明详见[帮助文档](documents/README.cn.md#11-安装常用软件)。\n\n- ### 安装常用软件\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-software\n```\n\n使用 `armbian-software -u` 命令可更新本地软件中心列表。根据用户在 [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中的反馈需求，已逐步整合常用[软件](build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf)，实现一键安装/更新/卸载等快捷操作。包括 `Docker 镜像`、`桌面软件`、`应用服务`等。详见[更多说明](documents/armbian_software.md)。\n\n- ### 修改 Armbian 配置\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-config\n```\n\n- ### 为 Armbian 创建 swap\n\n如果你在使用 `Docker` 等内存占用较大的应用时，感觉当前设备内存不足，可以创建 `swap` 虚拟内存分区，将磁盘空间的一定容量虚拟为内存使用。以下命令的参数单位为 `GB`，默认值为 `1`。\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-swap 1\n```\n\n- ### 控制 LED 显示\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-openvfd\n```\n\n根据 [LED 屏显示控制说明](documents/led_screen_display_control.md) 进行调试。\n\n- ### 备份/还原 EMMC 原系统\n\n支持在 `TF/SD/USB` 中对设备 `EMMC` 分区进行备份和恢复。建议在全新设备上安装 Armbian 系统之前，先对原始的安卓 TV 系统进行备份，以便日后需要恢复时使用。\n\n请从 `TF/SD/USB` 启动 Armbian 系统 → 输入命令：\n\n```shell\narmbian-ddbr\n```\n\n根据提示输入 `b` 进行系统备份，输入 `r` 进行系统恢复。\n\n> [!IMPORTANT]\n> 除此之外，也可以通过线刷方式将安卓系统写入 eMMC。安卓系统的下载镜像可在 [Tools](https://github.com/ophub/kernel/releases/tag/tools) 中查找。\n\n- ### 在 Armbian 中编译内核\n\n在 Armbian 中编译内核的用法详见[编译内核](compile-kernel/README.cn.md)说明文档。登录 Armbian 系统后，输入以下命令：\n\n```shell\narmbian-kernel -u\narmbian-kernel -k 6.6.12\n```\n\n- ### 更多使用说明\n\n将本地系统中的全部服务脚本更新至最新版本，可登录 Armbian 系统后输入以下命令：\n\n```shell\narmbian-sync\n```\n\n在 Armbian 的使用过程中，常见问题的解决方法详见 [documents](documents/README.cn.md)。\n\n## 本地化打包\n\n1. 克隆仓库到本地 `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. 安装必要的软件包（以 Ubuntu 24.04 为例）\n\n进入 `~/amlogic-s9xxx-armbian` 根目录，然后执行安装命令：\n\n```shell\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# For Ubuntu-24.04\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. 进入 `~/amlogic-s9xxx-armbian` 根目录，在该目录下创建 `build/output/images` 文件夹，并将 Armbian 镜像文件（如 `Armbian_21.11.0-trunk_Odroidn2_current_5.15.50.img`）上传至 `~/amlogic-s9xxx-armbian/build/output/images` 目录。请保留原版 Armbian 镜像文件名中的发行版本号（如 `21.11.0`）和内核版本号（如 `5.15.50`），它们将在重构后用作 Armbian 系统的命名依据。\n\n4. 进入 `~/amlogic-s9xxx-armbian` 根目录，执行 `sudo ./rebuild -b s905x3 -k 6.6.12` 命令即可生成指定 board 的 Armbian 镜像文件。生成的文件保存在 `build/output/images` 目录中。\n\n- ### 本地化打包参数说明\n\n| 参数  | 含义       | 说明        |\n| ---- | ---------- | ---------- |\n| -b   | Board      | 指定需要编译的设备代号。例如 `-b s905x3` 表示编译代号为 s905x3 的设备，多个设备可用下划线连接，如 `-b s905x3_s905d`。特殊值：`all` 表示编译全部设备，`first50` 表示设备库中的前 50 个，`range50_100` 表示第 51 至第 100 个，`range100_150` 表示第 101 至第 150 个，`last20` 表示最后 20 个。设备代号列表详见 [model_database.conf](build-armbian/armbian-files/common-files/etc/model_database.conf) 中的 `BOARD` 配置项。默认值：`all` |\n| -r   | KernelRepo | 指定 github.com 内核仓库的 `<owner>/<repo>`。默认值：`ophub/kernel` |\n| -u   | kernelUsage | 设置使用的内核的 `tags 后缀`，如 [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable), [flippy](https://github.com/ophub/kernel/releases/tag/kernel_flippy), [beta](https://github.com/ophub/kernel/releases/tag/kernel_beta)。默认值：`stable` |\n| -k   | Kernel     | 指定 [kernel](https://github.com/ophub/kernel/releases/tag/kernel_stable) 名称，如 `-k 6.6.12` 。多个内核使用 `_` 进行连接，如 `-k 6.6.12_5.15.50` 。通过 `-k` 参数自由指定的内核版本只对使用 `stable/flippy/beta` 的内核有效。其他内核系列例如 [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) / [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) / [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6) 等只能使用特定内核。  |\n| -a   | AutoKernel | 设置是否自动采用同系列最新版本内核。当为 `true` 时，将自动在内核库中查找 `-k` 指定内核（如 6.6.12）的同系列是否有更新版本，若存在更新版本则自动替换。设置为 `false` 时将使用指定版本编译。默认值：`true` |\n| -t   | RootfsType | 设置系统 ROOTFS 分区的文件系统类型，可选 `ext4` 或 `btrfs`。例如：`-t btrfs`。默认值：`ext4` |\n| -s   | Size       | 设置系统镜像分区大小。仅设置 ROOTFS 分区大小时可只指定一个数值，例如：`-s 2560`；需同时设置 BOOTFS 和 ROOTFS 分区大小时，用 `/` 连接两个数值，例如：`-s 512/2560`。默认值：`512/2560` |\n| -n   | BuilderName | 设置 Armbian 系统构建者签名。签名中请勿包含空格。默认值：无 |\n\n- `sudo ./rebuild` : 使用默认配置，对全部型号的设备进行打包。\n- `sudo ./rebuild -b s905x3 -k 6.6.12` : 推荐用法。使用默认配置编译指定内核。\n- `sudo ./rebuild -b s905x3 -k 6.1.y` : 使用默认配置编译，内核使用 6.1.y 系列的最新版。\n- `sudo ./rebuild -b s905x3_s905d -k 6.6.12_5.15.50` : 使用默认配置，同时打包多个内核。多个内核用 `_` 连接。\n- `sudo ./rebuild -b s905x3 -k 6.6.12 -s 2560` : 使用默认配置，指定单个内核和单个型号进行打包，ROOTFS 分区大小设为 2560 MiB。\n- `sudo ./rebuild -b s905x3_s905d`  使用默认配置，对多个型号进行全部内核打包，多个型号用 `_` 连接。\n- `sudo ./rebuild -k 6.6.12_5.15.50` : 使用默认配置，指定多个内核，对全部型号进行打包。多个内核用 `_` 连接。\n- `sudo ./rebuild -k 6.6.12_5.15.50 -a true` : 使用默认配置，指定多个内核，对全部型号进行打包，并自动升级到同系列最新内核。\n- `sudo ./rebuild -t btrfs -s 2560 -k 6.6.12` : 使用默认配置，文件系统设为 btrfs，ROOTFS 分区大小为 2560 MiB，指定内核为 6.6.12，对全部型号进行打包。\n\n## 使用 GitHub Actions 进行编译\n\n1. 关于 Workflows 文件的配置详见 [.github/workflows/](.github/workflows/) 目录。\n\n2. 全新编译：在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面中选择 ***`Build Armbian server image`***，即可通过 [build-armbian-arm64-server-image.yml](.github/workflows/build-armbian-arm64-server-image.yml) 进行编译。可选择 Ubuntu 系列（如 `resolute`）或 Debian 系列（如 `trixie`）等。点击 ***`Run workflow`*** 按钮即可开始编译。\n\n3. 二次编译：如果 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中已有编译好的 `Armbian_.*-trunk_.*.img.gz` 文件，只需为其他 board 重新打包，可跳过源文件编译步骤，直接使用 [build-armbian-using-releases-files.yml](.github/workflows/build-armbian-using-releases-files.yml) 进行二次制作。\n\n4. 使用其他 Armbian 系统（如 Armbian 官方下载站 [armbian.tnahosting.net](https://armbian.tnahosting.net/dl/) 提供的 [odroidn2](https://armbian.tnahosting.net/dl/odroidn2/archive/) 系统），只需在工作流配置文件 [build-armbian-using-official-image.yml](.github/workflows/build-armbian-using-official-image.yml) 中引入本仓库的脚本进行 Armbian 重构，即可适配其他设备。示例代码如下：\n\n```yaml\n- name: Build Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img\n    armbian_board: s905d_s905x3_s922x_s905x\n    armbian_kernel: 6.12.y_6.18.y\n```\n\n- ### GitHub Actions 输入参数说明\n\n相关参数与本地打包命令一一对应，详情请参考上述说明。\n\n| 参数              | 默认值         | 说明                                             |\n|------------------|---------------|--------------------------------------------------|\n| armbian_path     | 无            | 设置原版 Armbian 文件的路径。支持当前工作流中的文件路径（如 `build/output/images/*.img`），也支持网络下载地址（如 `https://dl.armbian.com/*/Armbian_*.img.xz`） |\n| armbian_board    | all           | 设置打包盒子的 `board` ，功能参考 `-b`                 |\n| kernel_repo      | ophub/kernel  | 指定 github.com 内核仓库的 `<owner>/<repo>`，功能参考 `-r` |\n| kernel_usage     | stable        | 设置使用的内核的 `tags 后缀`。功能参考 `-u` |\n| armbian_kernel   | 6.12.y_6.18.y | 设置内核 [版本](https://github.com/ophub/kernel/releases/tag/kernel_stable)，功能参考 `-k` |\n| auto_kernel      | true          | 设置是否自动采用同系列最新版本内核，功能参考 `-a`       |\n| armbian_fstype   | ext4          | 设置系统 ROOTFS 分区的文件系统类型，功能参考 `-t`     |\n| armbian_size     | 512/2560      | 设置系统 BOOTFS 和 ROOTFS 分区的大小，功能参考 `-s`  |\n| armbian_files    | false         | 添加自定义 Armbian 文件。设置后，该目录下的所有文件将被复制到 [common-files](build-armbian/armbian-files/common-files) 中。目录结构必须与 Armbian 根目录保持一致，以确保文件正确覆盖到固件中（例如：默认配置文件应存放于 `etc/default/` 子目录下）。 |\n| builder_name     | 无             | 设置 Armbian 系统构建者签名，功能参考 `-n`           |\n\n- ### GitHub Actions 输出变量说明\n\n上传到 `Releases` 需要为仓库设置 `Workflow 读写权限`，详见[使用说明](documents/README.cn.md#2-设置隐私变量-github_token)。\n\n| 参数                                 | 默认值         | 说明                       |\n|-------------------------------------|---------------|----------------------------|\n| ${{ env.PACKAGED_OUTPUTPATH }}      | out           | Armbian 系统文件输出路径      |\n| ${{ env.PACKAGED_OUTPUTDATE }}      | 04.13.1058    | 打包日期（月.日.时分）         |\n| ${{ env.PACKAGED_STATUS }}          | success       | 打包状态：success / failure  |\n\n## 制作 Armbian Docker 镜像\n\nArmbian 系统 [Docker](https://hub.docker.com/u/ophub) 镜像的制作方法可参考 [armbian_docker](./compile-kernel/tools/script/docker) 制作脚本。\n\n## 使用 GitHub Actions 编译内核\n\n内核的编译方法详见[编译内核](compile-kernel/README.cn.md)。\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n## Armbian 贡献者\n\n首先感谢 [150balbes](https://github.com/150balbes) 为在 Amlogic 电视盒子上运行 Armbian 所做出的杰出贡献和奠定的坑实基础。本项目编译的 [Armbian](https://github.com/armbian/build) 系统直接使用官方当前的最新源码进行实时编译。程序的开发思路来源于 [ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box) 等作者的教程。感谢各位的奉献与分享，让我们得以在更多设备上使用 Armbian 系统。\n\n本系统所使用的 [u-boot](https://github.com/ophub/u-boot)、[kernel](https://github.com/ophub/kernel) 等资源主要来源于 [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) 项目，部分文件由用户在 [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt) / [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian) / [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic) / [kernel](https://github.com/ophub/kernel) / [u-boot](https://github.com/ophub/u-boot) 等项目的 [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pulls) 和 [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中贡献分享。为感谢这些开拓者和分享者，自本仓库创建之日起（`2021-09-19`），已统一在 [CONTRIBUTORS.md](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTORS.md) 中进行记录。再次感谢大家为设备赋予新的生命与价值。\n\n## 其他发行版\n\n- [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt) 项目提供了适用于盒子的 `OpenWrt` 系统，在支持 Armbian 的相关设备上同样适用。\n- [fnnas](https://github.com/ophub/fnnas) 项目提供了适用于盒子的 `FnNAS` 系统，在支持 Armbian 的相关设备上同样适用。\n- [unifreq](https://github.com/unifreq/openwrt_packit) 为晶晨、瑞芯微和全志等平台的更多设备制作了 `OpenWrt` 系统，是盒子生态的标杆项目，推荐使用。\n- [Scirese](https://github.com/Scirese/alarm) 在安卓电视盒子上测试了 `Arch Linux ARM` / `Manjaro` 系统的制作、安装和使用，详情请参见其仓库说明。\n- [7Ji](https://7ji.github.io/) 在其博客中发表了多篇关于 Amlogic 平台逆向工程与开发的文章，涵盖以 ArchLinux 方式安装 ArchLinux ARM 系统、Amlogic 平台启动机制解析等内容。其 [ampart](https://github.com/7Ji/ampart) 项目提供了一款分区工具，可读取并编辑 Amlogic eMMC 分区表和 DTB 内分区，实现 eMMC 空间 100% 利用。[amlogic-s9xxx-archlinuxarm](https://github.com/7Ji/amlogic-s9xxx-archlinuxarm) 项目提供了 `Arch Linux ARM` 系统的制作和使用方法。[YAopenvfD](https://github.com/7Ji/YAopenvfD) 项目提供了另一个 openvfd 守护进程实现。\n- [13584452567](https://github.com/13584452567) 是本仓库 `Rockchip` 系列设备的开拓者。凭借其分享，本项目拓展了对 [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991)、[King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080)、[TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094)、[Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132)、[ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247)、[tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687)、[xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698) 等众多 `Rockchip` 设备的支持。他还是 [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) 等 `Allwinner` 设备[专用内核](https://github.com/13584452567/linux-6.6.y)的维护者，并在[论坛](https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1634)和[问答区](https://github.com/ophub/amlogic-s9xxx-armbian/issues)中提供了大量技术支持和解决方案，为盒子生态的发展做出了巨大贡献。\n- [cooip-jm](https://github.com/cooip-jm) 在其 [wiki](https://github.com/cooip-jm/About-openwrt/wiki) 中分享了许多关于 Armbian、LXC、Docker、AdGuard 等应用的使用方法，推荐参考学习。\n\n\n## 链接\n\n- [armbian](https://github.com/armbian/build)\n- [unifreq](https://github.com/unifreq)\n- [kernel.org](https://kernel.org)\n\n## License\n\nThe amlogic-s9xxx-armbian © OPHUB is licensed under [GPL-2.0](LICENSE)\n\n"
  },
  {
    "path": "README.ja.md",
    "content": "<div align=\"center\">\n    <img alt=\"Armbian\" src=\"https://github.com/user-attachments/assets/74e55052-031b-48f8-9aca-e5f1dd9e256a\" />\n</div>\n\n# Armbian\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nArmbianは、Debian/Ubuntuをベースに、ARMチップ向けに特別に構築された軽量Linuxディストリビューションです。Armbianシステムはスリムでクリーンであり、Debian/Ubuntuと100%互換性があり、その機能と豊富なソフトウェアエコシステムを継承しています。TF/SD/USBストレージおよびデバイスのeMMCで安全かつ安定して動作します。本プロジェクトは、公式Armbianシステムの完全性を維持しつつ、TVボックスなどの公式にサポートされていないデバイスへのサポートを拡張し、便利な管理コマンドのセットを追加しています。TVボックスのAndroid TVシステムをArmbianに置き換え、強力なサーバーに変身させることができます。\n\n本プロジェクトは多くの[コントリビューター](CONTRIBUTORS.md)に支えられ、`Amlogic`、`Rockchip`、`Allwinner`デバイス向けのArmbianシステムを構築しています。eMMCへの書き込み、カーネル更新などの機能をサポートしています。詳しい使い方は[Armbianユーザードキュメント](./documents/README.ja.md)をご覧ください。最新のArmbianシステムは[Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases)からダウンロードできます。`Fork`してカスタマイズすることを歓迎します。本プロジェクトがお役に立ちましたら、右上の`Star`ボタンをクリックしてサポートをお願いします。\n\n## Armbianシステムのデフォルト情報\n\n| システム名    | デフォルトユーザー名 | デフォルトパスワード  | SSHポート  | IPアドレス  |\n| -------------- | ---------------- | ----------------- | --------- | ----------- |\n| 🐧 [Armbian.OS](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | root | 1234 | 22 | ルーターから取得 |\n| 🐋 [Armbian.Docker](https://hub.docker.com/u/ophub) | root | 1234 | 22 | 静的MacVLAN IP |\n\n## 対応デバイス一覧\n\n⬆️ 各プラットフォーム（Amlogic/Rockchip/Allwinner）のモデルは、SoC性能の高い順に並べられています。\n\n| SoC | [デバイス](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | [カーネル](https://github.com/ophub/kernel) |\n| ---- | ---- | ---- |\n| a311d | [Khadas-VIM3](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/99), [WXY-OES](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s922x | [Beelink-GT-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/370), [Beelink-GT-King-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/707), [Ugoos-AM6-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/464), [ODROID-N2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/201), [X88-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/988), [Ali-CT2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1150), [WXY-OES-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x3 | [X96-Max+](https://github.com/ophub/amlogic-s9xxx-armbian/issues/351), [HK1-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/414), [Vontar-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1006), [H96-Max-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1250), [Ugoos-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/782), [TX3(QZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/644), [TX3(BZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1077), [X96-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/366), [X96-Max+_A100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/779), [A95X-F3-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2282), [Tencent-Aurora-3Pro(s905x3-b)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/506), [X96-Max+Q1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/788), [X96-Max+100W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/909), [X96-Max+_2101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1086), [Infinity-B32](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1181), [Whale](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1166), [X88-Pro-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [X99-Max-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [Transpeed-X3-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [TOX1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3441) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x2 | [X96Max-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/453), [X96Max-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/95), [MECOOL-KM3-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/79), [Tanix-Tx5-Max](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/351), [A95X-F2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/851), [HG680-FJ](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3089) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c), [CM311-1a-YST](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/732), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [UNT413A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [ZTE-B863AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/741), [CM311-1a-CH](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1508), [IP112H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1520), [B863AV3.1-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2292) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3b | [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2209), [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1180), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1268), [E900V21D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2447), [E900V22D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1256), [E900V21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1514), [E900V22E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/939), [M302A/M304A](https://github.com/ophub/amlogic-s9xxx-armbian/pull/615), [Hisense-IP103H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1154), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1332), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1568), [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1613), [B860AV-2.1M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1598), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1712), [RG020ET-CA](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1860), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3272) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3 | [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1318), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/763), [HG680-LC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/978), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921#issuecomment-1453143251), [UNT400G1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1277), [UNT400G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2625), [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [ZXV10-BV310](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1512), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1817), [ZXV10-B860AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2012), [ZXV10-B860AV2.1-U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2273), [E900V22D-2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2058), [CM201-1-6-YS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [M301A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3055) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s912 | [Tanix-TX8-Max](https://github.com/ophub/amlogic-s9xxx-armbian/issues/500), [Tanix-TX9-Pro(3G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/315), [Tanix-TX9-Pro(2G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/740), [Tanix-TX92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1012790770), [Tanix-TX9S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3282), [Nexbox-A1](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [Nexbox-A95X-A2](https://www.cafago.com/en/p-v2979eu-2g.html),  [A95X](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [H96-Pro-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1013071513), [VORKE-Z6-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72), [Mecool-M8S-PRO-L](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), [Vontar-X92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/525), [T95Z-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/668), [Octopus-Planet](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1020), [Phicomm-T1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/522), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1882), [OneCloudPro-V1.1_V1.2](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2241) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905d | [MECOOL-KI-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59), [Phicomm-N1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/925), [SML-5442TW](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/451) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x | [HG680P](https://github.com/ophub/amlogic-s9xxx-armbian/issues/262), [B860H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/60), [TBee-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/98), [T95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/285), [TX9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/645), [XiaoMI-3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1405), [X96](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1480), [Nexbox-a95x](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1714), [BTV9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3256) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905mb | [S65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1644) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l | [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [M201-S](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/444), [MiBox-4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2101), [MiBox-4C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1826), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1912), [E900V21C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2341), [IP108H-53u1m](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2357), [Tencent-Aurora-1s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2465), [B860AV2.1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2491), [B860AV2.1U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2499), [HM201](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2585) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l2 | [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [MGV2000-K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1839), [MGV3000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921), [Wojia-TV-IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [M301A](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/405), [E900v21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1278), [e900v21d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127), [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2188), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2598), [MGV2000-CW](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2616) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128), [IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905w | [X96-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/621), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1062), [W95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/570), [X96W/FunTV](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1044), [MXQ-Pro-4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1140), [MeCool-m8s-pro-W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3245) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3588(s) | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Radxa-Rock5C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [Orange-Pi-5-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [NanoPC-T6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2453), [Smart-Am60](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817), [DC-A588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2988), [Orangepi-5B](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052), [CM3588-NAS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3306), [Rock-5-ITX](https://github.com/ophub/fnnas/issues/355), [LZ-D3588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3328), [Boca-tcn100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3437) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) |\n| rk3576 | [NanoPi-m5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3207) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3399 | [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [CRRC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1280), [SMART-AM40](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1317), [SW799](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1326), [ZYSJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380), [DG-3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1492), [DLFR100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522), [Emb3531](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1549), [Leez-p710](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698), [Fine3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1790), [Firefly-RK3399](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491), [LX-R3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2026), [Hugsun-x99](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2050), [Tb-ls3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2146), [Hisense-hs530r](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/572), [Tpm312](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2403), [ZK-rk39a](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2446), [YSKJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2673), [Fmx1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2691), [Fmx1-Pro-B](https://github.com/ophub/fnnas/issues/250), [Sv-33a6x](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/748), [Sv-33a6x(VPU)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3372), [AIO-3399B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3185), [AIO-3399C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3339), [AIO-3399C(AI)](https://github.com/ophub/fnnas/issues/108), [TaraM](https://github.com/ophub/u-boot/pull/28), [NanoPC-T4](https://github.com/ophub/u-boot/pull/30), [Firefly-Core-3399-JD4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3354), [GEA-6319](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3383) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155), [Swan1-w28](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407), [Ruisen-box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508), [DG-TN3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661), [Alark35-3500](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911), [MMBox-Anas3035](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2995), [Wocyber-A3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978), [Photonicat](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827), [NSY-G16-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [NSY-G68-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [BDY-G18-Pro](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/847), [Gzpeite-P01](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3221), [LZ-D3568](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3387), [LZ-K3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3304), [BDKJ-One](https://github.com/ophub/u-boot/pull/29), [Station-P2](https://github.com/ophub/fnnas/pull/350), [Lyt-t68m](https://github.com/ophub/fnnas/issues/435) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867), [LCKFB-Taishan-Pi](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538), [WXY-OEC-turbo-4g](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736), [Station-M2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744), [Orange-Pi-3B](https://github.com/ophub/fnnas/issues/261) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726), [Radxa-E20C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [H96-Max-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404), [HK1-Rbox-K8S](https://github.com/ophub/fnnas/issues/464), [HT2](https://github.com/ophub/fnnas/issues/464), [CD1000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3302) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) |\n| rk3328 | [BeikeYun](https://github.com/ophub/amlogic-s9xxx-armbian/issues/852), [Chainedbox-L1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1680), [Station-M1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Bqeel-MVR9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Renegade/Firefly](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3318 | [RX3318-Box](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2129) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h6 | [Vplus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1100), [Tanix-TX6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1120), [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) | [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6)<br>[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h618 | [OrangePi-Zero3](https://github.com/ophub/fnnas/issues/158), [H618-DevBoard](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3434) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n\n> [!TIP]\n> 現在、[s905ボックス](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1173)は`TF/SD/USB`でのみ使用できます。その他のボックスモデルは`EMMC`への書き込みに対応しています。詳細は[✅ 対応デバイス一覧](build-armbian/armbian-files/common-files/etc/model_database.conf)をご参照ください。新しいデバイスサポートの追加については、ドキュメントのセクション12.15：[新しい対応デバイスの追加方法](documents/README.ja.md#1215-新しいサポートデバイスの追加方法)をご覧ください。ご使用前に[Armbianユーザードキュメント](./documents/README.ja.md)をお読みください。よくある問題の解決方法が記載されています。\n\n## Armbianのインストールとアップグレード手順\n\nお使いのデバイスモデルに合ったArmbianシステムを選択してください。デバイス固有の使用方法については、対応するドキュメントをご参照ください。\n\n- ### ArmbianをEMMCにインストール\n\n1. `Rockchip`プラットフォームのデバイスについては、ドキュメントの[第8章](documents/README.ja.md#8-armbian-を-emmc-にインストールする)をご参照ください。\n\n2. `Amlogic`および`Allwinner`プラットフォームのデバイスについては、[Rufus](https://rufus.ie/)や[balenaEtcher](https://www.balena.io/etcher/)などのツールを使用してシステムをUSBメモリに書き込み、デバイスに挿入します。Armbianシステムにログイン（デフォルトユーザー：root、デフォルトパスワード：1234）し、以下のコマンドを入力します：\n\n```shell\narmbian-install\n```\n\n| オプション | デフォルト | 選択肢 | 説明       |\n| -------- | ------- | ------- | ----------------- |\n| -m       | no      | yes/no  | メインラインu-bootを使用 |\n| -a       | yes     | yes/no  | [ampart](https://github.com/7Ji/ampart)パーティション調整ツールを使用 |\n| -l       | no      | yes/no  | 完全なデバイスリストを表示 |\n\n例：`armbian-install -m yes -a no`\n\n- ### Armbianカーネルの更新\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\n# rootユーザーとして実行（sudo -i）\n# パラメータを指定しない場合、最新バージョンに更新されます。\narmbian-update\n```\n\n| オプション | デフォルト      | 選択肢       | 説明                      |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r       | ophub/kernel | `<owner>/<repo>` | github.comからカーネルをダウンロードするリポジトリを設定 |\n| -u       | 自動判定   | stable/flippy/beta/rk3588/rk35xx/h6 | カーネルの[タグサフィックス](https://github.com/ophub/kernel/releases)を設定 |\n| -k       | 最新バージョン | カーネルバージョン | [カーネルバージョン](https://github.com/ophub/kernel/releases/tag/kernel_stable)を設定 |\n| -b       | yes          | yes/no        | 更新時に現在使用中のカーネルを自動バックアップ |\n| -d       | deb          | tar/deb       | 優先するカーネルパッケージ形式を設定。利用できない場合、スクリプトが自動的に代替形式を試みます。カスタムドライバーのコンパイルには`deb`形式を推奨。 |\n| -m       | no           | yes/no        | メインラインu-bootを使用 |\n| -s       | なし         | なし/ディスク名 | [SOS] eMMC/NVMe/sdXまたは他のディスク上のシステムカーネルを復元 |\n| -h       | なし         | なし          | ヘルプ情報を表示 |\n\n例：`armbian-update -k 5.15 -u stable -d deb`\n\n`-k`パラメータでカーネルバージョンを指定する際、正確なバージョン番号（例：`armbian-update -k 5.15.50`）またはカーネルシリーズのみ（例：`armbian-update -k 5.15`）を指定できます。シリーズを指定した場合、そのシリーズ内の最新バージョンが自動的に使用されます。\n\nカーネル更新時、現在実行中のカーネルは自動的に`/ddbr/backup`ディレクトリにバックアップされ、最新の3つのバージョンが保持されます。新しくインストールしたカーネルが不安定な場合、いつでもバックアップカーネルを復元できます。カーネル更新によりシステムが起動できなくなった場合は、`armbian-update -s`でシステムカーネルを復元できます。詳細は[ヘルプドキュメント](documents/README.ja.md#10-armbian-カーネルの更新)をご覧ください。\n\n- ### Armbianソースの変更\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-apt\n```\n\nお住まいの国や地域に適したソフトウェアソースを選択することで、ダウンロード速度を大幅に向上させることができます。詳細は[ヘルプドキュメント](documents/README.ja.md#11-よく使うソフトウェアのインストール)をご覧ください。\n\n- ### よく使うソフトウェアのインストール\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-software\n```\n\n`armbian-software -u`コマンドでローカルのソフトウェアセンターリストを更新できます。[Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues)でのユーザーフィードバックに基づき、よく使われる[ソフトウェア](build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf)がワンクリックでのインストール/更新/アンインストールに対応するよう段階的に統合されています。`Dockerイメージ`、`デスクトップソフトウェア`、`アプリケーションサービス`などが含まれます。[詳細な説明](documents/armbian_software.md)をご覧ください。\n\n- ### Armbian設定の変更\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-config\n```\n\n- ### ArmbianのSwap作成\n\n`Docker`などのメモリ集約型アプリケーションの実行時にデバイスのメモリが不足する場合、`swap`仮想メモリパーティションを作成して、ディスク容量の一部を追加メモリとして使用できます。パラメータの単位は`GB`で、デフォルト値は`1`です。\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-swap 1\n```\n\n- ### LEDディスプレイの制御\n\nArmbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-openvfd\n```\n\n[LEDスクリーンディスプレイ制御手順](documents/led_screen_display_control.md)に従ってデバッグしてください。\n\n- ### EMMC元システムのバックアップ/復元\n\n`TF/SD/USB`経由でデバイスの`EMMC`パーティションのバックアップと復元をサポートします。新しいデバイスにArmbianをインストールする前に、必要に応じて将来復元できるよう、元のAndroid TVシステムをバックアップすることをお勧めします。\n\n`TF/SD/USB`からArmbianシステムを起動し、以下のコマンドを入力します：\n\n```shell\narmbian-ddbr\n```\n\nプロンプトで`b`を入力するとシステムをバックアップ、`r`を入力すると復元します。\n\n> [!IMPORTANT]\n> または、USBケーブル経由でAndroidシステムをeMMCに直接書き込むこともできます。Androidシステムイメージは[Tools](https://github.com/ophub/kernel/releases/tag/tools)から入手できます。\n\n- ### Armbian内でのカーネルコンパイル\n\nカーネルコンパイルの手順については、[カーネルコンパイル](compile-kernel/README.ja.md)ドキュメントをご覧ください。Armbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-kernel -u\narmbian-kernel -k 6.6.12\n```\n\n- ### その他の使用方法\n\nシステム内のすべてのサービススクリプトを最新バージョンに更新するには、Armbianシステムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-sync\n```\n\nArmbian使用時のよくある問題とその解決方法については、[documents](documents/README.ja.md)をご覧ください。\n\n## ローカルパッケージング\n\n1. リポジトリをローカルにクローン `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. 必要なソフトウェアパッケージをインストール（Ubuntu 24.04を例として）\n\n`~/amlogic-s9xxx-armbian`ルートディレクトリに移動し、インストールコマンドを実行します：\n\n```shell\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# Ubuntu-24.04の場合\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. `~/amlogic-s9xxx-armbian`ルートディレクトリに移動し、`build/output/images`フォルダを作成して、Armbianイメージファイル（例：`Armbian_21.11.0-trunk_Odroidn2_current_5.15.50.img`）を`~/amlogic-s9xxx-armbian/build/output/images`ディレクトリにアップロードします。元のファイル名のリリースバージョン番号（例：`21.11.0`）とカーネルバージョン番号（例：`5.15.50`）を保持してください。再構築されたArmbianシステムの命名に使用されます。\n\n4. `~/amlogic-s9xxx-armbian`ルートディレクトリに移動し、`sudo ./rebuild -b s905x3 -k 6.6.12`を実行して、指定したボード用のArmbianイメージを生成します。出力ファイルは`build/output/images`ディレクトリに保存されます。\n\n- ### ローカルパッケージングパラメータの説明\n\n| パラメータ | 意味     | 説明 |\n| ----      | ----------  | ----------  |\n| -b        | ボード      | ビルドするデバイスコードを指定します。例：`-b s905x3`はs905x3デバイスをビルドします。複数のデバイスはアンダースコアで結合できます（例：`-b s905x3_s905d`）。特殊値：`all`はすべてのデバイスをビルド、`first50`は最初の50台、`range50_100`は51〜100台目、`range100_150`は101〜150台目、`last20`は最後の20台をビルドします。完全なリストは[model_database.conf](build-armbian/armbian-files/common-files/etc/model_database.conf)の`BOARD`エントリをご参照ください。デフォルト：`all` |\n| -r        | カーネルリポジトリ | github.comのカーネルリポジトリの`<owner>/<repo>`を指定。デフォルト値：`ophub/kernel` |\n| -u        | カーネル用途 | 使用するカーネルの`タグサフィックス`を設定（[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable)、[flippy](https://github.com/ophub/kernel/releases/tag/kernel_flippy)、[beta](https://github.com/ophub/kernel/releases/tag/kernel_beta)など）。デフォルト値：`stable` |\n| -k        | カーネル     | [カーネル](https://github.com/ophub/kernel/releases/tag/kernel_stable)名を指定（例：`-k 6.6.12`）。複数のカーネルは`_`で結合（例：`-k 6.6.12_5.15.50`）。`-k`パラメータで自由に指定できるカーネルバージョンは、`stable/flippy/beta`を使用するカーネルにのみ有効です。[rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) / [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) / [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6)などの他のカーネルシリーズは、専用のカーネルのみ使用できます。 |\n| -a        | 自動カーネル | 同じシリーズの最新カーネルを自動的に使用するかどうかを設定。`true`の場合、`-k`で指定されたシリーズ（例：6.6.12）内の新しいバージョンがカーネルリポジトリで確認され、見つかった場合は最新バージョンが自動的に使用されます。`false`の場合、指定された正確なバージョンが使用されます。デフォルト：`true` |\n| -t        | ルートFSタイプ | ROOTFSパーティションのファイルシステムタイプを設定。選択肢：`ext4`または`btrfs`。例：`-t btrfs`。デフォルト：`ext4` |\n| -s        | サイズ       | イメージパーティションサイズを設定。ROOTFSパーティションのみ設定する場合は単一の値を指定（例：`-s 2560`）。BOOTFSとROOTFSの両方を設定する場合は`/`で結合（例：`-s 512/2560`）。デフォルト：`512/2560` |\n| -n        | ビルダー名 | Armbianシステムのビルダー署名を設定。スペースを含めないでください。デフォルト：なし |\n\n- `sudo ./rebuild`：デフォルト設定ですべてのデバイスモデルをパッケージング。\n- `sudo ./rebuild -b s905x3 -k 6.6.12`：推奨。指定したカーネルでデフォルト設定のビルド。\n- `sudo ./rebuild -b s905x3 -k 6.1.y`：デフォルト設定で6.1.yシリーズの最新カーネルを使用してビルド。\n- `sudo ./rebuild -b s905x3_s905d -k 6.6.12_5.15.50`：デフォルト設定で複数のカーネルを同時にビルド。複数のカーネルは`_`で結合。\n- `sudo ./rebuild -b s905x3 -k 6.6.12 -s 2560`：単一のカーネルとモデルでデフォルト設定のビルド。ROOTFSパーティションサイズを2560 MiBに設定。\n- `sudo ./rebuild -b s905x3_s905d`：複数のモデルですべてのカーネルをデフォルト設定でビルド。複数のモデルは`_`で結合。\n- `sudo ./rebuild -k 6.6.12_5.15.50`：すべてのモデルで複数の指定カーネルをデフォルト設定でビルド。カーネルは`_`で結合。\n- `sudo ./rebuild -k 6.6.12_5.15.50 -a true`：上記と同じ。各シリーズ内の最新カーネルに自動アップグレード。\n- `sudo ./rebuild -t btrfs -s 2560 -k 6.6.12`：btrfsファイルシステム、2560 MiBのROOTFS、カーネル6.6.12ですべてのモデルをビルド。\n\n## GitHub Actionsを使用したコンパイル\n\n1. ワークフロー設定ファイルは[.github/workflows/](.github/workflows/)ディレクトリにあります。\n\n2. 新規ビルド：[Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions)ページで***`Build Armbian server image`***を選択し、[build-armbian-arm64-server-image.yml](.github/workflows/build-armbian-arm64-server-image.yml)ワークフローを使用します。Ubuntuシリーズ（例：`resolute`）またはDebianシリーズ（例：`trixie`）から選択できます。***`Run workflow`***をクリックしてビルドを開始します。\n\n3. 再ビルド：[Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases)にコンパイル済みの`Armbian_.*-trunk_.*.img.gz`ファイルがすでにあり、他のボード用に再パッケージするだけの場合は、ソースコンパイル手順をスキップし、[build-armbian-using-releases-files.yml](.github/workflows/build-armbian-using-releases-files.yml)を使用して二次ビルドを行います。\n\n4. 他のArmbianシステム（例：公式[armbian.tnahosting.net](https://armbian.tnahosting.net/dl/)ダウンロードサイトの[odroidn2](https://armbian.tnahosting.net/dl/odroidn2/archive/)イメージ）を使用する場合は、ワークフローファイル[build-armbian-using-official-image.yml](.github/workflows/build-armbian-using-official-image.yml)で本リポジトリのスクリプトを参照するだけで、他のデバイスをサポートするためのArmbian再構築が可能です。例：\n\n```yaml\n- name: Build Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img\n    armbian_board: s905d_s905x3_s922x_s905x\n    armbian_kernel: 6.12.y_6.18.y\n```\n\n- ### GitHub Actions入力パラメータの説明\n\nこれらのパラメータは、上記のローカルパッケージングコマンドオプションに対応しています。\n\n| パラメータ       | デフォルト       | 説明                                             |\n|-----------------|---------------|---------------------------------------------------------|\n| armbian_path    | なし          | 元のArmbianファイルのパスを設定。ワークフローファイルパス（例：`build/output/images/*.img`）およびネットワークダウンロードURL（例：`https://dl.armbian.com/*/Armbian_*.img.xz`）をサポート。 |\n| armbian_board   | all           | パッケージボックスの`board`を設定。`-b`を参照       |\n| kernel_repo     | ophub/kernel  | github.comのカーネルリポジトリの`<owner>/<repo>`を指定。`-r`を参照 |\n| kernel_usage    | stable        | 使用するカーネルの`タグサフィックス`を設定。`-u`を参照 |\n| armbian_kernel  | 6.12.y_6.18.y | カーネルの[バージョン](https://github.com/ophub/kernel/releases/tag/kernel_stable)を設定。`-k`を参照 |\n| auto_kernel     | true          | 同じシリーズの最新バージョンのカーネルを自動的に採用するかどうかを設定。`-a`を参照       |\n| armbian_fstype  | ext4          | システムのROOTFSパーティションのファイルシステムタイプを設定。`-t`を参照  |\n| armbian_size    | 512/2560      | システムのBOOTFSおよびROOTFSパーティションのサイズを設定。`-s`を参照  |\n| armbian_files   | false         | カスタムArmbianファイルを追加。設定した場合、このディレクトリ内のすべてのファイルが[common-files](build-armbian/armbian-files/common-files)にコピーされます。ファイルが正しくオーバーレイされるよう、ディレクトリ構造はArmbianのルートディレクトリを反映する必要があります（例：デフォルト設定ファイルは`etc/default/`配下に配置）。 |\n| builder_name    | なし          | Armbianシステムのビルダー署名を設定。`-n`を参照 |\n\n- ### GitHub Actions出力変数の説明\n\n`Releases`へのアップロードには、リポジトリの`ワークフロー読み取りおよび書き込み権限`が必要です。詳細は[使用方法の説明](documents/README.ja.md#2-プライバシー変数-github_token-等の設定)をご覧ください。\n\n| パラメータ                        | デフォルト       | 説明                           |\n|----------------------------------|---------------|---------------------------------------|\n| ${{ env.PACKAGED_OUTPUTPATH }}   | out           | Armbianシステムファイルの出力パス      |\n| ${{ env.PACKAGED_OUTPUTDATE }}   | 04.13.1058    | パッケージング日時（月.日.時分） |\n| ${{ env.PACKAGED_STATUS }}       | success       | パッケージングステータス：success / failure   |\n\n## Armbian Dockerイメージのビルド\n\nArmbianシステムの[Docker](https://hub.docker.com/u/ophub)イメージの作成については、[armbian_docker](./compile-kernel/tools/script/docker)ビルドスクリプトをご参照ください。\n\n## GitHub Actionsを使用したカーネルコンパイル\n\nカーネルコンパイルの手順については、[compile-kernel](compile-kernel/README.ja.md)をご覧ください。\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n## Armbianコントリビューター\n\nまず、[150balbes](https://github.com/150balbes)氏の素晴らしい貢献と、Amlogic TVボックスでArmbianを実行するために築かれた確かな基盤に感謝します。ここでコンパイルされる[Armbian](https://github.com/armbian/build)システムは、最新の公式ソースコードを使用してリアルタイムでビルドされています。開発アプローチは、[ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box)などの著者のチュートリアルからインスピレーションを受けています。皆様の献身と共有に感謝し、Armbianがますます多くのデバイスで動作できるようになっています。\n\nこのシステムで使用される[u-boot](https://github.com/ophub/u-boot)、[kernel](https://github.com/ophub/kernel)、その他のリソースは、主に[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit)プロジェクトから提供されています。一部のファイルは、[amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt)、[amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian)、[luci-app-amlogic](https://github.com/ophub/luci-app-amlogic)、[u-boot](https://github.com/ophub/u-boot)、[kernel](https://github.com/ophub/kernel)などのプロジェクトで、ユーザーが[Pull Requests](https://github.com/ophub/amlogic-s9xxx-armbian/pulls)や[Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues)を通じて貢献したものです。これらの先駆者やコントリビューターを称えるため、リポジトリ作成以降（`2021-09-19`）のすべての貢献が[CONTRIBUTORS.md](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTORS.md)に記録されています。皆様のおかげで、これらのデバイスに新しい命と目的が与えられたことに改めて感謝いたします。\n\n## その他のディストリビューション\n\n- [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt)プロジェクトは、TVボックス向けの`OpenWrt`システムを提供しており、Armbianがサポートするデバイスにも適用可能です。\n- [fnnas](https://github.com/ophub/fnnas)プロジェクトは、TVボックス向けの`FnNAS`システムを提供しており、Armbianがサポートするデバイスにも適用可能です。\n- [unifreq](https://github.com/unifreq/openwrt_packit)は、幅広いAmlogic、Rockchip、Allwinnerデバイス向けの`OpenWrt`システムを作成しており、コミュニティのベンチマークプロジェクトです。強くお勧めします。\n- [Scirese](https://github.com/Scirese/alarm)は、Android TVボックスでの`Arch Linux ARM` / `Manjaro`システムのビルド、インストール、使用をテストしています。詳細はリポジトリをご覧ください。\n- [7Ji](https://7ji.github.io/)は、Amlogicプラットフォームのリバースエンジニアリングと開発に関する記事を公開しており、ArchLinux ARMのインストールやAmlogicブートメカニズムの分析などのトピックを扱っています。[ampart](https://github.com/7Ji/ampart)プロジェクトは、Amlogic eMMCパーティションテーブルとDTBパーティションの読み取り・編集用パーティションツールを提供し、eMMCスペースの100%活用を実現しています。[amlogic-s9xxx-archlinuxarm](https://github.com/7Ji/amlogic-s9xxx-archlinuxarm)プロジェクトは、`Arch Linux ARM`のビルドおよび使用手順を提供しています。[YAopenvfD](https://github.com/7Ji/YAopenvfD)プロジェクトは、代替のopenvfdデーモン実装を提供しています。\n- [13584452567](https://github.com/13584452567)は、本リポジトリにおける`Rockchip`デバイスサポートの先駆者です。彼の貢献により、[EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991)、[King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080)、[TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094)、[Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132)、[ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247)、[tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687)、[xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698)など、多数の`Rockchip`デバイスのサポートが拡大されました。また、[TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638)などの`Allwinner`デバイス用の専用[カーネル](https://github.com/13584452567/linux-6.6.y)をメンテナンスし、[Discussions](https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1634)や[Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues)で広範な技術サポートとソリューションを提供し、コミュニティに多大な貢献をしています。\n- [cooip-jm](https://github.com/cooip-jm)は、Armbian、LXC、Docker、AdGuard、その他のアプリケーションに関する多くのガイドを[wiki](https://github.com/cooip-jm/About-openwrt/wiki)で共有しています。ぜひご覧ください。\n\n\n## リンク\n\n- [armbian](https://github.com/armbian/build)\n- [unifreq](https://github.com/unifreq)\n- [kernel.org](https://kernel.org)\n\n## ライセンス\n\namlogic-s9xxx-armbian © OPHUBは[GPL-2.0](LICENSE)の下でライセンスされています。\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n    <img alt=\"Armbian\" src=\"https://github.com/user-attachments/assets/74e55052-031b-48f8-9aca-e5f1dd9e256a\" />\n</div>\n\n# Armbian\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nArmbian is a lightweight Linux distribution built specifically for ARM chips, based on Debian/Ubuntu. The Armbian system is lean, clean, and 100% compatible with Debian/Ubuntu, inheriting its functionality and rich software ecosystem. It runs securely and stably on TF/SD/USB storage and the device's eMMC. This project preserves the integrity of the official Armbian system while extending support for unofficially supported devices such as TV boxes, and adds a set of convenient management commands. You can now replace the Android TV system on your TV box with Armbian, transforming it into a powerful server.\n\nThis project relies on many [contributors](CONTRIBUTORS.md) to build the Armbian system for `Amlogic`, `Rockchip`, and `Allwinner` devices. It supports writing to eMMC, kernel updates, and other features. For detailed usage, see the [Armbian User Documentation](./documents). The latest Armbian system can be downloaded from [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases). Welcome to `Fork` and customize. If this project is helpful, please click the `Star` button in the upper right corner to show your support.\n\n## Default Information for Armbian System\n\n| System Name    | Default Username | Default Password  | SSH Port  | IP Address  |\n| -------------- | ---------------- | ----------------- | --------- | ----------- |\n| 🐧 [Armbian.OS](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | root | 1234 | 22 | Obtain from router |\n| 🐋 [Armbian.Docker](https://hub.docker.com/u/ophub) | root | 1234 | 22 | Static MacVLAN IP |\n\n## Supported Devices\n\n⬆️ Models from each platform (Amlogic/Rockchip/Allwinner) are ranked by SoC performance from high to low.\n\n| SoC | [Device](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | [Kernel](https://github.com/ophub/kernel) |\n| ---- | ---- | ---- |\n| a311d | [Khadas-VIM3](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/99), [WXY-OES](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s922x | [Beelink-GT-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/370), [Beelink-GT-King-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/707), [Ugoos-AM6-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/464), [ODROID-N2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/201), [X88-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/988), [Ali-CT2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1150), [WXY-OES-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x3 | [X96-Max+](https://github.com/ophub/amlogic-s9xxx-armbian/issues/351), [HK1-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/414), [Vontar-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1006), [H96-Max-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1250), [Ugoos-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/782), [TX3(QZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/644), [TX3(BZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1077), [X96-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/366), [X96-Max+_A100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/779), [A95X-F3-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2282), [Tencent-Aurora-3Pro(s905x3-b)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/506), [X96-Max+Q1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/788), [X96-Max+100W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/909), [X96-Max+_2101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1086), [Infinity-B32](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1181), [Whale](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1166), [X88-Pro-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [X99-Max-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [Transpeed-X3-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [TOX1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3441) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x2 | [X96Max-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/453), [X96Max-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/95), [MECOOL-KM3-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/79), [Tanix-Tx5-Max](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/351), [A95X-F2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/851), [HG680-FJ](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3089) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c), [CM311-1a-YST](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/732), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [UNT413A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [ZTE-B863AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/741), [CM311-1a-CH](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1508), [IP112H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1520), [B863AV3.1-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2292) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3b | [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2209), [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1180), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1268), [E900V21D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2447), [E900V22D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1256), [E900V21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1514), [E900V22E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/939), [M302A/M304A](https://github.com/ophub/amlogic-s9xxx-armbian/pull/615), [Hisense-IP103H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1154), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1332), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1568), [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1613), [B860AV-2.1M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1598), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1712), [RG020ET-CA](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1860), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3272) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l3 | [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1318), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/763), [HG680-LC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/978), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921#issuecomment-1453143251), [UNT400G1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1277), [UNT400G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2625), [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [ZXV10-BV310](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1512), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1817), [ZXV10-B860AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2012), [ZXV10-B860AV2.1-U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2273), [E900V22D-2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2058), [CM201-1-6-YS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2539), [M301A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3055) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s912 | [Tanix-TX8-Max](https://github.com/ophub/amlogic-s9xxx-armbian/issues/500), [Tanix-TX9-Pro(3G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/315), [Tanix-TX9-Pro(2G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/740), [Tanix-TX92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1012790770), [Tanix-TX9S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3282), [Nexbox-A1](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [Nexbox-A95X-A2](https://www.cafago.com/en/p-v2979eu-2g.html),  [A95X](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [H96-Pro-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1013071513), [VORKE-Z6-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72), [Mecool-M8S-PRO-L](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), [Vontar-X92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/525), [T95Z-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/668), [Octopus-Planet](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1020), [Phicomm-T1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/522), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1882), [OneCloudPro-V1.1_V1.2](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2241) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905d | [MECOOL-KI-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59), [Phicomm-N1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/925), [SML-5442TW](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/451) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905x | [HG680P](https://github.com/ophub/amlogic-s9xxx-armbian/issues/262), [B860H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/60), [TBee-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/98), [T95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/285), [TX9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/645), [XiaoMI-3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1405), [X96](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1480), [Nexbox-a95x](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1714), [BTV9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3256) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905mb | [S65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1644) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l | [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [M201-S](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/444), [MiBox-4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2101), [MiBox-4C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1826), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1912), [E900V21C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2341), [IP108H-53u1m](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2357), [Tencent-Aurora-1s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2465), [B860AV2.1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2491), [B860AV2.1U](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2499), [HM201](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2585) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905l2 | [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [MGV2000-K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1839), [MGV3000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921), [Wojia-TV-IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [M301A](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/405), [E900v21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1278), [e900v21d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127), [CM201-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2188), [IP108H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2598), [MGV2000-CW](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2616) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128), [IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905w | [X96-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/621), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1062), [W95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/570), [X96W/FunTV](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1044), [MXQ-Pro-4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1140), [MeCool-m8s-pro-W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3245) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3588(s) | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Radxa-Rock5C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [Orange-Pi-5-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [NanoPC-T6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2453), [Smart-Am60](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817), [DC-A588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2988), [Orangepi-5B](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052), [CM3588-NAS](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3306), [Rock-5-ITX](https://github.com/ophub/fnnas/issues/355), [LZ-D3588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3328), [Boca-tcn100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3437) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) |\n| rk3576 | [NanoPi-m5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3207) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3399 | [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [CRRC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1280), [SMART-AM40](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1317), [SW799](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1326), [ZYSJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380), [DG-3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1492), [DLFR100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522), [Emb3531](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1549), [Leez-p710](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698), [Fine3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1790), [Firefly-RK3399](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491), [LX-R3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2026), [Hugsun-x99](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2050), [Tb-ls3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2146), [Hisense-hs530r](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/572), [Tpm312](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2403), [ZK-rk39a](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2446), [YSKJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2673), [Fmx1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2691), [Fmx1-Pro-B](https://github.com/ophub/fnnas/issues/250), [Sv-33a6x](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/748), [Sv-33a6x(VPU)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3372), [AIO-3399B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3185), [AIO-3399C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3339), [AIO-3399C(AI)](https://github.com/ophub/fnnas/issues/108), [TaraM](https://github.com/ophub/u-boot/pull/28), [NanoPC-T4](https://github.com/ophub/u-boot/pull/30), [Firefly-Core-3399-JD4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3354), [GEA-6319](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3383) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155), [Swan1-w28](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407), [Ruisen-box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508), [DG-TN3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661), [Alark35-3500](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911), [MMBox-Anas3035](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2995), [Wocyber-A3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978), [Photonicat](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827), [NSY-G16-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [NSY-G68-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/845), [BDY-G18-Pro](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/847), [Gzpeite-P01](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3221), [LZ-D3568](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3387), [LZ-K3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3304), [BDKJ-One](https://github.com/ophub/u-boot/pull/29), [Station-P2](https://github.com/ophub/fnnas/pull/350), [Lyt-t68m](https://github.com/ophub/fnnas/issues/435) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867), [LCKFB-Taishan-Pi](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538), [WXY-OEC-turbo-4g](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736), [Station-M2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744), [Orange-Pi-3B](https://github.com/ophub/fnnas/issues/261) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726), [Radxa-E20C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [H96-Max-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404), [HK1-Rbox-K8S](https://github.com/ophub/fnnas/issues/464), [HT2](https://github.com/ophub/fnnas/issues/464), [CD1000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3302) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) |\n| rk3328 | [BeikeYun](https://github.com/ophub/amlogic-s9xxx-armbian/issues/852), [Chainedbox-L1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1680), [Station-M1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Bqeel-MVR9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Renegade/Firefly](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| rk3318 | [RX3318-Box](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2129) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h6 | [Vplus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1100), [Tanix-TX6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1120), [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) | [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6)<br>[stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| h618 | [OrangePi-Zero3](https://github.com/ophub/fnnas/issues/158), [H618-DevBoard](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3434) | [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n\n> [!TIP]\n> At present, the [s905 box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1173) can only be used with `TF/SD/USB`; other box models support writing to `EMMC`. For more information, refer to the [✅ Supported Device List](build-armbian/armbian-files/common-files/etc/model_database.conf). To add new device support, see Section 12.15 of the documentation: [Adding New Supported Devices](documents/README.md#1215-how-to-add-new-supported-devices). Please read the [Armbian User Documentation](./documents) before use, as it provides solutions to common issues.\n\n## Installation and Upgrade Instructions for Armbian\n\nChoose the Armbian system that matches your device model. Refer to the corresponding documentation for device-specific usage instructions.\n\n- ### Install Armbian to EMMC\n\n1. For `Rockchip` platform devices, refer to [Chapter 8](documents#8-installing-armbian-to-emmc) of the documentation.\n\n2. For `Amlogic` and `Allwinner` platform devices, use tools such as [Rufus](https://rufus.ie/) or [balenaEtcher](https://www.balena.io/etcher/) to write the system to a USB stick, then insert the USB stick into the device. Log in to the Armbian system (default user: root, default password: 1234) and enter the command:\n\n```shell\narmbian-install\n```\n\n| Optional | Default | Options | Description       |\n| -------- | ------- | ------- | ----------------- |\n| -m       | no      | yes/no  | Use mainline u-boot |\n| -a       | yes     | yes/no  | Use [ampart](https://github.com/7Ji/ampart) partition adjustment tool |\n| -l       | no      | yes/no  | Show full device list |\n\nExample: `armbian-install -m yes -a no`\n\n- ### Update Armbian Kernel\n\nLog in to the Armbian system and enter the command:\n\n```shell\n# Run as root user (sudo -i)\n# If no parameter is specified, it will be updated to the latest version.\narmbian-update\n```\n\n| Optional | Default      | Options       | Description                      |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r       | ophub/kernel | `<owner>/<repo>` | Set the repository for downloading kernels from github.com |\n| -u       | Automation   | stable/flippy/beta/rk3588/rk35xx/h6 | Set the kernel [tags suffix](https://github.com/ophub/kernel/releases) |\n| -k       | Latest version | Kernel version | Set the [kernel version](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| -b       | yes          | yes/no        | Automatically back up the currently used kernel when updating |\n| -d       | deb          | tar/deb       | Set the preferred kernel package format. If unavailable, the script will automatically try the alternative format. The `deb` format is recommended for compiling custom drivers. |\n| -m       | no           | yes/no        | Use mainline u-boot |\n| -s       | None         | None/DiskName | [SOS] Restore the system kernel on eMMC/NVMe/sdX or other disks |\n| -h       | None         | None          | View help information |\n\nExample: `armbian-update -k 5.15 -u stable -d deb`\n\nWhen specifying the kernel version via the `-k` parameter, you can provide an exact version number (e.g., `armbian-update -k 5.15.50`) or specify only the kernel series (e.g., `armbian-update -k 5.15`). When a series is specified, the latest version within that series will be used automatically.\n\nDuring kernel updates, the currently running kernel is automatically backed up to the `/ddbr/backup` directory, retaining the 3 most recent versions. If the newly installed kernel proves unstable, you can restore a backup kernel at any time. If a kernel update renders the system unbootable, use `armbian-update -s` to restore the system kernel. For more details, see the [Help Document](documents#10-updating-armbian-kernel).\n\n- ### Replace Armbian Sources\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-apt\n```\n\nChoosing the appropriate software source for your country or region can significantly improve download speeds. For more details, see the [Help Document](documents#11-installing-common-software).\n\n- ### Install Common Software\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-software\n```\n\nThe command `armbian-software -u` updates the local software center list. Based on user feedback in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues), commonly used [software](build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) has been gradually integrated with one-click install/update/uninstall support. This includes `Docker images`, `desktop software`, `application services`, and more. See the [detailed instructions](documents/armbian_software.md).\n\n- ### Modify Armbian Configuration\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-config\n```\n\n- ### Create Swap for Armbian\n\nIf you find the device's memory insufficient when running memory-intensive applications such as `Docker`, you can create a `swap` virtual memory partition to use a portion of disk space as additional memory. The parameter unit is `GB`, with a default value of `1`.\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-swap 1\n```\n\n- ### Control LED Display\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-openvfd\n```\n\nDebug according to the [LED Screen Display Control Instructions](documents/led_screen_display_control.md).\n\n- ### Backup/Restore EMMC Original System\n\nSupports backing up and restoring the device's `EMMC` partition via `TF/SD/USB`. Before installing Armbian on a new device, it is recommended to back up the original Android TV system for future restoration if needed.\n\nBoot the Armbian system from `TF/SD/USB` and enter the command:\n\n```shell\narmbian-ddbr\n```\n\nEnter `b` at the prompt to back up the system, or `r` to restore.\n\n> [!IMPORTANT]\n> Alternatively, the Android system can be flashed directly into eMMC via USB cable. Android system images are available in [Tools](https://github.com/ophub/kernel/releases/tag/tools).\n\n- ### Compile the Kernel in Armbian\n\nFor kernel compilation instructions, see the [Compile Kernel](compile-kernel) documentation. Log in to the Armbian system and enter the command:\n\n```shell\narmbian-kernel -u\narmbian-kernel -k 6.6.12\n```\n\n- ### More Usage Instructions\n\nTo update all service scripts in the system to the latest version, log in to the Armbian system and enter the command:\n\n```shell\narmbian-sync\n```\n\nFor common issues and their solutions when using Armbian, see [documents](documents).\n\n## Local Packaging\n\n1. Clone the repository to local `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. Install the necessary software packages (using Ubuntu 24.04 as an example)\n\nEnter the `~/amlogic-s9xxx-armbian` root directory, then run the installation command:\n\n```shell\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# For Ubuntu-24.04\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. Enter the `~/amlogic-s9xxx-armbian` root directory, create the `build/output/images` folder, and upload the Armbian image file (e.g., `Armbian_21.11.0-trunk_Odroidn2_current_5.15.50.img`) to the `~/amlogic-s9xxx-armbian/build/output/images` directory. Retain the release version number (e.g., `21.11.0`) and kernel version number (e.g., `5.15.50`) in the original filename, as they will be used for naming the rebuilt Armbian system.\n\n4. Enter the `~/amlogic-s9xxx-armbian` root directory and run `sudo ./rebuild -b s905x3 -k 6.6.12` to generate the Armbian image for the specified board. Output files are saved in the `build/output/images` directory.\n\n- ### Local Packaging Parameter Description\n\n| Parameter | Meaning     | Description |\n| ----      | ----------  | ----------  |\n| -b        | Board      | Specifies the device code(s) to build. For example, `-b s905x3` builds the s905x3 device. Multiple devices can be joined with underscores, e.g., `-b s905x3_s905d`. Special values: `all` builds all devices; `first50` builds the first 50; `range50_100` builds devices 51–100; `range100_150` builds devices 101–150; `last20` builds the last 20. See the `BOARD` entries in [model_database.conf](build-armbian/armbian-files/common-files/etc/model_database.conf) for the full list. Default: `all` |\n| -r        | KernelRepo | Specify the `<owner>/<repo>` of the github.com kernel repository. Default value: `ophub/kernel` |\n| -u        | kernelUsage | Set the `tags suffix` of the kernel used, such as [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable), [flippy](https://github.com/ophub/kernel/releases/tag/kernel_flippy), [beta](https://github.com/ophub/kernel/releases/tag/kernel_beta). Default value: `stable` |\n| -k        | Kernel     | Specify [kernel](https://github.com/ophub/kernel/releases/tag/kernel_stable) name, such as `-k 6.6.12`. Connect multiple kernels with `_`, such as `-k 6.6.12_5.15.50`. The kernel version freely specified by the `-k` parameter is only valid for kernels using `stable/flippy/beta`. Other kernel series such as [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) / [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) / [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6) can only use specific kernels. |\n| -a        | AutoKernel | Set whether to automatically use the latest kernel within the same series. When `true`, the kernel repository is checked for newer versions within the series specified by `-k` (e.g., 6.6.12), and if found, the latest version is used automatically. When `false`, the exact specified version is used. Default: `true` |\n| -t        | RootfsType | Set the file system type of the ROOTFS partition. Options: `ext4` or `btrfs`. Example: `-t btrfs`. Default: `ext4` |\n| -s        | Size       | Set the image partition sizes. To set only the ROOTFS partition, specify a single value (e.g., `-s 2560`). To set both BOOTFS and ROOTFS, join them with `/` (e.g., `-s 512/2560`). Default: `512/2560` |\n| -n        | BuilderName | Set the Armbian system builder signature. Do not include spaces. Default: None |\n\n- `sudo ./rebuild`: Use default configuration to package all device models.\n- `sudo ./rebuild -b s905x3 -k 6.6.12`: Recommended. Build with default configuration for the specified kernel.\n- `sudo ./rebuild -b s905x3 -k 6.1.y`: Build with default configuration, using the latest kernel in the 6.1.y series.\n- `sudo ./rebuild -b s905x3_s905d -k 6.6.12_5.15.50`: Build with default configuration for multiple kernels simultaneously. Use `_` to join multiple kernels.\n- `sudo ./rebuild -b s905x3 -k 6.6.12 -s 2560`: Build a single kernel and model with default configuration; ROOTFS partition size set to 2560 MiB.\n- `sudo ./rebuild -b s905x3_s905d`: Build all kernels for multiple models with default configuration. Use `_` to join multiple models.\n- `sudo ./rebuild -k 6.6.12_5.15.50`: Build all models with default configuration and multiple specified kernels. Use `_` to join kernels.\n- `sudo ./rebuild -k 6.6.12_5.15.50 -a true`: Same as above, with automatic upgrade to the latest kernel within each series.\n- `sudo ./rebuild -t btrfs -s 2560 -k 6.6.12`: Build all models with btrfs filesystem, 2560 MiB ROOTFS, and kernel 6.6.12.\n\n## Use GitHub Actions for Compilation\n\n1. Workflow configuration files are located in the [.github/workflows/](.github/workflows/) directory.\n\n2. Fresh Build: On the [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, select ***`Build Armbian server image`*** to use the [build-armbian-arm64-server-image.yml](.github/workflows/build-armbian-arm64-server-image.yml) workflow. You can choose from Ubuntu series (e.g., `resolute`) or Debian series (e.g., `trixie`). Click ***`Run workflow`*** to start the build.\n\n3. Rebuild: If [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) already contains compiled `Armbian_.*-trunk_.*.img.gz` files and you only need to repackage for other boards, skip the source compilation step and use [build-armbian-using-releases-files.yml](.github/workflows/build-armbian-using-releases-files.yml) for secondary builds.\n\n4. To use other Armbian systems (e.g., the [odroidn2](https://armbian.tnahosting.net/dl/odroidn2/archive/) image from the official [armbian.tnahosting.net](https://armbian.tnahosting.net/dl/) download site), simply reference this repository's script in the workflow file [build-armbian-using-official-image.yml](.github/workflows/build-armbian-using-official-image.yml) for Armbian restructuring to support other devices. Example:\n\n```yaml\n- name: Build Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img\n    armbian_board: s905d_s905x3_s922x_s905x\n    armbian_kernel: 6.12.y_6.18.y\n```\n\n- ### GitHub Actions Input Parameter Description\n\nThese parameters correspond to the local packaging command options described above.\n\n| Parameter       | Default       | Description                                             |\n|-----------------|---------------|---------------------------------------------------------|\n| armbian_path    | None          | Set the path of the original Armbian file. Supports workflow file paths (e.g., `build/output/images/*.img`) and network download URLs (e.g., `https://dl.armbian.com/*/Armbian_*.img.xz`). |\n| armbian_board   | all           | Set the `board` of the package box, refer to `-b`       |\n| kernel_repo     | ophub/kernel  | Specify `<owner>/<repo>` of the github.com kernel repository, refer to `-r` |\n| kernel_usage    | stable        | Set the `tags suffix` of the used kernel. Refer to `-u` |\n| armbian_kernel  | 6.12.y_6.18.y | Set the [version](https://github.com/ophub/kernel/releases/tag/kernel_stable) of the kernel, refer to `-k` |\n| auto_kernel     | true          | Set whether to automatically adopt the latest version of the same series kernel, refer to `-a`       |\n| armbian_fstype  | ext4          | Set the file system type of the system's ROOTFS partition, refer to `-t`  |\n| armbian_size    | 512/2560      | Set the size of the system BOOTFS and ROOTFS partitions, function reference `-s`  |\n| armbian_files   | false         | Add custom Armbian files. When set, all files in this directory will be copied to [common-files](build-armbian/armbian-files/common-files). The directory structure must mirror the Armbian root directory to ensure files are correctly overlaid (e.g., default configuration files should be placed under `etc/default/`). |\n| builder_name    | None          | Set the Armbian system builder signature, refer to `-n` |\n\n- ### GitHub Actions Output Variable Description\n\nUploading to `Releases` requires `Workflow read and write permissions` for the repository. See the [usage instructions](documents/README.md#2-set-up-private-variable-github_token) for details.\n\n| Parameter                        | Default       | Description                           |\n|----------------------------------|---------------|---------------------------------------|\n| ${{ env.PACKAGED_OUTPUTPATH }}   | out           | Armbian system files output path      |\n| ${{ env.PACKAGED_OUTPUTDATE }}   | 04.13.1058    | Packaging date (month.day.hourminute) |\n| ${{ env.PACKAGED_STATUS }}       | success       | Packaging status: success / failure   |\n\n## Build Armbian Docker Image\n\nFor creating [Docker](https://hub.docker.com/u/ophub) images of the Armbian system, refer to the [armbian_docker](./compile-kernel/tools/script/docker) build script.\n\n## Compiling Kernel Using GitHub Actions\n\nFor kernel compilation instructions, see [compile-kernel](compile-kernel).\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n## Armbian Contributors\n\nFirst and foremost, thanks to [150balbes](https://github.com/150balbes) for the outstanding contributions and the solid foundation laid for running Armbian on Amlogic TV boxes. The [Armbian](https://github.com/armbian/build) system compiled here uses the latest official source code for real-time builds. The development approach is inspired by tutorials from authors such as [ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box). Thanks to everyone's dedication and sharing, enabling Armbian to run on an ever-growing range of devices.\n\nThe [u-boot](https://github.com/ophub/u-boot), [kernel](https://github.com/ophub/kernel), and other resources used in this system are primarily sourced from the [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) project. Some files have been contributed by users through [Pull Requests](https://github.com/ophub/amlogic-s9xxx-armbian/pulls) and [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) in projects such as [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic), [u-boot](https://github.com/ophub/u-boot), and [kernel](https://github.com/ophub/kernel). To acknowledge these pioneers and contributors, all contributions since the repository's creation (`2021-09-19`) are recorded in [CONTRIBUTORS.md](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTORS.md). Thanks again to everyone for breathing new life and purpose into these devices.\n\n## Other Distributions\n\n- The [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt) project provides the `OpenWrt` system for TV boxes, also applicable to Armbian-supported devices.\n- The [fnnas](https://github.com/ophub/fnnas) project provides the `FnNAS` system for TV boxes, also applicable to Armbian-supported devices.\n- [unifreq](https://github.com/unifreq/openwrt_packit) has created `OpenWrt` systems for a wide range of Amlogic, Rockchip, and Allwinner devices, serving as a benchmark project in the community. Highly recommended.\n- [Scirese](https://github.com/Scirese/alarm) has tested the build, installation, and usage of `Arch Linux ARM` / `Manjaro` systems on Android TV boxes. See his repository for details.\n- [7Ji](https://7ji.github.io/) has published articles on reverse engineering and development for the Amlogic platform, covering topics such as installing ArchLinux ARM and analyzing the Amlogic boot mechanism. His [ampart](https://github.com/7Ji/ampart) project provides a partition tool for reading and editing Amlogic eMMC partition tables and DTB partitions, enabling 100% utilization of eMMC space. The [amlogic-s9xxx-archlinuxarm](https://github.com/7Ji/amlogic-s9xxx-archlinuxarm) project provides build and usage instructions for `Arch Linux ARM`. The [YAopenvfD](https://github.com/7Ji/YAopenvfD) project offers an alternative openvfd daemon implementation.\n- [13584452567](https://github.com/13584452567) is the pioneer for `Rockchip` device support in this repository. Through his contributions, support was expanded for numerous `Rockchip` devices including [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698), and more. He also maintains specialized [kernels](https://github.com/13584452567/linux-6.6.y) for `Allwinner` devices such as [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638), and has provided extensive technical support and solutions in [Discussions](https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1634) and [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues), making significant contributions to the community.\n- [cooip-jm](https://github.com/cooip-jm) shares many guides on Armbian, LXC, Docker, AdGuard, and other applications in his [wiki](https://github.com/cooip-jm/About-openwrt/wiki). Recommended reading.\n\n\n## Links\n\n- [armbian](https://github.com/armbian/build)\n- [unifreq](https://github.com/unifreq)\n- [kernel.org](https://kernel.org)\n\n## License\n\nThe amlogic-s9xxx-armbian © OPHUB is licensed under [GPL-2.0](LICENSE)\n\n"
  },
  {
    "path": "action.yml",
    "content": "name: \"Rebuild Armbian and Kernel\"\nauthor: \"https://github.com/ophub/amlogic-s9xxx-armbian\"\ndescription: \"Support Amlogic, Rockchip and Allwinner boxes.\"\ninputs:\n  # Select build target\n  build_target:\n    description: \"Select build target: armbian / kernel\"\n    required: false\n    default: \"armbian\"\n  # For build armbian -----\n  armbian_path:\n    description: \"Set Armbian file path.\"\n    required: false\n    default: \"build/output/images/*.img\"\n  armbian_board:\n    description: \"Set device Board.\"\n    required: false\n    default: \"all\"\n  kernel_repo:\n    description: \"Set kernel repository.\"\n    required: false\n    default: \"ophub/kernel\"\n  kernel_usage:\n    description: \"Set the tags of the stable kernel.\"\n    required: false\n    default: \"stable\"\n  armbian_kernel:\n    description: \"Set kernel version.\"\n    required: false\n    default: \"6.1.y_6.12.y\"\n  auto_kernel:\n    description: \"Auto use the latest kernel.\"\n    required: false\n    default: \"true\"\n  armbian_fstype:\n    description: \"Set armbian rootfs type: ext4 / btrfs\"\n    required: false\n    default: \"ext4\"\n  armbian_size:\n    description: \"Set armbian rootfs size(Unit: MiB).\"\n    required: false\n    default: \"\"\n  armbian_files:\n    description: \"Add custom Armbian files.\"\n    required: false\n    default: \"\"\n  builder_name:\n    description: \"Set Armbian builder signature.\"\n    required: false\n    default: \"\"\n  # For compile kernel -----\n  kernel_source:\n    description: \"Select the kernel source code\"\n    required: false\n    default: \"unifreq\"\n  kernel_version:\n    description: \"Select kernel version\"\n    required: false\n    default: \"6.1.y_6.12.y\"\n  kernel_auto:\n    description: \"Auto use the latest kernel\"\n    required: false\n    default: \"true\"\n  kernel_package:\n    description: \"Select compile package list\"\n    required: false\n    default: \"all\"\n  kernel_sign:\n    description: \"Set the kernel custom signature\"\n    required: false\n    default: \"-ophub\"\n  kernel_toolchain:\n    description: \"Select the compilation toolchain\"\n    required: false\n    default: \"clang\"\n  config_flavor:\n    description: \"Set the kernel config flavor\"\n    required: false\n    default: \"\"\n  kernel_config:\n    description: \"Set the path of kernel .config\"\n    required: false\n    default: \"false\"\n  kernel_patch:\n    description: \"Set the directory for kernel patches\"\n    required: false\n    default: \"false\"\n  auto_patch:\n    description: \"Set whether to use kernel patches\"\n    required: false\n    default: \"false\"\n  compress_format:\n    description: \"Set the initrd compression format\"\n    required: false\n    default: \"xz\"\n  delete_source:\n    description: \"Set whether to delete the kernel source\"\n    required: false\n    default: \"false\"\n  silent_log:\n    description: \"Set whether to use silent log output\"\n    required: false\n    default: \"false\"\n  enable_log:\n    description: \"Set whether to output logs to a file\"\n    required: false\n    default: \"false\"\n  ccache_clear:\n    description: \"Set whether to clear the cache\"\n    required: false\n    default: \"false\"\n  docker_hostpath:\n    description: \"Set Docker working directory\"\n    required: false\n    default: \"\"\n  docker_image:\n    description: \"Select Armbian docker image\"\n    required: false\n    default: \"\"\n\nruns:\n  using: \"composite\"\n  steps:\n    - shell: bash\n      run: |\n        cd ${{ github.action_path }}\n        echo -e \"Current running path: [ ${PWD} ]\"\n        build_target=\"${{ inputs.build_target }}\"\n        [[ -z \"${build_target}\" ]] && build_target=\"armbian\"\n\n        if [[ \"${build_target}\" == \"armbian\" ]]; then\n\n            cd ${{ github.action_path }}\n            echo -e \"Starting Armbian rebuild...\"\n\n            armbian_file=\"${{ inputs.armbian_path }}\"\n            armbian_filename=\"${armbian_file##*/}\"\n            armbian_filepath=\"build/output/images\"\n            echo -e \"Armbian file input parameters: [ ${armbian_file} ]\"\n            [[ -z \"${armbian_file}\" ]] && echo -e \"The [ armbian_path ] variable must be specified.\" && exit 1\n            [[ -d \"${armbian_filepath}\" ]] || mkdir -p ${armbian_filepath}\n            if [[ \"${armbian_file}\" =~ ^http ]]; then\n                echo -e \"Downloading file: [ ${armbian_file} ]\"\n                curl -fsSL \"${armbian_file}\" -o \"${armbian_filepath}/${armbian_filename}\"\n            else\n                if [[ -z \"$(ls ${armbian_filepath}/${armbian_filename} 2>/dev/null)\" ]]; then\n                    echo -e \"Copying files: [ ${armbian_file} ]\"\n                    if [[ \"${armbian_file}\" =~ ^/ ]]; then\n                        cp -vf ${armbian_file} -t ${armbian_filepath}/ || true\n                    else\n                        cp -vf ${{ github.workspace }}/${armbian_file} -t ${armbian_filepath}/ || true\n                    fi\n                else\n                    echo -e \"File [ ${armbian_filepath}/${armbian_filename} ] already exists, skipping.\"\n                fi\n            fi\n            sync\n            echo -e \"Contents of [ ${armbian_filepath} ] directory: \\n$(ls -lh ${armbian_filepath} 2>/dev/null)\"\n\n            cd ${armbian_filepath}\n            echo -e \"Checking the Armbian file format...\"\n            down_file=\"$(ls -l *.img* 2>/dev/null | grep \"^-\" | awk '{print $9}' | sort -u | head -n 1)\"\n            if [[ -n \"${down_file}\" ]]; then\n                echo -e \"Selected Armbian file: [ ${down_file} ]\"\n            else\n                echo -e \"The Armbian file is invalid!\"\n                exit 1\n            fi\n            [[ \"${down_file:0-7}\" == \".img.gz\" ]] && gzip -df ${down_file} 2>/dev/null && sync\n            [[ \"${down_file:0-7}\" == \".img.xz\" ]] && xz -d ${down_file} 2>/dev/null && sync\n            [[ \"${down_file:0-4}\" == \".zip\" ]] && unzip -o ${down_file} 2>/dev/null && sync\n            echo -e \"Armbian file: \\n$(ls -lh *.img 2>/dev/null)\"\n\n            echo -e \"Checking the Armbian filename (-trunk_)...\"\n            image_file=\"$(ls *.img 2>/dev/null | head -n 1)\"\n            if [[ \"${image_file}\" =~ \"-trunk_\" ]]; then\n                echo -e \"The Armbian filename is correct.\"\n            else\n                echo -e \"Modifying Armbian filename...\"\n                # Get image version, such as 25.11.0\n                image_version=\"$(echo ${image_file} | grep -oE '[0-9]{2}\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1)\"\n                # Get image kernel version, such as 6.12.56\n                image_kernel=\"$(echo ${image_file} | grep -oE '[0-9]+\\.[0-9]{1,2}\\.[0-9]{1,3}' | grep -v \"${image_version}\" | head -n 1)\"\n                # Get image codename, such as trixie\n                image_codename=\"$(echo ${image_file} | grep -oE \"(trixie|bookworm|bullseye|resolute|noble|jammy)\" || echo '')\"\n                # Rename armbian image file\n                image_save_name=\"Armbian_${image_version}-trunk_${image_codename}_arm64_${image_kernel}.img\"\n                rm -f ${image_save_name}\n                mv -f ${image_file} ${image_save_name}\n                echo -e \"Renamed Armbian file: [ ${image_save_name} ]\"\n            fi\n\n            # Custom Armbian rebuild files\n            if [[ -n \"${{ inputs.armbian_files }}\" && \"${{ inputs.armbian_files }}\" != \"false\" ]]; then\n                echo -e \"Adding custom Armbian rebuild files...\"\n                copy_from_path=\"${{ inputs.armbian_files }}\"\n                copy_from_path=\"${copy_from_path%/}\"\n                [[ \"${copy_from_path}\" != /* ]] && copy_from_path=\"${{ github.workspace }}/${copy_from_path}\"\n                copy_to_path=\"build-armbian/armbian-files/common-files\"\n                cp -avf --no-preserve=ownership \"${copy_from_path}/.\" -t \"${copy_to_path}/\" || true\n            else\n                echo -e \"Using the default Armbian rebuild files.\"\n            fi\n\n            cd ${{ github.action_path }}\n            echo -e \"Starting to rebuild Armbian...\"\n            make_command=\"\"\n            [[ -n \"${{ inputs.armbian_board }}\" ]] && make_command=\"${make_command} -b ${{ inputs.armbian_board }}\"\n            [[ -n \"${{ inputs.kernel_repo }}\" ]] && make_command=\"${make_command} -r ${{ inputs.kernel_repo }}\"\n            [[ -n \"${{ inputs.kernel_usage }}\" ]] && make_command=\"${make_command} -u ${{ inputs.kernel_usage }}\"\n            [[ -n \"${{ inputs.armbian_kernel }}\" ]] && make_command=\"${make_command} -k ${{ inputs.armbian_kernel }}\"\n            [[ -n \"${{ inputs.auto_kernel }}\" ]] && make_command=\"${make_command} -a ${{ inputs.auto_kernel }}\"\n            [[ -n \"${{ inputs.armbian_fstype }}\" ]] && make_command=\"${make_command} -t ${{ inputs.armbian_fstype }}\"\n            [[ -n \"${{ inputs.armbian_size }}\" ]] && make_command=\"${make_command} -s ${{ inputs.armbian_size }}\"\n            [[ -n \"${{ inputs.builder_name }}\" ]] && make_command=\"${make_command} -n ${{ inputs.builder_name }}\"\n            read -r -a make_args <<< \"${make_command}\"\n            sudo ./rebuild \"${make_args[@]}\"\n\n            cd ${{ github.action_path }}/${armbian_filepath}\n            # Compress Armbian image file\n            pigz -qf *.img || gzip -qf *.img\n            sync && sleep 3\n\n            cd ${{ github.action_path }}\n            echo -e \"Output environment variables.\"\n            echo \"PACKAGED_OUTPUTPATH=${PWD}/${armbian_filepath}\" >> ${GITHUB_ENV}\n            echo \"PACKAGED_OUTPUTDATE=$(date +\"%m.%d.%H%M\")\" >> ${GITHUB_ENV}\n            echo \"PACKAGED_STATUS=success\" >> ${GITHUB_ENV}\n            echo -e \"PACKAGED_OUTPUTPATH: ${PWD}/${armbian_filepath}\"\n            echo -e \"PACKAGED_OUTPUTDATE: $(date +\"%m.%d.%H%M\")\"\n            echo -e \"PACKAGED_STATUS: success\"\n            echo -e \"PACKAGED_OUTPUTPATH files list: \\n$(ls -lh ${PWD}/${armbian_filepath}/ 2>/dev/null)\"\n\n        elif [[ \"${build_target}\" == \"kernel\" ]]; then\n\n            cd ${{ github.action_path }}\n            echo -e \"Starting kernel compilation...\"\n\n            # Custom kernel config files\n            config_filepath=\"compile-kernel/tools/config\"\n            [[ -d \"${config_filepath}\" ]] || mkdir -p ${config_filepath}\n            if [[ -n \"${{ inputs.kernel_config }}\" && \"${{ inputs.kernel_config }}\" != \"false\" ]]; then\n                if [[ \"$(ls ${{ github.workspace }}/${{ inputs.kernel_config }}/config-* -l 2>/dev/null | grep \"^-\" | wc -l)\" -ne \"0\" ]]; then\n                    echo -e \"Using a custom kernel compilation template...\"\n                    rm -f ${config_filepath}/* 2>/dev/null && sync\n                    cp -vrf \"${{ github.workspace }}/${{ inputs.kernel_config }}/.\" -t \"${config_filepath}/\" || true\n                    echo -e \"List of Kernel Custom Compilation Configuration Templates: \\n$(ls -lh ${config_filepath} 2>/dev/null)\"\n                else\n                    echo -e \"The custom kernel compilation template path is invalid. Using the default template.\"\n                fi\n            else\n                echo -e \"Using the default kernel compilation template.\"\n            fi\n\n            # Custom kernel patch files\n            custom_kernel_patch=\"compile-kernel/tools/patch\"\n            [[ -d \"${custom_kernel_patch}\" ]] || mkdir -p ${custom_kernel_patch}\n            if [[ -n \"${{ inputs.kernel_patch }}\" && \"${{ inputs.kernel_patch }}\" != \"false\" ]]; then\n                if [[ -d \"${{ github.workspace }}/${{ inputs.kernel_patch }}\" ]]; then\n                    echo -e \"Using custom kernel patches...\"\n                    rm -rf ${custom_kernel_patch}/* 2>/dev/null && sync\n                    cp -vrf \"${{ github.workspace }}/${{ inputs.kernel_patch }}/.\" -t \"${custom_kernel_patch}/\" || true\n                    echo -e \"Directory of custom kernel patches: \\n$(ls -lh ${custom_kernel_patch} 2>/dev/null)\"\n                else\n                    echo -e \"Invalid custom kernel patch directory. Skipping.\"\n                fi\n            else\n                echo -e \"No custom kernel patches provided.\"\n            fi\n\n            echo -e \"Building kernel compilation command.\"\n            make_command=\"\"\n            [[ -n \"${{ inputs.kernel_source }}\" ]] && make_command=\"${make_command} -r ${{ inputs.kernel_source }}\"\n            [[ -n \"${{ inputs.kernel_version }}\" ]] && make_command=\"${make_command} -k ${{ inputs.kernel_version }}\"\n            [[ -n \"${{ inputs.kernel_auto }}\" ]] && make_command=\"${make_command} -a ${{ inputs.kernel_auto }}\"\n            [[ -n \"${{ inputs.kernel_package }}\" ]] && make_command=\"${make_command} -m ${{ inputs.kernel_package }}\"\n            [[ -n \"${{ inputs.auto_patch }}\" ]] && make_command=\"${make_command} -p ${{ inputs.auto_patch }}\"\n            [[ -n \"${{ inputs.kernel_sign }}\" ]] && make_command=\"${make_command} -n ${{ inputs.kernel_sign }}\"\n            [[ -n \"${{ inputs.kernel_toolchain }}\" ]] && make_command=\"${make_command} -t ${{ inputs.kernel_toolchain }}\"\n            [[ -n \"${{ inputs.compress_format }}\" ]] && make_command=\"${make_command} -z ${{ inputs.compress_format }}\"\n            [[ -n \"${{ inputs.delete_source }}\" ]] && make_command=\"${make_command} -d ${{ inputs.delete_source }}\"\n            [[ -n \"${{ inputs.silent_log }}\" ]] && make_command=\"${make_command} -s ${{ inputs.silent_log }}\"\n            [[ -n \"${{ inputs.ccache_clear }}\" ]] && make_command=\"${make_command} -c ${{ inputs.ccache_clear }}\"\n            [[ -n \"${{ inputs.config_flavor }}\" ]] && make_command=\"${make_command} -f ${{ inputs.config_flavor }}\"\n            [[ -n \"${{ inputs.enable_log }}\" ]] && make_command=\"${make_command} -l ${{ inputs.enable_log }}\"\n            [[ -n \"${{ inputs.docker_hostpath }}\" ]] && make_command=\"${make_command} -h ${{ inputs.docker_hostpath }}\"\n            [[ -n \"${{ inputs.docker_image }}\" ]] && make_command=\"${make_command} -i ${{ inputs.docker_image }}\"\n            read -r -a make_args <<< \"${make_command}\"\n            sudo ./recompile \"${make_args[@]}\"\n\n            cd ${{ inputs.docker_hostpath }}\n            kernel_outpath=\"compile-kernel/output\"\n            output_tags=\"$(ls -l ${kernel_outpath}/*.tar.gz 2>/dev/null | awk '{print $9}' | grep -oP '\\d+\\.\\d+\\.\\d+' | sort -u | xargs | tr \"[ ]\" \"_\")\"\n            echo -e \"Setting output environment variables.\"\n            echo \"PACKAGED_OUTPUTTAGS=${output_tags}\" >> ${GITHUB_ENV}\n            echo \"PACKAGED_OUTPUTPATH=${PWD}/${kernel_outpath}\" >> ${GITHUB_ENV}\n            echo \"PACKAGED_OUTPUTDATE=$(date +\"%m.%d.%H%M\")\" >> ${GITHUB_ENV}\n            echo \"PACKAGED_STATUS=success\" >> ${GITHUB_ENV}\n            echo -e \"PACKAGED_OUTPUTTAGS: ${output_tags}\"\n            echo -e \"PACKAGED_OUTPUTPATH: ${PWD}/${kernel_outpath}\"\n            echo -e \"PACKAGED_OUTPUTDATE: $(date +\"%m.%d.%H%M\")\"\n            echo -e \"PACKAGED_STATUS: success\"\n            echo -e \"PACKAGED_OUTPUTPATH files list: \\n$(ls -lh ${PWD}/${kernel_outpath}/ 2>/dev/null)\"\n\n        else\n            echo -e \"Please select a build target: armbian / kernel\"\n            exit 1\n        fi\n\nbranding:\n  icon: \"terminal\"\n  color: \"gray-dark\"\n"
  },
  {
    "path": "build-armbian/README.cn.md",
    "content": "# 构建文件说明\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\n编译 Armbian 系统所需的文件按功能分类存放在各个子目录中。\n\n## armbian-files\n\n此目录存放 Armbian 构建过程中所需的全部文件。其中，`common-files` 目录存放与平台无关的通用文件，`platform-files` 目录存放各平台专用文件，`different-files` 目录存放针对不同设备的差异化配置文件。更多说明详见 [documents](../documents/README.cn.md) 中的 `12.15` 章节。\n\n所需固件将从 [ophub/firmware](https://github.com/ophub/firmware) 仓库自动下载至 `common-files/usr/lib/firmware` 目录。\n\n## kernel\n\n在 `kernel` 目录下创建与版本号对应的文件夹，如 `stable/5.10.125`。若需编译多个内核，依次创建各版本目录并放入对应的内核文件即可。内核文件可从 [kernel](https://github.com/ophub/kernel) 仓库下载，也可[自行编译](../compile-kernel)。若本地未预先存放内核文件，构建脚本将自动从 kernel 仓库下载。\n\n## u-boot\n\n系统引导文件。根据所用内核版本的不同，相应的 u-boot 文件将由安装或更新脚本自动获取和配置。所需的 u-boot 将从 [ophub/u-boot](https://github.com/ophub/u-boot) 仓库自动下载至 `u-boot` 目录。\n"
  },
  {
    "path": "build-armbian/README.ja.md",
    "content": "# ビルドファイルの説明\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nArmbian システムのコンパイルに必要なファイルは、機能別に各サブディレクトリに分類して格納されています。\n\n## armbian-files\n\nこのディレクトリには、Armbian のビルドプロセスで必要なすべてのファイルが格納されています。`common-files` ディレクトリにはプラットフォームに依存しない共通ファイル、`platform-files` ディレクトリには各プラットフォーム専用ファイル、`different-files` ディレクトリには異なるデバイス向けの差分設定ファイルが格納されています。詳細は [documents](../documents/README.ja.md) の `12.15` セクションを参照してください。\n\n必要なファームウェアは [ophub/firmware](https://github.com/ophub/firmware) リポジトリから `common-files/usr/lib/firmware` ディレクトリに自動的にダウンロードされます。\n\n## kernel\n\n`kernel` ディレクトリ内にバージョン番号に対応するフォルダを作成します（例：`stable/5.10.125`）。複数のカーネルをコンパイルする必要がある場合は、各バージョンのディレクトリを順次作成し、対応するカーネルファイルを配置してください。カーネルファイルは [kernel](https://github.com/ophub/kernel) リポジトリからダウンロードするか、[自分でコンパイル](../compile-kernel)することもできます。ローカルにカーネルファイルが事前に配置されていない場合、ビルドスクリプトが kernel リポジトリから自動的にダウンロードします。\n\n## u-boot\n\nシステムブートファイルです。使用するカーネルバージョンに応じて、対応する u-boot ファイルはインストールまたは更新スクリプトによって自動的に取得・設定されます。必要な u-boot は [ophub/u-boot](https://github.com/ophub/u-boot) リポジトリから `u-boot` ディレクトリに自動的にダウンロードされます。\n"
  },
  {
    "path": "build-armbian/README.md",
    "content": "# Build Files Reference\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nThe files required for compiling the Armbian system are organized in their respective directories.\n\n## armbian-files\n\nThis directory contains all the files used during the Armbian build process. The `common-files` subdirectory holds platform-independent shared files, the `platform-files` subdirectory holds platform-specific files, and the `different-files` subdirectory holds device-specific configuration files. For further details, refer to Section `12.15` of the [documentation](../documents/).\n\nRequired firmware files are automatically downloaded from the [ophub/firmware](https://github.com/ophub/firmware) repository into the `common-files/usr/lib/firmware` directory.\n\n## kernel\n\nCreate a version-specific folder under the `kernel` directory, e.g., `stable/5.10.125`. For multiple kernels, create separate directories sequentially and place the corresponding kernel files in each. Kernel files can be downloaded from the [kernel](https://github.com/ophub/kernel) repository, or you can [compile them yourself](../compile-kernel). If no kernel files are present locally, the build script will automatically download them from the kernel repository.\n\n## u-boot\n\nSystem bootloader files. Depending on the kernel version, the appropriate u-boot files are automatically managed by the installation and update scripts as needed. Required u-boot files are automatically downloaded from the [ophub/u-boot](https://github.com/ophub/u-boot) repository into the `u-boot` directory."
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/balance_irq",
    "content": "eth0\t4\nxhci-hcd:usb1\t3\nxhci-hcd:usb2\t3\nxhci-hcd:usb3\t3\nxhci-hcd:usb4\t3\nxhci-hcd:usb5\t3\nxhci-hcd:usb6\t3\nxhci-hcd:usb7\t3\nxhci-hcd:usb8\t3\nxhci-hcd:usb9\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/custom_service/start_service.sh",
    "content": "#!/bin/bash\n#========================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Customize the startup script. Add content as needed.\n# Dependent script: /etc/rc.local (which runs with 'set -e')\n# File path: /etc/custom_service/start_service.sh\n#\n# Version: v1.3\n#\n#========================================================================================\n\n# Custom Service Log - all script output will be logged here\ncustom_log=\"/tmp/ophub_start_service.log\"\n\n# A helper function for logging with a timestamp\nlog_message() {\n    echo \"[$(date +\"%Y.%m.%d.%H:%M:%S\")] $1\" >>\"${custom_log}\"\n}\n\n# Start of the script\nlog_message \"Starting custom services...\"\n\n# Disabled verbose kernel messages on console\ndmesg -n 1 >/dev/null 2>&1 || true\nlog_message \"Kernel console logging level set to 1 (Panic only).\"\n\n# System Identification\n# Set the release check file to identify the device type\nophub_release_file=\"/etc/ophub-release\"\n[[ -f \"${ophub_release_file}\" ]] && source \"${ophub_release_file}\" 2>/dev/null || true\nFDTFILE=\"${FDTFILE:-no_found.dtb}\"\nlog_message \"Detected FDT file: ${FDTFILE}\"\n\n# Device-Specific Services\n\n# Add rknpu module to the system module load list\nophub_load_conf=\"/etc/modules-load.d/ophub-load-list.conf\"\n[[ -f \"${ophub_load_conf}\" ]] || touch \"${ophub_load_conf}\"\nif modinfo rknpu >/dev/null 2>&1; then\n    grep -q -x \"rknpu\" \"${ophub_load_conf}\" 2>/dev/null || echo \"rknpu\" >>\"${ophub_load_conf}\"\nelse\n    grep -q -x \"rknpu\" \"${ophub_load_conf}\" 2>/dev/null && sed -i '/^rknpu$/d' \"${ophub_load_conf}\"\nfi\nlog_message \"Adjusted the rknpu module in the system module load list.\"\n\n# For Tencent Aurora 3Pro (s905x3-b) box: Load Bluetooth module\nif [[ \"${FDTFILE}\" == \"meson-sm1-skyworth-lb2004-a4091.dtb\" ]]; then\n    grep -q -x \"btmtksdio\" \"${ophub_load_conf}\" 2>/dev/null || echo \"btmtksdio\" >>\"${ophub_load_conf}\"\n    log_message \"Attempted to load btmtksdio module for Tencent-Aurora-3Pro.\"\nfi\n\n# For swan1-w28(rk3568) board: USB power and switch control\nif [[ \"${FDTFILE}\" == \"rk3568-swan1-w28.dtb\" ]]; then\n    (\n        # GPIO operations are critical, but we also add error suppression.\n        gpioset 0 21=1 >/dev/null 2>&1\n        gpioset 3 20=1 >/dev/null 2>&1\n        gpioset 4 21=1 >/dev/null 2>&1\n        gpioset 4 22=1 >/dev/null 2>&1\n    ) &\n    log_message \"USB power control GPIOs set for Swan1-w28.\"\nfi\n\n# For smart-am60(rk3588)/orangepi-5b(rk3588s) board: Bluetooth control\nif [[ \"${FDTFILE}\" =~ ^(rk3588-smart-am60\\.dtb|rk3588s-orangepi-5b\\.dtb)$ ]]; then\n    # This is a sequence of commands, with the last one running in the background.\n    # The background command (&) won't affect the script's exit code.\n    (\n        rfkill block all\n        chmod a+x /lib/firmware/ap6276p/brcm_patchram_plus1 >/dev/null 2>&1\n        sleep 2\n        rfkill unblock all\n        /lib/firmware/ap6276p/brcm_patchram_plus1 --enable_hci --no2bytes --use_baudrate_for_download --tosleep 200000 --baudrate 1500000 --patchram /lib/firmware/ap6275p/BCM4362A2.hcd /dev/ttyS9 &\n    ) &\n    log_message \"Bluetooth firmware download process started for Smart-am60/orangepi-5b.\"\nfi\n\n# For nsy-g16-plus/nsy-g68-plus/bdy-g18-pro board\nif [[ \"${FDTFILE}\" =~ ^(rk3568-nsy-g16-plus\\.dtb|rk3568-nsy-g68-plus\\.dtb|rk3568-bdy-g18-pro\\.dtb)$ ]]; then\n    (\n        # Wait for network to be up\n        sleep 10\n\n        # Set MTU to 1500 for eth0 and br0\n        set_mtu() {\n            [[ -d \"/sys/class/net/${1}\" ]] && ip link set \"${1}\" mtu 1500 >/dev/null 2>&1\n        }\n        set_mtu eth0\n        set_mtu br0\n\n        # Close offloading features to improve stability\n        if [[ -d \"/sys/class/net/eth0\" ]] && command -v ethtool >/dev/null 2>&1; then\n            ethtool -K eth0 tso off gso off gro off tx off rx off >/dev/null 2>&1\n        fi\n    ) &\n    log_message \"Network optimizations for ${FDTFILE} applied.\"\nfi\n\n# General System Services\n\n# Restart ssh service\nmkdir -p -m0755 /var/run/sshd >/dev/null 2>&1 || true\nif [[ -f \"/etc/init.d/ssh\" ]]; then\n    (sleep 5 && /etc/init.d/ssh restart >/dev/null 2>&1) &\n    log_message \"SSH service restart attempted.\"\nfi\n\n# Add network performance optimization\nif [[ -x \"/usr/sbin/balethirq.pl\" ]]; then\n    (perl /usr/sbin/balethirq.pl >/dev/null 2>&1) &\n    log_message \"Network optimization service (balethirq.pl) execution attempted.\"\nfi\n\n# Led display control, Only for Amlogic devices (meson-*) with valid boxid.\nopenvfd_enable=\"no\"  # yes or no, set to \"yes\" to enable OpenVFD service.\nopenvfd_boxid=\"15\"   # Set the boxid according to your device. Refer to the documentation for details.\nopenvfd_restart=\"no\" # yes or no, set to \"yes\" to restart the OpenVFD service.\nif [[ \"${openvfd_boxid}\" != \"0\" && \"${FDTFILE}\" =~ ^meson- ]]; then\n    (\n        # Start OpenVFD service\n        [[ \"${openvfd_enable}\" == \"yes\" ]] && armbian-openvfd \"${openvfd_boxid}\" >/dev/null 2>&1\n        # Some devices require a restart to clear 'BOOT' and related messages\n        [[ \"${openvfd_restart}\" == \"yes\" ]] && {\n            armbian-openvfd \"0\" >/dev/null 2>&1\n            sleep 3\n            armbian-openvfd \"${openvfd_boxid}\" >/dev/null 2>&1\n        }\n        log_message \"OpenVFD service execution attempted.\"\n    ) &\nfi\n\n# For vplus(Allwinner h6) led color lights\nif [[ -x \"/usr/bin/rgb-vplus\" ]]; then\n    rgb-vplus --RedName=RED --GreenName=GREEN --BlueName=BLUE >/dev/null 2>&1 &\n    log_message \"Vplus RGB LED service started in background.\"\nfi\n\n# For fan control service\nif [[ -x \"/usr/bin/pwm-fan.pl\" ]]; then\n    perl /usr/bin/pwm-fan.pl >/dev/null 2>&1 &\n    log_message \"Fan control service (pwm-fan.pl) started in background.\"\nfi\n\n# For oes(A311d) SATA LED status monitoring\nif [[ -x \"/usr/bin/oes_sata_leds.sh\" ]]; then\n    /usr/bin/oes_sata_leds.sh >/var/log/oes-sata-leds.log 2>&1 &\n    log_message \"SATA status check service (oes_sata_leds.sh) started in background.\"\nfi\n\n# For pveproxy startup service\nif [[ -n \"$(dpkg -l | awk '{print $2}' | grep -w \"^pve-manager$\" || true)\" ]]; then\n    # Restarting systemd services can sometimes fail during early boot.\n    (systemctl restart pveproxy >/dev/null 2>&1) &\n    log_message \"PVE proxy service restart attempted.\"\nfi\n\n# Maximize root partition size\ntodo_rootfs_resize=\"/root/.no_rootfs_resize\"\n[[ -f \"${todo_rootfs_resize}\" && \"$(cat ${todo_rootfs_resize} 2>/dev/null | xargs)\" == \"yes\" ]] && {\n    armbian-tf >/dev/null 2>&1 &\n    log_message \"Root partition resize completed.\"\n}\n\n# Finalization\nlog_message \"All custom services have been processed successfully.\"\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/default/cpufrequtils",
    "content": "# The file path: /etc/default/cpufrequtils\n# Call file: /etc/init.d/cpufrequtils\n#\n# View setup results:\n# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq\n# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq\n\n# Set ENABLE to \"true\" to let the script run at boot time\nENABLE=\"true\"\n\n# View CPU core\nMIN_CORE_CPU=\"$(ls -l /sys/devices/system/cpu | grep -oE \"cpu[0-9]{1,2}\" | sort | head -n 1)\"\nMAX_CORE_CPU=\"$(ls -l /sys/devices/system/cpu | grep -oE \"cpu[0-9]{1,2}\" | sort -rV | head -n 1)\"\n\n# MIN_SPEED and MAX_SPEED listed in: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies\nMIN_SPEED=\"$(cat /sys/devices/system/cpu/${MIN_CORE_CPU}/cpufreq/scaling_available_frequencies 2>/dev/null | awk '{print $(NF/2)}')\"\nMAX_SPEED=\"$(cat /sys/devices/system/cpu/${MAX_CORE_CPU}/cpufreq/scaling_available_frequencies 2>/dev/null | awk '{print $NF}')\"\n\n# GOVERNOR listed in: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors\n# GOVERNOR Options: conservative userspace powersave ondemand performance schedutil\nGOVERNOR=\"schedutil\"\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/fstab",
    "content": "LABEL=ROOTFS    /        ext4     defaults,noatime,nodiratime,commit=600,errors=remount-ro    0 1\nLABEL=BOOT      /boot    vfat     defaults                                                    0 2\ntmpfs           /tmp     tmpfs    defaults,nosuid                                             0 0\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/model_database.conf",
    "content": "#=========================================================================================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the build Armbian, OpenWrt and FnNAS\n# https://github.com/ophub/amlogic-s9xxx-armbian\n# https://github.com/ophub/amlogic-s9xxx-openwrt\n# https://github.com/ophub/fnnas\n#\n# Function: Define the list of supported devices\n#\n# Column definitions:\n# 1.ID  2.MODEL  3.SOC  4.FDTFILE  5.UBOOT_OVERLOAD  6.MAINLINE_UBOOT  7.BOOTLOADER_IMG  8.DESCRIPTION\n# 9.KERNEL_TAGS  10.PLATFORM  11.FAMILY  12.BOOT_CONF  13.CONTRIBUTORS  14.BOARD  15.BUILD\n#\n# [ 5.UBOOT_OVERLOAD ] : Referred to as <UBOOT_OVERLOAD> for Amlogic, <TRUST_IMG> for Rockchip, not used for Allwinner.\n# [ 9.KERNEL_TAGS    ] : The tag name suffix used in https://github.com/ophub/kernel/releases\n#                        [ Kernel tags      ] start with [ kernel_ ], e.g., kernel_stable, kernel_rk3588, etc.\n#                        [ Common kernels   ] include [ kernel_stable, kernel_flippy, and kernel_beta ], which can be used interchangeably.\n#                        [ Specific kernels ] use specific kernel versions, downloaded from [ kernel_stable ] tags by default, can be replaced with [ common kernels ].\n#                                             You can specify multiple kernel version matching formats, e.g., 6.1.43, 5.15.y, 6.x.y, 5.15.y_6.1.y, etc.\n#                                             Where [ 5.x.y ] includes 5.10.y, 5.15.y, and [ 6.x.y ] includes 6.1.y, 6.6.y, 6.12.y, and 6.18.y.\n#                        [ stable/all   ] = [ kernel_stable/*     ] : Available for all devices.\n#                        [ stable/6.x.y ] = [ kernel_stable/6.x.y ] : Available for all devices; Rockchip rk3399/rk3568 series devices use specified kernels.\n#                        [ stable/5.x.y ] = [ kernel_stable/5.x.y ] : Available for all Amlogic devices.\n#                        [ flippy/all   ] = [ kernel_flippy/*     ] : Available for all devices.\n#                        [ beta/all     ] = [ kernel_beta/*       ] : Available for all devices.\n#                        [ rk3588/6.1.y ] = [ kernel_rk3588/6.1.y ] : Dedicated to Rockchip rk3588 series devices.\n#                        [ rk35xx/6.1.y ] = [ kernel_rk35xx/6.1.y ] : Dedicated to Rockchip rk3528/rk3566/rk3568 series devices.\n#                        [ h6/6.6.y     ] = [ kernel_h6/6.6.y     ] : Dedicated to Allwinner h6 (TQC-A01) device.\n# [ 13.CONTRIBUTORS  ] : GitHub username of the contributor (https://github.com)\n#\n# When [ -b all      ], selects [ all rows ] where [ BUILD is yes ].\n# When [ -b first<N> ], selects [ first N rows ] where [ BUILD is yes ].\n# When [ -b from<N>  ], selects [ rows from N+1 to end ] where [ BUILD is yes ].\n# When [ -b last<N>  ], selects [ last N rows ] where [ BUILD is yes ].\n# When [ -b board    ], selects [ first row ] with [ matching BOARD ], ignoring [ BUILD ].\n#\n# Tip: [IDL]: ID Locked. Do not modify.\n#      For [ 2.MODEL ] entries marked with [IDL], a fixed [ ID ] is required (e.g., [ 213, 304, 409 ]). Do not change these in the [ install/update script ].\n#\n#=========================================================================================================================================================================\n\n# Amlogic GXL Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n101     :Phicomm-N1                                    :s905d    :meson-gxl-s905d-phicomm-n1.dtb           :u-boot-n1.bin                :NA                                  :u-boot-2015-phicomm-n1.bin      :2GB-Mem,1Gb-Nic,brcm43455-wifi             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :unifreq                                              :s905d               :yes\n102     :Phicomm-N1(DMA-thresh)                        :s905d    :meson-gxl-s905d-phicomm-n1-thresh.dtb    :u-boot-n1.bin                :NA                                  :u-boot-2015-phicomm-n1.bin      :When-ethmac-flow-control-is-off            :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :unifreq                                              :s905d-n1-thresh     :no\n103     :MECOOL-KI-Pro                                 :s905d    :meson-gxl-s905d-mecool-ki-pro.dtb        :u-boot-p201.bin              :NA                                  :NA                              :2G/16G,1Gb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :martinlanger90                                       :s905d-ki-pro        :no\n104     :SML-5442TW                                    :s905d    :meson-gxl-s905d-sml5442tw.dtb            :u-boot-s905x-s912.bin        :NA                                  :NA                              :2G/8G,100Mb-Nic                            :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :WallcroftUK                                          :s905d-sml5442tw     :no\n105     :HG680P                                        :s905x    :meson-gxl-s905x-p212.dtb                 :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :rapdodge                                             :s905x               :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n106     :B860H                                         :s905x    :meson-gxl-s905x-b860h.dtb                :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :sibondt                                              :s905x-b860h         :yes\n107     :Nexbox-a95x                                   :s905x    :meson-gxl-s905x-nexbox-a95x.dtb          :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :khancyr                                              :s905x-nexbox-a95x   :no\n108     :TX9                                           :s905x    :meson-gxl-s905x-tx9.dtb                  :u-boot-s905x-s912.bin        :NA                                  :NA                              :100Mb-Nic,rtl8723cs-WLAN                   :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :thumsl                                               :s905x-tx9           :no\n109     :T95,XiaoMI-3S,X96,BTV9                        :s905x    :meson-gxl-s905x-p212.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :2G/16G,1Gb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :chris4git,shuye1728,Drafteed,rickmschulz             :s905x-t95           :yes\n110     :TBee                                          :s905x    :meson-gxl-s905x-tbee.dtb                 :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :DiogoSilva48                                         :s905x-tbee          :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n111     :TX3-Mini,MeCool-m8s-pro-W                     :s905w    :meson-gxl-s905w-tx3-mini.dtb             :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :piotrekcrash,fgpx78                                  :s905w               :yes\n112     :W95                                           :s905w    :meson-gxl-s905w-p281.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :2GB-RAM,16GB-ROM,100Mb-Nic                 :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :skysurf                                              :s905w-w95           :no\n113     :X96-Mini                                      :s905w    :meson-gxl-s905w-x96-mini.dtb             :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :TThanhXuan                                           :s905w-x96-mini      :no\n114     :X96W,FunTV,MXQ-Pro-4K                         :s905w    :meson-gxl-s905w-x96w.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :2GB-RAM,16GB-ROM,100Mb-Nic,AP6255-wifi/BT  :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :daniyo27,Choomai                                     :s905w-x96w          :no\n115     :UNT402A,M201-S,MiBox-4C,IP108H,B860AV2.1      :s905l    :meson-gxl-s905l3b-m302a.dtb              :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :janko888,hzlyu123,foobarjimmy,shijifeizhai,qfnuzlr   :s905l               :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n116     :MG101,Mibox-4,E900V21C                        :s905l    :meson-gxl-s905l-venz-v10.dtb             :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :dz515704201,yicheng42,Jstzo2u                        :s905l-mg101         :yes\n117     :Tencent-Aurora-1s                             :s905l    :meson-gxl-s905x-p212.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :2G/16G,1Gb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :DavidTsou                                            :s905l-aurora-1s     :no\n118     :ZXV10-B860AV2.1U,HM201                        :s905l    :meson-gxl-s905x-tx9.dtb                  :u-boot-s905x-s912.bin        :NA                                  :NA                              :100Mb-Nic,rtl8723cs-WLAN                   :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :DavidTsou,ASFLY61                                    :s905l-b860av21u     :no\n119     :MGV2000,MGV3000,M301A,CM201-1,IP108H          :s905l2   :meson-gxl-s905l2-x7-5g.dtb               :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :skysurf,texaszc,champion0117,haochn,w2xg2022         :s905l2              :yes\n120     :E900v21E,MGV2000-K,e900v21d                   :s905l2   :meson-gxl-s905l2-x7-5g.dtb               :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :lovl88,sleepwalkera,shijifeizhai                     :s905l2-e900v21e     :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n121     :Wojia-TV-IPBS9505                             :s905l2   :meson-gxl-s905l2-ipbs9505.dtb            :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :marchmin                                             :s905l2-wojia        :no\n122     :CM311-1,HG680-LC,M401A,UNT402A,CM201-1-6-YS   :s905l3   :meson-gxl-s905l2-x7-5g.dtb               :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :ours1505,1904688138,yhxxm,orientzane,tinytinycn      :s905l3              :yes\n123     :CM211-1,M411A,B860AV3.2M,B860AV2.1U,M301A     :s905l3   :meson-gxl-s905l3b-m302a.dtb              :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :Ivanriver,foobarjimmy,chiqianjiqi,shuzhizhi,JiaHeWG  :s905l3-cm211        :yes\n124     :UNT400G1,E900V22D-2,UNT400G,IP108H            :s905l3   :meson-gxl-s905l2-x7-5g.dtb               :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :signigelchan,Cp0204,bambizlu,bambizlu                :s905l3-unt400g1     :no\n125     :UNT402A,UNT400G                               :s905l3   :meson-gxl-s905l3b-m302a.dtb              :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :shirakawa-poi,itdoginfo                              :s905l3-unt402a      :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n126     :E900V21E,E900V22E,MGV2000/CW,M411A            :s905l3b  :meson-gxl-s905l3b-e900v22e.dtb           :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :jietech17,tuzhis,locAtt,w2xg2022,siliconbanana       :s905l3b-e900v22e    :yes\n127     :M302A,M304A,CM201-1,CM211-1,CM311-1           :s905l3b  :meson-gxl-s905l3b-m302a.dtb              :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :janko888,wgbingo,God-JohnDiamond,peagsus             :s905l3b             :yes\n128     :UNT403A                                       :s905l3b  :meson-gxl-s905l3b-m302a.dtb              :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :yycvip                                               :s905l3b-unt403a     :no\n129     :RG020ET-CA                                    :s905l3b  :meson-gxl-s905l3b-e900v22e.dtb           :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :shijifeizhai                                         :s905l3b-rg020et-ca  :no\n130     :IP103H,TY1608,BV310,B860AV-2.1M               :s905l3b  :meson-gxl-s905l3b-m302a.dtb              :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :gbsadmin,Jeagarm,w2xg2022,aolin2000                  :s905l3b-ip103h      :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n131     :E900V22D,TY1608                               :s905l3b  :meson-gxl-s905l2-x7-5g.dtb               :u-boot-s905x-s912.bin        :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :piaoliuchong,aaftio                                  :s905l3b-e900v22d    :no\n132     :E900V21D                                      :s905l3b  :meson-gxl-s905l2-x7-5g.dtb               :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :Leona233                                             :s905l3b-e900v21d    :no\n133     :S65                                           :s905mb   :meson-gxl-s905x-p212.dtb                 :u-boot-r3300l.bin            :r3300l-u-boot.bin.sd.bin            :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :shijifeizhai                                         :s905mb              :no\n134     :BesTV-R3300L,SumaVision-Q7,MG101              :s905lb   :meson-gxl-s905x-p212.dtb                 :u-boot-r3300l.bin            :r3300l-u-boot.bin.sd.bin            :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :7Ji,taotao108,aaftio                                 :s905lb-r3300l       :yes\n135     :Q96-mini                                      :s905lb   :meson-gxl-s905x-p212.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :1G/8G,100Mb-Nic                            :stable/all            :amlogic     :meson-gxl    :uEnv.txt        :CarlKuhligk                                          :s905lb-q96-mini     :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n136     :IPBS9505                                      :s905lb   :meson-gxl-s905l2-x7-5g.dtb               :u-boot-p212.bin              :NA                                  :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-gxl    :extlinux.conf   :Hx0531                                               :s905lb-ipbs9505     :no\n\n\n# Amlogic GXM Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n201     :Octopus-Planet,OneCloudPro-V1.1,Tanix-TX9S    :s912     :meson-gxm-octopus-planet.dtb             :u-boot-zyxq.bin              :NA                                  :NA                              :2GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,longjuanfeng05,Eksol                         :s912                :yes\n202     :Octopus-Planet(FAKE)                          :s912     :meson-gxm-octopus-planet.dtb             :u-boot-zyxq.bin              :NA                                  :bl-fake-octopus-planet.bin      :2GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,lanyucomputer                                :s912-zyxq-fake      :no\n203     :H96-Pro-Plus,TX92,Z6-Plus                     :s912     :meson-gxm-octopus-planet.dtb             :u-boot-zyxq.bin              :NA                                  :NA                              :2G/32G,1Gb-Nic                             :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,ErikPelli                                    :s912-h96pro-plus    :no\n204     :Vontar-X92                                    :s912     :meson-gxm-x92.dtb                        :u-boot-p212.bin              :NA                                  :NA                              :3GB-RAM,16GB/32GB-eMMC,1Gb-Nic             :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :d5stick                                              :s912-x92            :yes\n205     :Phicomm-T1                                    :s912     :meson-gxm-phicomm-t1.dtb                 :u-boot-s905x-s912.bin        :NA                                  :NA                              :2G-RAM,16G-ROM,100Mb-Nic,Wifi,Bluetooth    :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :birdxs                                               :s912-phicomm-t1     :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n206     :MECOOL-M8S-Pro-L,TX3-Mini                     :s912     :meson-gxm-q201.dtb                       :u-boot-s905x-s912.bin        :NA                                  :NA                              :2G/3G-RAM,16G/32G-ROM,100Mb-Nic            :stable/all            :amlogic     :meson-gxm    :extlinux.conf   :parkjw0117,phuonganh2601                             :s912-m8s-pro        :yes\n207     :T95Z-Plus                                     :s912     :meson-gxm-t95z-plus.dtb                  :u-boot-s905x-s912.bin        :NA                                  :NA                              :3G+32G,1Gb-Nic                             :stable/all            :amlogic     :meson-gxm    :extlinux.conf   :NewbieOrange                                         :s912-t95z-plus      :yes\n208     :TX9-Pro(3G_32G_1Gb)                           :s912     :meson-gxm-tx9-pro.dtb                    :u-boot-zyxq.bin              :NA                                  :NA                              :3G-RAM,32G-ROM,1Gb-Nic,brcm43455-wifi      :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,Smim0                                        :s912-tx9-pro-3g     :no\n209     :TX9-Pro(2G_16G_100Mb)                         :s912     :meson-gxm-q201.dtb                       :u-boot-p212.bin              :NA                                  :NA                              :3G-RAM,32G-ROM,100Mb-Nic,RTL8189ETV-wifi   :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :rainups                                              :s912-tx9-pro-2g     :no\n210     :Nexbox-A1,A95X                                :s912     :meson-gxm-nexbox-a1.dtb                  :u-boot-p212.bin              :NA                                  :NA                              :2G-DDR3-RAM,16G-eMMC,1Gb-Nic               :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :kodokskoprol                                         :s912-nexbox-a1      :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n211     :Nexbox-A95X-A2                                :s912     :meson-gxm-nexbox-a2.dtb                  :u-boot-p212.bin              :NA                                  :NA                              :2GB-RAM,16GB-ROM,2.4G/5.0G-WiFi,1Gb-Nic    :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :sibondt                                              :s912-nexbox-a2      :no\n212     :Tanix-TX8-MAX                                 :s912     :meson-gxm-tx8-max.dtb                    :u-boot-p212.bin              :NA                                  :NA                              :3GB-RAM,16GB/32GB-eMMC,1Gb-Nic             :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :Fengke6                                              :s912-tx8-max        :no\n213     :[IDL],OneCloudPro-V1.2                        :s912     :meson-gxm-octopus-planet.dtb             :u-boot-zyxq.bin              :NA                                  :NA                              :2GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,longjuanfeng05                               :s912-onecloudpro    :no\n214     :[IDL],OneCloudPro-V1.2-Flash-NewOS            :s912     :meson-gxm-octopus-planet.dtb             :u-boot-zyxq.bin              :NA                                  :NA                              :2GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-gxm    :uEnv.txt        :unifreq,longjuanfeng05,lanlanpy,Asxcvbn              :s912-onecloudpro-2  :no\n\n\n# Amlogic G12A Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n301     :X96-Max-4GB,Tx5-Max                           :s905x2   :meson-g12a-x96-max.dtb                   :u-boot-x96max.bin            :x96max-u-boot.bin.sd.bin            :NA                              :4GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :mreser99                                             :s905x2              :yes\n302     :X96-Max-2GB,A95X-F2                           :s905x2   :meson-g12a-x96-max-rmii.dtb              :u-boot-x96max.bin            :x96max-u-boot.bin.sd.bin            :NA                              :2GB-Mem,100Mb-Nic                          :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :RomanKozyrev                                         :s905x2-x96max-2g    :no\n303     :MECOOL-KM3-4G                                 :s905x2   :meson-g12a-sei510.dtb                    :u-boot-x96max.bin            :x96max-u-boot.bin.sd.bin            :NA                              :4+64G/128G,100Mb-Nic                       :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :flymike                                              :s905x2-km3          :no\n304     :[IDL],E900V22C-D,CM311-1a-CH,IP112H,B863AV3.1 :s905l3a  :meson-g12a-s905l3a-e900v22c.dtb          :u-boot-e900v22c.bin          :NA                                  :NA                              :4+64G/128G,100Mb-Nic                       :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :Calmact,KryptonLee,yu6zhou,orientzane,AboutCXJ       :s905l3a             :yes\n305     :[IDL],CM311-1a-YST                            :s905l3a  :meson-g12a-s905l3a-cm311.dtb             :u-boot-e900v22c.bin          :NA                                  :NA                              :2+16G,BT-rtl8761b,100Mb-Nic                :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :xcray                                                :s905l3a-cm311       :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n306     :M401A,UNT403A,B863AV3.2-M                     :s905l3a  :meson-g12a-s905l3a-m401a.dtb             :u-boot-e900v22c.bin          :NA                                  :NA                              :2+16G,100Mb-Nic                            :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :janko888,yangzhuang2333,OPMonday                     :s905l3a-m401a       :no\n307     :HG680-FJ                                      :s905x2   :meson-g12a-hg680-fj.dtb                  :u-boot-x96max.bin            :x96max-u-boot.bin.sd.bin            :NA                              :2+8G,100Mb-Nic                             :stable/all            :amlogic     :meson-g12a   :uEnv.txt        :sibondt                                              :s905x2-hg680fj      :yes\n\n\n# Amlogic G12B Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n401     :Khadas-VIM3                                   :a311d    :meson-g12b-a311d-khadas-vim3.dtb         :u-boot-gtkingpro.bin         :khadas-vim3-u-boot.sd.bin           :NA                              :1Gb-Nic,brcm4398-wifi                      :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :darkliang                                            :a311d               :yes\n402     :GT-King                                       :s922x    :meson-g12b-gtking.dtb                    :u-boot-gtking.bin            :gtking-u-boot.bin.sd.bin            :NA                              :4GB-Mem,1Gb-Nic,brcm4356-wifi              :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq                                              :s922x-gtking        :no\n403     :GT-King-Pro,X88-King                          :s922x    :meson-g12b-gtking-pro.dtb                :u-boot-gtkingpro.bin         :gtkingpro-u-boot.bin.sd.bin         :NA                              :4GB-Mem,1Gb-Nic,brcm4356-wifi              :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq,JordanPlayz158                               :s922x               :yes\n404     :GT-King-Pro-H                                 :s922x    :meson-g12b-gtking-pro-h.dtb              :u-boot-gtkingpro.bin         :gtkingpro-u-boot.bin.sd.bin         :NA                              :4GB-Mem,1Gb-Nic,brcm4356-wifi              :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq                                              :s922x-gtkingpro-h   :no\n405     :GT-King-Pro-Rev_A                             :s922x    :meson-g12b-gtking-pro-rev_a.dtb          :u-boot-gtkingpro-rev-a.bin   :NA                                  :NA                              :4GB-Mem,1Gb-Nic,brcm4356-wifi              :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq,JFLim1                                       :s922x-reva          :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n406     :UGOOS-AM6-Plus                                :s922x    :meson-g12b-ugoos-am6.dtb                 :u-boot-gtkingpro.bin         :gtkingpro-u-boot.bin.sd.bin         :NA                              :4GB-Mem,1Gb-Nic,brcm4398-wifi              :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq                                              :s922x-ugoos-am6     :no\n407     :Hardkernel-ODroid-N2                          :s922x    :meson-g12b-odroid-n2.dtb                 :u-boot-gtkingpro.bin         :odroid-n2-u-boot.bin.sd.bin         :NA                              :4GB-Mem,1Gb-Nic                            :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq                                              :s922x-odroid-n2     :no\n408     :Ali-CT2000                                    :s922x    :meson-g12b-ali-ct2000.dtb                :u-boot-s905x2-s922.bin       :NA                                  :NA                              :4GB-Mem,16GB-eMMC,1Gb-Nic,Bluetooth,wifi   :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :unifreq                                              :s922x-ct2000        :yes\n409     :[IDL],WXY-OES                                 :a311d    :meson-g12b-a311d-oes-a.dtb               :u-boot-s905x2-s922.bin       :NA                                  :NA                              :4GB-Mem,8GB-eMMC,3xSATA,1Gb-Nic            :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :retro98boy,beixiang,Arthur97172,Bluehei,ZZH-wl       :a311d-oes           :yes\n410     :[IDL],WXY-OES-Plus                            :s922x    :meson-g12b-s922x-oes-plus-b.dtb          :u-boot-s905x2-s922.bin       :NA                                  :NA                              :4GB-Mem,8GB-eMMC,3xSATA,1Gb-Nic,300MB-Nic  :stable/all            :amlogic     :meson-g12b   :uEnv.txt        :retro98boy,zjycb,caojiezi2003,yesterday666,yaodmin   :s922x-oes-plus      :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n\n\n# Amlogic SM1 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n501     :X96-Max+_100Mb                                :s905x3   :meson-sm1-x96-max-plus-100m.dtb          :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic,rtl8822cs-wifi             :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3              :yes\n502     :X96-Max+_1GB                                  :s905x3   :meson-sm1-x96-max-plus.dtb               :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic,rtl8822cs-wifi             :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-x96max       :no\n503     :X96-Max+(OverClock)                           :s905x3   :meson-sm1-x96-max-plus-oc.dtb            :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic,rtl8822cs-wifi             :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-x96max-oc    :no\n504     :X96-Max+(IP1001M)                             :s905x3   :meson-sm1-x96-max-plus-ip1001m.dtb       :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic(IP1001M),brcm4354-wifi     :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq,psergeevich                                  :s905x3-ip1001m      :no\n505     :X96-Max+_A100                                 :s905x3   :meson-sm1-x96-max-plus-a100.dtb          :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,32G-Rom,Wifi-AM7256,100Mb-Nic      :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :dicsonpan,taras-filatov                              :s905x3-a100         :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n506     :X96-Max+_2101                                 :s905x3   :meson-sm1-x96-max-plus-2101.dtb          :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,32G-Rom,Wifi/BT,1Gb-Nic(JL2xx1)    :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :salsabilng                                           :s905x3-2101         :no\n507     :X96-Max+Q1                                    :s905x3   :meson-sm1-x96-max-plus-q1.dtb            :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,32G-Rom,Wifi-work,100Mb-Nic        :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :tv4you2016                                           :s905x3-q1           :no\n508     :X96-Max+Q2,X96-Air-Q1000                      :s905x3   :meson-sm1-x96-max-plus-q2.dtb            :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic,qca9377-wifi               :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :danboid                                              :s905x3-q2           :no\n509     :X96-Air-1Gb                                   :s905x3   :meson-sm1-x96-air-gbit.dtb               :u-boot-x96maxplus.bin        :NA                                  :NA                              :2GB-Mem,1Gb-Nic,Wifi                       :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-x96air-gb    :no\n510     :X96-Air,X96-Max+100W,100Mb                    :s905x3   :meson-sm1-x96-air.dtb                    :u-boot-x96maxplus.bin        :NA                                  :NA                              :2GB-Mem,100Mb-Nic,Wifi                     :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :trvqhuy                                              :s905x3-x96air       :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n511     :Tencent-Aurora-3Pro                           :s905x3   :meson-sm1-skyworth-lb2004-a4091.dtb      :u-boot-skyworth-lb2004.bin   :skyworth-lb2004-u-boot.bin.sd.bin   :skyworth-lb2004-bootloader.img  :4GB-Mem,32G-Rom,1Gb-Nic(JL2xx1)            :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :livelier                                             :s905x3-b            :no\n512     :HK1-Box,Vontar-X3                             :s905x3   :meson-sm1-hk1box-vontar-x3.dtb           :u-boot-x96maxplus.bin        :hk1box-u-boot.bin.sd.bin            :NA                              :4GB-Mem,1Gb-Nic,brcm4339-wifi              :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :d5stick                                              :s905x3-hk1          :no\n513     :HK1-Box(OverClock)                            :s905x3   :meson-sm1-hk1box-vontar-x3-oc.dtb        :u-boot-x96maxplus.bin        :hk1box-u-boot.bin.sd.bin            :NA                              :4GB-Mem,1Gb-Nic,brcm4339-wifi              :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-hk1-oc       :no\n514     :H96-Max-X3,Infinity-B32                       :s905x3   :meson-sm1-h96-max-x3.dtb                 :u-boot-x96maxplus.bin        :h96maxx3-u-boot.bin.sd.bin          :NA                              :4GB-Mem,1Gb-Nic,brcm4339-wifi              :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :ketaksaan                                            :s905x3-h96max       :no\n515     :H96-Max-X3(OverClock),B32                     :s905x3   :meson-sm1-h96-max-x3-oc.dtb              :u-boot-x96maxplus.bin        :h96maxx3-u-boot.bin.sd.bin          :NA                              :4GB-Mem,1Gb-Nic,brcm4339-wifi              :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-h96max-oc    :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n516     :Ugoos-X3                                      :s905x3   :meson-sm1-ugoos-x3.dtb                   :u-boot-ugoos-x3.bin          :ugoos-x3-u-boot.bin.sd.bin          :NA                              :4GB-Mem,1Gb-Nic,brcm43455/43456-wifi       :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq,livelier                                     :s905x3-ugoosx3      :no\n517     :Ugoos-X3(OverClock)                           :s905x3   :meson-sm1-ugoos-x3-oc.dtb                :u-boot-ugoos-x3.bin          :ugoos-x3-u-boot.bin.sd.bin          :NA                              :4GB-Mem,1Gb-Nic,brcm43455/43456-wifi       :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq,livelier                                     :s905x3-ugoosx3-oc   :no\n518     :TX3-1Gb                                       :s905x3   :meson-sm1-tx3-qz.dtb                     :u-boot-tx3-qz.bin            :x96maxplus-u-boot.bin.sd.bin        :NA                              :4GB-Mem,1Gb-Nic,bcm4330-wifi               :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-tx3          :no\n519     :TX3-1Gb(OverClock)                            :s905x3   :meson-sm1-tx3-qz-oc.dtb                  :u-boot-tx3-qz.bin            :x96maxplus-u-boot.bin.sd.bin        :NA                              :4GB-Mem,1Gb-Nic,bcm4330-wifi               :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-tx3-oc       :no\n520     :TX3-100Mb                                     :s905x3   :meson-sm1-tx3-bz.dtb                     :u-boot-tx3-bz.bin            :x96maxplus-u-boot.bin.sd.bin        :NA                              :4GB-Mem,100Mb-Nic,bcm4330-wifi             :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq,irfanjunaid                                  :s905x3-tx3-bz       :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n521     :TX3-100Mb(OverClock)                          :s905x3   :meson-sm1-tx3-bz-oc.dtb                  :u-boot-tx3-bz.bin            :x96maxplus-u-boot.bin.sd.bin        :NA                              :4GB-Mem,100Mb-Nic,bcm4330-wifi             :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-tx3-bz-oc    :no\n522     :A95XF3-Air-1Gb                                :s905x3   :meson-sm1-a95xf3-air-gbit.dtb            :u-boot-x96maxplus.bin        :NA                                  :NA                              :2GB-Mem,1Gb-Nic,Wifi                       :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq                                              :s905x3-a95xf3-gb    :no\n523     :A95XF3-Air-100Mb                              :s905x3   :meson-sm1-a95xf3-air.dtb                 :u-boot-x96maxplus.bin        :NA                                  :NA                              :2GB-Mem,100Mb-Nic,Wifi                     :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :unifreq,Pat-78                                       :s905x3-a95xf3       :no\n524     :X88-Pro-X3,X99-Max+,Transpeed-X3+             :s905x3   :meson-sm1-x88-pro-x3.dtb                 :u-boot-x96maxplus.bin        :x88prox3-u-boot.bin.sd.bin          :hk1box-bootloader.img           :4GB-Mem,1Gb-Nic,qca9377-wifi               :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :araczkowski                                          :s905x3-x88-pro-x3   :yes\n525     :[IDL],Whale                                   :s905x3   :meson-sm1-x96-max-plus.dtb               :u-boot-x96maxplus.bin        :x96maxplus-u-boot.bin.sd.bin        :hk1box-bootloader.img           :4GB-Mem,64G-Rom,1Gb-Nic,rtl8822cs-wifi     :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :9runner                                              :s905x3-whale        :no\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n526     :TOX1                                          :s905x3   :meson-sm1-tox1.dtb                       :u-boot-x96maxplus.bin        :hk1box-u-boot.bin.sd.bin            :NA                              :4GB-Mem,32GB-eMMC,1Gb-Nic,RTL8822BS-wifi   :stable/all            :amlogic     :meson-sm1    :uEnv.txt        :infirms,devmfc                                       :s905x3-tox1         :no\n\n\n# Amlogic GXBB Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UBOOT_OVERLOAD              6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\na01     :Sunvell-T95M,SumaVision-Q5                    :s905     :meson-gxbb-p201.dtb                      :u-boot-s905.bin              :NA                                  :NA                              :2GB-RAM,16GB-ROM,1Gb-Nic                   :stable/all            :amlogic     :meson-gxbb   :extlinux.conf   :puccio823,qianbinbin                                 :s905                :yes\na02     :MXQ-Pro+                                      :s905     :meson-gxbb-mxq-pro-plus.dtb              :u-boot-p201.bin              :NA                                  :NA                              :2GB-DDR3,8G-eMMC,100Mb-Nic                 :stable/all            :amlogic     :meson-gxbb   :uEnv.txt        :unifreq                                              :s905-mxqpro-plus    :no\na03     :Beelink-Mini-MX-2G                            :s905     :meson-gxbb-beelink-mini-mx.dtb           :u-boot-s905.bin              :NA                                  :NA                              :2GB-RAM,16GB-ROM,1Gb-Nic                   :stable/all            :amlogic     :meson-gxbb   :uEnv.txt        :flymike,atsdai                                       :s905-beelink-mini   :no\n\n\n# Rockchip RK3588/RK3588S Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr101    :Rock5B                                        :rk3588   :rk3588-rock-5b.dtb                       :NA                           :u-boot.itb                          :idbloader.img                   :Oct-core,4/8/16GB-RAM,2.5Gb-Nic            :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :unifreq                                              :rock5b              :yes\nr102    :IPC-R                                         :rk3588   :rk3588-beelink-ipc-r.dtb                 :NA                           :u-boot.itb                          :idbloader.img                   :8GB-LPDDR4,4x1Gb-Nic,2x2.5Gb-Nic,BT,wifi   :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :gwx11111111                                          :ipc-r               :no\nr103    :HLink-H88K                                    :rk3588   :rk3588-hlink-h88k.dtb                    :NA                           :NA                                  :rk3588-h88k-bootloader.bin      :8GB-LPDDR4,32GB-eMMC,1Gb/2.5Gb-Nic         :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :unifreq                                              :h88k                :yes\nr104    :HLink-H88K-V3                                 :rk3588   :rk3588-hlink-h88k-v31.dtb                :NA                           :u-boot.itb                          :idbloader.img                   :8GB-LPDDR4,32GB-eMMC,1Gb/2.5Gb-Nic         :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :unifreq                                              :h88k-v3             :yes\nr105    :Rock5C                                        :rk3588s  :rk3588s-rock-5c.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :4/8/16/32GB-LPDDR4x-RAM,NVMe,2.5Gb-Nic     :rk3588/6.1.y          :rockchip    :rk3588s      :armbianEnv.txt  :unifreq                                              :rock5c              :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr106    :Orange-Pi-5-Plus                              :rk3588   :rk3588-orangepi-5-plus.dtb               :NA                           :u-boot.itb                          :idbloader.img                   :Oct-core,4/8/16GB-RAM,2.5Gb-Nic            :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :yonggedebaqi                                         :orangepi-5-plus     :yes\nr107    :NanoPC-T6                                     :rk3588   :rk3588-nanopc-t6.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :4/8/16GB-RAM,32/64/256Gb-ROM,2x2.5Gb-Nic   :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :hunter24099                                          :nanopc-t6           :yes\nr108    :Smart-Am60                                    :rk3588   :rk3588-smart-am60.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :8/16GB-RAM,64/256Gb-ROM,1Gb-Nic            :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :dy008                                                :smart-am60          :yes\nr109    :DC-A588                                       :rk3588   :rk3588-dc-a588.dtb                       :NA                           :u-boot.itb                          :idbloader.img                   :4/8/16GB-RAM,16~128Gb-eMMC,TF,2x1Gb-Nic    :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :AndroidOL,Lemon1151                                  :dc-a588             :yes\nr110    :Orange-Pi-5B                                  :rk3588s  :rk3588s-orangepi-5b.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :4/8/16GB-RAM,16~256Gb-eMMC,TF,1Gb-Nic      :rk3588/6.1.y          :rockchip    :rk3588s      :armbianEnv.txt  :lighthx                                              :orangepi-5b         :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr111    :FriendlyElec-CM3588-NAS                       :rk3588   :rk3588-friendlyelec-cm3588-nas.dtb       :NA                           :NA                                  :u-boot-rockchip.bin             :4/8/16GB-RAM,64Gb-eMMC,4xNVMe,1x2.5Gb-Nic  :rk3588/6.1.y          :rockchip    :rk3588       :armbianEnv.txt  :dengweiwen                                           :cm3588-nas          :yes\nr112    :Rock-5-ITX                                    :rk3588   :rk3588-rock-5-itx.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :8~32GB-RAM,8Gb-eMMC,4xSATA,2x2.5Gb-Nic     :stable/6.12.y         :rockchip    :rk3588       :armbianEnv.txt  :lentll                                               :rock-5-itx          :yes\nr113    :LZ-D3588                                      :rk3588   :rk3588-lz-d3588.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :8GB-RAM,64Gb-eMMC,TF,2x1Gb-Nic             :stable/6.12.y         :rockchip    :rk3588       :armbianEnv.txt  :Crazh3                                               :lz-d3588            :yes\nr114    :Boca-tcn100                                   :rk3588s  :rk3588s-boca-tcn100.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :8/16GB-RAM,32Gb-eMMC,NVMe,1Gb-Nic          :rk3588/6.1.y          :rockchip    :rk3588s      :armbianEnv.txt  :nblky                                                :boca-tcn100         :yes\n\n\n# Rockchip RK3568 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr201    :R66S                                          :rk3568   :rk3568-fastrhino-r66s.dtb                :NA                           :u-boot.itb                          :idbloader.img                   :2/4GB-LPDDR4,TF,2x2.5Gb-Nic                :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :r66s                :yes\nr202    :R68S                                          :rk3568   :rk3568-fastrhino-r68s.dtb                :NA                           :NA                                  :bootloader.bin                  :1/2GB-LPDDR4,16G-eMMC,2x1Gb/2x2.5Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :r68s                :yes\nr203    :E25                                           :rk3568   :rk3568-radxa-e25.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :1/4/8GB-LPDDR4,SD/M.2-SSD,2x2.5Gb-Nic      :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :e25                 :yes\nr204    :NanoPi-R5S                                    :rk3568   :rk3568-nanopi-r5s.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :2/4GB-RAM,8/16G-eMMC,2x2.5Gb/1Gb-Nic       :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :buglloc                                              :nanopi-r5s          :yes\nr205    :NanoPi-R5C                                    :rk3568   :rk3568-nanopi-r5c.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :2/4GB-RAM,8/16G-eMMC,2x2.5Gb/1Gb-Nic       :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :kongjun0,inindev                                     :nanopi-r5c          :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr206    :HLink-H66K                                    :rk3568   :rk3568-hlink-h66k.dtb                    :NA                           :NA                                  :bootloader.bin                  :2/4GB-LPDDR4,32G-eMMC,2x2.5Gb-Nic          :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :h66k                :yes\nr207    :HLink-H68K                                    :rk3568   :rk3568-hlink-h68k.dtb                    :NA                           :NA                                  :bootloader.bin                  :2/4GB-LPDDR4,32G-eMMC,2x1Gb/2x2.5Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :h68k                :yes\nr208    :HLink-H69K                                    :rk3568   :rk3568-hlink-h69k.dtb                    :NA                           :NA                                  :bootloader.bin                  :2/4GB-LPDDR4,32G-eMMC,2x1Gb/2x2.5Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :unifreq                                              :h69k                :yes\nr209    :Seewo-sv21                                    :rk3568   :rk3568-seewo-sv21.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :2GB-DDR4,32G-eMMC,2x1Gb                    :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :sehczaa                                              :seewo-sv21          :yes\nr210    :Mrkaio-m68s                                   :rk3568   :rk3568-mrkaio-m68s.dtb                   :NA                           :u-boot.itb                          :idbloader.img                   :2GB-DDR4,8G-eMMC,2x1Gb                     :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :bnaand                                               :mrkaio-m68s         :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr211    :Swan1-w28                                     :rk3568   :rk3568-swan1-w28.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :2GB-DDR4,16G-eMMC,1x1Gb,BT,wifi            :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :dy008                                                :swan1-w28           :yes\nr212    :Ruisen-box                                    :rk3568   :rk3568-ruisen-box.dtb                    :NA                           :NA                                  :bootloader.bin                  :4GB-LPDDR4,32G-eMMC,2x1Gb,SATA3.0          :rk35xx/6.1.y          :rockchip    :rk3568       :armbianEnv.txt  :Xianleewu,ysuolmai                                   :ruisen-box          :yes\nr213    :DG-TN3568                                     :rk3568   :rk3568-dg-tn3568.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,32G-eMMC,1x1Gb,SATA3.0          :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :stevenliuit                                          :dg-tn3568           :yes\nr214    :Alark35-3500                                  :rk3568   :rk3568-alark35-3500.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,32G-eMMC,100Mb-Nic              :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :stevenliuit                                          :alark35-3500        :yes\nr215    :MMBox-Anas3035                                :rk3568   :rk3568-mmbox-anas3035.dtb                :NA                           :NA                                  :u-boot-rockchip.bin             :4GB-LPDDR4,32G-eMMC,3xSATA,2x2.5Gb-Nic     :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :ritech                                               :anas3035            :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr216    :Wocyber-A3                                    :rk3568   :rk3568-wocyber-a3.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,128G-eMMC,1xSATA,1Gb-Nic        :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :Arthur97172                                          :wocyber-a3          :yes\nr217    :photonicat                                    :rk3568   :rk3568-photonicat.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,256G-eMMC,wifi,1Gb-Nic          :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :sib0ndt                                              :photonicat          :yes\nr218    :NSY-G16-Plus                                  :rk3568   :rk3568-nsy-g16-plus.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,256G-eMMC,NVMe,wifi,5x1Gb-Nic   :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :liubei1998,xiaomeng9597,linai081795                  :nsy-g16-plus        :yes\nr219    :NSY-G68-Plus                                  :rk3568   :rk3568-nsy-g68-plus.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,256G-eMMC,NVMe,wifi,5x1Gb-Nic   :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :liubei1998,xiaomeng9597,maojun1998,nanosunny,faq110  :nsy-g68-plus        :yes\nr220    :BDY-G18-Pro                                   :rk3568   :rk3568-bdy-g18-pro.dtb                   :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,256G-eMMC,NVMe,wifi,5x1Gb-Nic   :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :liubei1998,xiaomeng9597,linai081795                  :bdy-g18-pro         :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr221    :Gzpeite-P01                                   :rk3568   :rk3568-gzpeite.dtb                       :NA                           :u-boot.itb                          :idbloader.img                   :2~8GB-LPDDR4,16~64G-eMMC,NVMe,2x1Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3568       :extlinux.conf   :lakalin                                              :gzpeite-p01         :yes\nr222    :LZ-K3568                                      :rk3568   :rk3568-lz-k3568.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :8GB-LPDDR4,128G-eMMC,TF,2x1Gb-Nic          :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :zzhccv1234                                           :lz-k3568            :yes\nr223    :BDKJ-One                                      :rk3568   :rk3568-bd-one.dtb                        :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,8G-eMMC,2xSATA,NVMe,6x1Gb-Nic   :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :a1303045940                                          :bdkj-bd-one         :yes\nr224    :Station-P2                                    :rk3568   :rk3568-roc-pc.dtb                        :NA                           :NA                                  :u-boot-rockchip.bin             :2~8GB-LPDDR4,eMMC,SATA,NVMe,TF,2x1Gb-Nic   :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :Javier                                               :station-p2          :yes\nr225    :LZ-D3568                                      :rk3568   :rk3568-lz-d3568-v3.dtb                   :NA                           :u-boot.itb                          :idbloader.img                   :8GB-LPDDR4,128G-eMMC,TF,2x1Gb-Nic          :stable/6.12.y         :rockchip    :rk3568       :extlinux.conf   :MaxCrazy1101                                         :lz-d3568            :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr226    :Lyt-t68m                                      :rk3568   :rk3568-lyt-t68m.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :2GB-RAM,32G-eMMC,TF,2x1Gb-Nic,2x2.5Gb-Nic  :stable/6.12.y         :rockchip    :rk3568       :armbianEnv.txt  :OlivInk                                              :lyt-t68m            :yes\n\n\n# Rockchip RK3566 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG/ENV               6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr301    :Panther-X2                                    :rk3566   :rk3566-panther-x2.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,32G-eMMC,64G-TF,2x1Gb-Nic       :stable/6.12.y         :rockchip    :rk3566       :armbianEnv.txt  :tdleiyao                                             :panther-x2          :yes\nr302    :JP-TvBox                                      :rk3566   :rk3566-jp-tvbox.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :8GB-LPDDR4,32G-eMMC,SATA,1Gb-Nic           :rk35xx/6.1.y          :rockchip    :rk3566       :armbianEnv.txt  :unifreq                                              :jp-tvbox            :yes\nr303    :LCKFB-Taishan-Pi                              :rk3566   :rk3566-taishanpi-v10.dtb                 :NA                           :u-boot.itb                          :idbloader.img                   :2GB-LPDDR4,16G-eMMC,SATA,1Gb-Nic           :rk35xx/6.1.y          :rockchip    :rk3566       :armbianEnv.txt  :ccu6                                                 :lckfb-tspi          :yes\nr304    :[IDL],WXY-OEC-turbo-4g(Replaced-Chip-eMMC)    :rk3566   :rk3566-wxy-oec-turbo-4g.dtb              :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,Replaced-eMMC,1xSATA,1Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3566       :extlinux.conf   :andyfanybo,dd-ray                                    :wxy-oect-mod        :no\nr305    :Station-M2                                    :rk3566   :rk3566-roc-pc.dtb                        :NA                           :NA                                  :u-boot-rockchip.bin             :2GB-LPDDR4,32G-eMMC,NVMe,TF,1Gb-Nic        :rk35xx/6.1.y          :rockchip    :rk3566       :armbianEnv.txt  :Kwonelee                                             :station-m2          :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr306    :[IDL],WXY-OEC-turbo-4g(Original-Edition)      :rk3566   :rk3566-wxy-oec-turbo-4g.dtb              :NA                           :NA                                  :bootloader.bin                  :4GB-LPDDR4,8G-eMMC,1xSATA,1Gb-Nic          :rk35xx/6.1.y          :rockchip    :rk3566       :extlinux.conf   :dd-ray,hoiw                                          :wxy-oect            :yes\nr307    :Orange-Pi-3B                                  :rk3566   :rk3566-orangepi-3b.dtb                   :NA                           :NA                                  :u-boot-rockchip.bin             :2/4/8GB-LPDDR4,16~256G-eMMC,TF,1Gb-Nic     :rk35xx/6.1.y          :rockchip    :rk3566       :extlinux.conf   :GinRyan                                              :orangepi-3b         :yes\n\n\n# Rockchip RK3399 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr401    :EAIDK-610                                     :rk3399   :rk3399-eaidk-610.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR3,16G-eMMC,128GB-SD,1Gb-Nic       :rk35xx/6.1.y          :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :eaidk-610           :yes\nr402    :King3399                                      :rk3399   :rk3399-king3399.dtb                      :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-DDR3,16G-eMMC,1Gb-Nic              :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :king3399            :yes\nr403    :TN3399                                        :rk3399   :rk3399-tn3399-v3.dtb                     :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,16G-eMMC,1Gb-Nic,WIFI/BT(AP6255)  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :tn3399              :yes\nr404    :Kylin3399                                     :rk3399   :rk3399-kylin3399.dtb                     :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,32G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :kylin3399           :yes\nr405    :ZCube1-Max                                    :rk3399   :rk3399-zcube1-max.dtb                    :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB-DDR3,16G-eMMC,1Gb-Nic                  :rk35xx/6.1.y          :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :zcube1-max          :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr406    :tvi3315a                                      :rk3399   :rk3399-tvi3315a.dtb                      :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-LPDDR3,16G-eMMC,1Gb-Nic,mini PCIe      :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :13584452567                                          :tvi3315a            :yes\nr407    :xiaobao                                       :rk3399   :rk3399-xiaobao.dtb                       :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,16G-eMMC,1Gb-Nic,SATA,TF          :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :13584452567,Lemon1151                                :xiaobao             :yes\nr408    :SMART-AM40                                    :rk3399   :rk3399-smart-am40.dtb                    :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,32G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :GD2021                                               :smart-am40          :yes\nr409    :CRRC                                          :rk3399   :rk3399-crrc.dtb                          :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB-DDR3,16G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :GD2021                                               :crrc                :yes\nr410    :ZYSJ                                          :rk3399   :rk3399-zysj.dtb                          :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-LPDDR3,8G/128G-eMMC,TF,1Gb-Nic     :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cm9vdA,GD2021,Lemon1151                              :zysj                :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr411    :Dilusense-DLFR100                             :rk3399   :rk3399-dlfr100.dtb                       :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR3,32G-eMMC,2x1Gb-Nic              :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cm9vdA,chamoyo                                       :dlfr100             :yes\nr412    :EMB3531                                       :rk3399   :rk3399-emb3531.dtb                       :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB-DDR3,32G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :rongchuan17                                          :emb3531             :yes\nr413    :Leez-P710                                     :rk3399   :rk3399-leez-p710.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,16G-eMMC,1Gb-Nic                :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cm9vdA,inoeud                                        :leez                :yes\nr414    :Firefly-RK3399                                :rk3399   :rk3399-firefly.dtb                       :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-DDR3,16G/32G-eMMC,1Gb-Nic          :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :150balbes,liaoya                                     :firefly-rk3399      :yes\nr415    :DG-3399                                       :rk3399   :rk3399-dg3399.dtb                        :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-DDR3,16G-eMMC,1Gb-Nic              :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :lauren12133                                          :dg3399              :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr416    :Fine3399                                      :rk3399   :rk3399-fine3399.dtb                      :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,8G/16G/64G/128G-eMMC,TF,1Gb-Nic    :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cm9vdA,r1172464137,Lemon1151,QXY716                  :fine3399            :yes\nr417    :SW799                                         :rk3399   :rk3399-bozz-sw799.dtb                    :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,16G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :inoeud                                               :sw799               :yes\nr418    :LX-R3S                                        :rk3399   :rk3399-lx-r3s.dtb                        :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-DDR3,6G/16G/32G-eMMC,1Gb-Nic       :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cm9vdA,kuuer                                         :lx-r3s              :yes\nr419    :Hugsun-X99                                    :rk3399   :rk3399-hugsun-x99.dtb                    :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-DDR3,32/64G-eMMC,1Gb-Nic               :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :yao-weijie                                           :hugsun-x99          :yes\nr420    :Tb-ls3399                                     :rk3399   :rk3399-tb-ls3399.dtb                     :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB-DDR3,16G-eMMC,1Gb-Nic                  :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :chute8427                                            :tb-ls3399           :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr421    :Hisense-hs530r                                :rk3399   :rk3399-hs530r.dtb                        :NA                           :u-boot.itb                          :idbloader.img                   :4GB-RAM,16G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :hunter24099                                          :hs530r              :yes\nr422    :Tpm312                                        :rk3399   :rk3399-tpm312.dtb                        :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,16G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :Lemon1151,wanglixiang90,robinZhao                    :tpm312              :yes\nr423    :ZK-rk39a                                      :rk3399   :rk3399-zk-r39a.dtb                       :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,32/64G-eMMC,1Gb-Nic                :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :hunter24099                                          :zk-r39a             :yes\nr424    :YSKJ                                          :rk3399   :rk3399-yskj.dtb                          :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,32G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :zakuwaki                                             :yskj                :yes\nr425    :Fmx1-Pro                                      :rk3399   :rk3399-fmx1-pro.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :4GB-RAM,32G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :doyoman                                              :fmx1-pro            :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr426    :GEA-6319                                      :rk3399   :rk3399-gea6319.dtb                       :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR3,8/16/32G-eMMC,SD,1Gb-Nic        :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :Lemon1151,zaichou,hunter24099                        :gea-6319            :yes\nr427    :AIO-3399b                                     :rk3399   :rk3399-aio-3399b.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :2GB/4GB-RAM,8G/16G/32G/64G-eMMC,TF,1Gb-Nic :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :TheRepublicOfChina                                   :aio-3399b           :yes\nr428    :TaraM                                         :rk3399   :rk3399-taram.dtb                         :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,32G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :chongshengB                                          :taram               :yes\nr429    :Fmx1-Pro-B                                    :rk3399   :rk3399-fmx1-pro-b.dtb                    :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,32G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :chengdataon-source,179156054                         :fmx1-pro-b          :yes\nr430    :NanoPC-T4                                     :rk3399   :rk3399-nanopc-t4.dtb                     :trust.bin                    :uboot.img                           :idbloader.bin                   :4GB-RAM,64G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :cnMeeko                                              :nanopc-t4           :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr431    :Firefly-Core-3399-JD4                         :rk3399   :rk3399-firefly-core-3399-jd4.dtb         :trust.bin                    :uboot.img                           :idbloader.bin                   :2/4GB-RAM,8~128G-eMMC,1Gb-Nic              :stable/6.12.y         :rockchip    :rk3399       :armbianEnv.txt  :maxwell-hub                                          :firefly-jd4         :yes\nr432    :AIO-3399C                                     :rk3399   :rk3399-aio-3399c.dtb                     :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-LPDDR4,8G/128G-eMMC,SD,1Gb-Nic     :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :shanshuise                                           :aio-3399c           :yes\nr433    :AIO-3399C(AI)                                 :rk3399   :rk3399-aio-3399c-ai.dtb                  :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-LPDDR4,8G/128G-eMMC,SD,1Gb-Nic     :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :kaixinos,jun9100,shanshuise                          :aio-3399c-ai        :yes\nr434    :Sv-33a6x                                      :rk3399   :rk3399-sv-33a6x.dtb                      :NA                           :u-boot.itb                          :idbloader.img                   :2GB-RAM,16G-eMMC,1Gb-Nic                   :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :loadnl                                               :sv-33a6x            :yes\nr435    :Sv-33a6x(VPU)                                 :rk3399   :rk3399-sv-33a6x-vpu.dtb                  :NA                           :NA                                  :u-boot-rockchip.bin             :2GB-RAM,16G-eMMC,1Gb-Nic,Add-VPU-driver    :stable/6.12.y         :rockchip    :rk3399       :extlinux.conf   :MikuChat                                             :sv-33a6x-vpu        :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n\n\n# Rockchip RK3328 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr501    :BeikeYun                                      :rk3328   :rk3328-beikeyun-1296mhz.dtb              :trust.bin                    :uboot.img                           :idbloader.bin                   :1GB-Mem,8G-eMMC,1Gb-Nic                    :stable/6.12.y         :rockchip    :rk3328       :armbianEnv.txt  :unifreq,doyoman                                      :beikeyun            :yes\nr502    :Chainedbox-L1-Pro                             :rk3328   :rk3328-l1pro-1296mhz.dtb                 :trust.bin                    :uboot.img                           :idbloader.bin                   :1GB-Mem,8G-eMMC,1Gb-Nic                    :stable/6.12.y         :rockchip    :rk3328       :armbianEnv.txt  :unifreq,Ride_Wind,aaa7260                            :chainedbox          :yes\nr503    :Station-M1,Bqeel-MVR9                         :rk3328   :rk3328-box-trn9.dtb                      :trust.bin                    :uboot.img                           :idbloader.bin                   :2GB/4GB-DDR3,8-128G-eMMC,TF,1Gb-Nic        :stable/6.12.y         :rockchip    :rk3328       :armbianEnv.txt  :giovEra                                              :station-m1          :yes\nr504    :Renegade-RK3328,Firefly-RK3328                :rk3328   :rk3328-roc-cc.dtb                        :trust.bin                    :uboot.img                           :idbloader.bin                   :1GB/2GB/4GB-DDR4,8-128G-eMMC,TF,1Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3328       :armbianEnv.txt  :sehczaa                                              :renegade-rk3328     :yes\n\n\n# Rockchip RK3318 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr601    :rk3318-box                                    :rk3318   :rk3318-box.dtb                           :NA                           :u-boot.itb                          :idbloader.img                   :1GB-Mem,8G-eMMC,1Gb-Nic                    :stable/6.12.y         :rockchip    :rk3318       :armbianEnv.txt  :13584452567                                          :rk3318-box          :yes\n\n\n# Rockchip RK3528 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr701    :HLink-H28K                                    :rk3528   :rk3528-hlink-h28k.dtb                    :NA                           :NA                                  :bootloader.bin                  :1GB/2GB/4GB-LPDDR4,8G-eMMC,TF,2x1Gb-Nic    :rk35xx/6.1.y          :rockchip    :rk3528       :armbianEnv.txt  :unifreq                                              :h28k                :yes\nr702    :Radxa-E20C                                    :rk3528   :rk3528-radxa-e20c.dtb                    :NA                           :u-boot.itb                          :idbloader.img                   :2GB-LPDDR4,TF,2x1Gb-Nic                    :rk35xx/6.1.y          :rockchip    :rk3528       :armbianEnv.txt  :unifreq                                              :e20c                :yes\nr703    :H96-Max-M2                                    :rk3528   :rk3528-mangopi-m28k.dtb                  :NA                           :u-boot.itb                          :idbloader.img                   :4GB-LPDDR4,64G-eMMC,USB,1Gb-Nic            :rk35xx/6.1.y          :rockchip    :rk3528       :armbianEnv.txt  :d5stick                                              :h96-max-m2          :yes\nr704    :HK1-Rbox-K8S                                  :rk3528   :rk3528-hk1-rbox-k8s.dtb                  :NA                           :NA                                  :bootloader.bin                  :2GB/4GB-LPDDR4,16/32/64G-eMMC,100Mb-Nic    :stable/6.12.y         :rockchip    :rk3528       :armbianEnv.txt  :xf110,xf110119,ruichi1978                            :hk1-rbox-k8s        :yes\nr705    :HT2                                           :rk3528   :rk3528-ht2.dtb                           :NA                           :NA                                  :bootloader.bin                  :2GB/4GB-LPDDR4,32/64G-eMMC,TF,1Gb-Nic      :stable/6.12.y         :rockchip    :rk3528       :armbianEnv.txt  :xf110,xf110119,ruichi1978                            :ht2                 :yes\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr706    :Inspur-CD1000-Cloud-PC                        :rk3528   :rk3528-cd1000.dtb                        :NA                           :NA                                  :bootloader.bin                  :2GB-LPDDR4,32-eMMC,TF,100Mb-Nic            :rk35xx/6.1.y          :rockchip    :rk3528       :armbianEnv.txt  :LSP0123,YukMingLaw                                   :cd1000              :yes\n\n\n# Rockchip RK3576 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.TRUST_IMG                   6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nr801    :NanoPi-m5                                     :rk3576   :rk3576-nanopi-m5.dtb                     :NA                           :u-boot.itb                          :idbloader.img                   :4/8/16GB-Mem,8/16G-eMMC,2x1Gb-Nic          :stable/6.12.y         :rockchip    :rk3576       :armbianEnv.txt  :RokkakuM                                             :nanopi-m5           :yes\n\n\n# Allwinner h6 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UNUSED                      6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nw101    :Vplus-Cloud                                   :h6       :sun50i-h6-vplus-cloud.dtb                :NA                           :NA                                  :u-boot-sunxi-with-spl.bin       :1GB-DDR3,8G-eMMC,1Gb-Nic                   :stable/6.12.y         :allwinner   :sun50i-h6    :armbianEnv.txt  :unifreq,yu13740000                                   :vplus               :yes\nw102    :Tanix-TX6                                     :h6       :sun50i-h6-tanix-tx6.dtb                  :NA                           :NA                                  :u-boot-sunxi-with-spl.bin       :2GB/4GB-DDR3,16G/32G-eMMC,100Mb-Nic        :stable/6.12.y         :allwinner   :sun50i-h6    :extlinux.conf   :angel                                                :tanix-tx6           :yes\nw103    :TQC-A01                                       :h6       :sun50i-h6-tqc-a01.dtb                    :NA                           :NA                                  :u-boot-sunxi-with-spl.bin       :1GiB-LPDDR3,8G-eMMC,100Mb-Nic,BT,WIFI      :h6/6.6.y              :allwinner   :sun50i-h6    :extlinux.conf   :13584452567                                          :tqc-a01             :yes\n\n\n# Allwinner h618 Family\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\n# 1.ID  2.MODEL                                        3.SOC     4.FDTFILE                                 5.UNUSED                      6.MAINLINE_UBOOT                     7.BOOTLOADER_IMG                 8.DESCRIPTION                               9.KERNEL_TAGS          10.PLATFORM  11.FAMILY     12.BOOT_CONF     13.CONTRIBUTORS                                       14.BOARD             15.BUILD\n#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------\nw201    :OrangePi-Zero3                                :h618     :sun50i-h618-orangepi-zero3.dtb           :NA                           :NA                                  :u-boot-sunxi-with-spl.bin       :1/1.5/2/4GiB-LPDDR4,TF,1Gb-Nic             :stable/6.12.y         :allwinner   :sun50i-h616  :armbianEnv.txt  :xzq849                                               :orangepi-zero3      :yes\nw202    :H618-DevBoard                                 :h618     :sun50i-h618-devboard.dtb                 :NA                           :NA                                  :u-boot-sunxi-with-spl.bin       :4GiB-LPDDR4,128G-eMMC,1Gb-Nic              :stable/6.12.y         :allwinner   :sun50i-h616  :armbianEnv.txt  :MrZhou                                               :h618-devboard       :yes\n\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/modprobe.d/brcmfmac.conf",
    "content": "options brcmfmac feature_disable=0x282000\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/modules-load.d/ophub-load-list.conf",
    "content": "# This is a custom file to automatically load driver modules at boot.\n# Add modules here that you would normally load manually via 'modprobe'.\n# \n# Format: Write only the module name (one per line).\n# Example: Instead of running 'sudo modprobe tcp_bbr', just add 'tcp_bbr' below.\n\ntcp_bbr\nrknpu\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/etc/sysctl.conf",
    "content": "#\n# /etc/sysctl.conf - Configuration file for setting system variables\n# See /etc/sysctl.d/ for additional system variables.\n# See sysctl.conf (5) for information.\n#\n\n#kernel.domainname = example.com\n\n# Uncomment the following to stop low-level messages on console\nkernel.printk = 7 4 1 7\n\n##############################################################3\n# Functions previously found in netbase\n#\n\n# Uncomment the next two lines to enable Spoof protection (reverse-path filter)\n# Turn on Source Address Verification in all interfaces to\n# prevent some spoofing attacks\n#net.ipv4.conf.default.rp_filter=1\n#net.ipv4.conf.all.rp_filter=1\n\n# Uncomment the next line to enable TCP/IP SYN cookies\n# See http://lwn.net/Articles/277146/\n# Note: This may impact IPv6 TCP sessions too\n#net.ipv4.tcp_syncookies=1\n\n# Uncomment the next line to enable packet forwarding for IPv4\n#net.ipv4.ip_forward=1\n\n# Uncomment the next line to enable packet forwarding for IPv6\n#  Enabling this option disables Stateless Address Autoconfiguration\n#  based on Router Advertisements for this host\n#net.ipv6.conf.all.forwarding=1\n\n\n###################################################################\n# Additional settings - these settings can improve the network\n# security of the host and prevent against some network attacks\n# including spoofing attacks and man in the middle attacks through\n# redirection. Some network environments, however, require that these\n# settings are disabled so review and enable them as needed.\n#\n# Do not accept ICMP redirects (prevent MITM attacks)\n#net.ipv4.conf.all.accept_redirects = 0\n#net.ipv6.conf.all.accept_redirects = 0\n# _or_\n# Accept ICMP redirects only for gateways listed in our default\n# gateway list (enabled by default)\n# net.ipv4.conf.all.secure_redirects = 1\n#\n# Do not send ICMP redirects (we are not a router)\n#net.ipv4.conf.all.send_redirects = 0\n#\n# Do not accept IP source route packets (we are not a router)\n#net.ipv4.conf.all.accept_source_route = 0\n#net.ipv6.conf.all.accept_source_route = 0\n#\n# Log Martian Packets\n#net.ipv4.conf.all.log_martians = 1\n#\n\n###################################################################\n# Magic system request Key\n# 0=disable, 1=enable all, >1 bitmask of sysrq functions\n# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html\n# for what other values do\n#kernel.sysrq=438\n\nvm.swappiness = 100\n\nvm.max_map_count = 262144\n# Generated file - do not edit.\n# Disable the hung task timer by default. (bnc#552820)\nkernel.hung_task_timeout_secs = 0\n\n# Increase defaults for IPC (bnc#146656)\nkernel.msgmax = 65536\nkernel.msgmnb = 65536\n\n# TCP Congestion Control Optimization Guide\n#\n# Command to check device support status: [ sysctl net.ipv4.tcp_available_congestion_control ]\n#         net.ipv4.tcp_available_congestion_control = reno cubic bbr\n#\n# Recommended for 100Mbps/Low Performance Devices: fq_codel + cubic\n# Recommended for Gigabit/High Performance Devices: fq + bbr\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\nnet.ipv4.ip_local_port_range = 1024 65535\n\nnet.ipv4.conf.default.arp_ignore = 1\nnet.ipv4.conf.all.arp_ignore = 1\nnet.ipv4.ip_forward = 1\nnet.ipv4.icmp_echo_ignore_broadcasts = 1\nnet.ipv4.icmp_ignore_bogus_error_responses = 1\nnet.ipv4.igmp_max_memberships = 100\nnet.ipv4.tcp_fin_timeout = 30\nnet.ipv4.tcp_keepalive_time = 120\nnet.ipv4.tcp_syncookies = 1\nnet.ipv4.tcp_timestamps = 1\nnet.ipv4.tcp_sack = 1\nnet.ipv4.tcp_dsack = 1\n\nnet.ipv6.conf.default.forwarding = 1\nnet.ipv6.conf.all.forwarding = 1\n\nnet.core.rmem_max = 4194304\nnet.core.wmem_max = 1048576\n\nnet.netfilter.nf_conntrack_acct = 1\nnet.netfilter.nf_conntrack_checksum = 0\nnet.netfilter.nf_conntrack_max = 65535\nnet.netfilter.nf_conntrack_tcp_timeout_established = 7440\nnet.netfilter.nf_conntrack_udp_timeout = 60\nnet.netfilter.nf_conntrack_udp_timeout_stream = 180\nnet.netfilter.nf_conntrack_helper = 1\n\n# Disable IPv6 by default\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-apt",
    "content": "#!/bin/bash\n#===========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Change the APT mirror source of the system\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-apt\n#\n#============================= Functions list #=============================\n#\n# error_msg           : Output error message\n# check_release       : Check the system release\n# backup_source_list  : Backup the source list\n# change_source_list  : Change the APT mirror source\n# select_mirror_site  : Select the mirror site\n#\n#========================= Set default parameters ==========================\n#\n# Get custom firmware information\nophub_release_file=\"/etc/ophub-release\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#===========================================================================\n\n# Encountered a serious error, abort the script execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check the system release information\ncheck_release() {\n    if [[ -f \"${ophub_release_file}\" ]]; then\n        source \"${ophub_release_file}\"\n        VERSION_CODEID=\"${VERSION_CODEID}\"\n        VERSION_CODENAME=\"${VERSION_CODENAME}\"\n        [[ -z \"${VERSION_CODEID}\" ]] && error_msg \"System VERSION_CODEID not detected!\"\n        [[ -z \"${VERSION_CODENAME}\" ]] && error_msg \"System VERSION_CODENAME not detected!\"\n\n        # Set the source files\n        armbian_source_file=\"/etc/apt/sources.list.d/${VERSION_CODEID}.sources\"\n        armbian_source_backup_file=\"/etc/apt/sources.list.d/${VERSION_CODEID}.sources.bak\"\n\n    else\n        error_msg \"System release file not found!\"\n    fi\n}\n\n# Backup the source list\nbackup_source_list() {\n    [[ -f \"${armbian_source_file}\" && ! -f \"${armbian_source_backup_file}\" ]] && {\n        cp -f \"${armbian_source_file}\" \"${armbian_source_backup_file}\"\n    }\n}\n\n# Change the APT mirror source\n# Reference source: https://github.com/armbian/build/blob/main/lib/functions/rootfs/distro-specific.sh\nchange_source_list() {\n    echo -e \"${STEPS} Changing APT mirror source to: [ ${MIRROR_URL} ]\"\n    echo -e \"${INFO} System release: [ ${VERSION_CODENAME} ]\"\n\n    case \"${VERSION_CODENAME}\" in\n    buster | bullseye | bookworm | trixie | forky)\n        declare -a suites=(\"${VERSION_CODENAME}\" \"${VERSION_CODENAME}-updates\")\n        declare -a components=(main contrib non-free)\n\n        if [[ \"${VERSION_CODENAME}\" != \"buster\" && \"${VERSION_CODENAME}\" != \"bullseye\" ]]; then\n            # EOS releases doesn't get security updates\n            declare -a security_suites=(\"${VERSION_CODENAME}-security\")\n            suites+=(\"${VERSION_CODENAME}-backports\")\n            components+=(\"non-free-firmware\")\n        fi\n\n        cat >${armbian_source_file} <<EOF\n            Types: deb\n            URIs: http://${MIRROR_URL}/debian\n            Suites: ${suites[@]}\n            Components: ${components[@]}\n            Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nEOF\n        if [[ ${#security_suites[@]} -gt 0 ]]; then\n            cat >>${armbian_source_file} <<EOF\n            Types: deb\n            URIs: http://${MIRROR_URL}/debian-security\n            Suites: ${security_suites[@]}\n            Components: ${components[@]}\n            Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nEOF\n        fi\n        ;;\n\n    resolute | focal | jammy | noble | oracular | plucky | questing)\n        cat >${armbian_source_file} <<EOF\n            Types: deb\n            URIs: http://${MIRROR_URL}/ubuntu-ports/\n            Suites: ${VERSION_CODENAME} ${VERSION_CODENAME}-security ${VERSION_CODENAME}-updates ${VERSION_CODENAME}-backports\n            Components: main restricted universe multiverse\n            Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\nEOF\n        ;;\n\n    sid | unstable)\n        cat >${armbian_source_file} <<EOF\n            Types: deb\n            URIs: http://${MIRROR_URL}/debian\n            Suites: ${VERSION_CODENAME}\n            Components: main contrib non-free non-free-firmware\n            Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nEOF\n        ;;\n\n    *)\n        error_msg \"Unsupported system release: [ ${VERSION_CODENAME} ]\"\n        ;;\n\n    esac\n\n    # Remove the space at the beginning of each line\n    sed -i 's|^[ t]*||g' ${armbian_source_file}\n    echo -e \"${SUCCESS} APT mirror source changed successfully.\"\n}\n\n# Select the mirror site\nselect_mirror_site() {\n    source_id=\"${1}\"\n    echo -e \"${INFO} Selected mirror source ID: [ ${source_id} ]\"\n\n    case \"${source_id}\" in\n        0)\n            # Restore the default source\n            if [[ -f \"${armbian_source_backup_file}\" ]]; then\n                cp -f \"${armbian_source_backup_file}\" \"${armbian_source_file}\"\n                echo -e \"${SUCCESS} Default source restored successfully.\" && exit 0\n            else\n                error_msg \"Default source backup file not found.\"\n            fi\n            ;;\n        1)  MIRROR_URL=\"mirrors.tuna.tsinghua.edu.cn\" ;;\n        2)  MIRROR_URL=\"mirrors.bfsu.edu.cn\" ;;\n        3)  MIRROR_URL=\"mirrors.aliyun.com\" ;;\n        4)  MIRROR_URL=\"mirrors.xtom.hk\" ;;\n        5)  MIRROR_URL=\"opensource.nchc.org.tw\" ;;\n        6)  MIRROR_URL=\"mirrors.ocf.berkeley.edu\" ;;\n        7)  MIRROR_URL=\"mirrors.xtom.com\" ;;\n        8)  MIRROR_URL=\"mirrors.mit.edu\" ;;\n        9)  MIRROR_URL=\"mirror.csclub.uwaterloo.ca\" ;;\n        10) MIRROR_URL=\"muug.ca/mirror\" ;;\n        11) MIRROR_URL=\"ftp.openbsd.dk/mirrors\" ;;\n        12) MIRROR_URL=\"mirrors.xtom.nl\" ;;\n        13) MIRROR_URL=\"mirrors.xtom.de\" ;;\n        14) MIRROR_URL=\"mirror.yandex.ru\" ;;\n        15) MIRROR_URL=\"in.mirror.coganng.com\" ;;\n        16) MIRROR_URL=\"mirrors.xtom.ee\" ;;\n        17) MIRROR_URL=\"mirrors.xtom.au\" ;;\n        18) MIRROR_URL=\"mirror.yuki.net.uk\" ;;\n        19) MIRROR_URL=\"mirror.sg.gs\" ;;\n        20) MIRROR_URL=\"mirrors.xtom.jp\" ;;\n        *) error_msg \"Invalid mirror source ID.\" ;;\n    esac\n\n    # Change the source list\n    change_source_list\n}\n\necho -e \"${STEPS} Welcome to the APT Mirror Source Switching Tool.\"\n# Check the system release information\ncheck_release\n# Backup the source list\nbackup_source_list\n\n# Prompt the user to input the source ID\necho -e \"${INFO} Please select a [\\033[92m ${VERSION_CODENAME} \\033[0m] mirror site.\"\ncat <<EOF\n  ┌──────┬───────────────────┬────────────────────────────────┐\n  │  ID  │  Country/Region   │  Mirror Site                   │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   0  │  -                │  Restore default source        │\n  │   1  │  China            │  mirrors.tuna.tsinghua.edu.cn  │\n  │   2  │  China            │  mirrors.bfsu.edu.cn           │\n  │   3  │  China            │  mirrors.aliyun.com            │\n  │   4  │  Hongkong, China  │  mirrors.xtom.hk               │\n  │   5  │  Taiwan, China    │  opensource.nchc.org.tw        │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   6  │  United States    │  mirrors.ocf.berkeley.edu      │\n  │   7  │  United States    │  mirrors.xtom.com              │\n  │   8  │  United States    │  mirrors.mit.edu               │\n  │   9  │  Canada           │  mirror.csclub.uwaterloo.ca    │\n  │  10  │  Canada           │  muug.ca/mirror                │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  11  │  Denmark          │  ftp.openbsd.dk/mirrors        │\n  │  12  │  Netherlands      │  mirrors.xtom.nl               │\n  │  13  │  Germany          │  mirrors.xtom.de               │\n  │  14  │  Russia           │  mirror.yandex.ru              │\n  │  15  │  India            │  in.mirror.coganng.com         │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  16  │  Estonia          │  mirrors.xtom.ee               │\n  │  17  │  Australia        │  mirrors.xtom.au               │\n  │  18  │  South Korea      │  mirror.yuki.net.uk            │\n  │  19  │  Singapore        │  mirror.sg.gs                  │\n  │  20  │  Japan            │  mirrors.xtom.jp               │\n  └──────┴───────────────────┴────────────────────────────────┘\nEOF\necho -ne \"${OPTIONS} Please Input ID: \"\nread mwid\n\ncase \"${mwid}\" in\n    [0-9]*) select_mirror_site \"${mwid}\" ;;\n         *) error_msg \"Invalid input.\" && exit 0 ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-ddbr",
    "content": "#!/bin/bash\n#===========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Backup and restore the eMMC system data\n# Copyright (C) 2017- The function borrowed from ddbr, Author: xXx\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-ddbr\n#\n#========================= Set default parameters ==========================\n#\n# Check the output path\nout_path=\"/ddbr\"\n# File name for backup/restore\nddbr_image=\"BACKUP-arm-64-emmc.img.gz\"\n# Need remaining space, unit: GB\nneed_space=\"2\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#===========================================================================\n\n# Encountered a serious error, abort the script execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check emmc\ndo_checkemmc() {\n    # Get device name\n    mydevice_name=\"$(cat /proc/device-tree/model | tr -d '\\000')\"\n    echo -e \"${INFO} The device name: [ ${mydevice_name} ]\"\n\n    # Find the partition where root is located\n    root_devname=\"$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print substr($3, 1, length($3)-2)}')\"\n    if lsblk -l | grep -E \"^${root_devname}boot0\" >/dev/null; then\n        error_msg \"You are running in eMMC mode, please boot system with TF/SD/USB!\"\n    fi\n\n    # Find the EMMC drive\n    emmc=\"$(lsblk -l -o NAME | grep -oE \"mmcblk[0-9]boot0\" | sort -u | sed \"s/boot0//g\")\"\n    # Find emmc disk, find emmc that does not contain the boot0 partition\n    [[ -z \"${emmc}\" ]] && emmc=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?)' | grep -vE ^${root_devname} | sort -u)\"\n    # Check if eMMC exists\n    [[ -z \"${emmc}\" ]] && error_msg \"No eMMC storage found on this device!\"\n    # Show the eMMC device name\n    echo -e \"${INFO} The device eMMC name: [ /dev/${emmc} ]\"\n\n    # Check emmc partition size\n    dev_intsize=\"$(fdisk -s /dev/${emmc})\"\n    [[ -z \"$(echo \"${dev_intsize}\" | sed -n \"/^[0-9]\\+$/p\")\" ]] && error_msg \"Unable to determine eMMC size.\"\n    echo -e \"${INFO} The device eMMC size: [ $(($dev_intsize / 1024 / 1024))GB ]\"\n\n    # check directory\n    [[ -d \"${out_path}\" ]] || mkdir -p ${out_path}\n    echo -e \"${INFO} The ddbr file path: [ ${out_path}/${ddbr_image} ]\\n\"\n}\n\n# Check the remaining space\ndo_checkspace() {\n    # Check the remaining space capacity\n    remaining_space=\"$(df -Tk ${out_path} | tail -n1 | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))\"\n    if [[ -z \"$(echo \"${remaining_space}\" | sed -n \"/^[0-9]\\+$/p\")\" ]]; then\n        error_msg \"Unable to determine available space on the target path.\"\n    fi\n    # Check if there is enough free space\n    if [[ \"${remaining_space}\" -lt \"${need_space}\" ]]; then\n        error_msg \"Insufficient disk space. Please use [ armbian-tf ] to expand the partition first.\"\n    fi\n}\n\n# Backup the eMMC system\ndo_backup() {\n    echo -e \"${STEPS} Starting eMMC system backup...\"\n    do_checkspace\n    echo -e \"${INFO} Compressing [ /dev/${emmc} ] to [ ${out_path}/${ddbr_image} ], please wait...\"\n    rm -f ${out_path}/${ddbr_image} 2>/dev/null && sync\n    dd if=/dev/${emmc} | pv -s ${dev_intsize}\"K\" | gzip >${out_path}/${ddbr_image}\n    [[ \"$?\" -eq \"0\" ]] && sync && echo -e \"${SUCCESS} eMMC backup completed successfully.\"\n    sync && sleep 3\n    exit 0\n}\n\n# Restore the eMMC system\ndo_restore() {\n    echo -e \"${STEPS} Starting eMMC system restore...\"\n    [[ ! -f \"${out_path}/${ddbr_image}\" ]] && error_msg \"Backup file [ ${out_path}/${ddbr_image} ] not found.\"\n    echo -e \"${INFO} Restoring [ ${out_path}/${ddbr_image} ] to [ /dev/${emmc} ], please wait...\"\n    gunzip -c ${out_path}/${ddbr_image} | pv -s ${dev_intsize}\"K\" | dd of=/dev/${emmc}\n    [[ \"$?\" -eq \"0\" ]] && sync && echo -e \"${SUCCESS} eMMC restore completed successfully.\"\n    sync && sleep 3\n    exit 0\n}\n\necho -e \"${STEPS} Welcome to the eMMC system backup/restore tool.\"\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\n\n# Check emmc\ndo_checkemmc\n\n# Prompt the user to select backup or restore\ncat <<EOF\n--------------------------------------------------------\n  Option  Description\n--------------------------------------------------------\n    b     :Backup eMMC system to external storage\n    r     :Restore system from external storage to eMMC\n--------------------------------------------------------\nEOF\necho -ne \"${OPTIONS} Please select (b/r): \"\nread br\n\ncase \"${br}\" in\n    b | B | backup)  do_backup ;;\n    r | R | restore) do_restore ;;\n    *)               exit 0 ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-docker",
    "content": "#!/bin/bash\n#===========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Install and manage Docker on Armbian\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Usage              : Command\n# Install Docker     : armbian-docker\n# Update  Docker     : armbian-docker update\n# Remove  Docker     : armbian-docker remove\n#\n#========================= Set default parameters ==========================\n#\n# Get custom firmware information\nophub_release_file=\"/etc/ophub-release\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#===========================================================================\n\n# Encountered a serious error, abort the script execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check system release information\ncheck_release() {\n    source \"${ophub_release_file}\"\n    VERSION_CODEID=\"${VERSION_CODEID}\"     # ubuntu          -  debian\n    VERSION_CODENAME=\"${VERSION_CODENAME}\" # resolute/noble  -  trixie/bookworm\n    if [[ -z \"${VERSION_CODEID}\" ]]; then\n        echo -ne \"${OPTIONS} Please Input VERSION_CODEID Name [ubuntu/debian]: \"\n        read VERSION_CODEID\n        VERSION_CODEID=\"${VERSION_CODEID}\"\n    fi\n    if [[ -z \"${VERSION_CODENAME}\" ]]; then\n        echo -ne \"${OPTIONS} Please Input VERSION_CODENAME Name [resolute/noble/trixie/bookworm]: \"\n        read VERSION_CODENAME\n        VERSION_CODENAME=\"${VERSION_CODENAME}\"\n    fi\n    echo -e \"${INFO} VERSION_CODEID: [ ${VERSION_CODEID} ]\"\n    echo -e \"${INFO} VERSION_CODENAME: [ ${VERSION_CODENAME} ]\"\n}\n\n# Select Docker installation source mirror\nselect_source() {\n    echo -e \"${STEPS} Select Docker download source...\"\n    cat <<EOF\n-----------------------------------------------\n  ID  SOURCE\n-----------------------------------------------\n  1   docker.com (default)\n  2   aliyun.com\n  3   ustc.edu.cn\n  4   tencent.com\n-----------------------------------------------\nEOF\n    echo -ne \"${OPTIONS} Please Input ID (1/2/3/4): \"\n    read source_id\n    DOCKER_SOURCE=\"https://download.docker.com/linux\"\n    if [[ \"${source_id}\" -eq \"2\" ]]; then\n        DOCKER_SOURCE=\"https://mirrors.aliyun.com/docker-ce/linux\"\n    elif [[ \"${source_id}\" -eq \"3\" ]]; then\n        DOCKER_SOURCE=\"https://mirrors.ustc.edu.cn/docker-ce/linux\"\n    elif [[ \"${source_id}\" -eq \"4\" ]]; then\n        DOCKER_SOURCE=\"https://mirrors.cloud.tencent.com/docker-ce/linux\"\n    fi\n}\n\n# Install Docker engine and dependencies\ndocker_install() {\n    echo -e \"${STEPS} Initializing Docker installation environment...\"\n\n    # Check release info\n    check_release\n    select_source\n\n    # Install the docker package\n    sudo apt-get update\n    sudo apt-get remove -y docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc\n    sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release\n\n    # Install GPG certificate\n    rm -f /usr/share/keyrings/docker-archive-keyring.gpg\n    # sudo curl -fsSL https://download.docker.com/linux/${VERSION_CODEID}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n    sudo curl -fsSL ${DOCKER_SOURCE}/${VERSION_CODEID}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n\n    # Add software source information\n    rm -f /etc/apt/sources.list.d/docker.list\n    # echo \"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/${VERSION_CODEID} ${VERSION_CODENAME} stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n    echo \"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] ${DOCKER_SOURCE}/${VERSION_CODEID} ${VERSION_CODENAME} stable\" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null\n\n    echo -e \"${STEPS} Installing Docker packages...\"\n    sudo apt-get update\n    sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\n    echo -e \"${STEPS} Configuring Docker registry mirrors...\"\n    [[ -d \"/etc/docker\" ]] || mkdir -p /etc/docker\n    if [[ \"${source_id}\" -ne \"1\" ]]; then\n        # Docker registry mirrors for China\n        sudo cat >/etc/docker/daemon.json <<EOF\n{\n  \"bip\": \"172.31.0.1/24\",\n  \"data-root\": \"/var/lib/docker/\",\n  \"log-level\": \"warn\",\n  \"log-driver\": \"json-file\",\n  \"log-opts\": {\n     \"max-size\": \"10m\",\n     \"max-file\": \"5\"\n   },\n  \"registry-mirrors\": [\n     \"https://mirror.baidubce.com/\",\n     \"https://hub-mirror.c.163.com\"\n   ]\n}\nEOF\n    else\n        # Docker official registry\n        sudo cat >/etc/docker/daemon.json <<EOF\n{\n  \"bip\": \"172.31.0.1/24\",\n  \"data-root\": \"/var/lib/docker/\",\n  \"log-level\": \"warn\",\n  \"log-driver\": \"json-file\",\n  \"log-opts\": {\n     \"max-size\": \"10m\",\n     \"max-file\": \"5\"\n   }\n}\nEOF\n    fi\n\n    sync\n    sudo systemctl daemon-reload\n    sudo systemctl restart docker\n\n    # Allow the current user to run Docker commands without sudo\n    sudo usermod -a -G docker $USER 2>/dev/null\n\n    sync && sleep 3\n    echo -e \"${SUCCESS} Docker installed successfully.\"\n}\n\n# Update Docker packages\ndocker_update() {\n    echo -e \"${STEPS} Updating Docker packages...\"\n\n    # Update the docker package\n    sudo apt-get update\n    sudo apt-get upgrade -y\n    sudo apt-get dist-upgrade -y\n    sudo apt-get --purge autoremove -y\n    sudo apt-get autoclean -y\n\n    echo -e \"${SUCCESS} Docker updated successfully.\"\n    exit 0\n}\n\n# Remove Docker and clean up\ndocker_remove() {\n    echo -e \"${STEPS} Removing Docker...\"\n\n    # Remove the docker package\n    sudo apt-get update\n    sudo apt-get remove --purge -y docker-ce docker-ce-cli containerd.io docker-compose* docker-ce-*\n    sudo apt-get --purge autoremove -y\n    sudo apt-get autoclean -y\n    #\n    sudo rm -rf /etc/docker 2>/dev/null\n    sudo rm -rf /var/lib/docker 2>/dev/null\n    sudo rm -rf /var/run/docker.sock 2>/dev/null\n\n    echo -e \"${SUCCESS} Docker removed successfully.\"\n    exit 0\n}\n\necho -e \"${INFO} Welcome to the Docker Management Tool.\"\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\n\n# Execute script assist functions\ncase \"${1}\" in\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *)      docker_install ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-fix",
    "content": "#!/bin/bash\n#========================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Dependent script: /usr/lib/armbian/armbian-firstrun\n# Function: Fix permissions and system settings (executed during initial system setup)\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-fix\n#\n#================================ Set default parameters ================================\n#\nexport DEBIAN_FRONTEND=noninteractive\n\n# Set the armbian release check file\narmbian_release_file=\"/etc/armbian-release\"\narmbian_image_file=\"/etc/armbian-image-release\"\narmbian_os_status=\"/etc/armbian-distribution-status\"\nos_release_file=\"/etc/os-release\"\n# Set the ophub release check file\nophub_release_file=\"/etc/ophub-release\"\n# Custom armbian-fix Log\nfix_log=\"/tmp/armbian-fix.log\"\n#\n#======================================================================================\n\n# Add log\ntolog() {\n    echo -e \"${1}\"\n    echo -e \"[$(date +\"%Y.%m.%d.%H:%M:%S\")] ${1}\" >>\"${fix_log}\" 2>/dev/null || true\n}\n\n# Show start message\necho \"\" >${fix_log} && tolog \"Starting system fixes...\"\n\n# Get the system release version, such as: resolute, noble, trixie, bookworm, etc.\n[[ -f \"/etc/lsb-release\" ]] && DISTRIBUTION_CODENAME=\"$(grep CODENAME /etc/lsb-release | cut -d'=' -f2 || true)\"\n[[ -z \"${DISTRIBUTION_CODENAME}\" && -f \"${os_release_file}\" ]] && DISTRIBUTION_CODENAME=\"$(grep VERSION_CODENAME \"${os_release_file}\" | cut -d'=' -f2 || true)\"\n[[ -z \"${DISTRIBUTION_CODENAME}\" && -x \"/usr/bin/lsb_release\" ]] && DISTRIBUTION_CODENAME=\"$(/usr/bin/lsb_release -c | cut -d':' -f2 | tr -d '\\t' || true)\"\n\n# ===== A. Fix system permissions =====\n\n# Fix common release permissions\n[[ -d \"/var/tmp\" ]] && chmod 777 /var/tmp 2>/dev/null && tolog \"01. Fix tmp permissions\"\n[[ -d \"/etc/update-motd.d\" ]] && chmod -x /etc/update-motd.d/* 2>/dev/null && chmod +x /etc/update-motd.d/{10-*,20-*,30-*} 2>/dev/null && tolog \"02. Fix update-motd.d permissions\"\n[[ -d \"/var/cache/man\" ]] && chown man:root /var/cache/man -R 2>/dev/null && tolog \"03. Fix man permissions\"\n[[ -d \"/var/cache/man\" ]] && chmod g+s /var/cache/man -R 2>/dev/null && tolog \"04. Fix man permissions\"\n[[ -f \"/etc/sudoers\" ]] && chown root:root /etc/sudoers 2>/dev/null && tolog \"05. Fix sudoers ownership\"\n[[ -f \"/etc/sudoers\" ]] && chmod 440 /etc/sudoers 2>/dev/null && tolog \"06. Fix sudoers permissions\"\n[[ -f \"/usr/bin/sudo\" ]] && chown root:root /usr/bin/sudo 2>/dev/null && tolog \"07. Fix sudo permissions\"\n[[ -f \"/usr/bin/sudo\" ]] && chmod 4755 /usr/bin/sudo 2>/dev/null && tolog \"08. Fix sudo permissions\"\n# Fix focal permissions\n[[ -f \"/usr/lib/sudo/sudoers.so\" ]] && chown 0 /usr/lib/sudo/sudoers.so 2>/dev/null && tolog \"09. Fix sudoers.so permissions\"\n[[ -f \"/usr/lib/sudo/sudoers.so\" ]] && chmod 644 /usr/lib/sudo/sudoers.so 2>/dev/null && tolog \"10. Fix sudoers.so permissions\"\n[[ -f \"/usr/lib/policykit-1/polkit-agent-helper-1\" ]] && chmod 4755 /usr/lib/policykit-1/polkit-agent-helper-1 2>/dev/null && tolog \"11. Fix polkit-agent-helper-1 permissions\"\n# Fix jammy permissions\n[[ -f \"/usr/libexec/sudo/sudoers.so\" ]] && chown 0 /usr/libexec/sudo/sudoers.so 2>/dev/null && tolog \"12. Fix sudoers.so permissions\"\n[[ -f \"/usr/libexec/sudo/sudoers.so\" ]] && chmod 644 /usr/libexec/sudo/sudoers.so 2>/dev/null && tolog \"13. Fix sudoers.so permissions\"\n[[ -f \"/usr/libexec/polkit-agent-helper-1\" ]] && chmod 4755 /usr/libexec/polkit-agent-helper-1 2>/dev/null && tolog \"14. Fix polkit-agent-helper-1 permissions\"\n\n# ===== B. Remove unnecessary packages and scripts =====\n\n# Clean APT cache\napt-get clean -y 2>/dev/null && rm -rf /var/cache/apt/* 2>/dev/null && rm -rf /var/lib/apt/* 2>/dev/null && tolog \"20. Clean APT cache\"\n\n# Get kernel signature\n[[ -f \"${ophub_release_file}\" ]] && {\n    kernel_signature=\"$(cat ${ophub_release_file} | grep -E \"^KERNEL_SIGNATURE=\" | cut -d\"'\" -f2 || true)\"\n}\n\n# 21. Remove linux-image-*\npkg_linux_image=\"$(dpkg -l | awk '{print $2}' | grep \"^linux-image-\" || true)\"\nfor pkg in ${pkg_linux_image}; do\n    if [[ -n \"${pkg}\" ]] && [[ -z \"${kernel_signature}\" || ! \"${pkg}\" =~ ${kernel_signature} ]]; then\n        image_list_path=\"/var/lib/dpkg/info/${pkg}.list\"\n        apt-mark unhold ${pkg} 2>/dev/null\n        truncate -s 0 \"${image_list_path}\" 2>/dev/null || : >\"${image_list_path}\" 2>/dev/null\n        apt-get remove -qq --purge -y --allow-change-held-packages ${pkg} 2>/dev/null && tolog \"21. Remove ${pkg}\"\n    elif [[ \"${pkg}\" =~ ${kernel_signature} ]]; then\n        tolog \"21. Keep ${pkg}\"\n    fi\ndone\n\n# 22. Remove linux-dtb-*\npkg_linux_dtb=\"$(dpkg -l | awk '{print $2}' | grep \"^linux-dtb-\" || true)\"\nfor pkg in ${pkg_linux_dtb}; do\n    if [[ -n \"${pkg}\" ]] && [[ -z \"${kernel_signature}\" || ! \"${pkg}\" =~ ${kernel_signature} ]]; then\n        dtb_list_path=\"/var/lib/dpkg/info/${pkg}.list\"\n        apt-mark unhold ${pkg} 2>/dev/null\n        truncate -s 0 \"${dtb_list_path}\" 2>/dev/null || : >\"${dtb_list_path}\" 2>/dev/null\n        apt-get remove -qq --purge -y --allow-change-held-packages ${pkg} 2>/dev/null && tolog \"22. Remove ${pkg}\"\n    elif [[ \"${pkg}\" =~ ${kernel_signature} ]]; then\n        tolog \"22. Keep ${pkg}\"\n    fi\ndone\n\n# 23. Remove linux-u-boot-*\npkg_linux_uboot=\"$(dpkg -l | awk '{print $2}' | grep \"^linux-u-boot-\" || true)\"\nfor pkg in ${pkg_linux_uboot}; do\n    if [[ -n \"${pkg}\" ]]; then\n        linux_uboot_list_path=\"/var/lib/dpkg/info/${pkg}.list\"\n        apt-mark unhold ${pkg} 2>/dev/null\n        truncate -s 0 \"${linux_uboot_list_path}\" 2>/dev/null || : >\"${linux_uboot_list_path}\" 2>/dev/null\n        apt-get remove -qq --purge -y --allow-change-held-packages ${pkg} 2>/dev/null && tolog \"23. Remove ${pkg}\"\n    fi\ndone\n\n# 24. Remove armbian-firmware\npkg_armbian_firmware=\"$(dpkg -l | awk '{print $2}' | grep \"^armbian-firmware\" || true)\"\nfor pkg in ${pkg_armbian_firmware}; do\n    if [[ -n \"${pkg}\" ]]; then\n        firmware_list_path=\"/var/lib/dpkg/info/${pkg}.list\"\n        apt-mark unhold ${pkg} 2>/dev/null\n        truncate -s 0 \"${firmware_list_path}\" 2>/dev/null || : >\"${firmware_list_path}\" 2>/dev/null\n        apt-get remove -qq --purge -y --allow-change-held-packages ${pkg} 2>/dev/null && tolog \"24. Remove ${pkg}\"\n    fi\ndone\n\n# 25. Remove armbian-bsp-cli-*\npkg_armbian_bsp_cli=\"$(dpkg -l | awk '{print $2}' | grep \"^armbian-bsp-cli-\" || true)\"\nfor pkg in ${pkg_armbian_bsp_cli}; do\n    if [[ -n \"${pkg}\" ]]; then\n        armbian_bsp_cli_list_path=\"/var/lib/dpkg/info/${pkg}.list\"\n        apt-mark unhold ${pkg} 2>/dev/null\n        truncate -s 0 \"${armbian_bsp_cli_list_path}\" 2>/dev/null || : >\"${armbian_bsp_cli_list_path}\" 2>/dev/null\n        apt-get remove -qq --purge -y --allow-change-held-packages ${pkg} 2>/dev/null && tolog \"25. Remove ${pkg}\"\n    fi\ndone\n\n# 26. hold packages and disable update_initramfs\n[[ -n \"$(dpkg -l | awk '{print $2}' | grep initramfs-tools || true)\" ]] && apt-mark hold initramfs-tools* 2>/dev/null && tolog \"26. Hold initramfs-tools*\"\ninitramfs_conf=\"/etc/initramfs-tools/update-initramfs.conf\"\n[[ -f \"${initramfs_conf}\" ]] && sed -i \"s|^update_initramfs=.*|update_initramfs=no|g\" \"${initramfs_conf}\" && tolog \"27. Disable update-initramfs.conf\"\n\n# ===== C. Disable unnecessary system services =====\n\n# Regenerate machine-id for unique identification\nrm -f /etc/machine-id /var/lib/dbus/machine-id 2>/dev/null && tolog \"50. Delete machine-id\"\ndbus-uuidgen --ensure=/etc/machine-id 2>/dev/null && tolog \"51. Generate /etc/machine-id\"\ndbus-uuidgen --ensure 2>/dev/null && tolog \"52. Generate /var/lib/dbus/machine-id\"\n\n# Disable automatic hibernation to prevent storage device issues\nsystemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target 2>/dev/null && tolog \"53. Disable automatic sleep/hibernation\"\n\n# Disable tips of the day for [ /etc/update-motd.d/35-armbian-tips ]\nmotd_tips=\"/etc/default/armbian-motd\"\n[[ -f \"${motd_tips}\" ]] && {\n    sed -i 's|^MOTD_DISABLE=\"\"|MOTD_DISABLE=\"tips\"|g' \"${motd_tips}\"\n    tolog \"54. Disable tips of the day\"\n} || true\nquotes_cron=\"/etc/cron.daily/armbian-quotes\"\n[[ -f \"${quotes_cron}\" ]] && {\n    sed -i \"s|^curl |#curl |g\" \"${quotes_cron}\"\n    tolog \"55. Disable quotes cron plan\"\n} || true\n\n# Remove motd-news services\nmotd_timer=\"/usr/lib/systemd/system/motd-news.timer\"\n[[ -f \"${motd_timer}\" ]] && {\n    systemctl stop motd-news.timer 2>/dev/null\n    systemctl disable motd-news.timer 2>/dev/null\n    rm -f \"${motd_timer}\"\n    tolog \"56. Disable motd-news.timer\"\n} || true\nmotd_service=\"/usr/lib/systemd/system/motd-news.service\"\n[[ -f \"${motd_service}\" ]] && {\n    systemctl stop motd-news.service 2>/dev/null\n    systemctl disable motd-news.service 2>/dev/null\n    rm -f \"${motd_service}\"\n    tolog \"57. Disable motd-news.service\"\n} || true\nrm -f /var/lib/systemd/deb-systemd-helper-enabled/timers.target.wants/motd-news.timer 2>/dev/null\nrm -f /var/lib/systemd/deb-systemd-helper-enabled/motd-news.timer.dsh-also 2>/dev/null\nrm -f /etc/systemd/system/timers.target.wants/motd-news.timer 2>/dev/null\n\n# Disable the partition auto-resize service\nsystemctl stop armbian-resize-filesystem.service 2>/dev/null\nsystemctl disable armbian-resize-filesystem.service 2>/dev/null\ntolog \"58. Disable armbian-resize-filesystem.service\"\n\n# Disable the ssh.socket: https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1476\nsystemctl disable --now ssh.socket 2>/dev/null\nsystemctl enable --now ssh.service 2>/dev/null\ntolog \"59. Disable the ssh.socket and enable ssh.service\"\n\n# ===== D. Apply custom settings =====\n\n# Fix legacy configuration file names (after 2022.12.03)\n[[ -f \"/etc/amlogic_model_database.conf\" ]] && {\n    mv -f /etc/amlogic_model_database.conf /etc/model_database.conf 2>/dev/null\n    tolog \"70. Rename amlogic_model_database.conf to model_database.conf\"\n} || true\n\n[[ -f \"/etc/rockchip_model_database.conf\" ]] && {\n    mv -f /etc/rockchip_model_database.conf /etc/model_database.conf 2>/dev/null\n    tolog \"71. Rename rockchip_model_database.conf to model_database.conf\"\n} || true\n\n# Confirm and adjust device information\n[[ -f \"${ophub_release_file}\" ]] && {\n    # Get welcome banner value\n    family_name=\"$(cat ${ophub_release_file} | grep -E \"^FAMILY=\" | cut -d\"'\" -f2 || true)\"\n    platform_name=\"$(cat ${ophub_release_file} | grep -E \"^PLATFORM=\" | cut -d\"'\" -f2 || true)\"\n    soc_name=\"$(cat ${ophub_release_file} | grep -E \"^SOC=\" | cut -d\"'\" -f2 | sed -e \"s|\\b[a-z]|\\U&|g\" || true)\"\n    board_name=\"$(cat ${ophub_release_file} | grep -E \"^BOARD=\" | cut -d\"'\" -f2 | sed -e \"s|\\b[a-z]|\\U&|g\" || true)\"\n\n    # Migrate legacy ANDROID_UBOOT parameter name\n    [[ -n \"$(cat ${ophub_release_file} | grep -E \"^ANDROID_UBOOT=\")\" ]] && {\n        sed -i \"s|^ANDROID_UBOOT=|BOOTLOADER_IMG=|g\" ${ophub_release_file}\n        tolog \"80. Rename ANDROID_UBOOT to BOOTLOADER_IMG\"\n    }\n\n    # Migrate legacy UBOOT_STATUS parameter name\n    [[ -n \"$(cat ${ophub_release_file} | grep -E \"^UBOOT_STATUS=\")\" ]] && {\n        sed -i \"s|^UBOOT_STATUS=|MLUBOOT_STATUS=|g\" ${ophub_release_file}\n        tolog \"81. Rename UBOOT_STATUS to MLUBOOT_STATUS\"\n    }\n\n    # Add default kernel tags if missing\n    sed -i \"s|^KERNEL_BRANCH=|KERNEL_TAGS=|g\" ${ophub_release_file}\n    sed -i \"s|^KERNEL_TAGS='6.x.y'|KERNEL_TAGS='6.1.y'|g\" ${ophub_release_file}\n    [[ -n \"$(cat ${ophub_release_file} | grep -E \"^KERNEL_TAGS=\")\" ]] || {\n        [[ \"${soc_name,,}\" == \"rk3588\" ]] && KERNEL_TAGS=\"rk3588\" || KERNEL_TAGS=\"stable\"\n        echo \"KERNEL_TAGS='${KERNEL_TAGS}'\" >>${ophub_release_file}\n        tolog \"82. Add the KERNEL_TAGS name\"\n    }\n\n    # Add default KERNEL_REPO if missing\n    [[ -n \"$(cat ${ophub_release_file} | grep -E \"^KERNEL_REPO=\")\" ]] || {\n        echo \"KERNEL_REPO='ophub/kernel'\" >>${ophub_release_file}\n        tolog \"83. Add the custom KERNEL_REPO URL\"\n    }\n\n    # Add default KERNEL_BACKUP if missing\n    [[ -n \"$(cat ${ophub_release_file} | grep -E \"^KERNEL_BACKUP=\")\" ]] || {\n        echo \"KERNEL_BACKUP='yes'\" >>${ophub_release_file}\n        tolog \"84. Add the custom KERNEL_BACKUP\"\n    }\n\n    # Get the board display name by platform\n    [[ \"${platform_name}\" == \"amlogic\" ]] && bd_name=\"Aml.${soc_name}\"\n    [[ \"${platform_name}\" == \"rockchip\" ]] && bd_name=\"RK.${board_name}\"\n    [[ \"${platform_name}\" == \"allwinner\" ]] && bd_name=\"AW.${board_name}\"\n\n    # Update armbian-release configuration\n    [[ -f \"${armbian_release_file}\" ]] && {\n        [[ -n \"${bd_name}\" ]] && {\n            sed -i \"s|^BOARD=.*|BOARD=\\\"${board_name}\\\"|g\" ${armbian_release_file}\n            sed -i \"s|^BOARD_NAME=.*|BOARD_NAME=\\\"${bd_name}\\\"|g\" ${armbian_release_file}\n        }\n\n        short_version=\"$(cat ${armbian_release_file} | grep -E '^VERSION=' | grep -oE '[2-9][0-9]\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1 || true)\"\n        [[ -n \"${short_version}\" ]] && {\n            sed -i \"s|^VERSION=.*|VERSION=\\\"${short_version}\\\"|g\" ${armbian_release_file}\n            sed -i \"s|^REVISION=.*|REVISION=\\\"${short_version}\\\"|g\" ${armbian_release_file}\n        }\n\n        sed -i \"s|^BOOT_SOC=.*|BOOT_SOC=\\\"${soc_name}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^BOARDFAMILY=.*|BOARDFAMILY=\\\"${family_name}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^LINUXFAMILY=.*|LINUXFAMILY=\\\"${platform_name}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^VENDOR=.*|VENDOR=\\\"Armbian OS\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^IMAGE_TYPE=.*|IMAGE_TYPE=rebuild|g\" ${armbian_release_file}\n        sed -i \"s|^BOARD_TYPE=.*|BOARD_TYPE=diy|g\" ${armbian_release_file}\n        sed -i \"s|^FORCE_BOOTSCRIPT_UPDATE=.*|FORCE_BOOTSCRIPT_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^BOOTSCRIPT_FORCE_UPDATE=.*|BOOTSCRIPT_FORCE_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^FORCE_UBOOT_UPDATE=.*|FORCE_UBOOT_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n        tolog \"85. Update custom board info: ${armbian_release_file}\"\n    }\n\n    # Update armbian-image-release configuration\n    [[ -f \"${armbian_image_file}\" ]] && {\n        [[ -n \"${bd_name}\" ]] && {\n            sed -i \"s|^BOARD=.*|BOARD=\\\"${board_name}\\\"|g\" ${armbian_image_file}\n            sed -i \"s|^BOARD_NAME=.*|BOARD_NAME=\\\"${bd_name}\\\"|g\" ${armbian_image_file}\n        }\n\n        short_version=\"$(cat ${armbian_image_file} | grep -E '^VERSION=' | grep -oE '[2-9][0-9]\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1 || true)\"\n        [[ -n \"${short_version}\" ]] && {\n            sed -i \"s|^VERSION=.*|VERSION=\\\"${short_version}\\\"|g\" ${armbian_image_file}\n            sed -i \"s|^REVISION=.*|REVISION=\\\"${short_version}\\\"|g\" ${armbian_image_file}\n        }\n\n        sed -i \"s|^BOARDFAMILY=.*|BOARDFAMILY=\\\"${family_name}\\\"|g\" ${armbian_image_file}\n        sed -i \"s|^LINUXFAMILY=.*|LINUXFAMILY=\\\"${platform_name}\\\"|g\" ${armbian_image_file}\n        sed -i \"s|^VENDOR=.*|VENDOR=\\\"Armbian OS\\\"|g\" ${armbian_image_file}\n        sed -i \"s|^IMAGE_TYPE=.*|IMAGE_TYPE=rebuild|g\" ${armbian_image_file}\n        sed -i \"s|^BOARD_TYPE=.*|BOARD_TYPE=diy|g\" ${armbian_image_file}\n        sed -i \"s|^FORCE_BOOTSCRIPT_UPDATE=.*|FORCE_BOOTSCRIPT_UPDATE=\\\"no\\\"|g\" ${armbian_image_file}\n        sed -i \"s|^BOOTSCRIPT_FORCE_UPDATE=.*|BOOTSCRIPT_FORCE_UPDATE=\\\"no\\\"|g\" ${armbian_image_file}\n        tolog \"86. Update custom board info: ${armbian_image_file}\"\n    }\n\n    # Update os-release information\n    [[ -f \"${os_release_file}\" ]] && {\n        short_version=\"$(cat ${os_release_file} | grep -E '^PRETTY_NAME=' | grep -oE '[2-9][0-9]\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1 || true)\"\n        sed -i \"s|^PRETTY_NAME=.*|PRETTY_NAME=\\\"Armbian OS ${short_version} ${DISTRIBUTION_CODENAME}\\\"|g\" ${os_release_file}\n        sed -i \"s|^ARMBIAN_PRETTY_NAME=.*|ARMBIAN_PRETTY_NAME=\\\"Armbian OS ${short_version} ${DISTRIBUTION_CODENAME}\\\"|g\" ${os_release_file}\n        tolog \"87. Update custom board info: ${os_release_file}\"\n    }\n\n    # Disable unused serial console on non-Amlogic platforms\n    [[ \"${platform_name}\" != \"amlogic\" ]] && {\n        systemctl disable serial-getty@ttyFIQ0 2>/dev/null\n        systemctl disable serial-getty@ttyAML0 2>/dev/null\n        tolog \"88. Disable ttyFIQ0 & ttyAML0 (ttyS2)\"\n    }\n} || true\n\n# Set system distribution status to supported\n[[ -n \"${DISTRIBUTION_CODENAME}\" && -f \"${armbian_os_status}\" ]] && {\n    sed -i \"s|^${DISTRIBUTION_CODENAME}=.*|${DISTRIBUTION_CODENAME}=supported|g\" ${armbian_os_status}\n    tolog \"90. Set ${DISTRIBUTION_CODENAME} distribution status to supported\"\n} || true\n\n# Expand root partition if flagged\ntodo_rootfs_resize=\"/root/.no_rootfs_resize\"\n[[ -f \"${todo_rootfs_resize}\" && \"$(cat ${todo_rootfs_resize} 2>/dev/null | xargs)\" == \"yes\" ]] && {\n    armbian-tf 2>/dev/null &&\n        tolog \"91. Root partition expanded successfully\"\n} || true\n\n# Hide WAN & IPv6 addresses from MOTD\nip_info_file=\"/etc/update-motd.d/20-ip-info\"\n[[ -f \"${ip_info_file}\" ]] && {\n    sed -i '/^get_wan.*_address/s/{.*/{ true; }/' ${ip_info_file}\n    sed -i '/if.*ipv6s.*||.*wan6/,/fi/s/^/#/' ${ip_info_file}\n    tolog \"92. Hide WAN & IPv6 addresses from MOTD\"\n} || true\n\n# Show end message\ntolog \"All system fixes applied successfully.\"\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-kernel",
    "content": "#!/bin/bash\n#==============================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Run on Armbian to compile the kernel\n# Copyright (C) 2021- https://github.com/unifreq\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-kernel\n# Command optional parameters please refer to the source code repository\n#\n#======================================= Functions list =======================================\n#\n# error_msg       : Output error message\n# update_script   : Update compilation scripts\n# clean_tmp       : Clear temporary files\n# help_info       : Display help information\n#\n#=============================== Set make environment variables ===============================\n#\n# Related file storage path\nmake_path=\"/opt/kernel\"\ncompile_path=\"${make_path}/compile-kernel\"\nkernel_path=\"${compile_path}/kernel\"\nout_kernel=\"${compile_path}/output\"\nconfig_path=\"${compile_path}/tools/config\"\nscript_path=\"${compile_path}/tools/script\"\ncompile_script=\"${make_path}/recompile\"\nscript_name=\"${script_path}/armbian_compile_kernel.sh\"\narch_info=\"$(arch)\"\n\n# The kernel compilation scripts download repository\nscript_repo=\"https://github.com/ophub/amlogic-s9xxx-armbian.git\"\nscript_dir=\"compile-kernel\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nHINT=\"[\\033[93m HINT \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==============================================================================================\n\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\nupdate_script() {\n    echo -e \"${STEPS} Updating kernel compilation scripts...\"\n\n    # Install git\n    echo -e \"${INFO} Installing update dependencies...\"\n    sudo apt-get -qq update\n    [[ -z \"$(dpkg -l | awk '{print $2}' | grep -w \"^git$\")\" ]] && sudo apt-get install -y git\n\n    # Download the latest scripts from the repository\n    echo -e \"${INFO} Fetching latest scripts from repository...\"\n    git_tmp_path=\"$(mktemp -d)\"\n    cd ${git_tmp_path}\n    git init --quiet\n    git remote add origin ${script_repo}\n    git config core.sparseCheckout true\n    echo \"${script_dir}/*\" >>.git/info/sparse-checkout\n    git pull --quiet --depth=1 origin main\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to download scripts from [ ${script_repo} ].\"\n\n    # Update the compilation scripts\n    cd ${make_path}\n    mkdir -p ${compile_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/* ${compile_path}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync scripts from [ ${script_repo} ].\"\n    cp -f --no-preserve=ownership ${script_name} ${compile_script}\n    chmod +x ${compile_script}\n\n    # Clean up temporary files\n    rm -rf ${git_tmp_path} 2>/dev/null\n\n    # Install compilation dependencies\n    echo -e \"${INFO} Installing compilation dependencies...\"\n    sudo apt-get install -y $(cat ${script_path}/armbian-compile-kernel-depends)\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to install dependencies.\"\n\n    sync && sleep 3\n    echo -e \"${SUCCESS} Compilation scripts updated successfully.\"\n    exit 0\n}\n\nclean_tmp() {\n    cd ${make_path}\n    echo -e \"${STEPS} Cleaning up kernel source and output files...\"\n\n    rm -rf ${kernel_path} ${out_kernel} 2>/dev/null && sync\n\n    echo -e \"${SUCCESS} Cleanup completed successfully.\"\n    exit 0\n}\n\nhelp_info() {\n    clear\n    cat <<EOF\n======================================================================================================================================\n\n01. Detailed instructions for compiling the kernel, list of optional parameters:\n    Command: armbian-kernel -k 6.1.y -a true -m dtbs -t gcc\n    -k : Kernel       Set the kernel version, such as [ -k 6.1.y ]\n    -a : AutoKernel   Set whether to automatically compile the latest version, such as [ -a true ], Optional: [ true/false ]\n    -m : MakePackage  Set the package list for compiling the kernel, such as [ -m dtbs ], Optional: [ dtbs/all ]\n    -t : Toolchain    Set the compilation toolchain, such as [ -t gcc ], Optional: [ gcc/clang ]\n    -n : customName   Set the kernel custom signature, such as [ -n -ophub ]\n    -r : Repository   Set the kernel source code repository, such as [ -r owner/repo@branch ]\n    -p : AutoPatch    Sets whether to use custom kernel patches, such as [ -p true ], Optional: [ true/false ]\n    -z : Compress     Set the compression format used for initrd in the kernel, such as [ -z xz ], Optional: [ xz/gzip/zstd/lzma ]\n    -d : DeleteSource Set whether to delete the kernel source code after compilation, such as [ -d true ], Optional: [ true/false ]\n    -s : SilentLog    Set whether to use silent mode to reduce log output, such as [ -s true ], Optional: [ true/false ]\n    -l : EnableLog    Set whether to output logs to a file, such as [ -l true ], Optional: [ true/false ]\n    -c : CcacheClear  Set whether to clear ccache before compiling, such as [ -c true ], Optional: [ true/false ]\n\n02. Script assist functions:\n    Command: armbian-kernel -u\n    -u : Update       Update the local compile script to the latest version.\n    -c : Clear        Clear the local kernel source and generated files.\n\n======================================================================================================================================\nEOF\n    exit 0\n}\n\n# Check script permission, only supports running on Armbian (aarch64)\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\n[[ \"${arch_info}\" == \"aarch64\" ]] || error_msg \"This script only supports running on Armbian (aarch64) systems.\"\n# Require at least 5GiB of free space\n[[ -d \"${make_path}\" ]] || mkdir -p ${make_path}\nremaining_space=\"$(df -Tk ${make_path} | tail -n1 | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))\"\n[[ \"${remaining_space}\" -ge \"5\" ]] || error_msg \"At least 5GiB of free space is required to compile the kernel.\"\n\n# Execute script assist functions\ncase \"${1}\" in\n    -u | --update) update_script ;;\n    -c | --clean)  clean_tmp ;;\n    -h | --help)   help_info ;;\n    *)\n        [[ -f \"${compile_script}\" ]] || error_msg \"Please run [ armbian-kernel -u ] to update scripts.\"\n        cd ${make_path} && sudo ${compile_script} \"${@}\"\n        ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-software",
    "content": "#!/bin/bash\n#==============================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Third-party software install/update/remove management center\n# Copyright (C) 2021- https://github.com/unifreq\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-software\n#\n#======================================= Functions list =======================================\n#\n# error_msg               : Output error message\n# check_release           : Check system release information\n# check_depends           : Check and install runtime dependencies\n# check_software_status   : Initialize and check software status\n# search_software_model   : Search for software model by ID\n# show_software_list      : Display the software list\n# update_script           : Update software management scripts\n# clean_tmp               : Clear temporary files\n# help_info               : Show help information\n#\n#=============================== Set make environment variables ===============================\n#\n# Related file storage path\nsoftware_path=\"/usr/share/ophub/armbian-software\"\nsoftware_conf=\"${software_path}/software-list.conf\"\nophub_release_file=\"/etc/ophub-release\"\narch_info=\"$(arch)\"\n#\n# The software management scripts download repository\nscript_repo=\"https://github.com/ophub/amlogic-s9xxx-armbian.git\"\nscript_dir=\"build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==============================================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check system release information\ncheck_release() {\n    if [[ -f \"${ophub_release_file}\" ]]; then\n        source \"${ophub_release_file}\" 2>/dev/null\n        VERSION_CODEID=\"${VERSION_CODEID}\"\n        VERSION_CODENAME=\"${VERSION_CODENAME}\"\n    else\n        error_msg \"Missing release file: [ ${ophub_release_file} ]\"\n    fi\n\n    [[ -n \"${VERSION_CODEID}\" && -n \"${VERSION_CODENAME}\" ]] || error_msg \"Incomplete release info in [ ${ophub_release_file} ]\"\n}\n\n# Check and install required dependencies\ncheck_depends() {\n    # List of required dependencies\n    dpkg_packages=(\n        \"apt-transport-https\" \"ca-certificates\" \"coreutils\" \"cpu-checker\" \"curl\"\n        \"dmidecode\" \"dnsmasq-base\" \"git\" \"net-tools\" \"systemd\" \"tar\"\n    )\n    # Add additional dependencies for non-trixie versions\n    if [[ \"${VERSION_CODENAME}\" != \"trixie\" ]]; then\n        dpkg_packages+=(\"software-properties-common\")\n    fi\n\n    # Cyclic check all dependencies\n    is_dpkg=\"0\"\n    i=\"1\"\n    for package in ${dpkg_packages[*]}; do\n        [[ -n \"$(dpkg -l | awk '{print $2}' | grep -w \"^${package}$\")\" ]] || is_dpkg=\"1\"\n        #echo -e \"${INFO} ${package}: ${is_dpkg}\"\n        ((i++))\n    done\n    # Install missing packages\n    if [[ \"${is_dpkg}\" -eq \"1\" ]]; then\n        echo -e \"${STEPS} Installing required dependencies...\"\n        sudo apt-get update\n        sudo apt-get install -y ${dpkg_packages[*]}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to install dependencies.\"\n    fi\n}\n\n# Initialize and check software installation status\ncheck_software_status() {\n    # Check if the software configuration file exists\n    [[ -s \"${software_conf}\" ]] || error_msg \"Missing configuration file: [ ${software_conf} ]\"\n    [[ -n \"$(cat ${software_conf} | grep -E \"^[0-9]{1,9}.*:\")\" ]] || error_msg \"Configuration file is empty: [ ${software_conf} ]\"\n\n    # Check software installation status\n    tmp_conf=\"$(mktemp)\"\n    [[ -f \"${tmp_conf}\" ]] && rm -f ${tmp_conf} 2>/dev/null\n    cat ${software_conf} 2>/dev/null | grep -E \"^[0-9]{1,9}.*:\" | sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' | while read line; do\n        # Set initial value\n        local state=\"not-installed\"\n        local manage=\"install\"\n        local support=\"supported\"\n        # Check software installation status\n        local auth_method=\"$(echo ${line} | awk -F ':' '{print $3}' | awk -F '@' '{print $1}')\"\n        local package=\"$(echo ${line} | awk -F ':' '{print $3}' | awk -F '@' '{print $2}')\"\n        # Check the software installation status by category\n        check_status=\"0\"\n        case \"${auth_method}\" in\n        dpkg) [[ -n \"$(dpkg -l | awk '{print $2}' | grep -w \"^${package}$\" 2>/dev/null)\" ]] && check_status=\"1\" ;;\n        docker) [[ -n \"$(docker ps -q -f name=${package} 2>/dev/null)\" ]] && check_status=\"1\" ;;\n        which) [[ -n \"$(which \"${package}\" 2>/dev/null)\" ]] && check_status=\"1\" ;;\n        find) [[ -s \"${package}\" ]] && check_status=\"1\" ;;\n        *) check_status=\"0\" ;;\n        esac\n        # Adjust software installation status\n        [[ \"${check_status}\" -eq \"1\" ]] && {\n            local state=\"installed\"\n            local manage=\"update/remove\"\n        }\n\n        # Check whether the software supports running on the current system\n        local release=\"$(echo ${line} | awk -F ':' '{print $5}')\"\n        [[ \"${release}\" != \"all\" && \"${release}\" != *\"${VERSION_CODENAME}\"* ]] && {\n            local support=\"unsupported\"\n            local manage=\"-\"\n        }\n\n        # Query results are written to a temporary file\n        [[ \"${support}\" == \"supported\" ]] && echo \"${line}:${support}:${state}:${manage}\" >>${tmp_conf} && sync\n    done\n    software_database=\"$(cat ${tmp_conf} 2>/dev/null)\"\n    [[ -n \"${software_database}\" ]] || error_msg \"No compatible software found for [ ${VERSION_CODEID}:${VERSION_CODENAME} ].\"\n}\n\n# Search for software model by ID\nsearch_software_model() {\n    local sid=\"${1}\"\n    local ret_count=\"$(echo \"${software_database}\" | grep -E \"^${sid}:\" | wc -l)\"\n    if [[ \"${ret_count}\" -eq \"1\" ]]; then\n        echo \"${software_database}\" | grep -E \"^${sid}:\"\n    fi\n}\n\n# Display the software list and handle user selection\n# Columns: 1.ID   2.NAME   3.STATE          4.MANAGE\n# Example: 11     :frps    :not-installed   :install\nshow_software_list() {\n    echo -e \"${STEPS} Displaying software list [ System: \\033[92m${VERSION_CODEID}/${VERSION_CODENAME}\\033[0m ]...\"\n\n    # Check software status\n    check_software_status\n\n    # Define split line style\n    split_line=\"───────────────────────────────────────────────────────────────────\"\n    # Show software list\n    echo \"${software_database}\" | awk -F ':' '{print $1,$2,$7,$8}' | while read line; do\n        # Add a header for each software list category\n        [[ \"$(echo ${line} | awk '{print $1}')\" == *\"01\" ]] && {\n            printf \"%-s\\n\" \"${split_line}\"\n            printf \"%-5s %-30s %-15s %-15s\\n\" ID NAME STATE MANAGE\n            printf \"%-s\\n\" \"${split_line}\"\n        }\n        # Print software information\n        printf \"%-5s %-30s %-15s %-15s\\n\" $(echo \"${line}\")\n    done\n    # Add end split line\n    printf \"%-s\\n\" \"${split_line}\"\n\n    # Display software options\n    echo -ne \"${OPTIONS} Please Input Software ID: \"\n    read software_id\n    # Check the validity of the selection\n    ret=\"$(search_software_model \"${software_id}\")\"\n    [[ -z \"${ret}\" ]] && error_msg \"Software ID [ ${software_id} ] not found!\"\n    #echo -e \"${INFO} Software Model: [ ${ret} ]\"\n\n    # Display selected software information\n    software_name=\"$(echo \"${ret}\" | awk -F ':' '{print $2}')\"\n    software_execute=\"$(echo \"${ret}\" | awk -F ':' '{print $4}')\"\n    software_release=\"$(echo \"${ret}\" | awk -F ':' '{print $5}')\"\n    software_support=\"$(echo \"${ret}\" | awk -F ':' '{print $6}')\"\n    software_state=\"$(echo \"${ret}\" | awk -F ':' '{print $7}')\"\n    software_manage=\"$(echo \"${ret}\" | awk -F ':' '{print $8}')\"\n    if [[ \"${software_support}\" == \"supported\" ]]; then\n        echo -e \"${INFO} Software ID: [ ${software_id} ]\"\n        echo -e \"${INFO} Software Name: [ ${software_name} ]\"\n    else\n        error_msg \"This software is not compatible with the current system. Supported: [ ${software_release//@/ \\| } ].\"\n    fi\n\n    # Choose to update or remove installed software\n    [[ \"${software_state}\" == \"installed\" ]] && {\n        echo -ne \"${OPTIONS} Update=(u) or Remove=(r)? (u/r): \"\n        read optid\n        optid=\"${optid/U/u}\" && optid=\"${optid/R/r}\"\n        [[ \"${optid:0:1}\" == \"u\" || \"${optid:0:1}\" == \"r\" ]] || error_msg \"Invalid input!\"\n        [[ \"${optid:0:1}\" == \"u\" ]] && software_manage=\"update\" || software_manage=\"remove\"\n    }\n\n    echo -e \"${STEPS} Processing: [ ${software_execute} ${software_manage} ${software_name} ]...\"\n\n    # Perform software install/update/remove operations\n    if [[ \"${software_execute}\" == \"command-\"* ]]; then\n        # Execute fixed scripts\n        sudo bash ${software_path}/${software_execute} -s ${software_id} -m ${software_manage}\n    else\n        # Execute dedicated scripts\n        sudo bash ${software_path}/${software_execute} ${software_manage}\n    fi\n}\n\n# Update software management scripts from repository\nupdate_script() {\n    echo -e \"${STEPS} Updating software management scripts...\"\n\n    # Download the latest scripts from the repository\n    git_tmp_path=\"$(mktemp -d)\"\n    cd ${git_tmp_path}\n    git init --quiet\n    git config core.sparseCheckout true\n    echo \"${script_dir}/*\" >>.git/info/sparse-checkout\n    git remote add origin ${script_repo}\n    git pull --quiet --depth=1 origin main\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to download scripts from [ ${script_repo} ].\"\n\n    # Update the software management scripts\n    mkdir -p ${software_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/* ${software_path}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync scripts from [ ${script_repo} ].\"\n    find ${software_path} -type f -name '*.sh' -exec chmod +x {} \\;\n\n    # Clean up temporary files\n    rm -rf ${git_tmp_path} 2>/dev/null\n\n    sync && sleep 3\n    echo -e \"${SUCCESS} Scripts updated successfully.\"\n    exit 0\n}\n\n# Clear software management scripts and temporary files\nclean_tmp() {\n    echo -e \"${STEPS} Cleaning up software management files...\"\n\n    rm -rf ${software_path} 2>/dev/null && sync\n\n    echo -e \"${SUCCESS} Cleanup completed successfully.\"\n    exit 0\n}\n\n# Show help information\nhelp_info() {\n    clear\n    cat <<EOF\n======================================================================\nCommand Example : armbian-software -u\n             -u : Update    Update install software script.\n             -c : Clear     Clear the local install software script.\n             -h : Help      Help information display.\n             -q : Quit      Quit install software services.\n              * : Other     Show software list.\n======================================================================\nEOF\n    exit 0\n}\n\n# Check script permission, only supports running on Armbian (aarch64)\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\n[[ \"${arch_info}\" == \"aarch64\" ]] || error_msg \"This script only supports running on Armbian (aarch64) systems.\"\n# Ensure the software configuration file exists\n[[ -f \"${software_conf}\" ]] || echo -e \"${INFO} Please run [ armbian-software -u ] to update the software management scripts.\"\n# Check system release information\ncheck_release\n# Check and install runtime dependencies\ncheck_depends\n\n# Execute script assist functions\ncase \"${1}\" in\n-u | -update) update_script ;;\n-c | -clean) clean_tmp ;;\n-h | -help) help_info ;;\n-q | -quit) echo \"quit!\" && exit 0 ;;\n*) show_software_list ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-swap",
    "content": "#!/bin/bash\n#===========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Create and manage swap space for Armbian system\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-swap 1\n# The input parameter unit is GiB, the default is 1\n#\n#=========================================================================\n#\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n\n# Encountered a serious error, abort the script execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check the disk and available space\ndo_checkdisk() {\n    # Find the partition where root is located\n    ROOT_PTNAME=$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print $3}')\n    if [[ -z \"${ROOT_PTNAME}\" ]]; then\n        error_msg \"Cannot find the root filesystem partition!\"\n    fi\n\n    # Find the disk where the partition is located, supporting multi-digit partition numbers\n    case \"${ROOT_PTNAME}\" in\n    mmcblk?p[0-9]*)\n        # Using sed to remove the trailing 'p' and all numbers\n        # For example, mmcblk0p1 -> mmcblk0\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        PARTITION_NAME=\"p\"\n        ;;\n    [hsv]d[a-z][0-9]*)\n        # Using sed to remove all trailing numbers\n        # For example, sda1 -> sda\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/[0-9]+$//')\n        PARTITION_NAME=\"\"\n        ;;\n    nvme?n?p[0-9]*)\n        # Using sed to remove the trailing 'p' and all numbers\n        # For example, nvme0n1p1 -> nvme0n1\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        PARTITION_NAME=\"p\"\n        ;;\n    *)\n        error_msg \"Unable to recognize the disk type of ${ROOT_PTNAME}!\"\n        ;;\n    esac\n\n    # Find out if the extended partition was created using armbian-tf on TF/USB storage\n    find_right_path=\"/mnt/${DISK_NAME}${PARTITION_NAME}2\"\n    if [[ -d \"${find_right_path}\" ]]; then\n        PARTITION_PATH=\"${find_right_path}\"\n    else\n        PARTITION_PATH=\"/mnt\"\n    fi\n\n    # Check if there is enough free space\n    available_space=\"$(df -Tk ${PARTITION_PATH} | tail -n1 | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))\"\n    if [[ -z \"$(echo \"${available_space}\" | sed -n \"/^[0-9]\\+$/p\")\" ]]; then\n        error_msg \"Unable to determine available space on the target path.\"\n    fi\n    if [[ \"${available_space}\" -lt \"${swap_gb}\" ]]; then\n        error_msg \"Only [ ${available_space} ] GiB available, insufficient to create [ ${swap_gb} ] GiB swap.\"\n    fi\n\n    # Check directory\n    SWAP_PATH=\"${PARTITION_PATH}/.swap\"\n    mkdir -p ${SWAP_PATH} && sync\n    echo -e \"${INFO} Preparing to create [ ${swap_gb} ] GiB swap in [ ${SWAP_PATH} ].\"\n}\n\n# Delete the current swap file\ndelete_current_swap() {\n    echo -e \"${STEPS} Current swap size: [ ${1} ] bytes. Removing...\"\n    current_swap_file=\"$(cat /proc/swaps | sed -n '$p' | awk '{print $1}' | echo $(xargs))\"\n    swapoff ${current_swap_file} 2>/dev/null && sync\n    rm -f ${current_swap_file} 2>/dev/null && sync\n    echo -e \"${SUCCESS} Previous swap removed successfully.\"\n}\n\n# Create a new swap file\ncreate_the_swap() {\n    echo -e \"${STEPS} Creating new swap file...\"\n    ROOTFS_TYPE=\"$(df -hT ${SWAP_PATH} | tail -n1 | awk '{print $2}')\"\n    echo -e \"${INFO} Swap size: [ ${swap_gb} ] GiB, filesystem type: [ ${ROOTFS_TYPE} ]. Please wait...\"\n\n    # create swapfile\n    [[ \"${ROOTFS_TYPE}\" == \"btrfs\" ]] && {\n        truncate -s 0 ${SWAP_PATH}/swapfile\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"[ truncate ] operation failed.\"\n        chattr +C ${SWAP_PATH}/swapfile\n        btrfs property set ${SWAP_PATH}/swapfile compression none\n    }\n    dd if=\"/dev/zero\" of=\"${SWAP_PATH}/swapfile\" bs=\"1024\" count=\"$((1048576 * ${swap_gb}))\" conv=\"fsync\"\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to write [ ${SWAP_PATH}/swapfile ] using dd.\"\n    chmod 600 ${SWAP_PATH}/swapfile\n    mkswap -L SWAP ${SWAP_PATH}/swapfile\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"[ mkswap ] operation failed.\"\n    swapon ${SWAP_PATH}/swapfile\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"[ swapon ] operation failed.\"\n\n    # Add swap to the mount point\n    sed -i '/swap/d' /etc/fstab\n    echo \"${SWAP_PATH}/swapfile swap swap defaults 0 0\" >>/etc/fstab\n\n    # Disable zram swap\n    zram_config=\"/etc/default/armbian-zram-config\"\n    [[ -f \"${zram_config}\" ]] && sed -i \"s|# SWAP=false|SWAP=false|g\" ${zram_config}\n\n    sync && sleep 3\n    echo -e \"${INFO} Current swap status: \\n$(cat /proc/swaps)\"\n    echo -e \"${SUCCESS} Swap created successfully!\"\n}\n\n# Check swap\ndo_checkswap() {\n    # Set the swap size in GiB\n    my_swap_gb=\"${1}\"\n    format_gb=\"$(echo \"${my_swap_gb}\" | awk -F \".\" '{print $1}')\"\n    if [[ -n \"$(echo \"${format_gb}\" | sed -n \"/^[0-9]\\+$/p\")\" ]]; then\n        swap_gb=\"${format_gb}\"\n    else\n        swap_gb=\"1\"\n    fi\n\n    # Check disk\n    do_checkdisk\n\n    # manage swap\n    current_swap=\"$(free -m | sed -n '$p' | awk '{print $2}' | echo $(xargs))\"\n    if [[ \"${current_swap}\" -ne \"0\" ]]; then\n        delete_current_swap ${current_swap}\n        create_the_swap ${swap_gb}\n    else\n        create_the_swap ${swap_gb}\n    fi\n    exit 0\n}\n\necho -e \"${STEPS} Welcome to the Swap Management Tool.\"\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\n# Check swap\ndo_checkswap \"${@}\"\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-sync",
    "content": "#!/bin/bash\n#==========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Synchronize all service scripts from the repository\n# Copyright (C) 2022- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2022- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-sync\n#\n#============================= Functions list =============================\n#\n# error_msg       : Output error message\n# check_release   : Check the config file\n# check_depends   : Check dependencies\n# sync_config     : Synchronize all service scripts\n#\n#==========================================================================\n#\n# Armbian firmware config info record file\nophub_release_file=\"/etc/ophub-release\"\n# The script files download repository\nscript_repo=\"https://github.com/ophub/amlogic-s9xxx-armbian.git\"\nscript_dir=\"build-armbian/armbian-files\"\n# Operation instruction and service storage path\nsbin_path=\"/usr/sbin\"\n# Software service storage path\nshare_path=\"/usr/share/ophub\"\n# Openvfd service storage path\nopenvfd_path=\"/usr/share/openvfd\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==========================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check the release configuration file\ncheck_release() {\n    # Check release file\n    [[ -f \"${ophub_release_file}\" ]] || error_msg \"Missing release file: [ ${ophub_release_file} ]\"\n\n    # Get values\n    source \"${ophub_release_file}\"\n    PLATFORM=\"${PLATFORM}\"\n    FDTFILE=\"${FDTFILE}\"\n\n    # Auto-detect platform for early devices that lack the PLATFORM parameter\n    [[ -z \"${PLATFORM}\" && -n \"${FDTFILE}\" ]] && {\n        [[ ${FDTFILE:0:5} == \"meson\" ]] && PLATFORM=\"amlogic\" || PLATFORM=\"rockchip\"\n        echo \"PLATFORM='${PLATFORM}'\" >>${ophub_release_file}\n    }\n\n    echo -e \"${INFO} Armbian PLATFORM: [ ${PLATFORM} ]\"\n}\n\n# Check and install required dependencies\ncheck_depends() {\n    # Check the necessary dependencies for apt install\n    is_dpkg=\"0\"\n    dpkg_packages=(\"git\" \"tar\" \"coreutils\")\n    i=\"1\"\n    for package in ${dpkg_packages[*]}; do\n        [[ -n \"$(dpkg -l | awk '{print $2}' | grep -w \"^${package}$\" 2>/dev/null)\" ]] || is_dpkg=\"1\"\n        ((i++))\n    done\n    # Install missing packages\n    if [[ \"${is_dpkg}\" -eq \"1\" ]]; then\n        echo -e \"${STEPS} Installing required dependencies...\"\n        sudo apt-get update\n        sudo apt-get install -y ${dpkg_packages[*]}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to install dependencies.\"\n    fi\n}\n\n# Synchronize all service scripts\nsync_config() {\n    echo -e \"${STEPS} Start syncing all service scripts...\"\n\n    # Download the latest scripts from the repository\n    echo -e \"${INFO} Fetching latest scripts from repository...\"\n    git_tmp_path=\"$(mktemp -d)\"\n    cd ${git_tmp_path}\n    git init --quiet\n    git remote add origin ${script_repo}\n    git config core.sparseCheckout true\n    echo \"${script_dir}/*\" >>.git/info/sparse-checkout\n    git pull --quiet --depth=1 origin main\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to download scripts from [ ${script_repo} ].\"\n\n    # Update system command and service scripts\n    echo -e \"${STEPS} Syncing system command and service scripts...\"\n    [[ -d \"${sbin_path}\" ]] || mkdir -p ${sbin_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/common-files${sbin_path}/* ${sbin_path}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync common [ ${sbin_path} ] scripts.\"\n    chmod +x ${sbin_path}/armbian-*\n\n    # Update software management scripts\n    echo -e \"${STEPS} Syncing software management scripts...\"\n    [[ -d \"${share_path}\" ]] || mkdir -p ${share_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/common-files${share_path}/* ${share_path}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync common [ ${share_path} ] scripts.\"\n    find ${share_path} -type f -name '*.sh' -exec chmod +x {} \\;\n\n    # Update Amlogic platform specific scripts\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && {\n        # Update Amlogic platform command and service scripts\n        echo -e \"${STEPS} Syncing Amlogic platform-specific scripts...\"\n        cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/platform-files/amlogic/rootfs${sbin_path}/* ${sbin_path}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync Amlogic [ ${sbin_path} ] scripts.\"\n        chmod +x ${sbin_path}/armbian-*\n\n        # Update OpenVFD LED display service scripts\n        echo -e \"${STEPS} Syncing Amlogic OpenVFD service scripts...\"\n        [[ -d \"${openvfd_path}\" ]] || mkdir -p ${openvfd_path}\n        cp -af --no-preserve=ownership ${git_tmp_path}/${script_dir}/platform-files/amlogic/rootfs${openvfd_path}/* ${openvfd_path}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync Amlogic [ ${openvfd_path} ] scripts.\"\n        chmod +x ${openvfd_path}/vfdservice\n    }\n\n    # Clean up temporary files\n    rm -rf ${git_tmp_path} 2>/dev/null\n\n    sync && sleep 3\n    echo -e \"${SUCCESS} All service scripts synchronized successfully.\"\n    exit 0\n}\n\n# Check the release configuration file\ncheck_release\n# Check and install required dependencies\ncheck_depends\n# Synchronize all service scripts\nsync_config\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-tf",
    "content": "#!/bin/bash\n#===========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Root Partition Expansion Tool\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-tf\n#\n#========================= Set default parameters ==========================\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#===========================================================================\n\n# Encountered a serious error, abort the script execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check the disk where the root partition resides\ndo_checkdisk() {\n    # Find the partition where root is located\n    ROOT_PTNAME=\"$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print $3}')\"\n    [[ -z \"${ROOT_PTNAME}\" ]] && error_msg \"Cannot find the root filesystem partition!\"\n\n    # Find the disk where the partition is located, supporting multi-digit partition numbers\n    case \"${ROOT_PTNAME}\" in\n    mmcblk?p[0-9]*)\n        # For example, mmcblk0p1 -> mmcblk0\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        ;;\n    [hsv]d[a-z][0-9]*)\n        # For example, sda1 -> sda\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/[0-9]+$//')\n        ;;\n    nvme?n?p[0-9]*)\n        # For example, nvme0n1p1 -> nvme0n1\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        ;;\n    *)\n        error_msg \"Unrecognized disk type ${ROOT_PTNAME}!\"\n        ;;\n    esac\n\n    sync && sleep 3\n}\n\n# Expand the root partition to fill available space\nexpansion_partition() {\n    echo -e \"${INFO} Repairing disk partition table...\"\n    printf 'f\\n' | parted ---pretend-input-tty /dev/${DISK_NAME} unit MiB print || repair_status=\"no\"\n    [[ \"${repair_status}\" == \"no\" ]] && error_msg \"Failed to repair disk partition table. Expansion aborted.\"\n\n    pt_num=\"$(parted -s /dev/${DISK_NAME} print | awk '$1~/[1-9]+/ {print $1}' | wc -l)\"\n    [[ \"${pt_num}\" -ne \"2\" ]] && error_msg \"Expected 2 partitions but found ${pt_num}. Automatic expansion aborted.\"\n\n    echo -e \"${INFO} Expanding the root partition...\"\n    printf 'Yes\\n-1\\n' | parted ---pretend-input-tty /dev/${DISK_NAME} resizepart 2 100%\n\n    echo -e \"${INFO} Resizing the filesystem...\"\n    ROOTFS_TYPE=\"$(df -hT / | grep \"/\" | awk '{print $2}')\"\n    if [[ \"${ROOTFS_TYPE}\" == \"btrfs\" ]]; then\n        btrfs filesystem resize max /\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"[ btrfs ] operation failed.\"\n    else\n        resize2fs /dev/${ROOT_PTNAME}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"[ resize2fs ] operation failed.\"\n    fi\n\n    # Do not delete the flag file, only modify the value to prevent re-expansion by armbian-resize-filesystem\n    echo \"no\" >/root/.no_rootfs_resize\n    echo -e \"${SUCCESS} Root partition expanded successfully.\"\n}\n\n# Show welcome message\necho -e \"${STEPS} Welcome to the Root Partition Expansion Tool.\"\n\ndo_checkdisk\nexpansion_partition\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/armbian-update",
    "content": "#!/bin/bash\n#==================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Armbian Kernel Update Tool\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Kernel download server: https://github.com/ophub/kernel/tree/main/pub\n#\n# Command: armbian-update\n#\n#========================================= Functions list =========================================\n#\n# error_msg          : Output error message and abort execution\n#\n# check_depends      : Check and install required dependencies\n# check_network      : Verify network connectivity to GitHub\n# check_disk         : Detect system disk and partition names\n#\n# init_var           : Initialize all runtime variables and parse options\n# query_version      : Query the latest kernel version from GitHub releases\n# search_kernel      : Search for local or remote kernel packages\n# download_kernel    : Download kernel package from GitHub releases\n# check_kernel       : Verify kernel package integrity (.deb and .tar.gz)\n# backup_kernel      : Backup the currently running kernel\n# backup_fdtfile     : Backup the current device tree blob (DTB) file\n# restore_fdtfile    : Restore DTB file from backup if missing\n# update_tar_kernel  : Install the kernel from .tar.gz packages\n# update_deb_kernel  : Install the kernel from .deb packages\n# update_uboot       : Update the U-Boot bootloader\n# update_initrd_addr : Adjust initrd/ramdisk address for Amlogic devices\n# update_os_version  : Update the Armbian OS version string\n#\n# sos_kernel         : Rescue and restore the kernel to a target disk\n#\n# help_info          : Display usage and help information\n#\n#===================================== Set default parameters =====================================\n#\n# Set current path\ncurrent_path=\"${PWD}\"\n# Set kernel backup directory\nbackup_path=\"/ddbr/backup\"\n# Set kernel rescue temporary directory\nrescue_path=\"/ddbr/rescue\"\n# Set the release check file\nophub_release_file=\"/etc/ophub-release\"\narmbian_release_file=\"/etc/armbian-release\"\narmbian_image_file=\"/etc/armbian-image-release\"\n# Set default installation mainline u-boot (-m)\nauto_mainline_uboot=\"no\"\n# Set default kernel download type (-d), option: tar/deb\ndownload_type=\"deb\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nFINISH=\"[\\033[93m FINISH \\033[0m]\"\nPROMPT=\"[\\033[93m PROMPT \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==================================================================================================\n\n# Encountered a critical error, output the message and abort execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check and install required dependencies\ncheck_depends() {\n    echo -e \"${STEPS} Checking required dependencies...\"\n\n    is_missing=\"0\"\n    necessary_packages=(\"coreutils\" \"bsdextrautils\" \"tar\" \"curl\" \"btrfs-progs\" \"e2fsprogs\")\n    i=\"1\"\n    for package in \"${necessary_packages[@]}\"; do\n        [[ -n \"$(dpkg -l | awk '{print $2}' | grep -w \"^${package}$\" 2>/dev/null)\" ]] || is_missing=\"1\"\n        ((i++))\n    done\n\n    if [[ \"${is_missing}\" -eq \"1\" ]]; then\n        echo -e \"${INFO} Installing missing dependencies...\"\n        sudo apt-get update\n        sudo apt-get install -y ${necessary_packages[@]}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to install dependencies. Update aborted.\"\n    else\n        echo -e \"${INFO} All dependencies are satisfied.\"\n    fi\n\n    sync && echo \"\"\n}\n\n# Verify network connectivity to GitHub\ncheck_network() {\n    # Check the connection status to github.com\n    curl --connect-timeout 10 -s \"github.com\" >/dev/null 2>&1 && github_net=\"yes\" || github_net=\"no\"\n    if [[ \"${github_net}\" == \"yes\" ]]; then\n        echo -e \"${INFO} Network connection to [ github.com ] is available.\"\n    else\n        error_msg \"Cannot access [ github.com ]. Please check your network connection.\"\n    fi\n}\n\n# Detect system disk and partition names\ncheck_disk() {\n    # Reload system services\n    sudo systemctl daemon-reload\n\n    # Find the partition where root is located\n    ROOT_PTNAME=\"$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print $3}')\"\n    [[ -z \"${ROOT_PTNAME}\" ]] && error_msg \"Failed to query system partition information.\"\n\n    # Find the disk where the partition is located, supporting multi-digit partition numbers\n    case \"${ROOT_PTNAME}\" in\n    mmcblk?p[0-9]*)\n        # For example, mmcblk0p1 -> mmcblk0\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        ;;\n    [hsv]d[a-z][0-9]*)\n        # For example, sda1 -> sda\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/[0-9]+$//')\n        ;;\n    nvme?n?p[0-9]*)\n        # For example, nvme0n1p1 -> nvme0n1\n        DISK_NAME=$(echo \"${ROOT_PTNAME}\" | sed -E 's/p[0-9]+$//')\n        ;;\n    *)\n        error_msg \"Unrecognized disk type ${ROOT_PTNAME}!\"\n        ;;\n    esac\n}\n\n# Initialize all runtime variables and parse command-line options\ninit_var() {\n    echo -e \"${STEPS} Initializing parameters...\"\n\n    # Query the current version\n    kernel_uname=\"$(uname -r)\"\n    current_kernel=\"$(echo \"${kernel_uname}\" | grep -oP '\\d+\\.\\d+\\.\\d+')\"\n    [[ -z \"${current_kernel}\" ]] && error_msg \"Failed to detect the current kernel version.\"\n\n    # Check release file\n    [[ -f \"${ophub_release_file}\" ]] || error_msg \"missing [ ${ophub_release_file} ] file.\"\n\n    # Adjust parameter name\n    sed -i \"s|^KERNEL_BRANCH=|KERNEL_TAGS=|g\" ${ophub_release_file}\n\n    # Attempt to detect the FDT file from common boot configuration files\n    FDTFILE=\"\"\n    [[ -f \"/boot/uEnv.txt\" ]] && { FDTFILE=\"$(grep -E '^FDT=.*\\.dtb$' /boot/uEnv.txt | sed -E 's#.*/##' || true)\"; }\n    [[ -z \"${FDTFILE}\" && -f \"/boot/extlinux/extlinux.conf\" ]] && { FDTFILE=\"$(grep -E '/dtb/.*\\.dtb$' /boot/extlinux/extlinux.conf | sed -E 's#.*/##' || true)\"; }\n    [[ -z \"${FDTFILE}\" && -f \"/boot/armbianEnv.txt\" ]] && { FDTFILE=\"$(grep -E '^fdtfile=.*\\.dtb$' /boot/armbianEnv.txt | sed -E 's#.*/##' || true)\"; }\n    # Update FDT file records information\n    [[ -n \"${FDTFILE}\" ]] && sed -i \"s|^FDTFILE=.*|FDTFILE='${FDTFILE}'|g\" ${ophub_release_file}\n\n    # Get values\n    source \"${ophub_release_file}\"\n    PLATFORM=\"${PLATFORM}\"\n    MODEL_ID=\"${MODEL_ID}\"\n    FDTFILE=\"${FDTFILE}\"\n    UBOOT_OVERLOAD=\"${UBOOT_OVERLOAD}\"\n    MAINLINE_UBOOT=\"${MAINLINE_UBOOT}\"\n    KERNEL_REPO=\"${KERNEL_REPO}\"\n    KERNEL_TAGS=\"${KERNEL_TAGS}\"\n    KERNEL_SIGNATURE=\"${KERNEL_SIGNATURE}\"\n    DOWNLOAD_TYPE=\"${DOWNLOAD_TYPE}\"\n    KERNEL_BACKUP=\"${KERNEL_BACKUP}\"\n\n    # Check the platform variable\n    [[ -z \"${PLATFORM}\" ]] && error_msg \"[ PLATFORM ] variable is missing. Update aborted.\"\n    # Check the FDT file variable\n    [[ -z \"${FDTFILE}\" ]] && error_msg \"[ FDTFILE ] variable is missing. Update aborted.\"\n    # Check kernel download type\n    if [[ -n \"${DOWNLOAD_TYPE}\" ]]; then\n        download_type=\"${DOWNLOAD_TYPE}\"\n    else\n        download_type=\"deb\"\n        echo \"DOWNLOAD_TYPE='deb'\" >>${ophub_release_file}\n    fi\n    # Check kernel signature\n    [[ -n \"${KERNEL_SIGNATURE}\" ]] || {\n        KERNEL_SIGNATURE=\"${kernel_uname#*-}\"\n        echo \"KERNEL_SIGNATURE='${KERNEL_SIGNATURE}'\" >>${ophub_release_file}\n    }\n\n    # Set the kernel packages\n    declare -A platform_family=([\"amlogic\"]=\"meson64\" [\"rockchip\"]=\"rockchip64\" [\"allwinner\"]=\"sunxi64\")\n    kernel_deb_list=(\"linux-image\" \"linux-dtb-${platform_family[${PLATFORM}]}\" \"linux-headers\" \"linux-libc-dev\")\n    kernel_tar_list=(\"boot\" \"dtb-${PLATFORM}\" \"modules\" \"header\")\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"r:u:k:b:m:d:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -r | --kernelRepository)\n            if [[ -n \"${2}\" ]]; then\n                KERNEL_REPO=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -r parameter [ ${2} ]!\"\n            fi\n            ;;\n        -u | --kernel_Usage)\n            if [[ -n \"${2}\" ]]; then\n                kernel_usage=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -u parameter [ ${2} ]!\"\n            fi\n            ;;\n        -k | --Kernel)\n            if [[ -n \"${2}\" ]]; then\n                inputs_kernel=\"${2//.tar.gz/}\"\n                inputs_kernel=\"${inputs_kernel##deb-}\"\n                shift 2\n            else\n                error_msg \"Invalid -k parameter [ ${2} ]!\"\n            fi\n            ;;\n        -b | --kernel_Backup)\n            if [[ -n \"${2}\" ]]; then\n                KERNEL_BACKUP=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -b parameter [ ${2} ]!\"\n            fi\n            ;;\n        -m | --Mainline_u-boot)\n            if [[ -n \"${2}\" ]]; then\n                auto_mainline_uboot=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -m parameter [ ${2} ]!\"\n            fi\n            ;;\n        -d | --download_type)\n            if [[ -n \"${2}\" ]]; then\n                download_type=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -d parameter [ ${2} ]!\"\n            fi\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n\n    # Adjust the custom kernel repository url format\n    [[ -z \"${KERNEL_REPO}\" ]] && KERNEL_REPO=\"ophub/kernel\"\n    [[ \"${KERNEL_REPO}\" =~ ^https: ]] && KERNEL_REPO=\"$(echo ${KERNEL_REPO} | awk -F'/' '{print $4\"/\"$5}')\"\n    kernel_api=\"https://github.com/${KERNEL_REPO}\"\n\n    # Set kernel download tags\n    [[ -n \"${kernel_usage}\" ]] && KERNEL_TAGS=\"${kernel_usage}\"\n    KERNEL_TAGS=\"${KERNEL_TAGS//kernel_/}\"\n    [[ -z \"$(echo ${KERNEL_TAGS} | grep -oE \"(stable|flippy|beta|rk3588|rk35xx|h6)\")\" ]] && {\n        echo -e \"${PROMPT} Invalid KERNEL_TAGS value [ ${KERNEL_TAGS} ]. Resetting to default [ stable ].\"\n        KERNEL_TAGS=\"stable\"\n    }\n\n    # Check if the mainline u-boot exists\n    [[ \"${auto_mainline_uboot}\" =~ ^(yes|no)$ ]] || auto_mainline_uboot=\"no\"\n    [[ \"${auto_mainline_uboot}\" == \"yes\" ]] && {\n        [[ -n \"${MAINLINE_UBOOT}\" && -f \"${MAINLINE_UBOOT}\" ]] || error_msg \"[ ${MAINLINE_UBOOT} ] not found. Update aborted.\"\n        sed -i \"s|^MLUBOOT_STATUS=.*|MLUBOOT_STATUS='yes'|g\" ${ophub_release_file}\n    }\n\n    # Check kernel download type\n    [[ \"${download_type}\" =~ ^(tar|deb)$ ]] || download_type=\"deb\"\n    # Check kernel backup option\n    [[ \"${KERNEL_BACKUP}\" =~ ^(yes|no)$ ]] || KERNEL_BACKUP=\"yes\"\n\n    # Check the current system running disk\n    check_disk\n\n    # Display settings results\n    echo -e \"${INFO} Armbian platform: [ ${PLATFORM} ]\"\n    echo -e \"${INFO} Current kernel: [ ${kernel_uname} ]\"\n    echo -e \"${INFO} Kernel signature: [ ${KERNEL_SIGNATURE} ]\"\n    echo -e \"${INFO} Kernel download type: [ ${download_type} ]\"\n    echo -e \"${INFO} Kernel download repository: [ ${KERNEL_REPO} ]\"\n    echo -e \"${INFO} Kernel tags: [ ${KERNEL_TAGS} ]\"\n    echo -e \"${INFO} Specify kernel: [ ${inputs_kernel} ]\"\n    echo -e \"${INFO} Backup kernel: [ ${KERNEL_BACKUP} ]\"\n    echo -e \"${INFO} Mainline u-boot update: [ ${auto_mainline_uboot} ]\"\n    echo -e \"${INFO} Running on disk: [ /dev/${DISK_NAME} ]\"\n\n    sync && echo \"\"\n}\n\n# Query the latest kernel version from GitHub releases\nquery_version() {\n    kernel_prefix=\"${1}\"\n    echo -e \"${INFO} Querying the latest version for [ ${kernel_prefix} ]...\"\n\n    # Using lookbehind (?<=...) to extract ONLY the patch number\n    latest_kernel=\"$(\n        curl -fsSL ${kernel_api}/releases/expanded_assets/kernel_${KERNEL_TAGS} |\n            grep -oP \"(?<=${kernel_prefix}\\.)[0-9]+(?=\\.tar\\.gz)\" |\n            sort -urV | head -n 1\n    )\"\n}\n\n# Search for local or remote kernel packages\nsearch_kernel() {\n    cd ${current_path}\n    echo -e \"${STEPS} Searching for kernel packages...\"\n\n    # Set the kernel save path and clear old files\n    kernel_save_path=\"/var/cache/apt/archives/ophub\"\n    [[ -d \"${kernel_save_path}\" ]] || mkdir -p \"${kernel_save_path}\"\n    rm -rf \"${kernel_save_path}\"/*\n    # Set the kernel path\n    kernel_path=\"${kernel_save_path}\"\n    local_found=\"no\"\n\n    # Check for local .deb files first, e.g: linux-image_6.1.164-1-ophub_arm64.deb -> 6.1.164\n    if [[ \"$(find . -maxdepth 1 -type f -name \"*.deb\" 2>/dev/null | wc -l)\" -ge \"3\" ]]; then\n        target_file=\"$(ls linux-image_*.deb 2>/dev/null | head -n 1)\"\n        if [[ -n \"${target_file}\" ]]; then\n            inputs_kernel=\"$(echo \"${target_file}\" | grep -oP '(?<=_)\\d+\\.\\d+\\.\\d+(?=-)' || echo \"${target_file}\" | grep -oP '\\d+\\.\\d+\\.\\d+')\"\n            download_type=\"deb\"\n            local_found=\"yes\"\n        fi\n\n    # Check for local .tar.gz files, e.g: boot-6.6.123-ophub.tar.gz -> 6.6.123\n    elif [[ \"$(find . -maxdepth 1 -type f -name \"*.tar.gz\" 2>/dev/null | wc -l)\" -ge \"3\" ]]; then\n        target_file=\"$(ls boot-*.tar.gz 2>/dev/null | head -n 1)\"\n        if [[ -n \"${target_file}\" ]]; then\n            inputs_kernel=\"$(echo \"${target_file}\" | grep -oP '(?<=boot-)\\d+\\.\\d+\\.\\d+')\"\n            download_type=\"tar\"\n            local_found=\"yes\"\n        fi\n    fi\n\n    # Handle Local Files\n    if [[ \"${local_found}\" == \"yes\" ]]; then\n        echo -e \"${INFO} Found local kernel packages. Version: [ ${inputs_kernel} ] Type: [ ${download_type} ]\"\n\n        [[ -f \"sha256sums\" ]] && mv -f sha256sums -t \"${kernel_path}\"\n        mv -f *\".${download_type}\"* -t \"${kernel_path}\"\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to move local kernel files.\"\n\n    else\n        # Handle Online Query\n        check_network\n\n        # If the last character of the string (e.g: 6.1.) is \".\", append \"y\" to it.\n        [[ -n \"${inputs_kernel}\" && \"${inputs_kernel: -1}\" == \".\" ]] && inputs_kernel=\"${inputs_kernel}y\"\n        # If the string (e.g: 6.1) contains only one period, add \".y\" to it.\n        [[ -n \"${inputs_kernel}\" && \"$(grep -o \"\\.\" <<<\"${inputs_kernel}\" | wc -l)\" -eq \"1\" ]] && inputs_kernel=\"${inputs_kernel}.y\"\n\n        # Automatically retrieve the latest version of the current kernel series and the specified kernel series (e.g: 6.1.y)\n        # However, when the specified kernel parameter contains a \"-\" character, the specified version will be used (e.g: 6.1.141-rk3588)\n        [[ -z \"${inputs_kernel}\" ]] || [[ \"${inputs_kernel}\" =~ ^[0-9].*[a-z]$ && \"${inputs_kernel}\" != *\"-\"* ]] && {\n            # kernel_verpatch, such as [ 6.1 ]\n            kernel_verpatch=\"$(echo ${current_kernel} | awk -F '.' '{print $1\".\"$2}')\"\n\n            # Setting the kernel series for the query (6.1.y -> 6.1)\n            [[ \"${inputs_kernel}\" =~ ^[0-9].*[a-z]$ ]] && kernel_verpatch=\"${inputs_kernel%.*}\"\n\n            # Define the search order of kernel types based on priority\n            [[ \"${download_type}\" == \"deb\" ]] && search_types=(\"deb\" \"tar\") || search_types=(\"tar\" \"deb\")\n            # Traverse kernel types to query the latest kernel version\n            for type in \"${search_types[@]}\"; do\n                # If deb: search for 'deb-6.1' to extract kernel version\n                # If tar: search for '6.1' to extract kernel version\n                [[ \"${type}\" == \"deb\" ]] && prefix=\"deb-${kernel_verpatch}\" || prefix=\"${kernel_verpatch}\"\n\n                # Query the latest kernel version\n                query_version \"${prefix}\"\n\n                # If found, update global variables and stop searching\n                if [[ -n \"${latest_kernel}\" ]]; then\n                    download_type=\"${type}\"\n                    break\n                fi\n            done\n\n            # If the latest kernel version is still not found, no suitable kernel exists in the repository\n            [[ -z \"${latest_kernel}\" ]] && error_msg \"No matching kernel version found in GitHub releases.\"\n\n            # Construct pure version number (e.g. 6.12.89)\n            inputs_kernel=\"${kernel_verpatch}.${latest_kernel}\"\n        }\n\n        echo -e \"${INFO} Target online kernel: [ ${inputs_kernel} ]\"\n    fi\n\n    sync && echo \"\"\n}\n\n# Download kernel package from GitHub releases\ndownload_kernel() {\n    cd ${current_path}\n    echo -e \"${STEPS} Downloading kernel package...\"\n\n    # Construct filename based on type\n    if [[ \"${download_type}\" == \"deb\" ]]; then\n        # deb-6.12.89.tar.gz\n        down_filename=\"deb-${inputs_kernel}.tar.gz\"\n    else\n        # 6.12.89.tar.gz\n        down_filename=\"${inputs_kernel}.tar.gz\"\n    fi\n\n    # Download the kernel package from GitHub releases\n    kernel_down_from=\"https://github.com/${KERNEL_REPO}/releases/download/kernel_${KERNEL_TAGS}/${down_filename}\"\n\n    echo -e \"${INFO} Download URL: [ ${kernel_down_from} ]\"\n    curl -fsSL \"${kernel_down_from}\" -o \"${kernel_path}/${down_filename}\"\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to download the kernel package.\"\n\n    # Extract the downloaded kernel package\n    tar -mxzf \"${kernel_path}/${down_filename}\" -C \"${kernel_path}\"\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to extract the kernel package.\"\n\n    # Handle if extraction creates a subdir\n    if [[ -d \"${kernel_path}/${inputs_kernel}\" ]]; then\n        kernel_path=\"${kernel_path}/${inputs_kernel}\"\n    elif [[ -d \"${kernel_path}/deb-${inputs_kernel}\" ]]; then\n        kernel_path=\"${kernel_path}/deb-${inputs_kernel}\"\n    fi\n\n    # Set permissions for directories and files separately\n    find \"${kernel_path}\" -type d -exec chmod 755 {} \\;\n    find \"${kernel_path}\" -type f -exec chmod a+r {} \\;\n\n    sync && echo \"\"\n}\n\n# Verify kernel package integrity (supports .deb and .tar.gz)\ncheck_kernel() {\n    cd \"${kernel_path}\"\n    echo -e \"${STEPS} Verifying kernel package integrity...\"\n\n    if [[ \"${download_type}\" == \"deb\" ]]; then\n        # Find .deb kernel file\n        target_file=\"$(ls linux-image_*.deb 2>/dev/null | head -n 1)\"\n        [[ -z \"${target_file}\" ]] && error_msg \"Kernel .deb file not found in [ ${kernel_path} ].\"\n\n        # Extract kernel name: linux-image_6.1.164-1-ophub_arm64.deb -> 6.1.164-1-ophub_arm64\n        kernel_name=\"$(echo \"${target_file}\" | grep -oP '(?<=linux-image_).*?(?=\\.deb)')\"\n        # Extract kernel signature: 6.1.164-1-ophub_arm64 -> ophub\n        kernel_signature=\"$(echo \"${kernel_name}\" | sed -E 's/^.*-([^-_]+)_.*/\\1/')\"\n        # Extract verify name: linux-image_6.1.164-1-ophub_arm64.deb -> 6.12.69-ophub\n        verify_name=\"$(\n            echo \"${target_file}\" |\n                grep -oP '(?<=linux-image_).*?(?=_arm64\\.deb)' |\n                awk -F'-' '{print $1\"-\"$NF}'\n        )\"\n\n        # Set file list for verification\n        check_list=(${kernel_deb_list[@]})\n\n    else\n        # Find .tar.gz kernel file\n        target_file=\"$(ls boot-*.tar.gz 2>/dev/null | head -n 1)\"\n        [[ -z \"${target_file}\" ]] && error_msg \"Kernel .tar.gz file not found in [ ${kernel_path} ].\"\n\n        # Extract kernel name: boot-6.6.123-ophub.tar.gz -> 6.6.123-ophub\n        kernel_name=\"$(echo \"${target_file}\" | grep -oP '(?<=boot-).*?(?=\\.tar\\.gz)')\"\n        # Extract kernel signature: 6.6.123-ophub -> ophub\n        kernel_signature=\"${kernel_name#*-}\"\n        verify_name=\"${kernel_name}\"\n\n        # Set file list for verification\n        check_list=(${kernel_tar_list[@]})\n    fi\n\n    echo -e \"${INFO} Kernel name: [ ${kernel_name} ]\"\n\n    # Check if the kernel is already installed\n    if [[ \"${kernel_uname}\" == \"${verify_name}\" ]]; then\n        echo -e \"${INFO} The current kernel [ ${kernel_uname} ] is already up to date.\"\n        echo -ne \"${PROMPT} Do you want to force update? [y/n]: \"\n        read force_update\n        case \"${force_update,,}\" in\n        y*) echo -e \"${INFO} Proceeding with force update...\" ;;\n        *)\n            echo -e \"${FINISH} Update cancelled by user.\"\n            exit 0\n            ;;\n        esac\n    fi\n\n    # Identify Kernel Version\n    kernel_base=\"$(echo ${kernel_name} | grep -oP '\\d+\\.\\d+\\.\\d+')\"\n    [[ -z \"${kernel_base}\" ]] && error_msg \"Failed to detect a valid kernel version.\"\n\n    # Check the sha256sums file\n    sha256sums_file=\"sha256sums\"\n    if [[ -s \"${sha256sums_file}\" && -n \"$(cat ${sha256sums_file})\" ]]; then\n        echo -e \"${INFO} Performing SHA256 checksum verification...\"\n\n        local i=\"1\"\n        for prefix in \"${check_list[@]}\"; do\n            # Construct filename based on prefix and kernel name\n            if [[ \"${download_type}\" == \"deb\" ]]; then\n                tmp_file=\"${prefix}_${kernel_name}.deb\"\n            else\n                tmp_file=\"${prefix}-${kernel_name}.tar.gz\"\n            fi\n\n            # Check if file exists\n            if [[ ! -s \"${tmp_file}\" ]]; then\n                # Handle optional header files\n                if [[ \"${prefix}\" == \"linux-headers\" || \"${prefix}\" == \"header\" ]]; then\n                    echo -e \"${PROMPT} (${i}/4) [ ${tmp_file} ] is missing, skipping verification.\"\n                    ((i++))\n                    continue\n                else\n                    error_msg \"(${i}/4) Required file [ ${tmp_file} ] is missing.\"\n                fi\n            fi\n\n            # Check checksum\n            tmp_sha256sum=\"$(sha256sum \"${tmp_file}\" | awk '{print $1}')\"\n            tmp_checkcode=\"$(grep \"${tmp_file}\" \"${sha256sums_file}\" | awk '{print $1}')\"\n\n            [[ \"${tmp_sha256sum}\" == \"${tmp_checkcode}\" ]] || error_msg \"(${i}/4) ${tmp_file}: SHA256 checksum mismatch.\"\n            echo -e \"${INFO} (${i}/4) [ ${tmp_file} ] checksum verified successfully.\"\n            ((i++))\n        done\n    fi\n\n    sync && echo \"\"\n}\n\n# Backup the currently running kernel\nbackup_kernel() {\n    echo -e \"${STEPS} Backing up the current kernel...\"\n\n    [[ -d \"${backup_path}\" ]] || mkdir -p ${backup_path}\n    rm -rf ${backup_path}/${current_kernel}\n\n    # Keep the latest 3 kernel backups and delete the others\n    backup_kernel_list=($(ls ${backup_path} -lt | grep \"^d\" | awk '{print $9}'))\n    [[ \"${#backup_kernel_list[@]}\" -ge \"3\" ]] && {\n        for ((i = 2; i < ${#backup_kernel_list[@]}; i++)); do rm -rf ${backup_path}/${backup_kernel_list[$i]}; done\n    }\n\n    # Identify the current kernel files\n    mkdir -p ${backup_path}/${current_kernel}\n\n    # Create temporary file directory\n    kernel_tmp_path=\"$(mktemp -d)\"\n    cd ${kernel_tmp_path}\n\n    # 1. Pack the boot-*.tar.gz file\n    rm -rf *\n    cp -rf /boot/*-${kernel_uname} -t .\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(1/4) Failed to copy [ /boot/*-${kernel_uname} ] files.\"\n    rm -rf dtb*\n    chmod +x *\n    tar -czf boot-${kernel_uname}.tar.gz *\n    mv -f *.tar.gz ${backup_path}/${current_kernel}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(1/4) Failed to move [ boot-${kernel_uname}.tar.gz ] files.\"\n    echo -e \"${INFO} (1/4) Backup of [ boot-${kernel_uname}.tar.gz ] succeeded.\"\n\n    # 2. Pack the dtb-*.tar.gz file\n    rm -rf *\n    cp -rf /boot/dtb/${PLATFORM}/* -t .\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(2/4) Failed to copy [ /boot/dtb/${PLATFORM}/* ] files.\"\n    tar -czf dtb-${PLATFORM}-${kernel_uname}.tar.gz *\n    mv -f *.tar.gz ${backup_path}/${current_kernel}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(2/4) Failed to move [ dtb-${PLATFORM}-${kernel_uname}.tar.gz ] files.\"\n    echo -e \"${INFO} (2/4) Backup of [ dtb-${PLATFORM}-${kernel_uname}.tar.gz ] succeeded.\"\n\n    # 3. Pack the modules-*.tar.gz file\n    rm -rf *\n    cp -rf /usr/lib/modules/${kernel_uname} -t .\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(3/4) Failed to copy [ /usr/lib/modules/${kernel_uname} ] files.\"\n    tar -czf modules-${kernel_uname}.tar.gz *\n    mv -f *.tar.gz ${backup_path}/${current_kernel}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"(3/4) Failed to move [ modules-${kernel_uname}.tar.gz ] files.\"\n    echo -e \"${INFO} (3/4) Backup of [ modules-${kernel_uname}.tar.gz ] succeeded.\"\n\n    # 4. Pack the header-*.tar.gz file, header file is optional\n    if [[ -d \"/usr/src/linux-headers-${kernel_uname}\" ]]; then\n        rm -rf *\n        cp -rf /usr/src/linux-headers-${kernel_uname}/* -t .\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"(4/4) Failed to copy [ /usr/src/linux-headers-${kernel_uname}/* ] files.\"\n        tar -czf header-${kernel_uname}.tar.gz *\n        mv -f *.tar.gz ${backup_path}/${current_kernel}\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"(4/4) Failed to move [ header-${kernel_uname}.tar.gz ] files.\"\n        echo -e \"${INFO} (4/4) Backup of [ header-${kernel_uname}.tar.gz ] succeeded.\"\n    else\n        echo -e \"${PROMPT} (4/4) [ /usr/src/linux-headers-${kernel_uname} ] folder does not exist, skip backup.\"\n    fi\n\n    # Add sha256sum integrity verification file\n    cd ${backup_path}/${current_kernel}\n    sha256sum * >sha256sums\n    echo -e \"${INFO} [ sha256sums ] file has been generated.\"\n    echo -e \"${INFO} Current kernel backup path: [ ${backup_path}/${current_kernel} ].\"\n\n    sync && echo \"\"\n}\n\nbackup_fdtfile() {\n    # Check if the dtb backup directory exists, if not, create it\n    [[ -d \"${backup_path}/dtb\" ]] || mkdir -p ${backup_path}/dtb\n\n    # Backup the current DTB file\n    [[ -f \"/boot/dtb/${PLATFORM}/${FDTFILE}\" ]] && {\n        cp -f /boot/dtb/${PLATFORM}/${FDTFILE} ${backup_path}/dtb/\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to backup the DTB file.\"\n        echo -e \"${INFO} DTB file backed up to [ ${backup_path}/dtb/${FDTFILE} ].\"\n    }\n}\n\nrestore_fdtfile() {\n    # Restore the DTB file if the backup exists and the current one is missing\n    if [[ -f \"${backup_path}/dtb/${FDTFILE}\" && ! -f \"/boot/dtb/${PLATFORM}/${FDTFILE}\" ]]; then\n        cp -f ${backup_path}/dtb/${FDTFILE} /boot/dtb/${PLATFORM}/\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to restore the DTB file.\"\n        echo -e \"${INFO} DTB file has been restored from backup.\"\n    elif [[ -f \"/boot/dtb/${PLATFORM}/${FDTFILE}\" ]]; then\n        echo -e \"${INFO} The new kernel already includes the required DTB file, skipping restoration.\"\n    fi\n}\n\n# Install the kernel from .deb packages\nupdate_deb_kernel() {\n    cd ${kernel_path}\n    echo -e \"${STEPS} Installing kernel from .deb packages...\"\n\n    # Check if the kernel package is in deb format\n    [[ \"${download_type}\" == \"deb\" ]] || error_msg \"The kernel package is not in deb format.\"\n\n    # Backup the current DTB files\n    backup_fdtfile\n\n    # Identify the .deb files to install\n    local n=\"0\"\n    local install_files=\"\"\n    for prefix in \"${kernel_deb_list[@]}\"; do\n        local f=\"$(ls ${prefix}_*.deb 2>/dev/null | head -n 1)\"\n        if [[ -n \"${f}\" ]]; then\n            ((n++))\n            install_files=\"${install_files} ./${f}\"\n        else\n            error_msg \"Kernel .deb package not found: [ ${prefix}_*.deb ].\"\n        fi\n    done\n\n    # Install the .deb kernel packages\n    if [[ -n \"${install_files}\" ]]; then\n        # Install packages one by one\n        local i=\"1\"\n        install_failed=0\n        for pkg in ${install_files}; do\n            # Install the package and capture the output log for error analysis if installation fails\n            pkg_log=\"$(apt-get install -y --reinstall --allow-downgrades \"${pkg}\" 2>&1)\"\n\n            # Check the installation result\n            if [[ \"${?}\" -eq \"0\" ]]; then\n                echo -e \"${INFO} (${i}/${n}) Installation of [ ${pkg#./} ] succeeded.\"\n            else\n                echo -e \"${PROMPT} (${i}/${n}) Installation of [ ${pkg#./} ] failed. Error details:\"\n                # Display the last 5 lines of the log to provide context on the failure without overwhelming the user\n                echo \"${pkg_log}\" | tail -n 5\n                install_failed=1\n            fi\n            ((i++))\n        done\n\n        # If any package installation failed, attempt to fix broken dependencies\n        if [[ \"${install_failed}\" -ne \"0\" ]]; then\n            echo -e \"${INFO} Attempting to fix broken package dependencies...\"\n\n            # First, try to fix broken dependencies which might be causing the installation failure\n            apt-get install -f -y >/dev/null 2>&1\n            # Then, try to reinstall the kernel packages again to ensure they are properly installed\n            apt-get install -y --reinstall --allow-downgrades ${install_files} >/dev/null 2>&1\n            # Finally, verify the installation status of the kernel packages\n            if [[ \"${?}\" -eq \"0\" ]]; then\n                echo -e \"${INFO} Package dependencies fixed and verified successfully.\"\n            else\n                error_msg \"Failed to fix package dependencies. Packages may be corrupted.\"\n            fi\n        fi\n    else\n        error_msg \"No kernel .deb packages found for installation.\"\n    fi\n\n    # Update release file\n    sed -i \"s|^KERNEL_VERSION=.*|KERNEL_VERSION='${kernel_base}'|g\" ${ophub_release_file}\n    sed -i \"s|^DOWNLOAD_TYPE=.*|DOWNLOAD_TYPE='${download_type}'|g\" ${ophub_release_file}\n    sed -i \"s|^KERNEL_SIGNATURE=.*|KERNEL_SIGNATURE='${kernel_signature}'|g\" ${ophub_release_file}\n\n    # Restore the DTB files if necessary\n    restore_fdtfile\n\n    # Delete kernel temporary files\n    rm -rf ${kernel_save_path}/*\n\n    sync && echo \"\"\n}\n\n# Install the kernel from .tar.gz packages\nupdate_tar_kernel() {\n    cd ${kernel_path}\n    echo -e \"${STEPS} Installing kernel from .tar.gz packages...\"\n\n    # Check if the kernel package is in tar.gz format\n    [[ \"${download_type}\" == \"tar\" ]] || error_msg \"The kernel package is not in tar.gz format.\"\n\n    # Backup the current DTB files\n    backup_fdtfile\n\n    # Delete the current kernel files\n    rm -f /boot/config-* /boot/initrd.img-* /boot/System.map-* /boot/uInitrd-* /boot/vmlinuz-*\n    rm -rf /boot/uInitrd /boot/Image /boot/zImage /boot/dtb-*\n\n    # 01. For /boot five files\n    tar -mxzf boot-${kernel_name}.tar.gz -C /boot\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && (cd /boot && cp -f uInitrd-${kernel_name} uInitrd && cp -f vmlinuz-${kernel_name} zImage)\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && (cd /boot && ln -sf uInitrd-${kernel_name} uInitrd && ln -sf vmlinuz-${kernel_name} Image)\n    [[ \"${PLATFORM}\" == \"allwinner\" ]] && (cd /boot && cp -f uInitrd-${kernel_name} uInitrd && cp -f vmlinuz-${kernel_name} Image)\n    # wxy-oect: MODEL_ID numbers r304 and r306, require special handling of uInitrd\n    [[ \"${MODEL_ID}\" =~ ^(r304|r306)$ ]] && (cd /boot && ln -sf initrd.img-${kernel_name} uInitrd)\n    [[ \"$(ls /boot/*${kernel_name}* -l 2>/dev/null | grep \"^-\" | wc -l)\" -ge \"4\" ]] || error_msg \"The /boot files is missing.\"\n    echo -e \"${INFO} (1/4) Unpacking [ boot-${kernel_name}.tar.gz ] succeeded.\"\n\n    # 02. For /boot/dtb/${PLATFORM}/*\n    [[ -d \"/boot/dtb/${PLATFORM}\" ]] || mkdir -p /boot/dtb/${PLATFORM}\n    tar -mxzf dtb-${PLATFORM}-${kernel_name}.tar.gz -C /boot/dtb/${PLATFORM}\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && ln -sf dtb /boot/dtb-${kernel_name}\n    [[ \"$(ls /boot/dtb/${PLATFORM} -l 2>/dev/null | grep \"^-\" | wc -l)\" -ge \"2\" ]] || error_msg \"/boot/dtb/${PLATFORM} files is missing.\"\n    echo -e \"${INFO} (2/4) Unpacking [ dtb-${PLATFORM}-${kernel_name}.tar.gz ] succeeded.\"\n\n    # 03. For /usr/src/linux-headers-${kernel_name}, header file is optional\n    if [[ -f \"header-${kernel_name}.tar.gz\" ]]; then\n        header_path=\"linux-headers-${kernel_name}\"\n        rm -rf /usr/src/linux-headers-* && mkdir -p \"/usr/src/${header_path}\"\n        tar -mxzf header-${kernel_name}.tar.gz -C /usr/src/${header_path}\n        [[ -d \"/usr/src/${header_path}/include\" ]] || error_msg \"/usr/src/${header_path}/include folder is missing.\"\n        echo -e \"${INFO} (3/4) Unpacking [ header-${kernel_name}.tar.gz ] succeeded.\"\n    else\n        echo -e \"${PROMPT} (3/4) [ header-${kernel_name}.tar.gz ] file does not exist, skip unpacking.\"\n    fi\n\n    # 04. For /usr/lib/modules/${kernel_name}\n    rm -rf /usr/lib/modules/*\n    tar -mxzf modules-${kernel_name}.tar.gz -C /usr/lib/modules\n    [[ -n \"${header_path}\" ]] && (cd /usr/lib/modules/${kernel_name}/ && rm -f build source && ln -sf /usr/src/${header_path} build)\n    [[ -d \"/usr/lib/modules/${kernel_name}\" ]] || error_msg \"/usr/lib/modules/${kernel_name} kernel folder is missing.\"\n    echo -e \"${INFO} (4/4) Unpacking [ modules-${kernel_name}.tar.gz ] succeeded.\"\n\n    # Update release file\n    sed -i \"s|^KERNEL_VERSION=.*|KERNEL_VERSION='${kernel_base}'|g\" ${ophub_release_file}\n    sed -i \"s|^DOWNLOAD_TYPE=.*|DOWNLOAD_TYPE='${download_type}'|g\" ${ophub_release_file}\n    sed -i \"s|^KERNEL_SIGNATURE=.*|KERNEL_SIGNATURE='${kernel_signature}'|g\" ${ophub_release_file}\n\n    # Restore the DTB files if necessary\n    restore_fdtfile\n\n    # Delete kernel temporary files\n    rm -rf ${kernel_save_path}/*\n\n    sync && echo \"\"\n}\n\n# Update the U-Boot bootloader\nupdate_uboot() {\n    echo -e \"${STEPS} Updating U-Boot bootloader...\"\n\n    # With TEXT_OFFSET patch is [ 0108 ], without TEXT_OFFSET patch is [ 0000 ] and need to ues [ UBOOT_OVERLOAD ] file.\n    need_overload=\"yes\"\n    vmlinuz_file_name=\"$(find /boot -maxdepth 1 -type f -name \"vmlinuz-*\" 2>/dev/null | head -n 1)\"\n    [[ \"$(hexdump -n 15 -x \"${vmlinuz_file_name}\" 2>/dev/null | head -n 1 | awk '{print $7}')\" == \"0108\" ]] && need_overload=\"no\"\n\n    # Copy u-boot.ext and u-boot.emmc\n    if [[ \"${need_overload}\" == \"yes\" && -f \"/boot/${UBOOT_OVERLOAD}\" ]]; then\n        echo -e \"${INFO} Copy u-boot: [ /boot/${UBOOT_OVERLOAD} ]\"\n        run_on_emmc=\"$(lsblk -l -o NAME | grep -oE \"^${DISK_NAME}boot0\")\"\n        [[ ! -f \"/boot/u-boot.ext\" ]] && cp -f /boot/${UBOOT_OVERLOAD} /boot/u-boot.ext\n        [[ ! -f \"/boot/u-boot.emmc\" && -n \"${run_on_emmc}\" ]] && cp -f /boot/u-boot.ext /boot/u-boot.emmc\n        chmod +x /boot/u-boot.*\n    elif [[ \"${need_overload}\" == \"yes\" && ! -f \"/boot/${UBOOT_OVERLOAD}\" ]]; then\n        echo -e \"${PROMPT} The [ /boot/${UBOOT_OVERLOAD} ] file is required but missing.\"\n    else\n        echo -e \"${INFO} No need for overload file, skip copying.\"\n    fi\n\n    # Write mainline u-boot\n    if [[ \"${auto_mainline_uboot}\" == \"yes\" ]]; then\n        echo -e \"${INFO} Write Mainline u-boot: [ ${MAINLINE_UBOOT} ]\"\n        dd if=\"${MAINLINE_UBOOT}\" of=\"/dev/${DISK_NAME}\" conv=fsync bs=1 count=444 2>/dev/null\n        dd if=\"${MAINLINE_UBOOT}\" of=\"/dev/${DISK_NAME}\" conv=fsync bs=512 skip=1 seek=1 2>/dev/null\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to write bootloader using [ dd ].\"\n    else\n        echo -e \"${INFO} Mainline U-Boot not enabled, skipping.\"\n    fi\n\n    sync && echo \"\"\n}\n\n# Adjust initrd and ramdisk address for Amlogic devices\nupdate_initrd_addr() {\n    echo -e \"${STEPS} Checking initrd and ramdisk addresses...\"\n\n    # Check if the file exists for emmc_autoscript.cmd and emmc_autoscript\n    initrd_addr_file=\"/boot/emmc_autoscript.cmd\"\n    initrd_addr_mkimage_file=\"/boot/emmc_autoscript\"\n    if [[ -f \"${initrd_addr_file}\" ]]; then\n        # Get the initrd_addr value\n        initrd_addr_value=\"$(grep 'setenv initrd_addr' ${initrd_addr_file} | awk '{print $3}')\"\n        [[ -z \"${initrd_addr_value}\" ]] && error_msg \"Failed to query [ initrd_addr ] value from [ ${initrd_addr_file} ].\"\n\n        # Check if the initrd_addr value is 0x15000000\n        [[ \"${initrd_addr_value}\" != \"0x15000000\" ]] && {\n            echo -e \"${INFO} The [ initrd_addr ] value is [ ${initrd_addr_value} ], need to adjust.\"\n\n            # Adjust the initrd_addr value to 0x15000000\n            sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" ${initrd_addr_file}\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to adjust [ initrd_addr ] value in [ ${initrd_addr_file} ].\"\n            echo -e \"${INFO} Adjust [ initrd_addr ] value to [ 0x15000000 ] succeeded.\"\n\n            # Create [ emmc_autoscript ] file\n            sudo rm -f ${initrd_addr_mkimage_file}\n            sudo mkimage -C none -A arm -T script -d ${initrd_addr_file} ${initrd_addr_mkimage_file} >/dev/null\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to create [ ${initrd_addr_mkimage_file} ] file.\"\n            echo -e \"${INFO} Create [ ${initrd_addr_mkimage_file} ] file succeeded.\"\n        }\n    else\n        error_msg \"The [ ${initrd_addr_file} ] file is missing, stop updating.\"\n    fi\n\n    # Check if the file exists for s905_autoscript.cmd and s905_autoscript\n    ramdisk_addr_file=\"/boot/s905_autoscript.cmd\"\n    ramdisk_addr_mkimage_file=\"/boot/s905_autoscript\"\n    if [[ -f \"${ramdisk_addr_file}\" ]]; then\n        # Get the ramdisk_addr_r value\n        ramdisk_addr_value=\"$(grep 'setenv ramdisk_addr_r' ${ramdisk_addr_file} | awk '{print $3}')\"\n        [[ -z \"${ramdisk_addr_value}\" ]] && error_msg \"Failed to query [ initrd_addr ] value from [ ${ramdisk_addr_file} ].\"\n\n        # Check if the ramdisk_addr_r value is 0x15000000\n        [[ \"${ramdisk_addr_value}\" != \"0x15000000\" ]] && {\n            echo -e \"${INFO} The [ ramdisk_addr_r ] value is [ ${ramdisk_addr_value} ], need to adjust.\"\n\n            # Adjust the ramdisk_addr_r value to 0x15000000\n            sed -i \"s|^setenv ramdisk_addr_r.*|setenv ramdisk_addr_r 0x15000000|g\" ${ramdisk_addr_file}\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to adjust [ ramdisk_addr_r ] value in [ ${ramdisk_addr_file} ].\"\n            echo -e \"${INFO} Adjust [ ramdisk_addr_r ] value to [ 0x15000000 ] succeeded.\"\n\n            # Create [ s905_autoscript ] file\n            sudo rm -f ${ramdisk_addr_mkimage_file}\n            sudo mkimage -C none -A arm -T script -d ${ramdisk_addr_file} ${ramdisk_addr_mkimage_file} >/dev/null\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to create [ ${ramdisk_addr_mkimage_file} ] file.\"\n            echo -e \"${INFO} Create [ ${ramdisk_addr_mkimage_file} ] file succeeded.\"\n        }\n    fi\n\n    # Check if the file exists for boot.ini\n    boot_ini_file=\"/boot/boot.ini\"\n    if [[ -f \"${boot_ini_file}\" ]]; then\n        # Get the initrd_addr value\n        boot_ini_addr_value=\"$(grep 'setenv initrd_addr' ${boot_ini_file} | awk '{print $3}')\"\n        [[ -z \"${boot_ini_addr_value}\" ]] && error_msg \"Failed to query [ initrd_addr ] value from [ ${boot_ini_file} ].\"\n\n        # Check if the initrd_addr value is 0x15000000\n        [[ \"${boot_ini_addr_value}\" != \"0x15000000\" ]] && {\n            echo -e \"${INFO} The [ initrd_addr ] value is [ ${boot_ini_addr_value} ], need to adjust.\"\n            sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" ${boot_ini_file}\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to adjust [ initrd_addr ] value in [ ${boot_ini_file} ].\"\n            echo -e \"${INFO} Adjust [ initrd_addr ] value to [ 0x15000000 ] succeeded.\"\n        }\n    else\n        error_msg \"The [ ${boot_ini_file} ] file is missing, stop updating.\"\n    fi\n\n    # Check if the file exists for boot-emmc.ini\n    boot_emmc_ini_file=\"/boot/boot-emmc.ini\"\n    if [[ -f \"${boot_emmc_ini_file}\" ]]; then\n        # Get the initrd_addr value\n        boot_emmc_ini_addr_value=\"$(grep 'setenv initrd_addr' ${boot_emmc_ini_file} | awk '{print $3}')\"\n        [[ -z \"${boot_emmc_ini_addr_value}\" ]] && error_msg \"Failed to query [ initrd_addr ] value from [ ${boot_emmc_ini_file} ].\"\n\n        # Check if the initrd_addr value is 0x15000000\n        [[ \"${boot_emmc_ini_addr_value}\" != \"0x15000000\" ]] && {\n            echo -e \"${INFO} The [ initrd_addr ] value is [ ${boot_emmc_ini_addr_value} ], need to adjust.\"\n            sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" ${boot_emmc_ini_file}\n            [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to adjust [ initrd_addr ] value in [ ${boot_emmc_ini_file} ].\"\n            echo -e \"${INFO} Adjust [ initrd_addr ] value to [ 0x15000000 ] succeeded.\"\n        }\n    fi\n\n    echo -e \"${INFO} All address checks completed.\"\n    sync && echo \"\"\n}\n\n# Update the Armbian OS version string\nupdate_os_version() {\n    echo -e \"${STEPS} Updating Armbian OS version...\"\n\n    # Get the latest Armbian OS version\n    os_version=\"$(\n        curl -fsSL -m 15 \\\n            https://github.com/armbian/build/tags |\n            grep -oE 'Link\\\">v.*</a>' |\n            grep -oE '[2-9][0-9]\\.[0-9]{1,2}\\.[0-9]{1,2}' |\n            sort -urV | head -n 1\n    )\"\n\n    # Update the Armbian OS version\n    if [[ ${?} -eq 0 && -n \"${os_version}\" ]]; then\n        echo -e \"${INFO} The latest Armbian OS version: [ ${os_version} ]\"\n        sed -i \"s|^VERSION=.*|VERSION=\\\"${os_version}\\\"|g\" ${armbian_image_file} ${armbian_release_file}\n        sed -i \"s|^REVISION=.*|REVISION=\\\"${os_version}\\\"|g\" ${armbian_image_file} ${armbian_release_file}\n    else\n        echo -e \"${PROMPT} Failed to query the latest Armbian OS version. Skipping update.\"\n    fi\n\n    sync && echo \"\"\n}\n\n# Rescue and restore the kernel to a target disk\nsos_kernel() {\n    echo -e \"${STEPS} Starting kernel rescue...\"\n\n    # Check the current system running disk\n    check_disk\n    # Supports specifying disks, such as: [ armbian-update -s mmcblk1 ]\n    box_disk=\"${2}\"\n\n    if [[ -n \"${box_disk}\" ]]; then\n        # Format the disk names\n        box_disk=\"${box_disk//\\/dev\\//}\"\n\n        # Check if the disk exists\n        [[ -b \"/dev/${box_disk}\" ]] || error_msg \"The specified disk [ ${box_disk} ] does not exist.\"\n\n        # Check if the specified disk is the same as the current system disk\n        [[ \"${box_disk}\" == \"${DISK_NAME}\" ]] && error_msg \"The specified disk [ ${box_disk} ] is the same as the current system disk [ ${DISK_NAME} ].\"\n\n        echo -e \"${INFO} The device name of the specified disk: [ ${box_disk} ]\"\n    else\n        # Find emmc disk, first find emmc containing boot0 partition\n        box_disk=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?|nvme[0-9]?n[0-9]?|[hsv]d[a-z])' | grep -vE ^${DISK_NAME} | sort -u | head -n 1)\"\n\n        # Check if disk exists\n        [[ -z \"${box_disk}\" ]] && error_msg \"Unable to locate the target disk for rescue.\"\n\n        echo -e \"${INFO} The device name of the target rescue disk: [ ${box_disk} ]\"\n    fi\n\n    rescue_disk=\"/dev/${box_disk}\"\n    echo -e \"${INFO} Armbian is running on [ /dev/${DISK_NAME} ]. Target rescue disk: [ ${rescue_disk} ].\"\n\n    # Create a temporary mount directory\n    umount -f ${rescue_path}/bootfs 2>/dev/null\n    umount -f ${rescue_path}/rootfs 2>/dev/null\n    rm -rf ${rescue_path} 2>/dev/null\n    mkdir -p ${rescue_path}/{bootfs/,rootfs/} && sync\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to create temporary mount directory [ ${rescue_path} ].\"\n\n    # Mount eMMC to USB\n    [[ \"${box_disk}\" =~ ^([hsv]d[a-z]) ]] && PARTITION_NAME=\"\" || PARTITION_NAME=\"p\"\n    mount ${rescue_disk}${PARTITION_NAME}1 ${rescue_path}/bootfs\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"mount ${rescue_disk}${PARTITION_NAME}1 failed!\"\n    mount ${rescue_disk}${PARTITION_NAME}2 ${rescue_path}/rootfs\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"mount ${rescue_disk}${PARTITION_NAME}2 failed!\"\n\n    # Identify the current system kernel files\n    system_kernel=\"$(uname -r)\"\n\n    # 01. For /boot files\n    if [[ -d \"${rescue_path}/bootfs\" ]]; then\n        cd ${rescue_path}/bootfs\n        rm -rf config-* initrd.img-* System.map-* vmlinuz-* uInitrd* *Image dtb* u-boot.ext u-boot.emmc\n        [[ -f \"/boot/u-boot.ext\" ]] && {\n            cp -f /boot/u-boot.ext -t .\n            cp -f /boot/u-boot.ext u-boot.emmc\n            chmod +x u-boot.ext u-boot.emmc\n        }\n        cp -rf /boot/{*-${system_kernel},uInitrd,*Image,dtb} -t .\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"(1/3) [ boot ] kernel files rescue failed.\"\n        echo -e \"${INFO} (1/3) [ boot ] kernel files rescue succeeded.\"\n\n        # Adjust the initrd_addr value to 0x15000000\n        initrd_addr_file=\"emmc_autoscript.cmd\"\n        initrd_addr_mkimage_file=\"emmc_autoscript\"\n        [[ -f \"${initrd_addr_file}\" ]] && {\n            sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" ${initrd_addr_file}\n            sudo rm -f ${initrd_addr_mkimage_file}\n            sudo mkimage -C none -A arm -T script -d ${initrd_addr_file} ${initrd_addr_mkimage_file} >/dev/null\n        }\n\n        # Adjust the ramdisk_addr_r value to 0x15000000\n        ramdisk_addr_file=\"s905_autoscript.cmd\"\n        ramdisk_addr_mkimage_file=\"s905_autoscript\"\n        [[ -f \"${ramdisk_addr_file}\" ]] && {\n            sed -i \"s|^setenv ramdisk_addr_r.*|setenv ramdisk_addr_r 0x15000000|g\" ${ramdisk_addr_file}\n            sudo rm -f ${ramdisk_addr_mkimage_file}\n            sudo mkimage -C none -A arm -T script -d ${ramdisk_addr_file} ${ramdisk_addr_mkimage_file} >/dev/null\n        }\n\n        # Adjust the initrd_addr value to 0x15000000\n        [[ -f \"boot.ini\" ]] && sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" boot.ini\n        [[ -f \"boot-emmc.ini\" ]] && sed -i \"s|^setenv initrd_addr.*|setenv initrd_addr 0x15000000|g\" boot-emmc.ini\n    else\n        error_msg \"(1/3) The [ ${rescue_path}/bootfs ] folder does not exist, stop rescuing.\"\n    fi\n\n    # 02. For /usr/lib/modules/${system_kernel}\n    if [[ -d \"${rescue_path}/rootfs/usr/lib/modules\" ]]; then\n        cd ${rescue_path}/rootfs/usr/lib/modules\n        rm -rf *\n        cp -rf /usr/lib/modules/${system_kernel} -t .\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"(2/3) [ modules ] kernel files rescue failed.\"\n        echo -e \"${INFO} (2/3) [ modules ] kernel files rescue succeeded.\"\n    else\n        error_msg \"(2/3) The [ ${rescue_path}/rootfs/usr/lib/modules ] folder does not exist, stop rescuing.\"\n    fi\n\n    # 03. For /usr/src/linux-headers-${system_kernel}\n    if [[ -d \"/usr/src/linux-headers-${system_kernel}\" ]]; then\n        cd ${rescue_path}/rootfs/usr/src\n        rm -rf linux-headers-*\n        cp -rf /usr/src/linux-headers-${system_kernel} -t .\n        [[ \"${?}\" -ne \"0\" ]] && error_msg \"(3/3) [ headers ] kernel files rescue failed.\"\n        echo -e \"${INFO} (3/3) [ headers ] kernel files rescue succeeded.\"\n    else\n        echo -e \"${PROMPT} (3/3) [ /usr/src/linux-headers-${system_kernel} ] folder does not exist, skip rescue.\"\n    fi\n\n    # Unmount the emmc partition\n    cd ${rescue_path}\n    umount -f ${rescue_path}/bootfs 2>/dev/null\n    umount -f ${rescue_path}/rootfs 2>/dev/null\n\n    sync && echo \"\"\n}\n\n# Display help information\n# prettytable (single_border_style): https://github.com/jazzband/prettytable/blob/main/src/prettytable/prettytable.py#L1358\nhelp_info() {\n    clear\n    cat <<EOF\n  ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n  │  Example: armbian-update -k 5.15.50 -u stable                                                                                  │\n  ├───────────┬──────────────┬─────────────────────────────────────┬───────────────────────────────────────────────────────────────┤\n  │  Optional │ Default      │ Value                               │ Description                                                   │\n  ├───────────┼──────────────┼─────────────────────────────────────┼───────────────────────────────────────────────────────────────┤\n  │  -r       │ ophub/kernel │ <owner>/<repo>                      │ Set the repository for downloading kernels from github.com    │\n  │  -u       │ automate     │ stable/flippy/beta/rk3588/rk35xx/h6 │ Set the tags suffix of the kernel used                        │\n  │  -k       │ latest       │ kernel-version                      │ Set the kernel version                                        │\n  │  -c       │ None         │ domain-name                         │ Set the cdn domain name for accelerated access to github.com  │\n  │  -b       │ yes          │ yes/no                              │ Automatically backup the current system kernel                │\n  │  -d       │ tar          │ tar/deb                             │ Set the download type for the kernel                          │\n  │  -m       │ no           │ yes/no                              │ Use Mainline u-boot                                           │\n  │  -s       │ None         │ None/mmcblkX/nvmeXnX/sdX            │ [SOS] Restore the system kernel of eMMC/NVMe/sdX disk         │\n  └───────────┴──────────────┴─────────────────────────────────────┴───────────────────────────────────────────────────────────────┘\nEOF\n    exit 0\n}\n\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\necho -e \"${STEPS} Welcome to the Armbian Kernel Update Tool.\"\n\n# Execute relevant functions based on the options\nif [[ \"${@}\" =~ ^-s(\\s)* ]]; then\n    # Start rescuing the kernel\n    sos_kernel \"${@}\"\n\n    # Kernel restore successful\n    sync && sleep 3\n    echo -e \"${SUCCESS} Kernel rescue completed successfully. Please remove the disk and restart the Armbian system.\"\nelif [[ \"${@}\" == \"-b yes\" ]]; then\n    # Backup current kernel\n    init_var \"${@}\"\n    backup_kernel\n\n    # Kernel backup successful\n    sync && sleep 3\n    echo -e \"${SUCCESS} Kernel backup completed successfully.\"\nelif [[ \"${@}\" == \"-h\" ]]; then\n    # Display help information\n    help_info\nelse\n    # Start updating the kernel\n    check_depends\n    init_var \"${@}\"\n    search_kernel\n    [[ \"${local_found}\" == \"no\" ]] && download_kernel\n    check_kernel\n    [[ \"${KERNEL_BACKUP}\" != \"no\" ]] && backup_kernel\n    [[ \"${download_type}\" == \"deb\" ]] && update_deb_kernel || update_tar_kernel\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && {\n        update_uboot\n        update_initrd_addr\n    }\n    update_os_version\n\n    # Kernel update successful\n    sync && sleep 3\n    echo -e \"${SUCCESS} Kernel update completed successfully. Rebooting the system...\"\n    reboot\nfi\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/sbin/balethirq.pl",
    "content": "#!/usr/bin/perl\n# Copyright (C) 2021- https://github.com/unifreq\n\nuse strict;\nour %irq_map;\nour %cpu_map;\nour %min_cpu_map;\nour %uniq_eth_cpu_map;\nour $all_cpu_mask = 0;\n\n# RPS CPU 掩码是否排除 eth0 占用的核心 (0: 否, 1: 是)\nour $rpscpu_exclude_eth0_core=1;\n# RPS CPU 掩码是否排除 eth1 占用的核心 (0: 否, 1: 是)\nour $rpscpu_exclude_eth1_core=1;\n\nour $usb_as_eth1 = 0;\n\n&read_config();\n&read_irq_data();\n&update_smp_affinity();\n&enable_eth_rps_rfs();\n&board_special_config();\nexit(0);\n\n############################## sub functions #########################\n# 读取 /etc/balance_irq 或 /etc/config/balance_irq 中的配置文件\nsub read_config {\n    my $cpu_count = &get_cpu_count();\n    my $fh;\n    my $config_file;\n    if(-f \"/etc/balance_irq\") {\n        $config_file = \"/etc/balance_irq\";\n    } elsif(-f \"/etc/config/balance_irq\") {\n        $config_file = \"/etc/config/balance_irq\";\n    } else {\n\texit(0);\n    }\n\n    open $fh, \"<\", $config_file or die $!;\n    while(<$fh>) {\n        chomp;\n\t# 跳过注释行\n\tnext if(/^#/);\n\t# 跳过空行\n\tnext if(/^\\s*$/);\n        my($name, $value) = split;\n        my @cpus = split(',', $value);\n        # ARMv8 架构当前最多支持 8 核 CPU\n        my $min_cpu = 9;\n\n        foreach my $cpu (@cpus) {\n            if($cpu > $cpu_count) {\n                $cpu = $cpu_count;\n            } elsif($cpu < 1) {\n                $cpu = 1;\n            }\n            if($min_cpu > $cpu) {\n                $min_cpu = $cpu;\n            }\n        } # foreach\n\n        $cpu_map{$name} = \\@cpus;\n        $min_cpu_map{$name} = $min_cpu;\n    } # while\n    close $fh;\n}\n\n# 计算 CPU 核心数\nsub get_cpu_count {\n    my $fh;\n    open $fh, \"<\", \"/proc/cpuinfo\" or die $!;\n    my $count=0;\n    while(<$fh>) {\n        chomp;\n        my @ary = split;\n        if($ary[0] eq \"processor\") {\n            $count++;\n            $all_cpu_mask += 1<<($count-1);\n        }\n    }\n    close $fh;\n    return $count;\n}\n\nsub read_irq_data {\n    my $fh;\n    open $fh, \"<\", \"/proc/interrupts\" or die $!;\n    my %local_map;\n    while(<$fh>) {\n        chomp;\n        my @raw = split;\n        my $irq = $raw[0];\n        $irq =~ s/://;\n        my $name = $raw[-1];\n\tif(exists $local_map{$name}) {\n\t    # R68S 有 2 条 eth0 和 2 条 eth1，仅保留第 1 条\n\t    next;\n\t} else {\n\t    $local_map{$name} = 1;\n\t}\n\n        if(exists $cpu_map{$name}) {\n            $irq_map{$name} = $irq;\n            if($name =~ m/\\Axhci-hcd:usb[1-9]\\Z/) {\n\t\tif (not (exists $cpu_map{eth1} || exists $cpu_map{'eth1-0'}) ) {\n                    # 对于单网口设备，USB 外接网卡视为 eth1\n\t\t    $usb_as_eth1 = 1;\n                    $uniq_eth_cpu_map{eth1} =  1 << ($min_cpu_map{$name} - 1);\n\t        } else {\n                    $uniq_eth_cpu_map{$name} =  1 << ($min_cpu_map{$name} - 1);\n\t\t}\n            } else {\n                $uniq_eth_cpu_map{$name} = 1 << ($min_cpu_map{$name} - 1);\n            }\n        }\n    }\n    close $fh;\n}\n\nsub update_smp_affinity {\n    for my $key (sort keys %irq_map) {\n        my $fh;\n        my $irq = $irq_map{$key};\n        my $cpus_ref = $cpu_map{$key};\n        my $mask = 0;\n        foreach my $cpu (@$cpus_ref) {\n            $mask += 1 << ($cpu-1);\n        }\n        my $smp_affinity = sprintf(\"%0x\", $mask);\n        open $fh, \">\", \"/proc/irq/$irq/smp_affinity\" or die $!;\n        print \"IRQ name: $key, IRQ: $irq, affinity: $smp_affinity\\n\";\n        print $fh \"$smp_affinity\\n\";\n        close $fh;\n    }\n}\n\nsub tunning_eth_ring {\n    my ($eth, $target_rx_ring, $target_tx_ring) = @_;\n    my $buf = `/usr/sbin/ethtool -g ${eth} 2>/dev/null`;\n    if($buf) {\n        $buf =~ s/\\r|\\n/\\t/g;\n        if( $buf =~ m/.+?Pre-set maximums:\\s+RX:\\s+(\\d+|n\\/a).+?TX:\\s+(\\d+|n\\/a).+?Current hardware settings:\\s+RX:\\s+(\\d+|n\\/a).+?TX:\\s+(\\d+|n\\/a)/) {\n            my $max_rx_ring  = $1;\n            my $max_tx_ring  = $2;\n            my $cur_rx_ring  = $3;\n            my $cur_tx_ring  = $4;\n\n\t    $max_rx_ring = 0 if ($max_rx_ring eq 'n/a');\n\t    $max_tx_ring = 0 if ($max_tx_ring eq 'n/a');\n\t    $cur_rx_ring = 0 if ($cur_rx_ring eq 'n/a');\n\t    $cur_tx_ring = 0 if ($cur_tx_ring eq 'n/a');\n\n            if( ($max_rx_ring > 0) && ($target_rx_ring>0) && ($max_rx_ring > $target_rx_ring) && ($cur_rx_ring != $target_rx_ring) ) {\n                system \"/usr/sbin/ethtool -G ${eth} rx ${target_rx_ring} >/dev/null 2>&1\";\n                print \"Set the RX ring of ${eth} to ${target_rx_ring}\\n\";\n            }\n            if( ($max_tx_ring > 0) && ($target_tx_ring>0) && ($max_tx_ring > $target_tx_ring) && ($cur_tx_ring != $target_tx_ring) ) {\n                system \"/usr/sbin/ethtool -G ${eth} tx ${target_tx_ring} >/dev/null 2>&1\";\n                print \"Set the TX ring of ${eth} to ${target_tx_ring}\\n\";\n            }\n        }\n    }\n}\n\nsub enable_eth_rps_rfs {\n    my $rps_sock_flow_entries = 0;\n    for my $eth (\"eth0\",\"eth1\",\"eth2\",\"eth3\",\"eth4\",\"eth5\",\"eth6\") {\n\t# RPS 优化仅针对单队列网卡，\n\t# 如果存在 rx-1，则表示该网卡支持 RSS 多队列，无需优化\n        if((-d \"/sys/class/net/${eth}/queues/rx-0\") && (! -d \"/sys/class/net/${eth}/queues/rx-1\")) {\n            my $value = 32768;\n            $rps_sock_flow_entries += $value;\n            my $eth_cpu_mask_hex;\n\t    my $cpu_mask = $all_cpu_mask;\n            if($rpscpu_exclude_eth0_core == 1) {\n\t        $cpu_mask -= $uniq_eth_cpu_map{eth0};\n\t    }\n            if($rpscpu_exclude_eth1_core == 1) {\n\t        $cpu_mask -= $uniq_eth_cpu_map{eth1};\n\t    }\n\n            $eth_cpu_mask_hex = sprintf(\"%0x\", $cpu_mask);\n            print \"Set the RPS CPU mask of $eth to 0x$eth_cpu_mask_hex\\n\";\n            open my $fh, \">\", \"/sys/class/net/${eth}/queues/rx-0/rps_cpus\" or die;\n            print $fh $eth_cpu_mask_hex;\n            close $fh;\n\n            open $fh, \">\", \"/sys/class/net/${eth}/queues/rx-0/rps_flow_cnt\" or die;\n            print $fh $value;\n            close $fh;\n\n            open my $fh, \">\", \"/sys/class/net/${eth}/queues/tx-0/xps_cpus\" or die;\n            print $fh $eth_cpu_mask_hex;\n            close $fh;\n\n\t    if( ($eth eq \"eth1\") && ($usb_as_eth1 == 1) ) {\n                # USB 外接网卡 eth1 (RTL8153)，经实测最佳 rx_ring 范围为 100-500，默认值 100，超过 500 后多核 CPU 负载会失衡\n\t        &tunning_eth_ring($eth, 192, 0);\n            }\n        }\n    }\n    open my $fh, \">\", \"/proc/sys/net/core/rps_sock_flow_entries\" or die;\n    print $fh $rps_sock_flow_entries;\n    close $fh;\n}\n\nsub get_boardinfo() {\n    my $ret=\"unknown\";\n    if(-f \"/proc/device-tree/model\") {\n         open my $fh, \"<\", \"/proc/device-tree/model\" or warn $!;\n\t read $fh, $ret, 100;\n\t close $fh;\n\t $ret =~ s/\\0//;\n    }\n    return $ret;\n}\n\nsub board_special_config() {\n    my $board = &get_boardinfo();\n    if($board eq \"FastRhino R66S\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\");\n    } elsif($board eq \"FastRhino R68S\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\",\"eth3\");\n    } elsif($board eq \"Radxa E25\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\");\n    } elsif($board eq \"FriendlyElec NanoPi R5\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\");\n    } elsif($board eq \"Radxa ROCK 5B\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\");\n    } elsif($board eq \"Beelink IPC-R Board\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\",\"eth3\",\"eth4\",\"eth5\");\n    } elsif($board eq \"Hlink H28K\") {\n        &optimize_eth_parameters(\"eth0\", \"eth1\");\n    } elsif($board eq \"Hlink H66K\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\");\n    } elsif($board eq \"Hlink H68K\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\",\"eth3\");\n    } elsif($board eq \"Hlink H69K\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\",\"eth2\",\"eth3\");\n    } elsif($board eq \"Hlink H88K\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\");\n    } elsif($board eq \"Hlink H88K-V3\") {\n        &optimize_eth_parameters(\"eth0\",\"eth1\");\n    }\n}\n\nsub optimize_eth_parameters {\n    while (my $eth = shift) {\n        print \"Optimizing $eth ... \";\n        system \"ethtool -K $eth scatter-gather on >/dev/null 2>&1\";\n        system \"ethtool -K $eth tcp-segmentation-offload on >/dev/null 2>&1\";\n        system \"ethtool -K $eth rx-udp-gro-forwarding on >/dev/null 2>&1\";\n        print \"done\\n\";\n    }\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/alsa/cards/axg-sound-card.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n#\n# Configuration for Amlogic AXG audio\n#\n\naxg-sound-card.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 0\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\naxg-sound-card.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 0\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tinterface PCM\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n\n<confdir:pcm/iec958.conf>\n\naxg-sound-card.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 1\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tinterface PCM\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device 1\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/201-desktop-chinese-fonts.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Install Chinese language support for desktop systems\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: sudo ./201-desktop-chinese-fonts.sh\n#\n#============================== Functions list ==============================\n#\n# error_msg               : Output error message and exit\n# check_release           : Check and load system release information\n# set_chinese_env         : Configure Chinese locale environment\n# install_chinese_fonts   : Install Chinese language packages and fonts\n#\n#========================== Set default parameters ==========================\n#\n# Get custom firmware information\nophub_release_file=\"/etc/ophub-release\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#============================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check release file\ncheck_release() {\n    if [[ -f \"${ophub_release_file}\" ]]; then\n        source \"${ophub_release_file}\" 2>/dev/null\n        VERSION_CODEID=\"${VERSION_CODEID}\"\n        VERSION_CODENAME=\"${VERSION_CODENAME}\"\n    else\n        error_msg \"${ophub_release_file} file is missing!\"\n    fi\n\n    [[ -n \"${VERSION_CODEID}\" && -n \"${VERSION_CODENAME}\" ]] || error_msg \"${ophub_release_file} value is missing!\"\n}\n\n# Set Chinese environment\nset_chinese_env() {\n    # Add Chinese language setting\n    echo -e \"${STEPS} Adding Chinese environment variable settings...\"\n    local etc_env=\"/etc/environment\"\n    sed -i '/^LANG=/d' ${etc_env}\n    sed -i '/^LANGUAGE=/d' ${etc_env}\n    sed -i '/^export LANG/d' ${etc_env}\n    echo 'LANG=\"zh_CN.UTF-8\"' >>${etc_env}\n    echo 'LANGUAGE=\"zh_CN:zh:en_US:en\"' >>${etc_env}\n    echo 'export LANG' >>${etc_env}\n    echo 'export LANGUAGE' >>${etc_env}\n    echo -e \"${INFO} Contents of [ ${etc_env} ]: \\n$(cat ${etc_env})\"\n\n    local locale_conf=\"/etc/default/locale\"\n    [[ -f \"${locale_conf}\" ]] || touch ${locale_conf} 2>/dev/null\n    sed -i '/^LANG=/d' ${locale_conf}\n    sed -i '/^LANGUAGE=/d' ${locale_conf}\n    sed -i '/^LC_MESSAGES=/d' ${locale_conf}\n    sed -i '/^LC_ALL=/d' ${locale_conf}\n    sed -i '/^export LANG/d' ${locale_conf}\n    echo 'LANG=zh_CN.UTF-8' >>${locale_conf}\n    echo 'LANGUAGE=zh_CN:zh:en_US:en' >>${locale_conf}\n    echo 'LC_MESSAGES=zh_CN.UTF-8' >>${locale_conf}\n    echo 'LC_ALL=zh_CN.UTF-8' >>${locale_conf}\n    echo -e \"${INFO} Contents of [ ${locale_conf} ]: \\n$(cat ${locale_conf})\"\n\n    # Add locale support settings\n    echo -e \"${STEPS} Adding Chinese locale settings...\"\n    local local_set=\"/var/lib/locales/supported.d/local\"\n    [[ -f \"${local_set}\" ]] || {\n        mkdir -p \"/var/lib/locales/supported.d\"\n        touch ${local_set}\n    }\n    echo 'en_US.UTF-8 UTF-8' >${local_set}\n    echo 'zh_CN.UTF-8 UTF-8' >>${local_set}\n    echo 'zh_CN.GBK GBK' >>${local_set}\n    echo 'zh_CN GB2312' >>${local_set}\n    echo -e \"${INFO} Contents of [ ${local_set} ]: \\n$(cat ${local_set})\"\n\n    # Load settings\n    echo -e \"${STEPS} Generating Chinese locale...\"\n    sudo locale-gen\n}\n\n# Install Chinese language packages\ninstall_chinese_fonts() {\n    # Get related variables\n    check_release\n\n    # Generic packages for Ubuntu system\n    local ubuntu_packages=(\n        \"language-pack-zh-hans\" \"language-pack-gnome-zh-hans\"\n        \"thunderbird-locale-zh-hans\" \"thunderbird-locale-zh-cn\"\n        \"fonts-noto-cjk\" \"fonts-noto-cjk-extra\" \"fonts-droid-fallback\" \"fonts-wqy-zenhei\"\n        \"fonts-wqy-microhei\" \"fonts-arphic-ukai\" \"fonts-arphic-uming\"\n        \"ibus-table-wubi\" \"ibus-libpinyin\"\n    )\n\n    # Packages of resolute/noble system\n    local resolute_packages=(\n        \"kde-config-fcitx5\"\n    )\n\n    # Packages of focal system\n    local focal_packages=(\n        \"kde-config-fcitx\"\n    )\n\n    # Packages of bookworm/bullseye/trixie system\n    local debian_packages=(\n        \"fonts-noto-cjk\" \"fonts-noto-cjk-extra\" \"fonts-droid-fallback\" \"fonts-wqy-zenhei\"\n        \"fonts-wqy-microhei\" \"fonts-arphic-ukai\" \"fonts-arphic-uming\"\n        \"fonts-arphic-bsmi00lp\" \"fonts-arphic-gbsn00lp\" \"fonts-arphic-gkai00mp\"\n        \"fcitx\" \"fcitx-table*\" \"fcitx-frontend-gtk2\" \"fcitx-frontend-gtk3\" \"fcitx-frontend-qt*\"\n        \"fcitx-table-wbpy\" \"fcitx-sunpinyin\" \"fcitx-googlepinyin\" \"fcitx-pinyin\"\n        \"kde-config-fcitx\" \"ibus-table-wubi\" \"ibus-libpinyin\"\n    )\n\n    # Install the Chinese language packages for the desktop system\n    sudo apt-get update\n    case \"${VERSION_CODENAME}\" in\n    resolute | jammy | noble | oracular)\n        echo -e \"${STEPS} Installing Chinese language pack for [ ${VERSION_CODENAME} ]...\"\n        sudo apt-get install -y ${ubuntu_packages[*]}\n        sudo apt-get install -y ${resolute_packages[*]}\n        set_chinese_env\n        ;;\n    focal)\n        echo -e \"${STEPS} Installing Chinese language pack for [ ${VERSION_CODENAME} ]...\"\n        sudo apt-get install -y ${ubuntu_packages[*]}\n        sudo apt-get install -y ${focal_packages[*]}\n        set_chinese_env\n        ;;\n    bullseye | bookworm | trixie)\n        echo -e \"${STEPS} Installing Chinese language pack for [ ${VERSION_CODENAME} ]...\"\n        sudo apt-get install -y ${debian_packages[*]}\n        set_chinese_env\n        ;;\n    *) error_msg \"Unsupported system: [ ${VERSION_CODENAME} ]\" ;;\n    esac\n\n    echo -e \"${SUCCESS} Chinese desktop support has been installed successfully.\"\n}\n\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo ${0} ]\"\n\n# Prompt for installation\necho -ne \"${OPTIONS} Install Chinese desktop support? (y/n): \"\nread optid\noptid=\"${optid/Y/y}\" && optid=\"${optid/N/n}\"\n[[ \"${optid:0:1}\" == \"y\" ]] && install_chinese_fonts || echo -e \"${INFO} Skipped Chinese desktop settings.\"\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/301-frps.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Manage frps (FRP server) software installation, update, and removal\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: ${0} <install/update/remove>\n# Example: ${0} install\n#          ${0} update\n#          ${0} remove\n#\n#============================== Functions list ==============================\n#\n# error_msg           : Output error message and exit\n# software_download   : Download the latest frps release\n# software_install    : Install and configure frps\n# software_update     : Update frps to the latest version\n# software_remove     : Remove frps and clean up files\n#\n#========================== Set default parameters ==========================\n#\n# Define the software\nsoftware_name=\"frps\"\nsoftware_core=\"/usr/bin/frps\"\nsoftware_conf=\"/etc/frp/frps.ini\"\nsoftware_service=\"/etc/systemd/system/frps.service\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nPROMPT=\"[\\033[93m PROMPT \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#============================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\nsoftware_download() {\n    echo -e \"${STEPS} Downloading [ ${software_name} ] software...\"\n\n    # Software version query api\n    software_api=\"https://api.github.com/repos/fatedier/frp/releases\"\n    # Check the latest version, E.g: v0.43.0\n    software_latest_version=\"$(curl -s \"${software_api}\" | grep \"tag_name\" | awk -F '\"' '{print $4}' | tr \" \" \"\\n\" | sort -rV | head -n 1)\"\n    # Query download address, E.g: https://github.com/fatedier/frp/releases/download/v0.43.0/frp_0.43.0_linux_arm64.tar.gz\n    software_url=\"$(curl -s \"${software_api}\" | grep -oE \"https:.*${software_latest_version}.*linux_arm64.*.tar.gz\")\"\n    [[ -n \"${software_url}\" ]] || error_msg \"Failed to obtain the download address!\"\n    echo -e \"${INFO} Downloading from: [ ${software_url} ]\"\n\n    # Download software, E.g: /tmp/tmp.xxx/frp_0.43.0_linux_arm64.tar.gz\n    tmp_download=\"$(mktemp -d)\"\n    software_filename=\"${software_url##*/}\"\n    curl -fsSL \"${software_url}\" -o \"${tmp_download}/${software_filename}\"\n    [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}/${software_filename}\" ]] || error_msg \"Failed to download the software!\"\n    echo -e \"${INFO} Download completed: $(ls ${tmp_download} -l)\"\n\n    # Unzip the downloaded file\n    tar -xf ${tmp_download}/${software_filename} -C ${tmp_download} && sync\n    # Software directory, E.g: /tmp/tmp.xxx/frp_0.43.0_linux_arm64\n    software_dir=\"${tmp_download}/${software_filename/.tar.gz/}\"\n    echo -e \"${INFO} Software directory: [ ${software_dir} ]\"\n}\n\nsoftware_install() {\n    echo -e \"${STEPS} Installing [ ${software_name} ] software...\"\n    software_download\n\n    # Generate random token\n    random_token=\"$(cat /proc/sys/kernel/random/uuid)\"\n    # Generate random account\n    random_account=\"$(cat /proc/sys/kernel/random/uuid)\"\n    random_user=\"${random_account:0:18}\"\n    random_pwd=\"${random_account:19}\"\n\n    # Add frps.ini\n    echo -e \"${INFO} Add frps.ini to: [ ${software_conf} ]\"\n    [[ -d \"/etc/frp\" ]] || sudo mkdir -p \"/etc/frp\"\n    # Copy the complete setup example\n    sudo cp -f ${software_dir}/frps_full.ini /etc/frp\n    # Generate common custom settings file\n    sudo cat >${software_conf} <<EOF\n[common]\nbind_addr = 0.0.0.0\nbind_port = 7000\nbind_udp_port = 7001\nkcp_bind_port = 7000\nvhost_http_port = 80\nvhost_https_port = 443\ndashboard_addr = 0.0.0.0\ndashboard_port = 7500\ndashboard_user = ${random_user}\ndashboard_pwd = ${random_pwd}\nlog_file = /tmp/frps.log\nlog_level = info\nlog_max_days = 1\ntoken = ${random_token}\nsubdomain_host = frps.com\nmax_pool_count = 5\ntcp_mux = true\n\nEOF\n\n    # Copy frps\n    echo -e \"${INFO} Copy frps to: [ ${software_core} ]\"\n    sudo cp -f ${software_dir}/frps /usr/bin && chmod +x ${software_core}\n\n    # Add frps.service\n    echo -e \"${INFO} Add frps.service to: [ ${software_service} ]\"\n    sudo cat >${software_service} <<EOF\n[Unit]\nDescription=frps\nAfter=network.target\n\n[Service]\nType=simple\nUser=nobody\nRestart=on-failure\nRestartSec=5s\nExecStart=${software_core} -c ${software_conf}\nLimitNOFILE=1048576\n\n[Install]\nWantedBy=multi-user.target\n\nEOF\n\n    sync\n\n    # Set up to start automatically\n    echo -e \"${INFO} Starting service...\"\n    sudo systemctl daemon-reload\n    sudo systemctl enable --now frps\n    sudo systemctl restart frps\n\n    echo -e \"${PROMPT} Instructions for use:\"\n    cat <<EOF\n============================================[ Instructions for use of frps ]============================================\nOfficial website: https://github.com/fatedier/frp\nDocumentation: https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/armbian_software.md\n\nCore file path: [ ${software_core} ]\nConfig file path: [ ${software_conf} ]\nService file path: [ ${software_service} ]\n\nOperate:\n        1. Edit config file: [ vi ${software_conf} ]\n        2. restart the service: [ sudo systemctl restart frps ]\n        3. Check running status: [ sudo systemctl status frps ]\n\nService management commands:\n        sudo systemctl start frps\n        sudo systemctl stop frps\n        sudo systemctl restart frps\n        sudo systemctl enable frps\n        sudo systemctl status frps\n========================================================================================================================\n\nEOF\n\n    echo -e \"${SUCCESS} Software installed successfully.\"\n    exit 0\n}\n\nsoftware_update() {\n    echo -e \"${STEPS} Updating [ ${software_name} ] software...\"\n    software_download\n\n    # Stop frps.service\n    sudo systemctl stop frps\n    sync && sleep 3\n\n    # Copy frps\n    echo -e \"${INFO} Copy frps to: [ ${software_core} ]\"\n    sudo cp -f ${software_dir}/frps /usr/bin && chmod +x ${software_core}\n    sync\n\n    # Set up to start automatically\n    sudo systemctl daemon-reload\n    sudo systemctl enable --now frps\n    sudo systemctl restart frps\n\n    echo -e \"${SUCCESS} Software updated successfully.\"\n    exit 0\n}\n\nsoftware_remove() {\n    echo -e \"${STEPS} Removing [ ${software_name} ] software...\"\n\n    # Stop frps.service\n    sudo systemctl stop frps\n    sync && sleep 3\n\n    # Remove frps and frps.service\n    sudo rm -rf /etc/frp\n    sudo rm -f ${software_core}\n    sudo rm -f ${software_service} 2>/dev/null\n    sudo systemctl daemon-reload\n\n    echo -e \"${SUCCESS} Software removed successfully.\"\n    exit 0\n}\n\nsoftware_help() {\n    echo -e \"${STEPS} Script usage instructions:\"\n\n    cat <<EOF\n=====================================================================\n Function         : [ Command ]\n---------------------------------------------------------------------\n Install Software : [ ${0} install ]\n Update  Software : [ ${0} update  ]\n Remove  Software : [ ${0} remove  ]\n=====================================================================\nEOF\n    exit 0\n}\n\n# Check script permission\necho -e \"${STEPS} Welcome to the [ ${software_name} ] management script: [ ${0} ]\"\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo ${0} ]\"\n#\n# Execute script assist functions\ncase \"${1}\" in\n    install) software_install ;;\n    update)  software_update ;;\n    remove)  software_remove ;;\n    *)       software_help ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/302-frpc.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Manage frpc (FRP client) software installation, update, and removal\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: ${0} <install/update/remove>\n# Example: ${0} install\n#          ${0} update\n#          ${0} remove\n#\n#============================== Functions list ==============================\n#\n# error_msg           : Output error message and exit\n# software_download   : Download the latest frpc release\n# software_install    : Install and configure frpc\n# software_update     : Update frpc to the latest version\n# software_remove     : Remove frpc and clean up files\n#\n#========================== Set default parameters ==========================\n#\n# Define the software\nsoftware_name=\"frps\"\nsoftware_core=\"/usr/bin/frpc\"\nsoftware_conf=\"/etc/frp/frpc.ini\"\nsoftware_service=\"/etc/systemd/system/frpc.service\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nPROMPT=\"[\\033[93m PROMPT \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#============================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\nsoftware_download() {\n    echo -e \"${STEPS} Downloading [ ${software_name} ] software...\"\n\n    # Software version query api\n    software_api=\"https://api.github.com/repos/fatedier/frp/releases\"\n    # Check the latest version, E.g: v0.43.0\n    software_latest_version=\"$(curl -s \"${software_api}\" | grep \"tag_name\" | awk -F '\"' '{print $4}' | tr \" \" \"\\n\" | sort -rV | head -n 1)\"\n    # Query download address, E.g: https://github.com/fatedier/frp/releases/download/v0.43.0/frp_0.43.0_linux_arm64.tar.gz\n    software_url=\"$(curl -s \"${software_api}\" | grep -oE \"https:.*${software_latest_version}.*linux_arm64.*.tar.gz\")\"\n    [[ -n \"${software_url}\" ]] || error_msg \"Failed to obtain the download address!\"\n    echo -e \"${INFO} Downloading from: [ ${software_url} ]\"\n\n    # Download software, E.g: /tmp/tmp.xxx/frp_0.43.0_linux_arm64.tar.gz\n    tmp_download=\"$(mktemp -d)\"\n    software_filename=\"${software_url##*/}\"\n    curl -fsSL \"${software_url}\" -o \"${tmp_download}/${software_filename}\"\n    [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}/${software_filename}\" ]] || error_msg \"Failed to download the software!\"\n    echo -e \"${INFO} Download completed: $(ls ${tmp_download} -l)\"\n\n    # Unzip the downloaded file\n    tar -xf ${tmp_download}/${software_filename} -C ${tmp_download} && sync\n    # Software directory, E.g: /tmp/tmp.xxx/frp_0.43.0_linux_arm64\n    software_dir=\"${tmp_download}/${software_filename/.tar.gz/}\"\n    echo -e \"${INFO} Software directory: [ ${software_dir} ]\"\n}\n\nsoftware_install() {\n    echo -e \"${STEPS} Installing [ ${software_name} ] software...\"\n    software_download\n\n    # Add frpc.ini\n    echo -e \"${INFO} Add frpc.ini to: [ ${software_conf} ]\"\n    [[ -d \"/etc/frp\" ]] || sudo mkdir -p \"/etc/frp\"\n    # Copy the complete setup example\n    sudo cp -f ${software_dir}/frpc_full.ini /etc/frp\n    # Generate common custom settings file\n    sudo cat >${software_conf} <<EOF\n[common]\nserver_addr = 127.0.0.1\nserver_port = 7000\ntoken = xxx\n\n[ssh]\ntype = tcp\nlocal_ip = 127.0.0.1\nlocal_port = 22\nremote_port = 6000\n\nEOF\n\n    # Copy frpc\n    echo -e \"${INFO} Copy frpc to: [ ${software_core} ]\"\n    sudo cp -f ${software_dir}/frpc /usr/bin && chmod +x ${software_core}\n\n    # Add frpc.service\n    echo -e \"${INFO} Add frpc.service to: [ ${software_service} ]\"\n    sudo cat >${software_service} <<EOF\n[Unit]\nDescription=frpc\nAfter=network.target\n\n[Service]\nType=simple\nUser=nobody\nRestart=on-failure\nRestartSec=5s\nExecStart=${software_core} -c ${software_conf}\nExecReload=${software_core} reload -c ${software_conf}\nLimitNOFILE=1048576\n\n[Install]\nWantedBy=multi-user.target\n\nEOF\n\n    sync\n\n    # Set up to start automatically\n    echo -e \"${INFO} Starting service...\"\n    sudo systemctl daemon-reload\n    sudo systemctl enable --now frpc\n    sudo systemctl restart frpc\n\n    echo -e \"${PROMPT} Instructions for use:\"\n    cat <<EOF\n============================================[ Instructions for use of frpc ]============================================\nOfficial website: https://github.com/fatedier/frp\nDocumentation: https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/armbian_software.md\n\nCore file path: [ ${software_core} ]\nConfig file path: [ ${software_conf} ]\nService file path: [ ${software_service} ]\n\nOperate:\n        1. Edit config file: [ vi ${software_conf} ]\n        2. restart the service: [ sudo systemctl restart frpc ]\n        3. Check running status: [ sudo systemctl status frpc ]\n\nService management commands:\n        sudo systemctl start frpc\n        sudo systemctl stop frpc\n        sudo systemctl restart frpc\n        sudo systemctl enable frpc\n        sudo systemctl status frpc\n========================================================================================================================\n\nEOF\n\n    echo -e \"${SUCCESS} Software installed successfully.\"\n    exit 0\n}\n\nsoftware_update() {\n    echo -e \"${STEPS} Updating [ ${software_name} ] software...\"\n    software_download\n\n    # Stop frpc.service\n    sudo systemctl stop frpc\n    sync && sleep 3\n\n    # Copy frpc\n    echo -e \"${INFO} Copy frpc to: [ ${software_core} ]\"\n    sudo cp -f ${software_dir}/frpc /usr/bin && chmod +x ${software_core}\n    sync\n\n    # Set up to start automatically\n    sudo systemctl daemon-reload\n    sudo systemctl enable --now frpc\n    sudo systemctl restart frpc\n\n    echo -e \"${SUCCESS} Software updated successfully.\"\n    exit 0\n}\n\nsoftware_remove() {\n    echo -e \"${STEPS} Removing [ ${software_name} ] software...\"\n\n    # Stop frpc.service\n    sudo systemctl stop frpc\n    sync && sleep 3\n\n    # Remove frpc and frpc.service\n    sudo rm -rf /etc/frp\n    sudo rm -f ${software_core}\n    sudo rm -f ${software_service} 2>/dev/null\n    sudo systemctl daemon-reload\n\n    echo -e \"${SUCCESS} Software removed successfully.\"\n    exit 0\n}\n\nsoftware_help() {\n    echo -e \"${STEPS} Script usage instructions:\"\n\n    cat <<EOF\n=====================================================================\n Function         : [ Command ]\n---------------------------------------------------------------------\n Install Software : [ ${0} install ]\n Update  Software : [ ${0} update  ]\n Remove  Software : [ ${0} remove  ]\n=====================================================================\nEOF\n    exit 0\n}\n\n# Check script permission\necho -e \"${STEPS} Welcome to the [ ${software_name} ] management script: [ ${0} ]\"\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo ${0} ]\"\n#\n# Execute script assist functions\ncase \"${1}\" in\n    install) software_install ;;\n    update)  software_update ;;\n    remove)  software_remove ;;\n    *)       software_help ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/command-desktop.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Manage desktop software installation, update, and removal\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: command-desktop.sh -s <software_id> -m <install/update/remove>\n# Example: command-desktop.sh -s 201 -m install\n#          command-desktop.sh -s 201 -m update\n#          command-desktop.sh -s 201 -m remove\n#\n#============================== Software list ===============================\n#\n# software_201  : For desktop\n# software_202  : For firefox\n# software_203  : For vlc\n# software_204  : For mpv\n# software_205  : For gimp\n# software_206  : For krita\n# software_207  : For libreoffice\n# software_208  : For shotcut\n# software_209  : For kdenlive\n# software_210  : For thunderbird\n# software_211  : For evolution\n# software_212  : For gwenview\n# software_213  : For eog\n# software_214  : For visual.studio.code\n# software_215  : For gedit\n# software_216  : For flameshot\n#\n#============================================================================\n\n# Execute generic functions\nsoftware_path=\"/usr/share/ophub/armbian-software\"\nsoftware_command=\"${software_path}/software-command.sh\"\nsource \"${software_command}\"\n\n# For desktop\nsoftware_201() {\n    case \"${software_manage}\" in\n    install)\n        # Add login desktop system user\n        echo -ne \"${OPTIONS} Please input the desktop login user (non-root): \"\n        read get_desktop_user\n        if [[ -n \"${get_desktop_user}\" ]]; then\n            sudo adduser ${get_desktop_user}\n            sudo usermod -aG sudo ${get_desktop_user}\n            echo -e \"${INFO} Desktop user: [ ${get_desktop_user} ]\"\n        else\n            echo -e \"${NOTE} Skipped adding a desktop login user.\"\n        fi\n\n        # Remote desktop option\n        echo -ne \"${OPTIONS} Enable remote desktop? (y/n): \"\n        read get_rd\n        if [[ -n \"${get_rd}\" ]]; then\n            get_rd=\"${get_rd,,,}\"\n            [[ \"${get_rd:0:1}\" == \"y\" ]] && get_rd=\"yes\" || get_rd=\"no\"\n        else\n            get_rd=\"no\"\n        fi\n        echo -e \"${INFO} Remote desktop enabled: [ ${get_rd} ]\"\n\n        # Define display manager\n        local display_manager=\"lightdm\"\n        # Define input drivers and display managers\n        local input_drivers=\"xserver-xorg-input-libinput xserver-xorg-input-evdev\"\n\n        if [[ \"${VERSION_CODEID}\" == \"ubuntu\" ]]; then\n            # Install ubuntu-desktop on Ubuntu (resolute/noble)\n            software_install \"ubuntu-desktop ${display_manager} ${input_drivers}\"\n        elif [[ \"${VERSION_CODEID}\" == \"debian\" ]]; then\n            # Install gnome on Debian (bookworm/trixie)\n            software_install \"gnome ${display_manager} ${input_drivers}\"\n        else\n            error_msg \"VERSION_CODEID not supported: [ ${VERSION_CODEID} ]\"\n        fi\n\n        # Install xrdp and configure\n        [[ \"${get_rd}\" == \"yes\" ]] && {\n            # Install xrdp\n            software_install \"xrdp xorgxrdp\"\n\n            # Configure xrdp\n            sudo cat <<EOF >>/etc/xrdp/xrdp.ini\n\n[xrdp2]\nname=Custom_Remote_Desktop\nlib=libvnc.so\nusername=${get_desktop_user}\npassword=ask\nip=${my_address}\nport=-1\ncode=20\n\nEOF\n\n            # Restart xrdp\n            sudo mkdir -p /var/run/xrdp\n            sudo chmod 775 /var/run/xrdp\n            sudo systemctl enable xrdp\n            sudo systemctl restart xrdp\n        }\n\n        # Install Chinese desktop support\n        sudo bash ${software_path}/201-desktop-chinese-fonts.sh\n\n        sync && sleep 3\n        echo -e \"${SUCCESS} Desktop installed successfully. Restarting...\"\n        reboot\n        ;;\n    update) software_update ;;\n    remove)\n        if [[ \"${VERSION_CODEID}\" == \"ubuntu\" ]]; then\n            # Remove ubuntu-desktop(gdm3) on Ubuntu (resolute/noble)\n            software_remove \"ubuntu-desktop gdm3\"\n        elif [[ \"${VERSION_CODEID}\" == \"debian\" ]]; then\n            # Remove gnome(gdm3) on Debian (bookworm/trixie)\n            software_remove \"gnome gdm3\"\n        else\n            error_msg \"VERSION_CODEID not supported: [ ${VERSION_CODEID} ]\"\n        fi\n\n        sync && sleep 3\n        echo -e \"${SUCCESS} Desktop removed successfully. Restarting...\"\n        reboot\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For firefox\nsoftware_202() {\n    case \"${software_manage}\" in\n    install)\n        case \"${VERSION_CODENAME}\" in\n        resolute | noble | jammy)\n            sudo add-apt-repository ppa:mozillateam/ppa -y\n            sudo apt-get update\n            software_install \"firefox-esr\"\n            ;;\n        focal)\n            software_install \"firefox\"\n            ;;\n        bullseye | bookworm | trixie)\n            software_install \"firefox-esr\"\n            ;;\n        *) error_msg \"Unsupported system: [ ${VERSION_CODENAME} ]\" ;;\n        esac\n        ;;\n    update) software_update ;;\n    remove)\n        case \"${VERSION_CODENAME}\" in\n        resolute | noble | jammy)\n            software_remove \"firefox-esr\"\n            sudo add-apt-repository --remove ppa:mozillateam/ppa -y\n            ;;\n        focal)\n            software_remove \"firefox\"\n            ;;\n        bullseye | bookworm | trixie)\n            software_remove \"firefox-esr\"\n            ;;\n        *) error_msg \"Unsupported system: [ ${VERSION_CODENAME} ]\" ;;\n        esac\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For vlc\nsoftware_203() {\n    case \"${software_manage}\" in\n    install) software_install \"vlc\" ;;\n    update) software_update ;;\n    remove) software_remove \"vlc\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For mpv\nsoftware_204() {\n    case \"${software_manage}\" in\n    install) software_install \"mpv\" ;;\n    update) software_update ;;\n    remove) software_remove \"mpv\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For gimp\nsoftware_205() {\n    case \"${software_manage}\" in\n    install) software_install \"gimp\" ;;\n    update) software_update ;;\n    remove) software_remove \"gimp\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For krita\nsoftware_206() {\n    case \"${software_manage}\" in\n    install) software_install \"krita\" ;;\n    update) software_update ;;\n    remove) software_remove \"krita\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For libreoffice\nsoftware_207() {\n    case \"${software_manage}\" in\n    install) software_install \"libreoffice libreoffice-l10n-zh-cn libreoffice-help-zh-cn\" ;;\n    update) software_update ;;\n    remove) software_remove \"libreoffice libreoffice-l10n-zh-cn libreoffice-help-zh-cn\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For shotcut\nsoftware_208() {\n    case \"${software_manage}\" in\n    install) software_install \"shotcut\" ;;\n    update) software_update ;;\n    remove) software_remove \"shotcut\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For kdenlive\nsoftware_209() {\n    case \"${software_manage}\" in\n    install) software_install \"kdenlive\" ;;\n    update) software_update ;;\n    remove) software_remove \"kdenlive\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For thunderbird\nsoftware_210() {\n    case \"${software_manage}\" in\n    install) software_install \"thunderbird\" ;;\n    update) software_update ;;\n    remove) software_remove \"thunderbird\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For evolution\nsoftware_211() {\n    case \"${software_manage}\" in\n    install) software_install \"evolution\" ;;\n    update) software_update ;;\n    remove) software_remove \"evolution\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For gwenview\nsoftware_212() {\n    case \"${software_manage}\" in\n    install) software_install \"gwenview\" ;;\n    update) software_update ;;\n    remove) software_remove \"gwenview\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For eog\nsoftware_213() {\n    case \"${software_manage}\" in\n    install) software_install \"eog\" ;;\n    update) software_update ;;\n    remove) software_remove \"eog\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For visual.studio.code\nsoftware_214() {\n    case \"${software_manage}\" in\n    install)\n        tmp_download=\"$(mktemp -d)/code_arm64.deb\"\n        curl -L https://aka.ms/linux-arm64-deb >${tmp_download}\n        [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}\" ]] || error_msg \"Failed to download the software!\"\n        sudo dpkg -i ${tmp_download}\n        ;;\n    update) software_update ;;\n    remove) software_remove \"code\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For gedit\nsoftware_215() {\n    case \"${software_manage}\" in\n    install) software_install \"gedit\" ;;\n    update) software_update ;;\n    remove) software_remove \"gedit\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For flameshot\nsoftware_216() {\n    case \"${software_manage}\" in\n    install) software_install \"flameshot\" ;;\n    update) software_update ;;\n    remove) software_remove \"flameshot\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# Initialize variables\ninit_var \"${@}\"\nsoftware_${software_id} ${software_manage}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/command-docker.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Manage Docker container software installation, update, and removal\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: command-docker.sh -s <software_id> -m <install/update/remove>\n# Example: command-docker.sh -s 101 -m install\n#          command-docker.sh -s 101 -m update\n#          command-docker.sh -s 101 -m remove\n#\n#============================== Software list ===============================\n#\n# software_101  : For docker\n# software_102  : For portainer:8000/9443\n# software_103  : For yacht:8001\n# software_104  : For transmission:9091/51413\n# software_105  : For qbittorrent:8080/6881\n# software_106  : For nextcloud:8088\n# software_107  : For jellyfin:8096/8920/7359/1900\n# software_108  : For homeassistant:8123\n# software_109  : For kodbox:8081\n# software_110  : For couchpotato:5050\n# software_111  : For sonarr:8989\n# software_112  : For radarr:7878\n# software_113  : For syncthing:8384\n# software_114  : For filebrowser:8002\n# software_115  : For heimdall:8003/8004\n# software_116  : For node-red:1880\n# software_117  : For mosquitto:1883/9001\n# software_118  : For openwrt:80\n# software_119  : For netdata:19999\n# software_120  : For xunlei:2345\n# software_121  : For docker-headless:10081/10089\n# software_122  : For navidrome:4533\n# software_123  : For openlist:5244\n# software_124  : For qinglong:5700\n# software_125  : For chatgpt-next-web:3000\n# software_126  : For n8n:5678\n#\n#============================================================================\n\n# Execute generic functions\nsoftware_path=\"/usr/share/ophub/armbian-software\"\nsoftware_command=\"${software_path}/software-command.sh\"\nsource \"${software_command}\"\n\n# For docker\nsoftware_101() {\n    case \"${software_manage}\" in\n    install) armbian-docker install ;;\n    update) armbian-docker update ;;\n    remove) armbian-docker remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For portainer\nsoftware_102() {\n    # Set basic information\n    container_name=\"portainer\"\n    image_name=\"portainer/portainer-ce:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n\n        # Prompt users whether to use their own SSL certificate\n        echo -ne \"${OPTIONS} Using your own SSL certificate? (y/N): \"\n        read use_ssl\n        [[ \"${use_ssl,,}\" =~ ^[y] ]] && use_ssl=\"yes\" || use_ssl=\"no\"\n        echo -e \"${INFO} Your own SSL Certificate Selection: [ ${use_ssl} ]\"\n\n        # Instructions(English): https://hub.docker.com/r/portainer/portainer-ce\n        docker volume create ${container_name}_data\n        if [[ \"${use_ssl}\" == \"yes\" ]]; then\n            # https://docs.portainer.io/advanced/ssl\n            docker run -d --name ${container_name} \\\n                --restart always \\\n                -p 8000:8000 \\\n                -p 9443:9443 \\\n                -v /var/run/docker.sock:/var/run/docker.sock \\\n                -v ${install_path}/portainer_data:/data \\\n                -v ${install_path}/certs:/certs \\\n                ${image_name} \\\n                --sslcert /certs/portainer.crt \\\n                --sslkey /certs/portainer.key\n        else\n            docker run -d --name ${container_name} \\\n                --restart always \\\n                -p 8000:8000 \\\n                -p 9443:9443 \\\n                -v /var/run/docker.sock:/var/run/docker.sock \\\n                -v ${install_path}/portainer_data:/data \\\n                ${image_name}\n        fi\n\n        sync && sleep 3\n        [[ \"${use_ssl}\" == \"yes\" ]] && {\n            echo -e \"${NOTE} Please place your SSL certificate in: [ ${install_path}/certs/portainer.crt & portainer.key ]\"\n        }\n        echo -e \"${NOTE} The ${container_name} address: [ https://${my_address}:9443 ]\"\n        echo -e \"${SUCCESS} The ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For yacht\nsoftware_103() {\n    # Set basic information\n    container_name=\"yacht\"\n    image_name=\"selfhostedpro/yacht:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/selfhostedpro/yacht\n        docker volume create ${container_name}\n        docker run -d --name ${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8001:8000 \\\n            -v /var/run/docker.sock:/var/run/docker.sock \\\n            -v ${install_path}/config:/config \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sudo ufw allow 8001/tcp 2>/dev/null\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address: [ http://${my_address}:8001 ]\"\n        echo -e \"${NOTE} The ${container_name} account: [ username:admin@yacht.local  /  password:pass ]\"\n        echo -e \"${NOTE} The ${container_name} website: [ https://yacht.sh ]\"\n        echo -e \"${NOTE} The ${container_name} template: [ https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/yacht/Template/template.json ]\"\n        echo -e \"${SUCCESS} The ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For transmission\nsoftware_104() {\n    # Set basic information\n    container_name=\"transmission\"\n    image_name=\"linuxserver/transmission:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    # Generate random account\n    random_account=\"$(cat /proc/sys/kernel/random/uuid)\"\n    tr_default_user=\"admin\"\n    tr_default_pass=\"${random_account:0:18}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n\n        echo -ne \"${OPTIONS} Set login username, the default is [ ${tr_default_user} ]: \"\n        read tr_user\n        [[ -z \"${tr_user}\" ]] && tr_user=\"${tr_default_user}\"\n        echo -e \"${INFO} Login username: [ ${tr_user} ]\"\n\n        echo -ne \"${OPTIONS} Set login password, the default is [ ${tr_default_pass} ]: \"\n        read tr_pass\n        [[ -z \"${tr_pass}\" ]] && tr_pass=\"${tr_default_pass}\"\n        echo -e \"${INFO} Login password: [ ${tr_pass} ]\"\n\n        # Instructions: https://github.com/linuxserver/docker-transmission\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -e USER=${tr_user} \\\n            -e PASS=${tr_pass} \\\n            -p 9091:9091 \\\n            -p 51413:51413 \\\n            -p 51413:51413/udp \\\n            -v ${install_path}/config:/config \\\n            -v ${install_path}/watch/folder:/watch \\\n            -v ${download_path}:/downloads \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        # Set the transmission-web-control\n        #echo -e \"${STEPS} Installing the transmission-web-control interface...\"\n        #tr_cn_url=\"https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh\"\n        #bash <(curl -fsSL ${tr_cn_url}) ${install_path}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address: [ http://${my_address}:9091 ]\"\n        echo -e \"${NOTE} The ${container_name} account: [ username:${tr_user}  /  password:${tr_pass} ]\"\n        echo -e \"${SUCCESS} The ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For qbittorrent\nsoftware_105() {\n    # Set basic information\n    container_name=\"qbittorrent\"\n    image_name=\"linuxserver/qbittorrent:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/qbittorrent\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -e WEBUI_PORT=8080 \\\n            -p 8080:8080 \\\n            -p 6881:6881 \\\n            -p 6881:6881/udp \\\n            -v ${install_path}/appdata/config:/config \\\n            -v ${download_path}:/downloads \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address: [ http://${my_address}:8080 ]\"\n        echo -e \"${NOTE} View ${container_name} username and password: [ docker logs -f qbittorrent ]\"\n        echo -e \"${SUCCESS} The ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For nextcloud\nsoftware_106() {\n    # Set basic information\n    container_name=\"nextcloud\"\n    image_name=\"arm64v8/nextcloud:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/arm64v8/nextcloud\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8088:80 \\\n            -v ${install_path}/nextcloud:/var/www/html \\\n            -v ${install_path}/apps:/var/www/html/custom_apps \\\n            -v ${install_path}/config:/var/www/html/config \\\n            -v ${install_path}/data:/var/www/html/data \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8088 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For jellyfin\nsoftware_107() {\n    # Set basic information\n    container_name=\"jellyfin\"\n    image_name=\"linuxserver/jellyfin:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/jellyfin\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8096:8096 \\\n            -p 8920:8920 \\\n            -p 7359:7359/udp \\\n            -p 1900:1900/udp \\\n            -v ${install_path}/library:/config \\\n            -v ${install_path}/tvseries:/data/tvshows \\\n            -v ${install_path}/movies:/data/movies \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8096  /  https://${my_address}:8920 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For homeassistant\nsoftware_108() {\n    # Set basic information\n    container_name=\"homeassistant\"\n    image_name=\"homeassistant/home-assistant:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/homeassistant/home-assistant\n        docker run -d --name=${container_name} \\\n            --privileged \\\n            --network=host \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8123:8123 \\\n            -v ${install_path}/config:/config \\\n            -v ${install_path}/media:/media \\\n            -v /run/dbus:/run/dbus:ro \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} app [ Home Assistant ]\"\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8123 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For kodbox\nsoftware_109() {\n    # Set basic information\n    container_name=\"kodbox\"\n    image_name=\"kodcloud/kodbox:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/kodcloud/kodbox\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8081:80 \\\n            -v ${install_path}/data:/var/www/html \\\n            -v ${install_path}/ssl:/etc/nginx/ssl \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8081 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For couchpotato\nsoftware_110() {\n    # Set basic information\n    container_name=\"couchpotato\"\n    image_name=\"linuxserver/couchpotato:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/couchpotato\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 5050:5050 \\\n            -v ${install_path}/appdata/config:/config \\\n            -v ${download_path}:/downloads \\\n            -v ${movie_path}:/movies \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:5050 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For sonarr\nsoftware_111() {\n    # Set basic information\n    container_name=\"sonarr\"\n    image_name=\"linuxserver/sonarr:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/sonarr\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8989:8989 \\\n            -v ${install_path}/data:/config \\\n            -v ${tv_path}:/tv \\\n            -v ${download_path}:/downloads \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8989 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For radarr\nsoftware_112() {\n    # Set basic information\n    container_name=\"radarr\"\n    image_name=\"linuxserver/radarr:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/radarr\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 7878:7878 \\\n            -v ${install_path}/data:/config \\\n            -v ${movie_path}:/movies \\\n            -v ${download_path}:/downloads \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:7878 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For syncthing\nsoftware_113() {\n    # Set basic information\n    container_name=\"syncthing\"\n    image_name=\"linuxserver/syncthing:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/syncthing\n        docker run -d --name=${container_name} \\\n            --hostname=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8384:8384 \\\n            -p 22000:22000/tcp \\\n            -p 22000:22000/udp \\\n            -p 21027:21027/udp \\\n            -v ${install_path}/appdata/config:/config \\\n            -v ${install_path}/data1:/data1 \\\n            -v ${install_path}/data2:/data2 \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8384 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For filebrowser\nsoftware_114() {\n    # Set basic information\n    container_name=\"filebrowser\"\n    image_name=\"filebrowser/filebrowser:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/filebrowser/filebrowser\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8002:80 \\\n            -v ${install_path}/root:/srv \\\n            -v ${install_path}/filebrowser.db:/database/filebrowser.db \\\n            -v ${install_path}/settings.json:/config/settings.json \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8002 ]\"\n        echo -e \"${NOTE} The ${container_name} account: [ username:admin  /  password:admin ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For heimdall\nsoftware_115() {\n    # Set basic information\n    container_name=\"heimdall\"\n    image_name=\"linuxserver/heimdall:arm64v8-latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/linuxserver/heimdall\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 8003:80 \\\n            -p 8004:443 \\\n            -v ${install_path}/config:/config \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:8003  /  https://${my_address}:8004 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For node-red\nsoftware_116() {\n    # Set basic information\n    container_name=\"node-red\"\n    image_name=\"nodered/node-red:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://nodered.org/docs/getting-started/docker\n        docker run -itd --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 1880:1880 \\\n            -v node_red_data:/data \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:1880 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For mosquitto\nsoftware_117() {\n    # Set basic information\n    container_name=\"mosquitto\"\n    image_name=\"arm64v8/eclipse-mosquitto:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    # Create a local persistent directory\n    mkdir -p ${install_path}/{config/,data/,log/}\n    # Initialize the configuration file\n    mosquitto_conf=\"${install_path}/config/mosquitto.conf\"\n    sudo cat >${mosquitto_conf} <<EOF\npersistence true\npersistence_location ${install_path}/data\nlog_dest file ${install_path}/log/mosquitto.log\nEOF\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/arm64v8/eclipse-mosquitto/\n        docker run -itd --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 1883:1883 \\\n            -p 9001:9001 \\\n            -v ${install_path}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf \\\n            -v ${install_path}/data \\\n            -v ${install_path}/log \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name}  address [ http://${my_address}:1883  /  http://${my_address}:9001 ]\"\n        echo -e \"${NOTE} The ${container_name} tutorial [ https://www.mosquitto.org/ ]\"\n        echo -e \"${NOTE} The ${container_name}  MQTT.fx [ https://softblade.de/en/download-2/ ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For openwrt\nsoftware_118() {\n    # Set basic information\n    container_name=\"openwrt\"\n    image_name=\"ophub/openwrt-armv8:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    echo -ne \"${OPTIONS} Please input the docker image, the default is [ ${image_name} ]: \"\n    read docker_img\n    [[ -n \"${docker_img}\" ]] && image_name=\"${docker_img}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n\n        # Create a virtual network: macvlan\n        [[ -z \"${my_macvlan}\" ]] && {\n            echo -ne \"${OPTIONS} Add macvlan network, please input gateway, the default is [ ${my_gateway} ]: \"\n            read gw\n            [[ -n \"${gw}\" ]] && my_gateway=\"${gw}\"\n\n            my_subnet=\"${my_gateway%.*}.0\"\n            if [[ -n \"$(ifconfig | grep -oE '^br0:')\" ]]; then\n                parent_lan=\"br0\"\n            elif [[ -n \"$(ifconfig | grep -oE '^vmbr0:')\" ]]; then\n                parent_lan=\"vmbr0\"\n            else\n                parent_lan=\"eth0\"\n            fi\n\n            docker network create -d macvlan --subnet=${my_subnet}/24 --gateway=${my_gateway} -o parent=${parent_lan} macnet\n        }\n\n        # Instructions: https://hub.docker.com/r/ophub/openwrt-armv8\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            --network macnet \\\n            --privileged \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} enter the OpenWrt system [ docker exec -it openwrt bash ]\"\n        echo -e \"${NOTE} The ${container_name} instructions [ https://hub.docker.com/r/ophub/openwrt-armv8 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For netdata\nsoftware_119() {\n    # Set basic information\n    container_name=\"netdata\"\n    image_name=\"netdata/netdata:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/netdata/netdata\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 19999:19999 \\\n            -v ${install_path}/netdataconfig:/etc/netdata \\\n            -v netdatalib:/var/lib/netdata \\\n            -v netdatacache:/var/cache/netdata \\\n            -v /etc/passwd:/host/etc/passwd:ro \\\n            -v /etc/group:/host/etc/group:ro \\\n            -v /proc:/host/proc:ro \\\n            -v /sys:/host/sys:ro \\\n            -v /etc/os-release:/host/etc/os-release:ro \\\n            --restart unless-stopped \\\n            --cap-add SYS_PTRACE \\\n            --security-opt apparmor=unconfined \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:19999 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For xunlei\nsoftware_120() {\n    # Set basic information\n    container_name=\"xunlei\"\n    image_name=\"cnk3x/xunlei:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/cnk3x/xunlei\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            --hostname=mynas \\\n            --net=bridge \\\n            -p 2345:2345 \\\n            -v ${install_path}/data:/xunlei/data \\\n            -v ${install_path}/downloads:/xunlei/downloads \\\n            --restart unless-stopped \\\n            --privileged \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:2345 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For docker-headless\nsoftware_121() {\n    # Set basic information\n    container_name=\"docker-headless\"\n    image_name=\"infrastlabs/docker-headless:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/infrastlabs/docker-headless\n        docker run -itd --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 10081:10081 \\\n            -p 10089:10089 \\\n            --shm-size 1g \\\n            --tmpfs /run \\\n            --tmpfs /run/lock \\\n            --tmpfs /tmp \\\n            --cap-add SYS_BOOT \\\n            --cap-add SYS_ADMIN \\\n            -v /sys/fs/cgroup:/sys/fs/cgroup \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} Usage [ https://github.com/infrastlabs/docker-headless ]\"\n        echo -e \"${NOTE} The ${container_name} noVnc [ http://${my_address}:10081 ], PASS [ headless ], ReadOnly [ View123 ]\"\n        echo -e \"${NOTE} The ${container_name} RDP [ ${my_address}:10089 ]\"\n        echo -e \"${NOTE} The ${container_name} SSH [ ssh -p 10022 headless@${my_address} ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For navidrome\nsoftware_122() {\n    # Set basic information\n    container_name=\"navidrome\"\n    image_name=\"deluan/navidrome:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/deluan/navidrome\n        docker run -d --name=${container_name} \\\n            --user $(id -u):$(id -g) \\\n            -e ND_LOGLEVEL=info \\\n            -p 4533:4533 \\\n            -v ${install_path}/music:/music \\\n            -v ${install_path}/data:/data \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:4533 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For openlist\nsoftware_123() {\n    # Set basic information\n    container_name=\"openlist\"\n    image_name=\"openlistteam/openlist:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n\n        echo -ne \"${OPTIONS} Set your login password: \"\n        read openlist_pass\n        [[ -z \"${openlist_pass}\" ]] && openlist_pass=\"$(docker exec -it openlist ./openlist admin random | grep 'password:' | awk '{print $4}')\"\n\n        # Instructions: https://hub.docker.com/r/openlistteam/openlist\n        docker run -d --name=${container_name} \\\n            -e PUID=0 \\\n            -e PGID=0 \\\n            -e UMASK=022 \\\n            -p 5244:5244 \\\n            -v ${install_path}/openlist:/opt/openlist/data \\\n            --restart=always \\\n            ${image_name}\n\n        docker exec -it openlist ./openlist admin set ${openlist_pass}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:5244 ]\"\n        echo -e \"${NOTE} Login name: [ admin ], password [ ${openlist_pass} ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For qinglong\nsoftware_124() {\n    # Set basic information\n    container_name=\"qinglong\"\n    image_name=\"whyour/qinglong:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/whyour/qinglong\n        docker run -dit --name=${container_name} \\\n            -v ${install_path}/ql:/ql/data \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -p 5700:5700 \\\n            --hostname=qinglong \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:5700 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For chatgpt-next-web\nsoftware_125() {\n    # Set basic information\n    container_name=\"chatgpt-next-web\"\n    image_name=\"yidadaa/chatgpt-next-web:latest\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n\n        # Set your OPENAI_API_KEY\n        echo -ne \"${OPTIONS} Please input your OPENAI_API_KEY, such as sk-xxxxx: \"\n        read oak\n        [[ -n \"${oak}\" ]] && your_api_key=\"${oak}\" || error_msg \"OPENAI_API_KEY is invalid.\"\n\n        # Set your login password\n        echo -ne \"${OPTIONS} Please input your login password: \"\n        read pw\n        [[ -n \"${pw}\" ]] && your_password=\"${pw}\" || error_msg \"PassWord is invalid.\"\n\n        # Instructions: https://hub.docker.com/r/yidadaa/chatgpt-next-web\n        docker run -d --name=${container_name} \\\n            -p 3000:3000 \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -e OPENAI_API_KEY=${your_api_key} \\\n            -e CODE=${your_password} \\\n            -e HIDE_USER_API_KEY=1 \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        sync && sleep 3\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:3000 ]\"\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For n8n\nsoftware_126() {\n    # Set basic information\n    container_name=\"n8n\"\n    image_name=\"n8nio/n8n:nightly-arm64\"\n    install_path=\"${docker_path}/${container_name}\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing Docker container: [ ${container_name} ]...\"\n        # Instructions: https://hub.docker.com/r/n8nio/n8n\n        docker run -d --name=${container_name} \\\n            -e PUID=${docker_puid} \\\n            -e PGID=${docker_pgid} \\\n            -e TZ=${docker_tz} \\\n            -e GENERIC_TIMEZONE=${docker_tz} \\\n            -p 5678:5678 \\\n            -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \\\n            -e N8N_RUNNERS_ENABLED=true \\\n            -e N8N_SECURE_COOKIE=false \\\n            -v ${install_path}/n8n_data:/home/node/.n8n \\\n            --restart unless-stopped \\\n            ${image_name}\n\n        echo -e \"${NOTE} Please wait 20 seconds...\"\n        sync && sudo chown -R ${docker_puid}:${docker_pgid} ${docker_path}\n        sudo docker restart ${container_name}\n        sync && sleep 20\n        echo -e \"${SUCCESS} ${container_name} installed successfully.\"\n        echo -e \"${NOTE} The ${container_name} address [ http://${my_address}:5678 ]\"\n        exit 0\n        ;;\n    update) docker_update ;;\n    remove) docker_remove ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# Initialize variables\ninit_var \"${@}\"\nsoftware_${software_id} ${software_manage}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/command-service.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Manage service software installation, update, and removal\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: command-service.sh -s <software_id> -m <install/update/remove>\n# Example: command-service.sh -s 303 -m install\n#          command-service.sh -s 303 -m update\n#          command-service.sh -s 303 -m remove\n#\n#============================== Software list ===============================\n#\n# software_303  : For nps\n# software_304  : For npc\n# software_305  : For plex\n# software_306  : For emby-server\n# software_307  : For kvm\n# software_308  : For pve\n# software_309  : For casaos\n# software_310  : For arozos\n#\n#============================================================================\n\n# Execute generic functions\nsoftware_path=\"/usr/share/ophub/armbian-software\"\nsoftware_command=\"${software_path}/software-command.sh\"\nsource \"${software_command}\"\n\n# For nps\nsoftware_303() {\n    case \"${software_manage}\" in\n    install)\n        # Software version query api\n        software_api=\"https://api.github.com/repos/ehang-io/nps/releases\"\n        # Check the latest version, E.g: v0.26.10\n        software_latest_version=\"$(curl -s \"${software_api}\" | grep \"tag_name\" | awk -F '\"' '{print $4}' | tr \" \" \"\\n\" | sort -rV | head -n 1)\"\n        # Query download address, E.g: https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_arm64_server.tar.gz\n        software_url=\"$(curl -s \"${software_api}\" | grep -oE \"https:.*/${software_latest_version}/linux_arm64_server.tar.gz\")\"\n        [[ -n \"${software_url}\" ]] || error_msg \"Failed to obtain the download address!\"\n        echo -e \"${INFO} Downloading from: [ ${software_url} ]\"\n\n        # Download software, E.g: /tmp/tmp.xxx/linux_arm64_server.tar.gz\n        tmp_download=\"$(mktemp -d)\"\n        software_filename=\"${software_url##*/}\"\n        echo -e \"${STEPS} Downloading NPS...\"\n        curl -fsSL \"${software_url}\" -o \"${tmp_download}/${software_filename}\"\n        [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}/${software_filename}\" ]] || error_msg \"Failed to download the software!\"\n        echo -e \"${INFO} Download completed: $(ls ${tmp_download} -l)\"\n\n        # Installing and start NPS\n        echo -e \"${STEPS} Installing and starting NPS...\"\n        cd ${tmp_download} && tar -xf ${software_filename}\n        sudo ./nps install\n        sudo nps start\n\n        sync && sleep 3\n        echo -e \"${NOTE} The NPS address: [ http://${my_address}:8080 ]\"\n        echo -e \"${NOTE} The NPS account: [ username:admin  /  password:123 ]\"\n        echo -e \"${NOTE} The NPS Instructions for Use: [ https://ehang-io.github.io/nps ]\"\n        echo -e \"${SUCCESS} NPS installed successfully.\"\n        ;;\n    update)\n        sudo nps stop && sudo nps-update update && sudo nps restart\n        echo -e \"${SUCCESS} NPS updated and restarted successfully.\"\n        ;;\n    remove)\n        sudo nps stop && sudo nps uninstall\n        sudo rm -rf /etc/nps /root/conf/nps.conf /usr/local/bin/nps /usr/local/bin/nps-update /usr/bin/nps /usr/bin/nps-update 2>/dev/null\n        echo -e \"${SUCCESS} NPS removed successfully.\"\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For npc\nsoftware_304() {\n    case \"${software_manage}\" in\n    install)\n        # Software version query api\n        software_api=\"https://api.github.com/repos/ehang-io/nps/releases\"\n        # Check the latest version, E.g: v0.26.10\n        software_latest_version=\"$(curl -s \"${software_api}\" | grep \"tag_name\" | awk -F '\"' '{print $4}' | tr \" \" \"\\n\" | sort -rV | head -n 1)\"\n        # Query download address, E.g: https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_arm64_client.tar.gz\n        software_url=\"$(curl -s \"${software_api}\" | grep -oE \"https:.*/${software_latest_version}/linux_arm64_client.tar.gz\")\"\n        [[ -n \"${software_url}\" ]] || error_msg \"Failed to obtain the download address!\"\n        echo -e \"${INFO} Downloading from: [ ${software_url} ]\"\n\n        # Download software, E.g: /tmp/tmp.xxx/linux_arm64_client.tar.gz\n        tmp_download=\"$(mktemp -d)\"\n        software_filename=\"${software_url##*/}\"\n        echo -e \"${STEPS} Downloading NPC...\"\n        curl -fsSL \"${software_url}\" -o \"${tmp_download}/${software_filename}\"\n        [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}/${software_filename}\" ]] || error_msg \"Failed to download the software!\"\n        echo -e \"${INFO} Download completed: $(ls ${tmp_download} -l)\"\n\n        # Installing and start NPC\n        echo -e \"${STEPS} Installing and starting NPC...\"\n        cd ${tmp_download} && tar -xf ${software_filename}\n        sudo mkdir -p /etc/npc && sudo cp -rf conf /etc/npc\n        sudo ./npc install\n        sudo npc start\n\n        sync && sleep 3\n        echo -e \"${NOTE} The NPS config file path: [ /etc/npc/conf/npc.conf ]\"\n        echo -e \"${NOTE} The NPS enable config command: [ sudo npc -config=/etc/npc/conf/npc.conf ]\"\n        echo -e \"${NOTE} The NPC Instructions for Use: [ https://ehang-io.github.io/nps ]\"\n        echo -e \"${SUCCESS} NPC installed successfully.\"\n        ;;\n    update)\n        sudo npc stop && sudo npc-update update && sudo npc restart\n        echo -e \"${SUCCESS} NPC updated and restarted successfully.\"\n        ;;\n    remove)\n        sudo npc stop && sudo npc uninstall\n        sudo rm -rf /etc/npc /root/conf/npc.conf /usr/local/bin/npc /usr/local/bin/npc-update /usr/bin/npc /usr/bin/npc-update 2>/dev/null\n        echo -e \"${SUCCESS} NPC removed successfully.\"\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For plex\nsoftware_305() {\n    case \"${software_manage}\" in\n    install)\n        # Install basic dependencies\n        echo -e \"${STEPS} Installing basic dependencies...\"\n        software_install \"curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates\"\n\n        # Add Plex Media Server APT repository\n        echo -e \"${STEPS} Adding the Plex Media Server APT repository...\"\n        echo \"deb https://downloads.plex.tv/repo/deb public main\" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list\n\n        # Import GPG key\n        echo -e \"${STEPS} Importing GPG keys...\"\n        curl -fsSOL https://downloads.plex.tv/plex-keys/PlexSign.key\n        cat PlexSign.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/PlexSigkey.gpg\n        rm -f PlexSign.key\n\n        # Installing Plex Media server\n        echo -e \"${STEPS} Installing Plex Media Server...\"\n        software_install \"plexmediaserver\"\n\n        # Ensure to open the port 32400 through the firewall\n        echo -e \"${STEPS} Configuring firewall to open port 32400...\"\n        sudo ufw allow 32400 2>/dev/null\n\n        # Enable Plex server to start automatically on system boot\n        echo -e \"${STEPS} Enabling Plex Media Server to start automatically at boot...\"\n        sudo systemctl daemon-reload\n        sudo systemctl enable --now plexmediaserver.service\n        sudo systemctl restart plexmediaserver.service\n\n        # Confirm the service is enabled\n        echo -e \"${STEPS} Confirming the service is enabled...\"\n        systemctl is-enabled plexmediaserver.service\n\n        # Configure Plex Media Server\n        sync && sleep 3\n        echo -e \"${NOTE} The Plex Media Server address: [ http://${my_address}:32400/web ]\"\n        echo -e \"${SUCCESS} Plex Media Server installed successfully.\"\n        ;;\n    update) software_update ;;\n    remove) software_remove \"plexmediaserver\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For emby-server\nsoftware_306() {\n    case \"${software_manage}\" in\n    install)\n        # Software version query api\n        software_api=\"https://api.github.com/repos/MediaBrowser/Emby.Releases/releases\"\n        # Check the latest version, E.g: 4.7.5.0\n        software_latest_version=\"$(curl -s \"${software_api}\" | grep \"tag_name\" | awk -F '\"' '{print $4}' | grep -E [.]0$ | tr \" \" \"\\n\" | sort -rV | head -n 1)\"\n        # Query download address, E.g: https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.5.0/emby-server-deb_4.7.5.0_arm64.deb\n        software_url=\"$(curl -s \"${software_api}\" | grep -oE \"https:.*${software_latest_version}.*_arm64.deb\")\"\n        [[ -n \"${software_url}\" ]] || error_msg \"Failed to obtain the download address!\"\n        echo -e \"${INFO} Downloading from: [ ${software_url} ]\"\n\n        # Download software, E.g: /tmp/tmp.xxx/emby-server-deb_4.7.5.0_arm64.deb\n        tmp_download=\"$(mktemp -d)\"\n        software_filename=\"${software_url##*/}\"\n        echo -e \"${STEPS} Downloading Emby Server...\"\n        curl -fsSL \"${software_url}\" -o \"${tmp_download}/${software_filename}\"\n        [[ \"${?}\" -eq \"0\" && -s \"${tmp_download}/${software_filename}\" ]] || error_msg \"Failed to download the software!\"\n        echo -e \"${INFO} Download completed: $(ls ${tmp_download} -l)\"\n\n        # Installing Emby Server\n        echo -e \"${STEPS} Installing Emby Server...\"\n        sudo dpkg -i ${tmp_download}/${software_filename}\n\n        # Enable Emby Server to start automatically on system boot\n        echo -e \"${STEPS} Enabling Emby Server to start automatically at boot...\"\n        sudo systemctl daemon-reload\n        sudo systemctl enable --now emby-server.service\n        sudo systemctl restart emby-server.service\n\n        # Confirm the service is enabled\n        echo -e \"${STEPS} Confirming the service is enabled...\"\n        systemctl is-enabled emby-server.service\n\n        # Configure Emby Server\n        sync && sleep 3\n        echo -e \"${NOTE} The Emby Server address: [ http://${my_address}:8096 ]\"\n        echo -e \"${SUCCESS} Emby Server installed successfully.\"\n        ;;\n    update) software_update ;;\n    remove) software_remove \"emby-server\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For kvm\nsoftware_307() {\n    # kvm general settings\n    my_network_br0=\"/etc/network/interfaces.d/br0\"\n    kvm_package_list=\"\\\n        gconf2 qemu-system-arm qemu-utils qemu-efi ipxe-qemu libvirt-daemon-system libvirt-clients bridge-utils \\\n        virtinst virt-manager seabios vgabios gir1.2-spiceclientgtk-3.0 xauth fonts-noto* \\\n        \"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing KVM and related virtualization packages...\"\n        software_install \"${kvm_package_list}\"\n\n        # Get desktop system login user\n        echo -ne \"${OPTIONS} Please input the desktop login user (non-root): \"\n        read get_desktop_user\n        [[ -n \"${get_desktop_user}\" ]] && my_user=\"${get_desktop_user}\" || my_user=\"${USER}\"\n        # If the user exists, add it to the group\n        if ! id -u ${my_user} >/dev/null 2>&1; then\n            echo -e \"${NOTE} User (${my_user}) does not exist. Creating...\"\n            sudo adduser ${my_user}\n            sudo usermod -aG sudo ${my_user}\n        fi\n        # Add the login desktop system user to the kvm​ and libvirt user groups\n        echo -e \"${STEPS} Adding user (${my_user}) to the kvm and libvirt groups...\"\n        sudo usermod -aG kvm ${my_user}\n        sudo usermod -aG libvirt ${my_user}\n\n        # Enable X11Forwarding to run Linux GUI programs remotely\n        sed -i '/X11Forwarding/d' /etc/ssh/sshd_config 2>/dev/null\n        echo \"X11Forwarding yes\" >>/etc/ssh/sshd_config 2>/dev/null\n\n        # Enable and start the libvirtd.service daemon\n        echo -e \"${STEPS} Enabling and starting the libvirtd.service daemon...\"\n        sudo systemctl daemon-reload\n        sudo systemctl enable --now libvirtd.service\n        sudo systemctl restart libvirtd.service\n        #sudo systemctl status libvirtd.service\n\n        # Add network bridge settings template\n        echo -e \"${STEPS} Adding bridged network settings template...\"\n        [[ -z \"${my_network_card}\" || -z \"${my_address}\" || -z \"${my_broadcast}\" || -z \"${my_netmask}\" || -z \"${my_gateway}\" ]] && {\n            echo -ne \"${OPTIONS} Please input IP address, the default is [ ${my_address} ]: \"\n            read get_address\n            [[ -n \"${get_address}\" ]] && my_address=\"${get_address}\"\n\n            echo -ne \"${OPTIONS} Please input broadcast, the default is [ ${my_broadcast} ]: \"\n            read get_broadcast\n            [[ -n \"${get_broadcast}\" ]] && my_broadcast=\"${get_broadcast}\"\n\n            echo -ne \"${OPTIONS} Please input netmask, the default is [ ${my_netmask} ]: \"\n            read get_netmask\n            [[ -n \"${get_netmask}\" ]] && my_netmask=\"${get_netmask}\"\n\n            echo -ne \"${OPTIONS} Please input gateway, the default is [ ${my_gateway} ]: \"\n            read get_gateway\n            [[ -n \"${get_gateway}\" ]] && my_gateway=\"${get_gateway}\"\n        }\n        sudo rm -f ${my_network_br0} 2>/dev/null\n        sudo cat >${my_network_br0} <<EOF\n# Network card settings\nallow-hotplug ${my_network_card}\niface ${my_network_card} inet manual\n        pre-up ifconfig \\$IFACE up\n        pre-down ifconfig \\$IFACE down\n\n# Bridge settings\nauto br0\niface br0 inet static\n        bridge_ports ${my_network_card}\n        bridge_stp off\n        bridge_waitport 0\n        bridge_fd 0\n        address ${my_address}\n        broadcast ${my_broadcast}\n        netmask ${my_netmask}\n        gateway ${my_gateway}\n        dns-nameservers ${my_gateway}\nEOF\n\n        # Disable netfilter on KVM bridge\n        sudo cat >>/etc/sysctl.conf <<EOF\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-arptables = 0\nEOF\n        # Reload /etc/sysctl.conf\n        sudo sysctl -p /etc/sysctl.conf\n\n        # Set the virtual machine to start automatically\n        vm_autostart=\"/etc/default/libvirt-guests\"\n        [[ -f \"${vm_autostart}\" ]] && {\n            sed -i '/^ON_BOOT=.*/d' ${vm_autostart} 2>/dev/null\n            sed -i '/^ON_SHUTDOWN=.*/d' ${vm_autostart} 2>/dev/null\n            echo \"ON_BOOT=start\" >>${vm_autostart} 2>/dev/null\n            echo \"ON_SHUTDOWN=shutdown\" >>${vm_autostart} 2>/dev/null\n        }\n\n        sync && sleep 3\n        echo -e \"${NOTE} The bridge network settings: [ ${my_network_br0} ]\"\n        echo -e \"${NOTE} KVM can install OpenWrt, Debian, Ubuntu, OpenSUSE, ArchLinux, Centos, Gentoo, KyLin, UOS, etc.\"\n        echo -e \"${NOTE} Making and using OpenWrt: [ https://github.com/unifreq/openwrt_packit ]\"\n        echo -e \"${SUCCESS} KVM installed successfully.\"\n        ;;\n    update) software_update ;;\n    remove)\n        software_remove \"${kvm_package_list}\"\n        sudo rm -f ${my_network_br0} 2>/dev/null\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For pve, Tutorials for using [ Cooip-JM: https://github.com/cooip-jm/About-openwrt/wiki ]\nsoftware_308() {\n    # pve general settings\n    my_interfaces=\"/etc/network/interfaces\"\n    pve_package_list=\"pve-manager proxmox-ve\"\n    networking_package_list=\"ifupdown2 resolvconf bridge-utils lm-sensors\"\n\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing PVE...\"\n\n        # Add PVE software source\n        echo -e \"${STEPS} Adding [ ${VERSION_CODENAME} ] software source...\"\n        [[ -d \"/etc/apt/sources.list.d\" ]] || sudo mkdir -p /etc/apt/sources.list.d\n        if [[ \"${VERSION_CODENAME}\" =~ ^(bookworm|trixie)$ ]]; then\n            # Reference documentation: Cooip JM\n            # Update: accordding to https://docs.pxvirt.lierfang.com/zh/installfromdebian.html\n            echo \"deb https://mirrors.lierfang.com/pxcloud/pxvirt ${VERSION_CODENAME} main\" >/etc/apt/sources.list.d/pxvirt-${VERSION_CODENAME}-sources.list\n            curl -fsSL https://mirrors.lierfang.com/pxcloud/lierfang.gpg -o /etc/apt/trusted.gpg.d/${VERSION_CODENAME}-lierfang.gpg\n        elif [[ \"${VERSION_CODENAME}\" == \"bullseye\" ]]; then\n            # Reference documentation: https://www.zhou.pp.ua/2023/08/08/n1/\n            echo \"deb https://raw.githubusercontent.com/pimox/pimox7/master/ dev/\" >/etc/apt/sources.list.d/pimox-${VERSION_CODENAME}-sources.list\n            curl -fsSL https://raw.githubusercontent.com/pimox/pimox7/master/KEY.gpg -o /etc/apt/trusted.gpg.d/${VERSION_CODENAME}-pimox7.gpg\n        else\n            error_msg \"This version is not supported: [ ${VERSION_CODENAME} ]\"\n        fi\n\n        # Declare PATH\n        export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n        echo -e \"${STEPS} Installing networking packages...\"\n        software_install \"${networking_package_list}\"\n\n        # Add network settings\n        echo -e \"${STEPS} Adding network settings...\"\n        [[ -z \"${my_network_card}\" || -z \"${my_mac}\" || -z \"${my_address}\" || -z \"${my_broadcast}\" || -z \"${my_netmask}\" || -z \"${my_gateway}\" ]] && {\n            echo -ne \"${OPTIONS} Please input IP address, the default is [ ${my_address} ]: \"\n            read get_address\n            [[ -n \"${get_address}\" ]] && my_address=\"${get_address}\"\n\n            echo -ne \"${OPTIONS} Please input netmask, the default is [ ${my_netmask} ]: \"\n            read get_netmask\n            [[ -n \"${get_netmask}\" ]] && my_netmask=\"${get_netmask}\"\n\n            echo -ne \"${OPTIONS} Please input gateway, the default is [ ${my_gateway} ]: \"\n            read get_gateway\n            [[ -n \"${get_gateway}\" ]] && my_gateway=\"${get_gateway}\"\n        }\n        sudo mv -f ${my_interfaces} ${my_interfaces}.bak 2>/dev/null\n        sudo cat >${my_interfaces} <<EOF\nauto lo\niface lo inet loopback\n\niface ${my_network_card} inet manual\n\nauto vmbr0\niface vmbr0 inet static\n        hwaddress ether ${my_mac}\n        address ${my_address}/24\n        broadcast ${my_broadcast}\n        netmask ${my_netmask}\n        gateway ${my_gateway}\n        bridge-ports ${my_network_card}\n        bridge-stp off\n        bridge-fd 0\n        dns-nameservers ${my_gateway}\nEOF\n\n        # Confirm hostname\n        echo -ne \"${OPTIONS} Please input the hostname, the default is [ ${my_hostname} ]: \"\n        read get_hostname\n        [[ -n \"${get_hostname}\" ]] && my_hostname=\"${get_hostname}\"\n        echo -e \"${INFO} Set the hostname: [ ${my_hostname} ]\"\n        sudo hostnamectl set-hostname ${my_hostname}\n        sudo cat >/etc/hosts <<EOF\n127.0.0.1\tlocalhost\n${my_address}\t${my_hostname}\nEOF\n\n        # Adjust the DNS settings\n        sed -i \"s|nameserver.*|nameserver ${my_gateway}|g\" /etc/resolv.conf\n\n        # Disable systemd-networkd and NetworkManager\n        networkmanager_status_check=\"$(systemctl is-active NetworkManager)\"\n        if [[ \"${networking_status_check}\" == \"active\" ]]; then\n            echo -e \"${INFO} Disable systemd-networkd and NetworkManager...\"\n            sudo systemctl disable systemd-networkd\n            sudo systemctl disable systemd-networkd.socket\n            sudo systemctl disable NetworkManager\n            sudo systemctl stop NetworkManager\n            sudo systemctl daemon-reload\n        fi\n\n        # Install networking packages\n        networking_status_check=\"$(systemctl is-active networking)\"\n        if [[ \"${networking_status_check}\" != \"active\" ]]; then\n            echo -e \"${INFO} Enable networking...\"\n            sudo systemctl enable --now networking\n            sudo systemctl restart networking\n            sudo systemctl daemon-reload\n            echo -e \"${NOTE} Network adjustments require a reboot. Please try again after restarting.\"\n            sudo sync && sudo reboot\n            exit 0\n        fi\n\n        echo -e \"${STEPS} Installing packages...\"\n        software_install \"${pve_package_list}\"\n\n        # Optimizing LXC container logs\n        echo -e \"${INFO} Optimizing LXC container logs.\"\n        rsyslog_conf=\"/etc/rsyslog.conf\"\n        [[ -f \"${rsyslog_conf}\" ]] && {\n            echo -e \"${STEPS} Optimizing LXC container logs...\"\n            sed -i s'|^*.*;auth,authpriv|#&|'g ${rsyslog_conf}\n            sed -i s'|^daemon.*|#&|'g ${rsyslog_conf}\n            [[ -f \"/var/log/syslog\" ]] && echo \"\" >/var/log/syslog\n            [[ -f \"/var/log/daemon.log\" ]] && echo \"\" >/var/log/daemon.log\n            sudo service syslog restart\n        }\n\n        # Disable zram\n        echo -e \"${INFO} Disable zram service.\"\n        sudo systemctl disable armbian-zram-config.service\n        sudo systemctl disable armbian-ramlog.service\n\n        # Remove ceph-dkms package error\n        echo -e \"${INFO} Remove ceph-dkms package error.\"\n        sudo rm -rf /usr/src/ceph-dkms-0.0.2\n        sudo dpkg --configure -a\n\n        # Install optional packages\n        software_install \"ifupdown2\"\n        sudo ifup vmbr0 ${my_network_card}\n        software_update\n\n        # Adjust the PVE web interface (Fix the PVE web interface certificate access)\n        echo -e \"${INFO} Adjust certificate.\"\n        sudo rm -f /etc/pve/pve-root-ca.pem /etc/pve/priv/pve-root-ca.* /etc/pve/local/pve-ssl.*\n        sudo pvecm updatecerts -f\n\n        # Add startup service\n        echo -e \"${INFO} Add pveproxy as a startup service.\"\n        sudo systemctl daemon-reload\n        sudo systemctl enable --now pveproxy\n        sudo systemctl restart pveproxy\n\n        # Adjust sshd_config (Fix the SSH certificate access modified by PVE)\n        [[ -L ~/.ssh/authorized_keys ]] && {\n            cp -f $(ls -l ~/.ssh/authorized_keys | awk '{print $NF}') ~/.ssh/authorized_keys_2\n            chmod 600 ~/.ssh/authorized_keys_2\n            sudo sed -i '/AuthorizedKeysFile/d' /etc/ssh/sshd_config\n            sudo echo \"AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys_2\" >>/etc/ssh/sshd_config\n            sudo /etc/init.d/ssh restart\n        }\n\n        # Fix log issue\n        [[ -f \"/var/log/pveproxy/access.log\" ]] || {\n            echo -e \"${INFO} Fix the missing log issue.\"\n            sudo mkdir -p /var/log/pveproxy\n            sudo touch /var/log/pveproxy/access.log\n            sudo chown -R www-data:www-data /var/log/pveproxy/\n            sudo chmod -R 755 /var/log/pveproxy/\n            sudo systemctl restart pveproxy\n        }\n\n        sync && sleep 3\n        echo -e \"${NOTE} The network address: [ https://${my_address}:8006 ]\"\n        echo -e \"${NOTE} Username and Password: [  Your system account ]\"\n        echo -e \"${SUCCESS} PVE installation is successful, please [ reboot ] Armbian.\"\n        ;;\n    update) software_update ;;\n    remove) software_remove \"${pve_package_list}\" ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For casaos\nsoftware_309() {\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing CasaOS...\"\n        curl -fsSL https://get.casaos.io | sudo bash\n\n        sync && sleep 3\n\n        # Get the CasaOS service port\n        CASA_CONF_PATH=\"/etc/casaos/gateway.ini\"\n        CASA_PORT=\"$(grep \"port\" ${CASA_CONF_PATH} | awk -F \"=\" '{print $2}')\"\n        [[ \"${CASA_PORT}\" -eq \"80\" ]] && my_casa_port=\"\" || my_casa_port=\":${CASA_PORT}\"\n\n        echo -e \"${NOTE} The CasaOS access address: [ http://${my_address}${my_casa_port} ]\"\n        echo -e \"${SUCCESS} CasaOS installation successful.\"\n        ;;\n    update) software_update ;;\n    remove)\n        sudo casaos-uninstall\n        echo -e \"${SUCCESS} CasaOS uninstallation successful.\"\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# For arozos\nsoftware_310() {\n    case \"${software_manage}\" in\n    install)\n        echo -e \"${STEPS} Installing ArozOS...\"\n        wget -O install.sh https://raw.githubusercontent.com/tobychui/arozos/master/installer/install.sh && bash install.sh\n\n        sync && sleep 3\n\n        echo -e \"${SUCCESS} ArozOS installation successful.\"\n        ;;\n    update) software_update ;;\n    remove)\n        # Stop and disable the ArozOS service\n        sudo systemctl stop arozos.service 2>/dev/null\n        sudo systemctl disable arozos.service 2>/dev/null\n        sudo rm -f /etc/systemd/system/arozos.service 2>/dev/null\n        sudo systemctl daemon-reload\n\n        # Uninstall ArozOS\n        sudo rm -rf ~/arozos\n\n        sync && sleep 3\n        echo -e \"${SUCCESS} ArozOS uninstallation successful.\"\n        ;;\n    *) error_msg \"Invalid input parameter: [ ${@} ]\" ;;\n    esac\n}\n\n# Initialize variables\ninit_var \"${@}\"\nsoftware_${software_id} ${software_manage}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh",
    "content": "#!/bin/bash\n#============================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Shared utility functions for software management scripts\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n#============================== Functions list ==============================\n#\n# error_msg                 : Output error message and exit\n# check_release             : Check and load system release information\n# software_install          : Install specified packages\n# software_update           : Update all system packages\n# software_remove           : Remove specified packages\n# docker_container_remove   : Stop and remove a Docker container\n# docker_image_remove       : Remove a Docker image\n# docker_update             : Update a Docker container to the latest image\n# docker_remove             : Fully remove a Docker container, image, and data\n# init_var                  : Initialize and parse command-line parameters\n#\n#========================== Set default parameters ==========================\n#\n# Get custom firmware information\nsoftware_path=\"/usr/share/ophub/armbian-software\"\ncommand_docker=\"${software_path}/command-docker.sh\"\nophub_release_file=\"/etc/ophub-release\"\n#\n# Docker-related default settings\ndocker_path=\"/opt/docker\"\ndownload_path=\"/opt/downloads\"\nmovie_path=\"/opt/movies\"\nmusic_path=\"/opt/music\"\ntv_path=\"/opt/tv\"\ndocker_puid=\"1000\"\ndocker_pgid=\"1000\"\ndocker_tz=\"Asia/Shanghai\"\n#\n# Get current network status\nmy_network_card=\"$(cat /proc/net/dev 2>/dev/null | awk '{i++; if(i>2){print $1}}' | sed 's/^[\\t]*//g' | sed 's/[:]*$//g' | grep -E 'e' | head -n 1)\"\nmy_ifconfig=\"$(ifconfig -a 2>/dev/null | grep inet | grep -v 'inet6.*' | grep -v 'inet 172.*' | grep -v 'inet 127.*' | head -n1)\"\nmy_address=\"$(echo ${my_ifconfig} | awk '{print $2}')\"\nmy_netmask=\"$(echo ${my_ifconfig} | awk '{print $4}')\"\nmy_broadcast=\"$(echo ${my_ifconfig} | awk '{print $6}')\"\nmy_gateway=\"$(route -n 2>/dev/null | awk '($2~/^1/){print $2}' | head -n1)\"\nmy_macvlan=\"$(docker network ls 2>/dev/null | grep macvlan | awk '($2 == \"macnet\" && $3 == \"macvlan\"){print $2,$3}' | head -n1)\"\nmy_mac=\"$(ip a | grep ether | cut -d ' ' -f 6 | head -n 1)\"\nmy_hostname=\"$(hostname)\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nNOTE=\"[\\033[93m NOTE \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#============================================================================\n\n# Show error message\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\ncheck_release() {\n    if [[ -f \"${ophub_release_file}\" ]]; then\n        source \"${ophub_release_file}\" 2>/dev/null\n        VERSION_CODEID=\"${VERSION_CODEID}\"\n        VERSION_CODENAME=\"${VERSION_CODENAME}\"\n    else\n        error_msg \"${ophub_release_file} file is missing!\"\n    fi\n\n    [[ -n \"${VERSION_CODEID}\" && -n \"${VERSION_CODENAME}\" ]] || error_msg \"${ophub_release_file} value is missing!\"\n}\n\nsoftware_install() {\n    install_list=\"${1}\"\n    echo -e \"${STEPS} Installing packages: [ ${install_list} ]...\"\n\n    # Install the package\n    sudo apt-get update\n    [[ -n \"${install_list}\" ]] && sudo apt-get install -y ${install_list}\n\n    echo -e \"${SUCCESS} [ ${install_list} ] packages installed successfully.\"\n}\n\nsoftware_update() {\n    echo -e \"${STEPS} Updating packages...\"\n\n    # Update the package\n    sudo apt-get update\n    sudo apt-get upgrade -y\n    sudo apt-get dist-upgrade -y\n    sudo apt-get --purge autoremove -y\n    sudo apt-get autoclean -y\n\n    echo -e \"${SUCCESS} Packages updated successfully.\"\n}\n\nsoftware_remove() {\n    remove_list=\"${1}\"\n    echo -e \"${STEPS} Removing packages: [ ${remove_list} ]...\"\n\n    # Update the package\n    sudo apt-get update\n    [[ -n \"${remove_list}\" ]] && sudo apt-get remove --purge -y ${remove_list}\n    sudo apt-get --purge autoremove -y\n    sudo apt-get autoclean -y\n\n    echo -e \"${SUCCESS} [ ${remove_list} ] packages removed successfully.\"\n}\n\n# Stop and remove the Docker container\ndocker_container_remove() {\n    local container_name=\"${1}\"\n    [[ -n \"${container_name}\" ]] || error_msg \"Docker container name is empty!\"\n\n    # Query the container ID based on the image name and remove it\n    echo -e \"${STEPS} Removing container: [ ${container_name} ]...\"\n    docker stop $(docker ps -aq --filter name=${container_name})\n    docker rm -f $(docker ps -aq --filter name=${container_name})\n    echo -e \"${SUCCESS} Container [ ${container_name} ] removed successfully.\"\n}\n\n# Remove the Docker image\ndocker_image_remove() {\n    local image_name=\"${1}\"\n    [[ -n \"${image_name}\" ]] || error_msg \"Docker image name is empty!\"\n\n    # Query the image ID based on the image name and remove it\n    echo -e \"${STEPS} Removing image: [ ${image_name} ]...\"\n    docker image rm -f $(docker images -q --filter reference=${image_name})\n    # Automatically remove unused Docker images\n    docker image prune -f >/dev/null\n    echo -e \"${SUCCESS} Image [ ${image_name} ] removed successfully.\"\n}\n\n# Update a Docker container\ndocker_update() {\n    [[ -n \"${image_name}\" && -n \"${container_name}\" ]] || error_msg \"Docker image or container name is empty!\"\n\n    echo -e \"${STEPS} Updating Docker container: [ ${container_name} ]...\"\n    # Update docker image\n    docker pull \"${image_name}\"\n    # Delete old container\n    docker_container_remove \"${container_name}\"\n    # Start a new one\n    sudo bash ${command_docker} -s ${software_id} -m install\n    # Automatically remove unused Docker images\n    docker image prune -f >/dev/null\n}\n\n# Remove a Docker container completely\ndocker_remove() {\n    [[ -n \"${image_name}\" && -n \"${container_name}\" && -n \"${install_path}\" ]] || error_msg \"Docker image, container, or path is empty!\"\n\n    echo -e \"${STEPS} Removing Docker container: [ ${container_name} ]...\"\n    # Delete old container\n    docker_container_remove \"${container_name}\"\n    # Delete old image\n    docker_image_remove \"${image_name}\"\n\n    # Delete the installation directory\n    echo -ne \"${OPTIONS} Delete the [ ${install_path} ] directory? (y/n): \"\n    read del_dir\n    [[ \"${del_dir,,}\" == \"y\" ]] && [[ -d \"${install_path}\" ]] && rm -rf ${install_path} 2>/dev/null\n\n    exit 0\n}\n\n# Initialize variables\ninit_var() {\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"s:m:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -s | --SoftwareID)\n            if [[ -n \"${2}\" ]]; then\n                software_id=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -s parameter [ ${2} ]!\"\n            fi\n            ;;\n        -m | --Manage)\n            if [[ -n \"${2}\" ]]; then\n                if [[ \"${2}\" == \"install\" || \"${2}\" == \"update\" || \"${2}\" == \"remove\" ]]; then\n                    software_manage=\"${2}\"\n                else\n                    error_msg \"Invalid -m parameter [ ${2} ]!\"\n                fi\n                shift 2\n            else\n                error_msg \"Invalid -m parameter [ ${2} ]!\"\n            fi\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n\n    # Get related variables\n    check_release\n    # Execute the corresponding operation command\n    echo -e \"${INFO} Software Manage: [ ${software_id} / ${software_manage} ]\"\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf",
    "content": "#=====================================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Configure software list\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n#=====================================================================================================================\n\n# 1xx for docker\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n# 1.ID   2.Software Name                3.AuthMethod@Package        4.Execute Selection   5.Supported Release\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n101      :Docker                        :dpkg@docker-ce             :command-docker.sh    :all\n102      :Portainer                     :docker@portainer           :command-docker.sh    :all\n103      :Yacht                         :docker@yacht               :command-docker.sh    :all\n104      :Transmission                  :docker@transmission        :command-docker.sh    :all\n105      :qBittorrent                   :docker@qbittorrent         :command-docker.sh    :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n106      :NextCloud                     :docker@nextcloud           :command-docker.sh    :all\n107      :Jellyfin                      :docker@jellyfin            :command-docker.sh    :all\n108      :HomeAssistant                 :docker@homeassistant       :command-docker.sh    :all\n109      :Kodbox                        :docker@kodbox              :command-docker.sh    :all\n110      :CouchPotato                   :docker@couchpotato         :command-docker.sh    :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n111      :Sonarr                        :docker@sonarr              :command-docker.sh    :all\n112      :Radarr                        :docker@radarr              :command-docker.sh    :all\n113      :Syncthing                     :docker@syncthing           :command-docker.sh    :all\n114      :FileBrowser                   :docker@filebrowser         :command-docker.sh    :all\n115      :Heimdall                      :docker@heimdall            :command-docker.sh    :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n116      :Node-RED                      :docker@node-red            :command-docker.sh    :all\n117      :Mosquitto                     :docker@mosquitto           :command-docker.sh    :all\n118      :OpenWrt                       :docker@openwrt             :command-docker.sh    :all\n119      :Netdata                       :docker@netdata             :command-docker.sh    :all\n120      :XunLei                        :docker@xunlei              :command-docker.sh    :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n121      :Docker-Headless               :docker@docker-headless     :command-docker.sh    :all\n122      :Navidrome                     :docker@navidrome           :command-docker.sh    :all\n123      :Alist                         :docker@alist               :command-docker.sh    :all\n124      :QingLong                      :docker@qinglong            :command-docker.sh    :all\n125      :ChatGPT-Next-Web              :docker@chatgpt-next-web    :command-docker.sh    :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n126      :N8N                           :docker@n8n                 :command-docker.sh    :all\n\n\n# 2xx for desktop\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n# 1.ID   2.Software Name                3.AuthMethod@Package        4.Execute Selection   5.Supported Release\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n201      :Desktop                       :dpkg@gdm3                  :command-desktop.sh   :all\n202      :Firefox                       :dpkg@firefox-esr           :command-desktop.sh   :all\n203      :VLC                           :dpkg@vlc                   :command-desktop.sh   :all\n204      :MPV                           :dpkg@mpv                   :command-desktop.sh   :all\n205      :GIMP                          :dpkg@gimp                  :command-desktop.sh   :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n206      :Krita                         :dpkg@krita                 :command-desktop.sh   :all\n207      :LibreOffice                   :dpkg@libreoffice           :command-desktop.sh   :all\n208      :Shotcut                       :dpkg@shotcut               :command-desktop.sh   :all\n209      :Kdenlive                      :dpkg@kdenlive              :command-desktop.sh   :all\n210      :Thunderbird                   :dpkg@thunderbird           :command-desktop.sh   :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n211      :Evolution                     :dpkg@evolution             :command-desktop.sh   :all\n212      :Gwenview                      :dpkg@gwenview              :command-desktop.sh   :all\n213      :Eog                           :dpkg@eog                   :command-desktop.sh   :all\n214      :VisualStudioCode              :which@code                 :command-desktop.sh   :all\n215      :Gedit                         :dpkg@gedit                 :command-desktop.sh   :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n216      :Flameshot                     :dpkg@flameshot             :command-desktop.sh   :all\n\n\n# 3xx for service\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n# 1.ID   2.Software Name                3.AuthMethod@Package        4.Execute Selection   5.Supported Release\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n301      :Frps                          :which@frps                 :301-frps.sh          :all\n302      :Frpc                          :which@frpc                 :302-frpc.sh          :all\n303      :NPS                           :which@nps                  :command-service.sh   :all\n304      :NPC                           :which@npc                  :command-service.sh   :all\n305      :Plex                          :dpkg@plexmediaserver       :command-service.sh   :all\n#--------+------------------------------+---------------------------+---------------------+---------------------------\n306      :Emby-Server                   :dpkg@emby-server           :command-service.sh   :all\n307      :KVM                           :dpkg@virt-manager          :command-service.sh   :all\n308      :PVE                           :dpkg@pve-manager           :command-service.sh   :bullseye@bookworm@trixie\n309      :CasaOS                        :which@casaos               :command-service.sh   :all\n310      :ArozOS                        :find@/root/arozos          :command-service.sh   :all\n\n\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/a311d-oes/bootfs/extlinux/extlinux.conf.bak",
    "content": "label Armbian\n    kernel /zImage\n    initrd /uInitrd\n    fdt /dtb/amlogic/meson-g12b-a311d-oes.dtb\n    append root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 coherent_pool=2M libata.force=noncq ubootpart= fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 loglevel=1 voutmode=hdmi disablehpd=false overscan=100 sdrmode=auto loglevel=1 splash=verbose usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/a311d-oes/bootfs/uEnv.txt",
    "content": "LINUX=/zImage\nINITRD=/uInitrd\nFDT=/dtb/amlogic/meson-g12b-a311d-oes.dtb\nAPPEND=root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 coherent_pool=2M libata.force=noncq ubootpart= fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 loglevel=1 splash=verbose usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/a311d-oes/rootfs/etc/armbian-board-release.conf",
    "content": "#===========================================================================\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# WXY-OES, 4GB-Mem,8GB-eMMC,3xSATA,1Gb-Nic\n#\n# Configuration: /etc/model_database.conf\n# MODEL_ID=\"409\"\n# MODEL_BOARD=\"a311d-oes\"\n# SOC=\"a311d\"\n#\n# ampart /dev/mmcblk2\n# IO seek EPT: Seeking to 37748736\n# EPT report: 20 partitions in the table:\n# ===================================================================================\n# ID| name            |          offset|(   human)|            size|(   human)| masks\n# -----------------------------------------------------------------------------------\n#  0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0\n#     (GAP)                                                 2000000 (  32.00M)\n#  1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  2: cache                     6c00000 ( 108.00M)         20000000 ( 512.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n#  3: env                      27400000 ( 628.00M)           800000 (   8.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  4: logo                     28400000 ( 644.00M)           800000 (   8.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n#  5: recovery                 29400000 ( 660.00M)          1800000 (  24.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n#  6: misc                     2b400000 ( 692.00M)          2000000 (  32.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n#  7: dto                      2dc00000 ( 732.00M)           800000 (   8.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n#  8: cri_data                 2ec00000 ( 748.00M)           800000 (   8.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n#  9: param                    2fc00000 ( 764.00M)          1000000 (  16.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n# 10: boot                     31400000 ( 788.00M)          2000000 (  32.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 11: rsv                      33c00000 ( 828.00M)          1000000 (  16.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 12: tee                      35400000 ( 852.00M)          2000000 (  32.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 13: vendor                   37c00000 ( 892.00M)         10000000 ( 256.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 14: odm                      48400000 (   1.13G)         10000000 ( 256.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 15: system                   58c00000 (   1.39G)         40000000 (1024.00M)      1\n#     (GAP)                                                  800000 (   8.00M)\n# 16: kernel                   99400000 (   2.39G)          2000000 (  32.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n# 17: backup                   9bc00000 (   2.43G)         40000000 (1024.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n# 18: instaboot                dc400000 (   3.44G)         20000000 ( 512.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n# 19: data                     fcc00000 (   3.95G)         d5400000 (   3.33G)      4\n# ===================================================================================\n# EPT report: Minumum block in table: 0x400000, 4194304, 4.000000M\n# CLI dispatcher: invalid mode\n#\n#===========================================================================\n# Set the partition value of a special board (fixed parameter)\nskip_mb=\"700\"\n\n# Set the bootloader write command for a special board (fixed parameters)\nwrite_board_file=\"yes\"\nwrite_board_bootloader() {\n    dd if=\"${bootloader_path}/${board}/bootloader.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 skip=1 seek=1 count=8191 2>/dev/null\n    dd if=\"${bootloader_path}/${board}/reserved.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=1M seek=36 count=8 2>/dev/null\n    dd if=\"${bootloader_path}/${board}/env.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=1M seek=628 count=1 2>/dev/null\n    # echo -e \"${INFO} For [ ${board} ] write special bootloader: ${bootloader_path}/${board}/bootloader.bin\"\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/a311d-oes/rootfs/etc/fw_env.config",
    "content": "/dev/mmcblk2    0x27400000  0x10000  0x10000\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/a311d-oes/rootfs/usr/bin/oes_sata_leds.sh",
    "content": "#!/bin/bash\n# ==================================================================================\n#\n# 脚本用途: 监控 WXY-OES(A311d) 设备 SATA 端口的硬盘活动，并根据硬盘的存在与否控制对应的LED灯。\n# 通用版本: 可自动适应 Armbian 和 OpenWrt 系统\n#\n# 作者: https://github.com/Onlyoooooo\n# 版本: 1.1 (Beta)\n#\n# ==================================================================================\n\n# 定义3个SATA端口到LED设备文件的映射\ndeclare -A PORT_LED_MAP=(\n    [\"ata1\"]=\"/sys/class/leds/green:disk/brightness\"\n    [\"ata2\"]=\"/sys/class/leds/green:disk_1/brightness\"\n    [\"ata3\"]=\"/sys/class/leds/green:disk_2/brightness\"\n)\n\n# 获取当前所有活动的SATA端口ID (例如 ata1, ata2, ata3)\nget_active_ata_ids() {\n    find /sys/class/block/sd* -exec readlink -f {} + 2>/dev/null | grep -o 'ata[0-9]\\+' | sort -u || true\n}\n\necho \"WXY-OES(A311d) 设备SATA硬盘监测脚本启动，正在初始化LED状态...\"\n\n# 用于存储每个端口的当前状态 (1=亮, 0=灭)\ndeclare -A PORT_STATE\n\n# 获取系统启动时已经连接的硬盘对应的端口列表\nACTIVE_PORTS_AT_BOOT=$(get_active_ata_ids)\n\necho \"开机时检测到的活动端口: ${ACTIVE_PORTS_AT_BOOT}\"\n\n# 遍历关联数组 PORT_LED_MAP 的所有键 (即 \"ata1\", \"ata2\", \"ata3\")\nfor port in \"${!PORT_LED_MAP[@]}\"; do\n    # 默认状态为0 (灯灭)\n    initial_state=0\n\n    # 检查当前遍历的端口是否存在于\"活动端口列表\"中\n    # 使用静默模式，通过退出码(0为成功, 非0为失败)来判断\n    if echo \"${ACTIVE_PORTS_AT_BOOT}\" | grep -q -x \"${port}\"; then\n        # 如果找到，说明有硬盘，状态设为1 (灯亮)\n        initial_state=1\n        echo \"  - 端口 ${port} 检测到活动设备，将点亮LED。\"\n    else\n        echo \"  - 端口 ${port} 未检测到活动设备，将熄灭LED。\"\n    fi\n\n    # 将该端口的初始状态存入 PORT_STATE 关联数组中\n    PORT_STATE[\"${port}\"]=${initial_state}\n\n    # 从 PORT_LED_MAP 关联数组中获取该端口对应的LED文件路径\n    led_file=\"${PORT_LED_MAP[${port}]}\"\n\n    # 检查文件是否存在并且当前用户有写入权限\n    if [[ -w \"${led_file}\" ]]; then\n        # 将初始状态 (0或1) 写入文件来控制LED状态\n        echo \"${initial_state}\" >\"${led_file}\"\n    else\n        echo \"  - 警告: LED文件 '${led_file}' 不存在或不可写。\"\n    fi\ndone\n\necho \"初始化完成，开始监控内核日志...\"\n\n# 初始化一个空变量，用于存储最终要执行的命令。\nMONITOR_CMD=\"\"\n\n# 使用 'command -v' 检查 logread 命令是否存在，判断是否为 OpenWrt 系统。\nif command -v logread >/dev/null 2>&1; then\n    # 如果 logread 命令存在，我们判定为 OpenWrt 系统。\n    echo \"系统环境检测为: OpenWrt，使用 'logread' 进行监控。\"\n    MONITOR_CMD=\"logread -f\"\nelse\n    # 否则，我们判定为 Armbian 或其他标准 Linux 系统。\n    echo \"系统环境检测为: Armbian，使用 'tail' 进行监控。\"\n\n    # [[ -r \"file\" ]]: 检查文件是否存在且可读。\n    if [[ -r \"/var/log/kern.log\" ]]; then\n        # -F 选项比 -f 更强大，它可以正确处理日志文件的轮替(log rotation)。\n        MONITOR_CMD=\"tail -F /var/log/kern.log\"\n    else\n        echo \"错误: /var/log/kern.log 不存在或不可读！无法进行监控。\"\n        exit 1\n    fi\nfi\n\necho \"持续监听SATA硬盘状态...\"\n\n# 使用 tail -F 或 logread -f 持续监控内核日志的变化\n${MONITOR_CMD} 2>/dev/null | while read -r line; do\n    port=\"\"\n    new_value=\"\"\n\n    if [[ \"${line}\" =~ (ata[0-9]+):[[:space:]]SATA[[:space:]]link[[:space:]](up|down) ]]; then\n        port=\"${BASH_REMATCH[1]}\"\n        [[ \"${BASH_REMATCH[2]}\" == \"up\" ]] && new_value=1 || new_value=0\n    elif [[ \"${line}\" =~ (ata[0-9]+)\\.00:[[:space:]]configured ]]; then\n        port=\"${BASH_REMATCH[1]}\"\n        new_value=1\n    elif [[ \"${line}\" =~ (ata[0-9]+):[[:space:]]device_remove ]]; then\n        port=\"${BASH_REMATCH[1]}\"\n        new_value=0\n    elif [[ \"${line}\" =~ (ata[0-9]+):[[:space:]]EH[[:space:]]complete ]]; then\n        port=\"${BASH_REMATCH[1]}\"\n        # 错误处理完成后，重新检查sysfs中的设备状态\n        [[ -d \"/sys/class/ata_port/${port}/device\" ]] && new_value=1 || new_value=0\n    fi\n\n    if [[ -n \"${port}\" && -v \"PORT_LED_MAP[${port}]\" ]]; then\n\n        # 仅当新状态与我们记录的旧状态不同时才进行操作\n        if [[ \"${PORT_STATE[${port}]}\" != \"${new_value}\" ]]; then\n            echo \"\"\n            echo \"[$(date)] 检测到状态变化: 端口 ${port} -> ${new_value} (旧状态: ${PORT_STATE[${port}]})\"\n\n            led_file=\"${PORT_LED_MAP[${port}]}\"\n\n            if [[ -w \"${led_file}\" ]]; then\n                echo \"${new_value}\" >\"${led_file}\"\n                echo \"  - LED状态已更新。\"\n            else\n                echo \"  - 警告: LED文件 '${led_file}' 不可写。\"\n            fi\n\n            # 更新我们内存中的状态记录。\n            PORT_STATE[\"${port}\"]=\"${new_value}\"\n            echo \"正在等待新的内核事件...\"\n        fi\n    fi\ndone\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/alark35-3500/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-alark35-3500.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,115200\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/alark35-3500/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/anas3035/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nconsole=both\nextraargs=cma=256M rw rootwait\noverlay_prefix=rk35xx\nfdtfile=rockchip/rk3568-mmbox-anas3035.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/anas3035/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdkj-bd-one/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-bd-one.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdkj-bd-one/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdkj-bd-one/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3568-nsy-g68-plus.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 loglevel=8 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdkj-bd-one/rootfs/etc/modules-load.d/bridge.conf",
    "content": "br_netfilter\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdkj-bd-one/rootfs/etc/sysctl.d/99-custom.conf",
    "content": "# Enable IP forwarding\nnet.ipv4.ip_forward = 1\n\n# Configure bridged traffic to bypass the firewall\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdy-g18-pro/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-bdy-g18-pro.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdy-g18-pro/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 coherent_pool=2M loglevel=${verbosity} ubootpart=${partuuid} libata.force=noncq usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdy-g18-pro/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3568-bdy-g18-pro.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdy-g18-pro/rootfs/etc/modules-load.d/bridge.conf",
    "content": "br_netfilter\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/bdy-g18-pro/rootfs/etc/sysctl.d/99-custom.conf",
    "content": "# Enable IP forwarding\nnet.ipv4.ip_forward = 1\n\n# Configure bridged traffic to bypass the firewall\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/beikeyun/bootfs/armbianEnv.txt",
    "content": "verbosity=1\noverlay_prefix=rockchip\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nextraargs=usbcore.autosuspend=-1 rw rootwait\nextraboardargs=\nfdtfile=/dtb/rockchip/rk3328-beikeyun-1296mhz.dtb\nkernel_addr_r=0x02000000\nramdisk_addr_r=0x06000000\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/beikeyun/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} panic=10 consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/boca-tcn100/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\noverlay_prefix=rk3588\nfdtfile=rockchip/rk3588s-boca-tcn100.dtb\nrootdev=/dev/mmcblk0p2\nextraargs=rw rootwait net.ifnames=0\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/boca-tcn100/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\necho \"Testing for existence ${devtype} ${devnum} ${prefix}armbianEnv.txt ...\"\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\techo \"Found ${devtype} ${devnum} ${prefix}armbianEnv.txt - loading ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt ...\"\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\techo \"Loaded environment from ${devtype} ${devnum} ${prefix}armbianEnv.txt into ${load_addr} filesize ${filesize}...\"\n\techo \"Importing into environment ...\"\n\tenv import -t ${load_addr} ${filesize}\n\techo \"armbianEnv.txt imported into environment\"\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/boca-tcn100/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  6\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cd1000/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3528-cd1000.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS0,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xff9f0000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3528\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cd1000/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cd1000/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\neth0 \t\t4\neth1\t\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/chainedbox/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=false\noverlay_prefix=rockchip\nfdtfile=/dtb/rockchip/rk3328-l1pro-1296mhz.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nextraargs=usbcore.autosuspend=-1 rw rootwait\nextraboardargs=\nusbstoragequirks=0x05e3:0x0612:u,0x1d6b:0x0003:u,0x05e3:0x0610:u\nconsole=serial\nkernel_addr_r=0x02000000\nramdisk_addr_r=0x06000000\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/chainedbox/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/chainedbox/rootfs/usr/bin/pwm-fan.pl",
    "content": "#!/usr/bin/perl\n\nuse strict;\nuse Sys::Hostname;\nuse File::Glob qw(bsd_glob);\n\n################################################################################\n#个人见解:ophub我家云用的f大的调速脚本,我的理解是根据温度的匀速调速脚本,但是我家云\n#的情况不太一样,我家云主板上的散热器是一块厚铝合金,实际目的是为了增加cpu的热容,使温\n#度不易跳变,由于平时cpu使用频率也很低,温度更多是来自环境温度和硬盘温度,所以我之前的\n#使用爱好是cpu温度低风扇不开启可保证寿命,温度高于65低于75度,风扇低速、低噪音运行,缓\n#慢抽走我家云内热风就行,没有必要强制降低cpu温度,当cpu突破75度,风扇全速运行,强制散热.\n#由于cpu重负载情况不多,所以风扇很少全速开启.\n#这套逻辑使用下来非常满意;\n#20240903 再次修复硬盘未待机低温切换未生效bug;\n#20240708 修复硬盘未待机低温切换未生效bug;\n#         调整未待机时的风扇启动停温度;\n#         修改部分无需变动的变量为未常量;\n#20240624 增加没有内置机械硬盘的情况,可供设置,详细请看my @disks 相关几行;\n#20240618 由于无法在不影响硬盘进入待机状态前提下读取硬盘温度,所以只能简单判断硬盘工作状态,调整风扇启停温度;\n#         增加硬盘待机状态检测,如果硬盘待机,风扇可在cpu温度较高时停转(50度),较高温度起转(65度);如果硬盘未待机,风扇可在cpu温度较低时停转(38度),较低温度起转(55度);\n#         如果你有多块硬盘,并且知道内置硬盘设备名,请修改 #@disks 行代码;         \n#20240618 降低风扇启动温度到57度,为了降低未待机硬盘的温度,感觉硬盘温度还高的朋友可自己降低风扇启动温度;\n#20240604 增加风扇降噪系数（系数可以是小数）,倍数降低风扇温度最高限（最高限默认75度）以下,最低限以上的风扇转速,强调不超温就尽量不让风扇吵闹的原则;\n#         修改风扇停转温度,根据硬盘最佳寿命40度为修改参考;\n#20240428 增加风扇关闭功能,在冬天气温比较低时,如果风扇还旋转,因为热胀冷缩轴承非常容易磨损,天气冷的时候是风扇损坏率较高的时候\n# 参数我已经修改完善,没有特殊情况勿改 -根据F大脚本修改 by Ran\n# cat /sys/devices/virtual/thermal/thermal_zone0/temp #用此行命令可在ssh命令矿中查看cpu实时温度\n# 参数调整区 风扇按照固定占空比启动后10s,根据cpu温度调整转速,低于$temp_low风扇停转,高于$temp_fanOn风扇启动\n\n# 获取所有硬盘设备名称\nmy @disks = bsd_glob(\"/dev/sd[a-z]\");#如果你使用的硬盘比较多,由于我无法判断那块硬盘是内置硬盘,所以视所有硬盘为内置硬盘;两块以上硬盘无法判断内置硬盘带来问题是,风扇无法在cpu较高温度停转;\n  #@disks = (\"/dev/sdb\");  #如果你能确定内置硬盘设备名,请去掉本行代码前面的井号,并修改为硬盘设备名  /dev/sda  或  /dev/sdb  或  /dev/sdc   ...\n  #@disks = (\"0\");\t#如果你没有内置机械硬盘请去掉前面的#号,风扇会比较安静;\n\n# 速度最小值(满速是99),如果太小可能进入死区,风扇不转,需配合下面提示调整\nmy $speed_min = 8;\n\n# 速度最大值(满速是99)\nmy $speed_max = 99;\n\n#当硬盘待机时下面赋值生效\n#$temp_low = temp_low_high;\n#$temp_fanOn = temp_fanOn_high;\n#当硬盘没有待机时下面赋值生效\n#$temp_low = temp_low_low;\n#$temp_fanOn = temp_fanOn_low;\n\n\n# 温度低限(摄氏度): 小于等于此温度风扇停转\nmy $temp_low = 38;\n\n# 温度低限(摄氏度):根据硬盘待机与否设置停转温度\nuse constant temp_low_high => 50;#硬盘待机时cpu温度小于50度,风扇停转\n\nuse constant temp_low_low => 38;#硬盘非待机时cpu温度小于38度,风扇停转\n\n# 风扇启动温度低限(摄氏度): 大于于等于此值按启动风扇散热\nmy $temp_fanOn = 50;\n\n# 风扇启动温度低限(摄氏度):根据硬盘待机与否设置停转温度\nuse constant temp_fanOn_high => 65;#硬盘待机时cpu温度大于65度,风扇启动\n\nuse constant temp_fanOn_low => 50;#硬盘非待机时cpu温度大于55度,风扇启动\n\n# 风扇启动占空比参数(%): 风扇启动时使用固定占空比：风扇启动占空比参数,设置要点:保证能启动同时风扇噪音不要过大\nmy $duty_cycle_on = 5;\n\n# 降噪系数: 降低风扇启动到cpu温度最高限区间的风扇噪音,降低幅度计算1/$fan_n,最终风扇转速=计算转速*(1/$fan_n)+$speed_min\nmy $fan_n = 2;\n\n# 温度最高限(摄氏度): 大于此值按最高速率转动\nmy $temp_high = 75;\n\n# 调速间隔(秒)\nmy $interval = 10;\n################################################################################\n#用到的变量,下面参数勿动\n# 风扇状态位:0为关闭,1为开启\nmy $fanclose_temp = 0;\n\n# 风扇首次启动标志位:0为风扇运转中,1风扇从关闭到开启是第一次运行\nmy $fan_up = 0;\n\n# 风扇切换温度转换值\nmy $coeff_temp = 0;\n\n################################################################################\n\nmy $fixed_speed = $ARGV[0];\nmy $period = 25000;\n&init;\nif( ($fixed_speed ne \"\") && \n    ($fixed_speed =~ m/^[0-9]{1,3}$/) ) {\n    # 如果命令行参数为 0-100 的整数,则按指定的固定速率调速\n    &set_fixed_speed($fixed_speed);\n} else { \n    # 否则自动调速\n    while(1) {\n\t\t#print \"ok 1.\\n\";\n        &auto_speed;\n        sleep($interval);    \n    }\n}\nexit 0;\n\n###############################################################################\nsub get_soc_temp {\n    my @fnames=(\n          '/sys/devices/virtual/thermal/thermal_zone0/temp',\n          '/sys/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/temp1_input',\n       );\n    my $fh;\n    my $temp = 50;\n    for my $fname (@fnames) {\n        if( -f $fname ) {\n            open $fh, \"<\", $fname;\n            $temp = <$fh> / 1000.0;\n            close $fh;\n            return $temp;\n        }\n    }\n    return $temp;\n}\n\nsub init {\n\n    $speed_max = 100  if ($speed_max > 100);\n    $speed_min = 0  if($speed_min < 0);\n\n    my $fh;\n    `rmmod pwm_fan 2>/dev/null`;\n\n    open $fh, \">\", \"/sys/class/pwm/pwmchip0/export\";\n    print $fh \"0\\n\";\n    close $fh;\n\n    open $fh, \">\", \"/sys/class/pwm/pwmchip0/pwm0/period\";\n    print $fh \"$period\\n\";\n    close $fh;\n\n    open $fh, \">\", \"/sys/class/pwm/pwmchip0/pwm0/polarity\";\n    print $fh \"normal\\n\";\n    close $fh;\n\n    open $fh, \">\", \"/sys/class/pwm/pwmchip0/pwm0/enable\";\n    print $fh \"1\\n\";\n    close $fh;\n}\n\nsub set_fixed_speed {\n    my $fixed_speed = shift;\n\n    # 最大值0.99\n    my $coeff_speed = ($fixed_speed / 100.0) > 1 ?  0.99 :($fixed_speed / 100.0);\n\n    #0.1-0.19 定义为死区\n    $coeff_speed = 0.20 if $coeff_speed > 0 and $coeff_speed < 0.2;\n\n    my $duty_cycle = int($coeff_speed * $period);\n\n    open my $fh, \">\", \"/sys/class/pwm/pwmchip0/pwm0/duty_cycle\";\n    print $fh \"$duty_cycle\\n\";\n    close $fh;\n}\n\nsub auto_speed {\n\n    my $non_standby_disks = 0;\n    if($disks[0] !~ /0/){\n      foreach my $disk (@disks) {\n      # 检查每个硬盘的电源状态\n      my $state = `hdparm -C $disk`;\n      if ($state !~ /standby/) {\n        #print \"Disk $disk is not in standby mode.\\n\";\n        $non_standby_disks++;\n        }\n      }\n    }\n     #根据硬盘状态调整风扇启停温度\n     if($non_standby_disks == 0){\n        $temp_low = temp_low_high;\n        $temp_fanOn = temp_fanOn_high;\n     }else {\n        $temp_low = temp_low_low;\n        $temp_fanOn = temp_fanOn_low;\n     }\n\n    my $temp = &get_soc_temp;\n    #my $coeff_temp;\n    if($temp <= $temp_low) {\n\t        $coeff_temp = 0;\n\t        $fanclose_temp = 0;\n\t        #$fanclose_temp = 1; #去掉此行代码前的#测试风扇是否可以维持旋转,测试完毕此行代码前加#\n        } elsif($temp > $temp_high) {\n                $coeff_temp = 1;\n\t            $fanclose_temp = 1;\n            } elsif(($temp > $temp_fanOn)&&($fanclose_temp == 0)){\n\t                $fan_up = 1; #风扇启转,设置首启转志位\n\t                $fanclose_temp = 1; \n\t            }else {\n                        $coeff_temp = ($temp - $temp_low) / (($temp_high - $temp_low)*$fan_n);\n                    }\n\n    my $coeff_speed_min = $speed_min / $speed_max  * ($speed_max / 100);\n    my $coeff_speed = $coeff_temp; \n    $coeff_speed = ($coeff_speed_min + $coeff_speed) > 0.99 ? 0.99 :($coeff_speed_min + $coeff_speed);\n   \n    my $duty_cycle = int($coeff_speed * $period);\n\n    if($fanclose_temp == 0) {\n\t        $duty_cycle = 0;\n        }elsif(($fanclose_temp == 1)&&($fan_up == 1)){\n\t\t    $duty_cycle = $duty_cycle_on ;\n\t\t    $fan_up = 0; #风扇已启动,清零首启转标志位\n\t\t}else{\n\t\t }\n\n    open my $fh, \">\", \"/sys/class/pwm/pwmchip0/pwm0/duty_cycle\";\n    print $fh \"$duty_cycle\\n\";\n    close $fh;\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cm3588-nas/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nconsole=both\nextraargs=cma=256M\noverlay_prefix=rk3588\nfdtfile=rockchip/rk3588-friendlyelec-cm3588-nas.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=btrfs\nrootflags=compress=zstd:6\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cm3588-nas/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/cm3588-nas/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/dc-a588/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-dc-a588.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\nearlycon=on\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3588\noverlays=\nuser_overlays=\n\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/dc-a588/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e20c/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=true\nfdtfile=rockchip/rk3528-radxa-e20c.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS0,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xff9f0000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3528\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e20c/bootfs/armbian_first_run.txt.template",
    "content": "#-----------------------------------------------------------------\n# Armbian first run configuration\n# Set optional end user configuration\n#\t- Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt\n#\t- Settings below will be applied only on 1st run of Armbian\n#-----------------------------------------------------------------\n\n#-----------------------------------------------------------------\n# General:\n# 1 = delete this file, after first run setup is completed.\n\nFR_general_delete_this_file_after_completion=1\n\n#-----------------------------------------------------------------\n#Networking:\n# Change default network settings\n# Set to 1 to apply any network related settings below\n\nFR_net_change_defaults=0\n\n# Enable WiFi or Ethernet.\n#\tNB: If both are enabled, WiFi will take priority and Ethernet will be disabled.\n\nFR_net_ethernet_enabled=1\nFR_net_wifi_enabled=0\n\n#Enter your WiFi creds\n#\tSECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.\n\nFR_net_wifi_ssid='MySSID'\nFR_net_wifi_key='MyWiFiKEY'\n\n#\tCountry code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n\nFR_net_wifi_countrycode='GB'\n\n#If you want to use a static ip, set it here\n\nFR_net_use_static=0\nFR_net_static_ip='192.168.0.100'\nFR_net_static_mask='255.255.255.0'\nFR_net_static_gateway='192.168.0.1'\nFR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, seperated by a space.\n#-----------------------------------------------------------------\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e20c/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e20c/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\neth0 \t\t4\neth1\t\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e25/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-radxa-e25.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,115200\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e25/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/e25/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n# Radxa E25 网卡中断优化配置\n# 映射关系: 1->CPU0, 2->CPU1, 3->CPU2, 4->CPU3\n\n# ==========================\n# 1. PCIe LAN (eth0 - RTL8125B)\n# 内网吞吐，RX 和 TX 分开，避开 WAN 的重负载核\n# ==========================\n# RX 队列 (接收内网数据) -> 交给 CPU2, CPU3 (与 GMAC 共享，因为 GMAC 负载低)\neth0-0          4\neth0-1          3\n\n# TX 队列 (发送内网数据) -> 交给 CPU0, CPU1 (为 WAN 腾出 RX 资源)\neth0-16         2\neth0-18         1\n\n# ==========================\n# 2. PCIe WAN (eth1 - RTL8125B) [核心优化区]\n# 负载最重，必须打散！\n# 策略：TX (最重) 占用 CPU0, CPU1; RX 占用 CPU2, CPU3\n# 这样每个核都有 WAN 的任务，但避免了单核过热\n# ==========================\n# TX 队列 (NAT/防火墙主要消耗点)\neth1-16         1\neth1-18         2\n\n# RX 队列 (从外网进入)\n# 放在 CPU2, CPU3，与 LAN RX 共享，因为 RX 主要是 DMA，计算少\neth1-0          3\neth1-1          4\n\n# ==========================\n# 4. USB & Others\n# ==========================\n# usb 3.0\nxhci-hcd:usb2\t2\n# sata\nahci[fc400000.sata] 4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/firefly-rk3399/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty0\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/firefly-rk3399/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3399-firefly.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/gzpeite-p01/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-gzpeite.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/gzpeite-p01/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/gzpeite-p01/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3568-gzpeite.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0  loglevel=8 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h28k/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3528-hlink-h28k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS0,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xff9f0000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3528\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h28k/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h28k/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\neth0 \t\t4\neth1\t\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h66k/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3568-hlink-h66k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h66k/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h66k/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# pcie wan rx\neth0-0\t\t4\n# pcie wan tx-0\neth0-16\t\t1\n# pcie wan tx-1\neth0-18\t\t1\n\n# pcie lan rx\neth1-0\t\t3\n# pcie lan tx-0\neth1-16\t\t2\n# pcie lan tx-1\neth1-18\t\t2\n\n# pcie lan(option) rx\neth2-0\t\t3\n# pcie lan tx-0\neth2-16\t\t2\n# pcie lan tx-1\neth2-18\t\t2\n\n# usb 3.0\nxhci-hcd:usb1\t2\nxhci-hcd:usb3\t1\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h68k/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3568-hlink-h68k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h68k/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h68k/rootfs/etc/balance_irq",
    "content": "# H68K 网卡中断优化配置\n# 映射关系: 1->CPU0, 2->CPU1, 3->CPU2, 4->CPU3\n\n# ==========================\n# 1. GMAC LAN (eth0, eth1)\n# 负载较低，固定在两个核，避免干扰 PCIe 网卡\n# ==========================\neth0            3\neth1            4\n\n# ==========================\n# 2. PCIe LAN (eth2 - RTL8125B)\n# 内网吞吐，RX 和 TX 分开，避开 WAN 的重负载核\n# ==========================\n# RX 队列 (接收内网数据) -> 交给 CPU2, CPU3 (与 GMAC 共享，因为 GMAC 负载低)\neth2-0          4\neth2-1          3\n\n# TX 队列 (发送内网数据) -> 交给 CPU0, CPU1 (为 WAN 腾出 RX 资源)\neth2-16         2\neth2-18         1\n\n# ==========================\n# 3. PCIe WAN (eth3 - RTL8125B) [核心优化区]\n# 负载最重，必须打散！\n# 策略：TX (最重) 占用 CPU0, CPU1; RX 占用 CPU2, CPU3\n# 这样每个核都有 WAN 的任务，但避免了单核过热\n# ==========================\n# TX 队列 (NAT/防火墙主要消耗点)\neth3-16         1\neth3-18         2\n\n# RX 队列 (从外网进入)\n# 放在 CPU2, CPU3，与 LAN RX 共享，因为 RX 主要是 DMA，计算少\neth3-0          3\neth3-1          4\n\n# ==========================\n# 4. USB & Others\n# ==========================\nxhci-hcd:usb1   2\nxhci-hcd:usb3   4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h69k/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3568-hlink-h69k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h69k/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h69k/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# wan\neth0\t\t4\n\n# lan\neth1\t\t1\n\n# pcie lan rx\neth2-0\t\t3\n# pcie lan tx-0\neth2-16\t\t2\n# pcie lan tx-1\neth2-18\t\t2\n\n# pcie lan rx\neth3-0\t\t2\n# pcie lan tx-0\neth3-16\t\t1\n# pcie lan tx-1\neth3-18\t\t1\n\n# usb 3.0\nxhci-hcd:usb1\t2\nxhci-hcd:usb3\t4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-hlink-h88k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\nearlycon=on\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3588\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k-v3/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-hlink-h88k-v3.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\nearlycon=on\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3588\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k-v3/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h88k-v3/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h96-max-m2/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3528-mangopi-m28k.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nextraargs=rw rootwait\nconsole=both\nconsoleargs=console=ttyS2,1500000\noverlay_prefix=rk35xx\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/h96-max-m2/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/hk1-rbox-k8s/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3528-hk1-rbox-k8s.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS0,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xff9f0000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3528\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/hk1-rbox-k8s/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/hk1-rbox-k8s/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\neth0 \t\t4\neth1\t\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ht2/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3528-ht2.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS0,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xff9f0000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3528\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ht2/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ht2/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\neth0 \t\t4\neth1\t\t3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/hugsun-zm/rootfs/root/led-control/aw2028.c",
    "content": "#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <err.h>\n#include <errno.h>\n\n#include <linux/types.h>\n#include <linux/i2c.h>\n#include <linux/i2c-dev.h>\n\n#include <sys/ioctl.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n\n#define I2C_DEV \"/dev/i2c-2\"\n#define AW2028_I2C_ADDR 0x65\n\nint fd = -1;\n\nstatic uint8_t aw2028_init(void)\n{\n\tfd = open(I2C_DEV, O_RDWR);\n\n\tif (fd < 0) {\n\t\tperror(\"Can't open \" I2C_DEV \" \\n\");\n\t\texit(1);\n\t}\n\n\tprintf(\"open \" I2C_DEV \" success !\\n\");\n\n\tif (ioctl(fd, I2C_SLAVE, AW2028_I2C_ADDR) < 0) {\n\t\tperror(\"fail to set i2c device slave address!\\n\");\n\t\tclose(fd);\n\t\treturn -1;\n\t}\n\n\treturn 0;\n}\n\nstatic uint8_t i2c_write(uint8_t reg, uint8_t val)\n{\n\tint retries;\n\tuint8_t data[2];\n\n\tdata[0] = reg;\n\tdata[1] = val;\n\n\tfor (retries = 5; retries; retries--) {\n\t\tif (write(fd, data, 2) == 2) {\n\t\t\treturn 0;\n\t\t}\n\t\tusleep(1000 * 10);\n\t}\n\n\treturn -1;\n}\n\nstatic uint8_t i2c_read(uint8_t reg, uint8_t *val)\n{\n\tint retries;\n\n\tfor (retries = 5; retries; retries--) {\n\t\tif (write(fd, &reg, 1) == 1) {\n\t\t\tif (read(fd, val, 1) == 1) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nunsigned char ms2timer(unsigned int time)\n{\n\tunsigned char i = 0;\n\tunsigned int ref[16] = {4,\t  128,\t256,  384,\t512,  762,\t1024, 1524,\n\t\t\t\t\t\t\t2048, 2560, 3072, 4096, 5120, 6144, 7168, 8192};\n\n\tfor (i = 0; i < 15; i++) {\n\t\tif (time <= ref[0]) {\n\t\t\treturn 0;\n\t\t} else if (time > ref[15]) {\n\t\t\treturn 15;\n\t\t} else if ((time > ref[i]) && (time <= ref[i + 1])) {\n\t\t\tif ((time - ref[i]) <= (ref[i + 1] - time)) {\n\t\t\t\treturn i;\n\t\t\t} else {\n\t\t\t\treturn (i + 1);\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nunsigned char AW2028_LED_ON(unsigned char r, unsigned char g, unsigned char b)\n{\n\ti2c_write(0x00, 0x55);\t// software reset\n\n\ti2c_write(0x01, 0x01);\t// GCR\n\ti2c_write(0x03, 0x01);\t// IMAX\n\ti2c_write(0x04, 0x00);\t// LCFG1\n\ti2c_write(0x05, 0x00);\t// LCFG2\n\ti2c_write(0x06, 0x00);\t// LCFG3\n\ti2c_write(0x07, 0x07);\t// LEDEN\n\n\ti2c_write(0x10, r);\t\t// ILED1\n\ti2c_write(0x11, g);\t\t// ILED2\n\ti2c_write(0x12, b);\t\t// ILED3\n\ti2c_write(0x1C, 0xFF);\t// PWM1\n\ti2c_write(0x1D, 0xFF);\t// PWM2\n\ti2c_write(0x1E, 0xFF);\t// PWM3\n\n\treturn 0;\n}\n\nunsigned char AW2028_LED_OFF(void)\n{\n\ti2c_write(0x00, 0x55);\t// software reset\n\treturn 0;\n}\n\nunsigned char AW2028_LED_Blink(unsigned char r, unsigned char g,\n\t\t\t\t\t\t\t   unsigned char b, unsigned int trise_ms,\n\t\t\t\t\t\t\t   unsigned int ton_ms, unsigned int tfall_ms,\n\t\t\t\t\t\t\t   unsigned int toff_ms)\n{\n\tunsigned char trise, ton, tfall, toff;\n\n\ttrise = ms2timer(trise_ms);\n\tton = ms2timer(ton_ms);\n\ttfall = ms2timer(tfall_ms);\n\ttoff = ms2timer(toff_ms);\n\n\ti2c_write(0x00, 0x55);\t// software reset\n\n\ti2c_write(0x01, 0x01);\t// GCR\n\ti2c_write(0x03, 0x01);\t// IMAX\n\ti2c_write(0x04, 0x01);\t// LCFG1\n\ti2c_write(0x05, 0x01);\t// LCFG2\n\ti2c_write(0x06, 0x01);\t// LCFG3\n\ti2c_write(0x07, 0x07);\t// LEDEN\n\ti2c_write(0x08, 0x08);\t// LEDCTR\n\n\ti2c_write(0x10, r);\t\t// ILED1\n\ti2c_write(0x11, g);\t\t// ILED2\n\ti2c_write(0x12, b);\t\t// ILED3\n\ti2c_write(0x1C, 0xFF);\t// PWM1\n\ti2c_write(0x1D, 0xFF);\t// PWM2\n\ti2c_write(0x1E, 0xFF);\t// PWM3\n\n\ti2c_write(0x30, (trise << 4) | ton);   // PAT_T1               Trise & Ton\n\ti2c_write(0x31, (tfall << 4) | toff);  // PAT_T2               Tfall & Toff\n\ti2c_write(0x32, 0x00);\t// PAT_T3                               Tdelay\n\ti2c_write(0x33, 0x00);\t// PAT_T4         PAT_CTR & Color\n\ti2c_write(0x34, 0x00);\t// PAT_T5                   Timer\n\n\ti2c_write(0x09, 0x07);\t// PAT_RIN\n}\n\nunsigned char AW2028_Audio_Corss_Zero(void)\n{\n\ti2c_write(0x00, 0x55);\t// software reset\n\n\ti2c_write(0x01, 0x01);\t// GCR\n\ti2c_write(0x03, 0x01);\t// IMAX\n\ti2c_write(0x07, 0x07);\t// LEDEN\n\ti2c_write(0x10, 0xFF);\t// ILED1\n\ti2c_write(0x11, 0xFF);\t// ILED2\n\ti2c_write(0x12, 0xFF);\t// ILED3\n\ti2c_write(0x1C, 0xFF);\t// PWM1\n\ti2c_write(0x1D, 0xFF);\t// PWM2\n\ti2c_write(0x1E, 0xFF);\t// PWM3\n\n\ti2c_write(0x40, 0x11);\t// AUDIO_CTR\n\ti2c_write(0x41, 0x07);\t// AUDIO_LEDEN\n\ti2c_write(0x42, 0x00);\t// AUDIO_FLT\n\ti2c_write(0x43, 0x1A);\t// AGC_GAIN\n\ti2c_write(0x44, 0x1F);\t// GAIN_MAX\n\ti2c_write(0x45, 0x3D);\t// AGC_CFG\n\ti2c_write(0x46, 0x14);\t// ATTH\n\ti2c_write(0x47, 0x0A);\t// RLTH\n\ti2c_write(0x48, 0x00);\t// NOISE\n\ti2c_write(0x49, 0x02);\t// TIMER\n\ti2c_write(0x40, 0x13);\t// AUDIO_CTR\n\n\treturn 0;\n}\n\nunsigned char AW2028_Audio_Timer(void)\n{\n\ti2c_write(0x00, 0x55);\t// software reset\n\n\ti2c_write(0x01, 0x01);\t// GCR\n\ti2c_write(0x03, 0x01);\t// IMAX\n\ti2c_write(0x07, 0x07);\t// LEDEN\n\ti2c_write(0x10, 0xFF);\t// ILED1\n\ti2c_write(0x11, 0xFF);\t// ILED2\n\ti2c_write(0x12, 0xFF);\t// ILED3\n\ti2c_write(0x1C, 0xFF);\t// PWM1\n\ti2c_write(0x1D, 0xFF);\t// PWM2\n\ti2c_write(0x1E, 0xFF);\t// PWM3\n\n\ti2c_write(0x40, 0x11);\t// AUDIO_CTR\n\ti2c_write(0x41, 0x07);\t// AUDIO_LEDEN\n\ti2c_write(0x42, 0x00);\t// AUDIO_FLT\n\ti2c_write(0x43, 0x1A);\t// AGC_GAIN\n\ti2c_write(0x44, 0x1F);\t// GAIN_MAX\n\ti2c_write(0x45, 0x3D);\t// AGC_CFG\n\ti2c_write(0x46, 0x14);\t// ATTH\n\ti2c_write(0x47, 0x0A);\t// RLTH\n\ti2c_write(0x48, 0x00);\t// NOISE\n\ti2c_write(0x49, 0x00);\t// TIMER\n\ti2c_write(0x40, 0x0B);\t// AUDIO_CTR\n\n\treturn 0;\n}\n\nunsigned char AW2028_Audio(unsigned char mode)\n{\n\tif (mode > 5) {\n\t\tmode = 0;\n\t}\n\ti2c_write(0x00, 0x55);\t// software reset\n\n\ti2c_write(0x01, 0x01);\t// GCR\n\ti2c_write(0x03, 0x01);\t// IMAX\n\ti2c_write(0x07, 0x07);\t// LEDEN\n\ti2c_write(0x10, 0xFF);\t// ILED1\n\ti2c_write(0x11, 0xFF);\t// ILED2\n\ti2c_write(0x12, 0xFF);\t// ILED3\n\ti2c_write(0x1C, 0xFF);\t// PWM1\n\ti2c_write(0x1D, 0xFF);\t// PWM2\n\ti2c_write(0x1E, 0xFF);\t// PWM3\n\n\ti2c_write(0x40, (mode << 3) | 0x01);  // AUDIO_CTR\n\ti2c_write(0x41, 0x07);\t\t\t\t  // AUDIO_LEDEN\n\ti2c_write(0x42, 0x00);\t\t\t\t  // AUDIO_FLT\n\ti2c_write(0x43, 0x1A);\t\t\t\t  // AGC_GAIN\n\ti2c_write(0x44, 0x1F);\t\t\t\t  // GAIN_MAX\n\ti2c_write(0x45, 0x3D);\t\t\t\t  // AGC_CFG\n\ti2c_write(0x46, 0x14);\t\t\t\t  // ATTH\n\ti2c_write(0x47, 0x0A);\t\t\t\t  // RLTH\n\ti2c_write(0x48, 0x00);\t\t\t\t  // NOISE\n\ti2c_write(0x49, 0x00);\t\t\t\t  // TIMER\n\ti2c_write(0x40, (mode << 3) | 0x03);  // AUDIO_CTR\n\n\treturn 0;\n}\n\nint main(int argc, char **argv)\n{\n\tif (aw2028_init() != 0) {\n\t\texit(-1);\n\t}\n\tAW2028_LED_OFF();\n\t// AW2028_LED_ON(255, 255, 255);\n\t// AW2028_Audio(1);\n\t// AW2028_Audio_Corss_Zero();\n\t// AW2028_Audio_Timer();\n\tAW2028_Audio(3);\n\t// AW2028_LED_ON(255, 255, 255);\n\t// AW2028_LED_Blink(255,255,255, 10, 7, 10, 2);\n\twhile (1) {\n\t\tAW2028_LED_Blink(255, 255, 255, 1000, 0, 1000, 1000);\n\t\tsleep(2);\n\t\tAW2028_LED_Blink(0, 255, 255, 1000, 0, 1000, 1000);\n\t\tsleep(2);\n\t\tAW2028_LED_Blink(255, 0, 255, 1000, 0, 1000, 1000);\n\t\tsleep(2);\n\t\tAW2028_LED_Blink(255, 255, 0, 1000, 0, 1000, 1000);\n\t\tsleep(2);\n\t\tAW2028_LED_Blink(0, 0, 0, 1000, 0, 1000, 1000);\n\t\tsleep(2);\n\t}\n\treturn 0;\n}"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ipc-r/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-nvr-demo-v10-android.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=btrfs\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3588\noverlays=uart7-m2\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ipc-r/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ipc-r/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# lan\neth0\t\t1\n\n# lan\neth1\t\t2\n\n# pcie lan rx\neth2-0\t\t3\n# pcie lan tx-0\neth2-16\t\t2\n# pcie lan tx-1\neth2-18\t\t2\n\n# pcie wan rx\neth3-0\t\t4\n# pcie wan tx-0\neth3-16\t\t1\n# pcie wan tx-1\neth3-18\t\t1\n\n# usb 3.0\nxhci-hcd:usb1\t1\nxhci-hcd:usb3\t2\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/jp-tvbox/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3566-jp-tvbox.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3566\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/jp-tvbox/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/lckfb-tspi/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3566-taishanpi-v10.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3566\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/lckfb-tspi/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/lz-d3588/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=true\nconsole=both\nextraargs=cma=256M\noverlay_prefix=rockchip-rk3588\nfdtfile=rockchip/rk3588-lz-d3588.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/lz-d3588/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/mrkaio-m68s/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-mrkaio-m68s.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,115200\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/mrkaio-m68s/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/mrkaio-m68s/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# pcie-lan rx\neth0-0\t3\n# pcie-lan tx-0\neth0-16 2\n# pcie-lan tx-1\neth0-18 2\n\n# pcie-wan rx\neth1-0\t4\n# pcie wan tx-0\neth1-16\t1\n# pcie wan tx-1\neth1-18\t1\n\n# usb 3.0\nxhci-hcd:usb2\t1\n\n# sata\nahci[fc400000.sata] 2\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nanopc-t6/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3588-nanopc-t6.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3588\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nanopc-t6/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nanopi-m5/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=true\nconsole=both\noverlay_prefix=rk35xx\noverlays=\nfdtfile=rockchip/rk3576-nanopi-m5.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nanopi-m5/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x48000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS0,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g16-plus/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-nsy-g16-plus.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g16-plus/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 coherent_pool=2M loglevel=${verbosity} ubootpart=${partuuid} libata.force=noncq usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g16-plus/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3568-nsy-g16-plus.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g16-plus/rootfs/etc/modules-load.d/bridge.conf",
    "content": "br_netfilter\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g16-plus/rootfs/etc/sysctl.d/99-custom.conf",
    "content": "# Enable IP forwarding\nnet.ipv4.ip_forward = 1\n\n# Configure bridged traffic to bypass the firewall\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g68-plus/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-nsy-g68-plus.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g68-plus/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g68-plus/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3568-nsy-g68-plus.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0  loglevel=8 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g68-plus/rootfs/etc/modules-load.d/bridge.conf",
    "content": "br_netfilter\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/nsy-g68-plus/rootfs/etc/sysctl.d/99-custom.conf",
    "content": "# Enable IP forwarding\nnet.ipv4.ip_forward = 1\n\n# Configure bridged traffic to bypass the firewall\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-3b/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nconsole=both\nextraargs=cma=256M\noverlay_prefix=rk3566\nfdtfile=rockchip/rk3566-orangepi-3b.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-3b/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5-plus/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-orangepi-5-plus.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=btrfs\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3588\noverlays=uart7-m2\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5-plus/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5-plus/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5b/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588s-orangepi-5b.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=btrfs\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3588\noverlays=uart7-m2\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5b/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/orangepi-5b/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb2  2\nxhci-hcd:usb7  3\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/panther-x2/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3566-panther-x2.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nearlycon=on\nconsole=both\nconsoleargs=console=ttyS02,1500000 console=tty0\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/panther-x2/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty0\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS02,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/photonicat/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-photonicat.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/photonicat/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs} net.ifnames=0 biosdevname=0\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/photonicat/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  6\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/r66s/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# pcie-lan rx\neth0-0  3\n# pcie-lan tx-0\neth0-16 2\n# pcie-lan tx-1\neth0-18 1\n\n# pcie-wan rx\neth1-0  2\n# pcie wan tx-0\neth1-16 3\n# pcie wan tx-1\neth1-18 4\n\n# usb 3.0\nxhci-hcd:usb1   1\nxhci-hcd:usb3   4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/r68s/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3568-fastrhino-r68s.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/r68s/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/r68s/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# lan\neth0\t\t1\n\n# lan\neth1\t\t2\n\n# pcie lan rx\neth2-0\t\t3\n# pcie lan tx-0\neth2-16\t\t2\n# pcie lan tx-1\neth2-18\t\t2\n\n# pcie wan rx\neth3-0\t\t4\n# pcie wan tx-0\neth3-16\t\t1\n# pcie wan tx-1\neth3-18\t\t1\n\n# usb 3.0\nxhci-hcd:usb1\t1\nxhci-hcd:usb3\t2\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock-5-itx/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=true\nconsole=both\nextraargs=cma=256M\noverlay_prefix=rockchip-rk3588\nfdtfile=rockchip/rk3588-rock-5-itx.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock-5-itx/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5b/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3588-rock-5b.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=btrfs\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3588\noverlays=uart7-m2\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5b/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5b/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5c/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\noverlay_prefix=rk3588\nfdtfile=rockchip/rk3588s-rock-5c.dtb\nrootdev=/dev/mmcblk0p2\nextraargs=rw rootwait\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5c/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\necho \"Testing for existence ${devtype} ${devnum} ${prefix}armbianEnv.txt ...\"\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\techo \"Found ${devtype} ${devnum} ${prefix}armbianEnv.txt - loading ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt ...\"\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\techo \"Loaded environment from ${devtype} ${devnum} ${prefix}armbianEnv.txt into ${load_addr} filesize ${filesize}...\"\n\techo \"Importing into environment ...\"\n\tenv import -t ${load_addr} ${filesize}\n\techo \"armbianEnv.txt imported into environment\"\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/rock5c/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  6\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ruisen-box/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3568-ruisen-box.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ruisen-box/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/ruisen-box/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# pcie wan rx\neth0-0\t\t4\n# pcie wan tx-0\neth0-16\t\t1\n# pcie wan tx-1\neth0-18\t\t1\n\n# pcie lan rx\neth1-0\t\t3\n# pcie lan tx-0\neth1-16\t\t2\n# pcie lan tx-1\neth1-18\t\t2\n\n# pcie lan(option) rx\neth2-0\t\t3\n# pcie lan tx-0\neth2-16\t\t2\n# pcie lan tx-1\neth2-18\t\t2\n\n# usb 3.0\nxhci-hcd:usb1\t2\nxhci-hcd:usb3\t1\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/s922x-oes-plus/bootfs/extlinux/extlinux.conf.bak",
    "content": "label Armbian\n    kernel /zImage\n    initrd /uInitrd\n    fdt /dtb/amlogic/meson-g12b-s922x-oes-plus-00050000.dtb\n    append root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 coherent_pool=2M libata.force=noncq ubootpart= fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 loglevel=1 voutmode=hdmi disablehpd=false overscan=100 sdrmode=auto loglevel=1 splash=verbose usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/s922x-oes-plus/bootfs/uEnv.txt",
    "content": "LINUX=/zImage\nINITRD=/uInitrd\nFDT=/dtb/amlogic/meson-g12b-s922x-oes-plus-00050000.dtb\nAPPEND=root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 coherent_pool=2M libata.force=noncq ubootpart= fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 loglevel=1 splash=verbose usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/s922x-oes-plus/rootfs/etc/armbian-board-release.conf",
    "content": "#===========================================================================\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# WXY-OES-Plus, 4GB-Mem,8GB-eMMC,3xSATA,1Gb-Nic,300MB-Nic\n#\n# Configuration: /etc/model_database.conf\n# MODEL_ID=\"410\"\n# MODEL_BOARD=\"s922x-oes-plus\"\n# SOC=\"s922x\"\n#\n# ampart /dev/mmcblk2\n# IO seek EPT: Seeking to 37748736\n# EPT report: 5 partitions in the table:\n# ===================================================================================\n# ID| name            |          offset|(   human)|            size|(   human)| masks\n# -----------------------------------------------------------------------------------\n#  0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0\n#     (GAP)                                                 2000000 (  32.00M)\n#  1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  2: cache                     6c00000 ( 108.00M)                0 (   0.00B)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  3: env                       7400000 ( 116.00M)           800000 (   8.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  4: data                      8400000 ( 132.00M)        1c9c00000 (   7.15G)      4\n# ===================================================================================\n# EPT report: Minumum block in table: 0x400000, 4194304, 4.000000M\n# CLI dispatcher: invalid mode\n#\n#===========================================================================\n# Set the partition value of a special board (fixed parameter)\nskip_mb=\"117\"\n\n# Set the bootloader write command for a special board (fixed parameters)\nwrite_board_file=\"yes\"\nwrite_board_bootloader() {\n    dd if=\"${bootloader_path}/${board}/bootloader.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 skip=1 seek=1 count=8191 2>/dev/null\n    dd if=\"${bootloader_path}/${board}/reserved.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=1M seek=36 count=8 2>/dev/null\n    dd if=\"${bootloader_path}/${board}/env.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=1M seek=116 count=1 2>/dev/null\n    # echo -e \"${INFO} For [ ${board} ] write special bootloader: ${bootloader_path}/${board}/bootloader.bin\"\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/s922x-oes-plus/rootfs/etc/fw_env.config",
    "content": "/dev/mmcblk2    0x7400000  0x10000  0x10000\n#/dev/mmcblk2    0x27400000  0x10000  0x10000\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/smart-am60/bootfs/armbianEnv.txt",
    "content": "verbosity=9\nbootlogo=true\nfdtfile=rockchip/rk3588-smart-am60.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyFIQ0 console=tty1\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3588\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/smart-am60/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/smart-am60/rootfs/etc/balance_irq",
    "content": "xhci-hcd:usb5  5\nxhci-hcd:usb7  7\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/station-m2/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=true\nfdtfile=rockchip/rk3566-roc-pc.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=compress=zstd:6\nearlycon=on\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nextraargs=cma=256M rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk35xx\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/station-m2/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\ntest -n \"${distro_bootpart}\" || distro_bootpart=1\n\necho \"Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}\"\n\nif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\telif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\necho \"Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards.\"\nkaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/swan1-w28/bootfs/armbianEnv.txt",
    "content": "verbosity=9\nbootlogo=false\nfdtfile=rockchip/rk3568-swan1-w28.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nconsole=serial\nconsoleargs=console=ttyS2,1500000\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nearlycon=on\nearlyconargs=earlycon=uart8250,mmio32,0xfe660000\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0\noverlay_prefix=rk3568\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/swan1-w28/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x39000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"${consoleargs} console=tty1\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"${earlyconargs} ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -n 'flatmax load script' -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/swan1-w28/rootfs/etc/balance_irq",
    "content": "# /etc/balance_irq\n# 用于中断设备的负载均衡\n# 用法：\n# 首先， 用 cat /proc/interrupts 进行观察\n#        如果某个cpu负载过重，可以把对应的中断设备迁移到其它cpu\n#  /proc/interrupt格式：\n#        最左列：中断号\n#        第 2 至第 2+cpus 列：cpu单核上产生的中断数量\n#        最右列：对应的设备名\n#\n# 本配置文件格式：\n#        第1列： 设备名\n#        第2列： 期望绑定在第几个cpu (从1开始)\n#\n#  配置文件改好，运行 balethirq.pl 即时生效\n\n# pcie-lan rx\neth0-0\t3\n# pcie-lan tx-0\neth0-16 2\n# pcie-lan tx-1\neth0-18 2\n\n# pcie-wan rx\neth1-0\t4\n# pcie wan tx-0\neth1-16\t1\n# pcie wan tx-1\neth1-18\t1\n\n# usb 3.0\nxhci-hcd:usb2\t1\n\n# sata\nahci[fc400000.sata] 2\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/vplus/rootfs/usr/bin/rgb-vplus",
    "content": "#!/usr/bin/env perl\n\nuse strict;\nuse threads;\nuse Getopt::Long qw(:config no_ignore_case);\n\nmy $version=\"1.0.0\";\n\nmy %leds = (\n\tred\t\t=>\t\"surround:red\",\n\tgreen\t\t=>\t\"surround:green\",\n\tblue\t\t=>\t\"surround:blue\",\n\tuser\t\t=>\t\"led-user\",\n);\n\nmy %fixed_delay_secs = (\n\tred_on\t\t=>\t5,\n\tred_off\t\t=>\t2,\n\tgreen_on\t=>\t8,\n\tgreen_off\t=>\t4,\n\tblue_on\t\t=>\t13,\n\tblue_off\t=>\t8,\n);\n\nmy %triggers = (\n\ton\t\t=>\t\"default-on\",\n\toff\t\t=>\t\"none\",\n\theartbeat\t=>\t\"heartbeat\",\n\ttimer\t\t=>\t\"timer\",\n);\n\nmy $opt_red_mode = \"fixed\";  # fixed | random\nmy $opt_green_mode = \"fixed\";  # fixed | random\nmy $opt_blue_mode = \"fixed\";  # fixed | random\nmy $opt_red_led_name;\nmy $opt_green_led_name;\nmy $opt_blue_led_name;\nmy $opt_red_led_on_secs;\nmy $opt_red_led_off_secs;\nmy $opt_green_led_on_secs;\nmy $opt_green_led_off_secs;\nmy $opt_blue_led_on_secs;\nmy $opt_blue_led_off_secs;\nmy $opt_want_help;\n\nGetOptions(\n\t'RedMode=s'\t\t=>\t\\$opt_red_mode,\n\t'GreenMode=s'\t\t=>\t\\$opt_green_mode,\n\t'BlueMode=s'\t\t=>\t\\$opt_blue_mode,\n\n\t'RedName=s'\t\t=>\t\\$opt_red_led_name,\n\t'GreenName=s'\t\t=>\t\\$opt_green_led_name,\n\t'BlueName=s'\t\t=>\t\\$opt_blue_led_name,\n\n\t'RedOnSecs=i'\t\t=>\t\\$opt_red_led_on_secs,\n\t'RedOffSecs=i'\t\t=>\t\\$opt_red_led_off_secs,\n\n\t'GreenOnSecs=i'\t\t=>\t\\$opt_green_led_on_secs,\n\t'GreenOffSecs=i'\t=>\t\\$opt_green_led_off_secs,\n\n\t'BlueOnSecs=i'\t\t=>\t\\$opt_blue_led_on_secs,\n\t'BlueOffSecs=i'\t\t=>\t\\$opt_blue_led_off_secs,\n\n\t'help|?'\t\t=>\t\\$opt_want_help,\n);\n&usage if $opt_want_help;\n\n$leds{red} = $opt_red_led_name if $opt_red_led_name;\n$leds{green} = $opt_green_led_name if $opt_green_led_name;\n$leds{blue} = $opt_blue_led_name if $opt_blue_led_name;\n\n$fixed_delay_secs{red_on} = $opt_red_led_on_secs if $opt_red_led_on_secs;\n$fixed_delay_secs{red_off} = $opt_red_led_off_secs if $opt_red_led_off_secs;\n\n$fixed_delay_secs{green_on} = $opt_green_led_on_secs if $opt_green_led_on_secs;\n$fixed_delay_secs{green_off} = $opt_green_led_off_secs if $opt_green_led_off_secs;\n\n$fixed_delay_secs{blue_on} = $opt_blue_led_on_secs if $opt_blue_led_on_secs;\n$fixed_delay_secs{blue_off} = $opt_blue_led_off_secs if $opt_blue_led_off_secs;\n\nmy $th_red = threads->create( {'exit'=>'thread_only'}, \\&led_tune, \"red\", $opt_red_mode);\nmy $th_green = threads->create( {'exit'=>'thread_only'}, \\&led_tune, \"green\", $opt_green_mode);\nmy $th_blue = threads->create( {'exit'=>'thread_only'}, \\&led_tune, \"blue\", $opt_blue_mode);\n\n$th_red->join();\n$th_green->join();\n$th_blue->join();\nexit(0);\n\n### subs #########################################################################################\nsub led_trigger {\n\tmy($led_name, $led_trigger) = @_;\n\tmy $led_sys_path = \"/sys/class/leds/$leds{${led_name}}\";\n\tif(! -d $led_sys_path) {\n\t\treturn;\n\t}\n\tif(! $triggers{$led_trigger}) {\n\t\treturn;\n\t}\n\topen my $fh, \">\" , \"${led_sys_path}/trigger\" or warn $!;\n\tprint $fh $triggers{$led_trigger};\n\tclose $fh;\n}\n\nsub led_tune {\n\tmy ($led_name, $tune_mode) = @_;\n\tif($tune_mode eq \"fixed\") {\n\t\tmy $current_stats = \"off\";\n\t\twhile(1) {\n\t\t\tif($current_stats eq \"off\") {\n\t\t\t\tmy $delay_sec = $fixed_delay_secs{${led_name}.\"_on\"};\n\t\t\t\t&led_trigger($led_name, \"on\");\n\t\t\t\tsleep($delay_sec);\n\t\t\t\t$current_stats = \"on\";\n\t\t\t} else {\n\t\t\t\tmy $delay_sec = $fixed_delay_secs{${led_name}.\"_off\"};\n\t\t\t\t&led_trigger($led_name, \"off\");\n\t\t\t\tsleep($delay_sec);\n\t\t\t\t$current_stats = \"off\";\n\t\t\t}\n\t\t}\n\t} elsif($tune_mode eq \"random\") {\n\t\tmy $current_stats = \"off\";\n\t\twhile(1) {\n\t\t\tmy $delay_sec = int(rand(9)) + 1;\n\t\t\tif($current_stats eq \"off\") {\n\t\t\t\t&led_trigger($led_name, \"on\");\n\t\t\t\tsleep($delay_sec);\n\t\t\t\t$current_stats = \"on\";\n\t\t\t} else {\n\t\t\t\t&led_trigger($led_name, \"off\");\n\t\t\t\tsleep($delay_sec);\n\t\t\t\t$current_stats = \"off\";\n\t\t\t}\n\t\t}\n\t} elsif($tune_mode eq \"on\") {\n\t\t&led_trigger($led_name, \"on\");\n\t\texit;\n\t} elsif($tune_mode eq \"off\") {\n\t\t&led_trigger($led_name, \"off\");\n\t\texit;\n\t}\n}\n\nsub usage {\n    my $usage = \"\\n\".\n      \"程序描述: RGB LED Control\\n\".\n      \"版    本: $version\\n\".\n      \"作    者: flippy (flippy\\@sina.com)\\n\".\n      \"\\n\".\n      \"用法: $0 [可选参数]\".\n      \"\\n\".\n      \"可选参数:\\n\".\n      \"  --RedMode=fixed|random|on|off             红色 LED 闪烁模式: 固定间隔(fixed)或随机间隔(random)或常开或常闭 (默认: fixed)\\n\".\n      \"  --GreenMode=fixed|random|on|off           绿色 LED 闪烁模式: 固定间隔(fixed)或随机间隔(random)或常开或常闭 (默认: fixed)\\n\".\n      \"  --BlueMode=fixed|random|on|off            蓝色 LED 闪烁模式: 固定间隔(fixed)或随机间隔(random)或常开或常闭 (默认: fixed)\\n\".\n      \"\\n\".\n      \"  --RedName=name                            红色 LED 对应的系统设备名 (默认: surround:red)\\n\".\n      \"  --GreenName=name                          绿色 LED 对应的系统设备名 (默认: surround:green)\\n\".\n      \"  --BlueName=name                           蓝色 LED 对应的系统设备名 (默认: surround:blue)\\n\".\n      \"\\n\".\n      \"  --RedOnSecs=secs                          红色 LED 固定模式下每次点亮的秒数 (默认: 5)\\n\".\n      \"  --RedOffSecs=secs                         红色 LED 固定模式下每次关闭的秒数 (默认: 2)\\n\".\n      \"\\n\".\n      \"  --GreenOnSecs=secs                        绿色 LED 固定模式下每次点亮的秒数 (默认: 8)\\n\".\n      \"  --GreenOffSecs=secs                       绿色 LED 固定模式下每次关闭的秒数 (默认: 4)\\n\".\n      \"\\n\".\n      \"  --BlueOnSecs=secs                         蓝色 LED 固定模式下每次点亮的秒数 (默认: 13)\\n\".\n      \"  --BlueOffSecs=secs                        蓝色 LED 固定模式每次关闭的秒数 (默认: 8)\\n\".\n      \"\\n\".\n      \"  --help 或 -h 或 -?                        打印帮助信息\\n\".\n      \"\\n\"\n      ;\n    die $usage;\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wocyber-a3/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3568-wocyber-a3.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3568\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wocyber-a3/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3566-wxy-oec-turbo-4g.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3566\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv scriptaddr \"0x32000000\"\nsetenv kernel_addr_r \"0x34000000\"\nsetenv fdt_addr_r \"0x4080000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk1p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\n\n# odroid c4 legacy kernel values from boot.ini\n\nsetenv dtb_loadaddr \"0x1000000\"\nsetenv k_addr \"0x1100000\"\nsetenv loadaddr \"0x1B00000\"\nsetenv initrd_loadaddr \"0x4080000\"\n\nsetenv display_autodetect \"true\"\n# HDMI Mode\n# Resolution Configuration\n#    Symbol             | Resolution\n# ----------------------+-------------\n#    \"480x272p60hz\"     | 480x272 Progressive 60Hz\n#    \"480x320p60hz\"     | 480x320 Progressive 60Hz\n#    \"480p60hz\"         | 720x480 Progressive 60Hz\n#    \"576p50hz\"         | 720x576 Progressive 50Hz\n#    \"720p60hz\"         | 1280x720 Progressive 60Hz\n#    \"720p50hz\"         | 1280x720 Progressive 50Hz\n#    \"1080p60hz\"        | 1920x1080 Progressive 60Hz\n#    \"1080p50hz\"        | 1920x1080 Progressive 50Hz\n#    \"1080p30hz\"        | 1920x1080 Progressive 30Hz\n#    \"1080p24hz\"        | 1920x1080 Progressive 24Hz\n#    \"1080i60hz\"        | 1920x1080 Interlaced 60Hz\n#    \"1080i50hz\"        | 1920x1080 Interlaced 50Hz\n#    \"2160p60hz\"        | 3840x2160 Progressive 60Hz\n#    \"2160p50hz\"        | 3840x2160 Progressive 50Hz\n#    \"2160p30hz\"        | 3840x2160 Progressive 30Hz\n#    \"2160p25hz\"        | 3840x2160 Progressive 25Hz\n#    \"2160p24hz\"        | 3840x2160 Progressive 24Hz\n#    \"smpte24hz\"        | 3840x2160 Progressive 24Hz SMPTE\n#    \"2160p60hz420\"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0\n#    \"2160p50hz420\"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0\n#    \"640x480p60hz\"     | 640x480 Progressive 60Hz\n#    \"800x480p60hz\"     | 800x480 Progressive 60Hz\n#    \"800x600p60hz\"     | 800x600 Progressive 60Hz\n#    \"1024x600p60hz\"    | 1024x600 Progressive 60Hz\n#    \"1024x768p60hz\"    | 1024x768 Progressive 60Hz\n#    \"1280x800p60hz\"    | 1280x800 Progressive 60Hz\n#    \"1280x1024p60hz\"   | 1280x1024 Progressive 60Hz\n#    \"1360x768p60hz\"    | 1360x768 Progressive 60Hz\n#    \"1440x900p60hz\"    | 1440x900 Progressive 60Hz\n#    \"1600x900p60hz\"    | 1600x900 Progressive 60Hz\n#    \"1600x1200p60hz\"   | 1600x1200 Progressive 60Hz\n#    \"1680x1050p60hz\"   | 1680x1050 Progressive 60Hz\n#    \"1920x1200p60hz\"   | 1920x1200 Progressive 60Hz\n#    \"2560x1080p60hz\"   | 2560x1080 Progressive 60Hz\n#    \"2560x1440p60hz\"   | 2560x1440 Progressive 60Hz\n#    \"2560x1600p60hz\"   | 2560x1600 Progressive 60Hz\n#    \"3440x1440p60hz\"   | 3440x1440 Progressive 60Hz\nsetenv hdmimode \"1080p60hz\"\nsetenv monitor_onoff \"false\"\nsetenv overscan \"100\"\nsetenv sdrmode \"auto\"\nsetenv voutmode \"hdmi\"\nsetenv disablehpd \"false\"\nsetenv cec \"false\"\nsetenv disable_vu7 \"true\"\nsetenv max_freq_a55 \"1908\"\n#setenv max_freq_a55 \"2100\"\nsetenv maxcpus \"4\"\n\n# Show what uboot default fdtfile is\necho \"U-boot default fdtfile: ${fdtfile}\"\necho \"Current variant: ${variant}\"\n# there is a mismatch between u-boot and kernel in the n2-plus/n2_plus DTB filename.\n# Also u-boot can't seem to decide between having, or not, 'amlogic/' in there.\nif test \"${variant}\" = \"n2_plus\"; then\n\tsetenv fdtfile \"amlogic/meson-g12b-odroid-n2-plus.dtb\"\n\techo \"For variant ${variant}, set default fdtfile: ${fdtfile}\"\nfi\n\nif test \"${variant}\" = \"n2-plus\"; then\n\tsetenv fdtfile \"amlogic/meson-g12b-odroid-n2-plus.dtb\"\n\techo \"For variant ${variant} (dash version, 2021.07 or up), set default fdtfile: ${fdtfile}\"\nfi\n\n# legacy kernel values from boot.ini\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${scriptaddr} ${prefix}armbianEnv.txt\n\tenv import -t ${scriptaddr} ${filesize}\nfi\n\n# get PARTUUID of first partition on SD/eMMC it was loaded from\n# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\nif test \"${console}\" = \"display\"; then setenv consoleargs \"console=tty1\"; fi\n\necho \"Current fdtfile after armbianEnv: ${fdtfile}\"\n\nif test -e ${devtype} ${devnum} ${prefix}zImage; then\n\t# legacy kernel boot\n\n\tif test \"${console}\" = \"serial\"; then setenv consoleargs \"console=ttyS0,115200\"; fi\n\tif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS0,115200 console=tty1\"; fi\n\tif test \"${console}\" = \"serial\"; then setenv consoleargs \"console=ttyS0,115200\"; fi\n\tif test \"${bootlogo}\" = \"true\"; then\n\t\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\n\telse\n\t\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\n\tfi\n\n\tsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 coherent_pool=2M loglevel=${verbosity} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a55=${max_freq_a55} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} ${cec_enable} sdrmode=${sdrmode}\"\n\techo \"Legacy bootargs: ${bootargs}\"\n\n\tload ${devtype} ${devnum} ${k_addr} boot/zImage\n\tload ${devtype} ${devnum} ${dtb_loadaddr} boot/dtb/${fdtfile}\n\tload ${devtype} ${devnum} ${initrd_loadaddr} boot/uInitrd\n\tfdt addr ${dtb_loadaddr}\n\tunzip ${k_addr} ${loadaddr}\n\tbooti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}\nelse\n\t# modern kernel boot\n\n\tif test \"${console}\" = \"serial\"; then setenv consoleargs \"console=ttyAML0,115200\"; fi\n\tif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyAML0,115200 console=tty1\"; fi\n\tif test \"${console}\" = \"serial\"; then setenv consoleargs \"console=ttyAML0,115200\"; fi\n\tif test \"${bootlogo}\" = \"true\"; then\n\t\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\n\telse\n\t\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\n\tfi\n\tif test \"${disable_vu7}\" = \"false\"; then setenv usbhidquirks \"usbhid.quirks=0x0eef:0x0005:0x0004\"; fi\n\n\tsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 coherent_pool=2M loglevel=${verbosity} ubootpart=${partuuid} libata.force=noncq usb-storage.quirks=${usbstoragequirks} ${usbhidquirks} ${extraargs} ${extraboardargs}\"\n\tif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=memory\"; fi\n\techo \"Mainline bootargs: ${bootargs}\"\n\n\tload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\n\tload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\n\tfdt addr ${fdt_addr_r}\n\tfdt resize 65536\n\tfor overlay_file in ${overlays}; do\n\t\tif load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\t\tfdt apply ${scriptaddr} || setenv overlay_error \"true\"\n\t\tfi\n\tdone\n\n\tfor overlay_file in ${user_overlays}; do\n\t\tif load ${devtype} ${devnum} ${scriptaddr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\t\tfdt apply ${scriptaddr} || setenv overlay_error \"true\"\n\t\tfi\n\tdone\n\n\tif test \"${overlay_error}\" = \"true\"; then\n\t\techo \"Error applying DT overlays, restoring original DT\"\n\t\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\n\telse\n\t\tif load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-fixup.scr; then\n\t\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\t\tsource ${scriptaddr}\n\t\tfi\n\t\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\t\tload ${devtype} ${devnum} ${scriptaddr} ${prefix}fixup.scr\n\t\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\t\tsource ${scriptaddr}\n\t\tfi\n\tfi\n\n\tbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\nfi\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3566-wxy-oec-turbo-4g.dtb\n  APPEND root=LABEL=ROOTFS earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect/rootfs/etc/armbian-board-release.conf",
    "content": "#===========================================================================\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# WXY-OEC-turbo-4g(Original-Edition), 4GB-LPDDR4,8G-eMMC,1xSATA,1Gb-Nic\n#\n# Configuration: /etc/model_database.conf\n# MODEL_ID=\"r306\"\n# MODEL_BOARD=\"wxy-oect\"\n#\n#===========================================================================\n\n# Set the partition value of a special board (fixed parameter)\nskip_mb=\"180\"\n\n# Set the bootloader write command for a special board (fixed parameters)\nwrite_board_file=\"yes\"\nwrite_board_bootloader() {\n    dd if=\"${bootloader_path}/env.bin\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=294912 2>/dev/null\n    # echo -e \"${INFO} For [ ${board} ] write special bootloader: ${bootloader_path}/env.bin\"\n}\n\n# Set the kernel file adjustment command for a special board (fixed parameters)\nadjust_kernel_files=\"yes\"\nadjust_kernel_files_cmd() {\n    (cd ${tag_bootfs} && ln -sf initrd.img-${kernel_name} uInitrd)\n}\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect/rootfs/etc/fw_env.config",
    "content": "/dev/mmcblk0 0x9000000 0x10000 0x10000\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect-mod/bootfs/armbianEnv.txt",
    "content": "verbosity=7\nbootlogo=true\nfdtfile=rockchip/rk3566-wxy-oec-turbo-4g.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\nearlycon=on\nconsole=both\nconsoleargs=console=ttyS02,1500000 console=tty0\nusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u\ndocker_optimizations=on\nextraargs=systemd.unified_cgroup_hierarchy=0 rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\noverlay_prefix=rk3566\noverlays=\nuser_overlays=\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect-mod/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv rootflags \"rw,errors=remount-ro\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty0\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS02,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then setenv consoleargs \"bootsplash.bootfile=bootsplash.armbian ${consoleargs}\"; fi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\n# if test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n# get PARTUUID of first partition on current boot device the boot script was loaded from\npart uuid ${devtype} ${devnum}:1 partuuid\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} rootflags=${rootflags} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/different-files/wxy-oect-mod/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3566-wxy-oec-turbo-4g.dtb\n  APPEND root=LABEL=ROOTFS earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian systemd.unified_cgroup_hierarchy=0\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/allwinner/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=allwinner/sun50i-h6-vplus-cloud.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=sun50i-h6\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/allwinner/bootfs/armbian_first_run.txt.template",
    "content": "#-----------------------------------------------------------------\n# Armbian first run configuration\n# Set optional end user configuration\n#\t- Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt\n#\t- Settings below will be applied only on 1st run of Armbian\n#-----------------------------------------------------------------\n\n#-----------------------------------------------------------------\n# General:\n# 1 = delete this file, after first run setup is completed.\n\nFR_general_delete_this_file_after_completion=1\n\n#-----------------------------------------------------------------\n#Networking:\n# Change default network settings\n# Set to 1 to apply any network related settings below\n\nFR_net_change_defaults=0\n\n# Enable WiFi or Ethernet.\n#\tNB: If both are enabled, WiFi will take priority and Ethernet will be disabled.\n\nFR_net_ethernet_enabled=1\nFR_net_wifi_enabled=0\n\n#Enter your WiFi creds\n#\tSECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.\n\nFR_net_wifi_ssid='MySSID'\nFR_net_wifi_key='MyWiFiKEY'\n\n#\tCountry code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n\nFR_net_wifi_countrycode='GB'\n\n#If you want to use a static ip, set it here\n\nFR_net_use_static=0\nFR_net_static_ip='192.168.0.100'\nFR_net_static_mask='255.255.255.0'\nFR_net_static_gateway='192.168.0.1'\nFR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, separated by a space.\n#-----------------------------------------------------------------\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/allwinner/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\n# default values\nsetenv load_addr \"0x45000000\"\nsetenv overlay_error \"false\"\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv rootfstype \"ext4\"\nsetenv console \"both\"\nsetenv docker_optimizations \"on\"\nsetenv bootlogo \"false\"\n\nsetenv vendor \"allwinner\"\n\n# Remember the default fdtfile provided by u-boot and delete the vendor name\nif setexpr subfdt sub ${vendor}/ \"\" ${fdtfile};then\n\tsetenv deffdt_file ${subfdt}\nfi\n\n# Remember the default u-boot fdtdir\nsetenv deffdt_dir \"${prefix}dtb\"\nif test \"$fdtdir\" = \"\"; then setenv fdtdir \"${deffdt_dir}/${vendor}\";fi\n\n# Print boot source\nitest.b *0x10028 == 0x00 && echo \"U-boot loaded from SD\"\nitest.b *0x10028 == 0x02 && echo \"U-boot loaded from eMMC or secondary SD\"\nitest.b *0x10028 == 0x03 && echo \"U-boot loaded from SPI\"\n\necho \"Boot script loaded from ${devtype}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\n# Delete the vendor's name from the fdtfile variable and record the result\n# after the file with the environment variables has been read\nif setexpr subfdt sub ${vendor}/ \"\" ${fdtfile};then\n\tsetenv fdtfile ${subfdt}\nfi\n\n# In this shell, we can only check the existence of the file.\n# Make a check of reasonable ways to find the dtb file.\n# Set the true value of the paths.\nif test -e ${devtype} ${devnum} \"${fdtdir}/${fdtfile}\"; then\n\techo \"Load fdt: ${fdtdir}/${fdtfile}\"\nelse\n\techo \"The file ${fdtfile} was not found in the path ${fdtdir}\"\n\tif test -e ${devtype} ${devnum} \"${deffdt_dir}/${fdtfile}\"; then\n\t\tsetenv fdtdir \"${deffdt_dir}\"\n\t\techo \"Load fdt: ${fdtdir}/${fdtfile}\"\n\telse\n\t\tif test -e ${devtype} ${devnum} \"${deffdt_dir}/${vendor}/${deffdt_file}\"; then\n\t\t\tsetenv fdtdir \"${deffdt_dir}/${vendor}\"\n\t\t\tsetenv fdtfile \"${deffdt_file}\"\n\t\t\techo \"Load fdt: ${fdtdir}/${fdtfile}\"\n\t\telse\n\t\t\tif test -e ${devtype} ${devnum} \"${deffdt_dir}/${deffdt_file}\"; then\n\t\t\t\tsetenv fdtdir \"${deffdt_dir}\"\n\t\t\t\tsetenv fdtfile \"${deffdt_file}\"\n\t\t\t\techo \"Load fdt: ${fdtdir}/${fdtfile}\"\n\t\t\tfi\n\t\tfi\n\tfi\nfi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS0,115200 console=tty1\"; fi\nif test \"${console}\" = \"serial\"; then setenv consoleargs \"console=ttyS0,115200\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC it was loaded from\n# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc 0:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=memory\"; fi\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/allwinner/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/allwinner/sun50i-h6-tanix-tx6.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS0,115200 console=tty0 video=HDMI-A-1:e no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian earlycon\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/allwinner/rootfs/usr/sbin/armbian-install",
    "content": "#!/bin/bash\n#================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Install Armbian to eMMC for Allwinner devices\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-install\n#\n#======================================== Functions list ========================================\n#\n# error_msg          : Output error message and abort execution\n# check_depends      : Check and install required dependencies\n# init_var           : Initialize all runtime variables\n# set_rootfs_type    : Select the root filesystem type\n# create_partition   : Create eMMC partition layout\n# copy_bootfs        : Copy boot partition files to eMMC\n# copy_rootfs        : Copy root partition files to eMMC\n#\n#==================================== Set default parameters ====================================\n#\n# Add custom Armbian configuration information\nophub_release_file=\"/etc/ophub-release\"\n# Set the installation file preprocessing directory\ntmp_path=\"/ddbr\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#================================================================================================\n\n# Encountered a critical error, output the message and abort execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check and install required dependencies\ncheck_depends() {\n    echo -e \"${STEPS} Checking required dependencies...\"\n\n    is_missing=\"0\"\n    necessary_packages=(\"tar\" \"hexdump\" \"mkfs.vfat\" \"mkfs.ext4\" \"mkfs.btrfs\" \"parted\" \"losetup\" \"fdisk\" \"lsblk\")\n    install_packages=(\"tar\" \"bsdextrautils\" \"dosfstools\" \"e2fsprogs\" \"btrfs-progs\" \"parted\" \"mount\" \"fdisk\" \"util-linux\")\n\n    i=\"1\"\n    for package in ${necessary_packages[*]}; do\n        [[ -n \"$(which \"${package}\" 2>/dev/null)\" ]] || is_missing=\"1\"\n        ((i++))\n    done\n\n    if [[ \"${is_missing}\" -eq \"1\" ]]; then\n        echo -e \"${INFO} Installing missing dependencies...\"\n        sudo apt-get update\n        sudo apt-get install -y ${install_packages[*]}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to install dependencies. Installation aborted.\"\n    else\n        echo -e \"${INFO} All dependencies are satisfied. Proceeding with installation...\"\n    fi\n}\n\n# Initialize all runtime variables\ninit_var() {\n    echo -e \"${STEPS} Initializing the environment...\"\n\n    # View device configuration information\n    [[ -s \"${ophub_release_file}\" ]] || error_msg \"[ ${ophub_release_file} ] file is missing!\"\n    PLATFORM=\"$(cat \"${ophub_release_file}\" | grep -E \"^PLATFORM\" | awk -F\"'\" '{print $2}')\"\n    FDTFILE=\"$(cat \"${ophub_release_file}\" | grep -E \"^FDTFILE\" | awk -F\"'\" '{print $2}')\"\n    FAMILY=\"$(cat \"${ophub_release_file}\" | grep -E \"^FAMILY\" | awk -F\"'\" '{print $2}')\"\n    MAINLINE_UBOOT=\"$(cat \"${ophub_release_file}\" | grep -E \"^MAINLINE_UBOOT\" | awk -F\"'\" '{print $2}')\"\n    BOOTLOADER_IMG=\"$(cat \"${ophub_release_file}\" | grep -E \"^BOOTLOADER_IMG\" | awk -F\"'\" '{print $2}')\"\n    [[ -n \"${PLATFORM}\" && -n \"${FDTFILE}\" && -n \"${FAMILY}\" && -n \"${BOOTLOADER_IMG}\" ]] || {\n        error_msg \"Required configuration is missing in [ ${ophub_release_file} ].\"\n    }\n\n    # Display device configuration\n    echo -e \"${INFO} PLATFORM: [ ${PLATFORM} ]\"\n    echo -e \"${INFO} FDTFILE: [ ${FDTFILE} ]\"\n    echo -e \"${INFO} FAMILY: [ ${FAMILY} ]\"\n    echo -e \"${INFO} MAINLINE_UBOOT: [ ${MAINLINE_UBOOT} ]\"\n    echo -e \"${INFO} BOOTLOADER_IMG:  [ ${BOOTLOADER_IMG} ]\"\n\n    # Check the current system running disk\n    root_devname=\"$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print substr($3, 1, length($3)-2)}')\"\n    if lsblk -l | grep -E \"^${root_devname}boot0\" >/dev/null; then\n        error_msg \"System is running from eMMC. Please boot from USB or TF card first!\"\n    fi\n\n    # Find emmc disk, first find emmc containing boot0 partition\n    install_emmc=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?boot0)' | sed \"s/boot0//g\")\"\n    # Find emmc disk, find emmc that does not contain the boot0 partition\n    [[ -z \"${install_emmc}\" ]] && install_emmc=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?)' | grep -vE ^${root_devname} | sort -u)\"\n    # Check if emmc exists\n    [[ -z \"${install_emmc}\" ]] && error_msg \"No eMMC storage found on this device!\"\n    # Location of eMMC\n    DEV_EMMC=\"/dev/${install_emmc}\"\n    echo -e \"${INFO} Detected eMMC device: [ ${DEV_EMMC} ]\"\n\n    # Create a file preprocessing directory\n    DIR_INSTALL=\"${tmp_path}/install\"\n    [[ -d \"${DIR_INSTALL}\" ]] && rm -rf ${DIR_INSTALL}\n    mkdir -p ${DIR_INSTALL} && chmod 777 ${tmp_path}\n\n    # Regenerate new machine-id\n    rm -f /etc/machine-id /var/lib/dbus/machine-id\n    dbus-uuidgen --ensure=/etc/machine-id\n    dbus-uuidgen --ensure\n\n    # Generate New ROOTFS UUID\n    ROOTFS_UUID=\"$(cat /proc/sys/kernel/random/uuid)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && ROOTFS_UUID=\"$(uuidgen)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && error_msg \"The new UUID is invalid, cannot continue.\"\n}\n\n# Select the root filesystem type\nset_rootfs_type() {\n    echo -e \"${STEPS} Selecting root filesystem type...\"\n    cat <<EOF\n-----------------------------------------------\n  ID   TYPE\n-----------------------------------------------\n  1    ext4\n  2    btrfs\n-----------------------------------------------\nEOF\n    echo -ne \"${OPTIONS} Please Input ID (1/2): \"\n    read filetype\n    if [[ \"${filetype}\" -eq \"2\" || \"${filetype}\" == \"btrfs\" ]]; then\n        file_system_type=\"btrfs\"\n        armbianenv_rootflags=\"compress=zstd:6\"\n        armbianenv_rootdev=\"UUID=${ROOTFS_UUID}\"\n        uenv_mount_string=\"UUID=${ROOTFS_UUID} rootflags=compress=zstd:6 rootfstype=btrfs\"\n        fstab_mount_string=\"defaults,noatime,compress=zstd:6\"\n    else\n        file_system_type=\"ext4\"\n        armbianenv_rootflags=\"rw,errors=remount-ro\"\n        armbianenv_rootdev=\"UUID=${ROOTFS_UUID}\"\n        uenv_mount_string=\"UUID=${ROOTFS_UUID} rootflags=data=writeback rw rootfstype=ext4\"\n        fstab_mount_string=\"defaults,noatime,nodiratime,commit=600,errors=remount-ro\"\n    fi\n    echo -e \"${INFO} Input Type ID: [ ${filetype} ]\"\n    echo -e \"${INFO} Selected filesystem type: [ ${file_system_type} ]\"\n}\n\n# Create eMMC partition layout\ncreate_partition() {\n    cd /\n    echo -e \"${STEPS} Creating eMMC partition layout...\"\n\n    # Backup the bootloader, necessary for system recovery\n    [[ -d \"/usr/lib/u-boot\" ]] || mkdir -p /usr/lib/u-boot\n    MYBOX_UBOOT=\"/usr/lib/u-boot/mybox-bootloader.img\"\n    if [[ ! -f \"${MYBOX_UBOOT}\" ]]; then\n        echo -e \"${INFO} Start backing up the default bootloader.\"\n        dd if=\"${DEV_EMMC}\" of=\"${MYBOX_UBOOT}\" bs=1M count=4 conv=fsync\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Using dd to backup [ ${MYBOX_UBOOT} ] failed.\"\n    else\n        MAGIC_SIG=\"$(head -c 512 \"${MYBOX_UBOOT}\" 2>/dev/null | tail -c 2 | hexdump -e '1/1 \"%02x\"' 2>/dev/null || true)\"\n        if [[ \"${MAGIC_SIG}\" != \"55aa\" ]]; then\n            echo -e \"${INFO} Existing backup is invalid (No 55aa signature). Re-backing up...\"\n            dd if=\"${DEV_EMMC}\" of=\"${MYBOX_UBOOT}\" bs=1M count=4 conv=fsync\n            [[ \"${?}\" -eq \"0\" ]] || error_msg \"Using dd to backup [ ${MYBOX_UBOOT} ] failed.\"\n        else\n            echo -e \"${INFO} Bootloader backup file [ ${MYBOX_UBOOT} ] already exists.\"\n        fi\n    fi\n\n    # Clear emmc disk data\n    exists_pts=\"$(parted ${DEV_EMMC} print 2>/dev/null | grep 'primary' | wc -l)\"\n    if [[ \"${exists_pts}\" -gt \"0\" ]]; then\n        echo -e \"${INFO} Deleting existing [ ${exists_pts} ] partition(s).\"\n        i=1\n        while [[ \"${i}\" -le \"${exists_pts}\" ]]; do\n            umount -f ${DEV_EMMC}p${i} 2>/dev/null\n            parted -s ${DEV_EMMC} rm ${i}\n            [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to delete the [ ${i} ] partition. Please try again.\"\n            ((i++))\n        done\n    fi\n\n    # Set partition size (Unit: MiB)\n    BLANK1=\"16\"\n    BOOT=\"512\"\n    BLANK2=\"0\"\n\n    # Format emmc disk\n    echo -e \"${INFO} Creating MBR partition table and partitions.\"\n    parted -s \"${DEV_EMMC}\" mklabel msdos\n    parted -s \"${DEV_EMMC}\" mkpart primary fat32 $((BLANK1))MiB $((BLANK1 + BOOT - 1))MiB\n    parted -s \"${DEV_EMMC}\" mkpart primary ${file_system_type} $((BLANK1 + BOOT + BLANK2))MiB 100%\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to create partition using [ parted ].\"\n\n    # Write bootloader\n    if [[ -n \"${BOOTLOADER_IMG}\" && -f \"${BOOTLOADER_IMG}\" ]] &&\n        [[ -n \"${MAINLINE_UBOOT}\" && -f \"${MAINLINE_UBOOT}\" ]]; then\n        echo -e \"${INFO} 01. Write bootloader: [ ${MAINLINE_UBOOT} ]\"\n        dd if=\"${BOOTLOADER_IMG}\" of=\"${DEV_EMMC}\" conv=fsync,notrunc bs=8k seek=1\n        dd if=\"${MAINLINE_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync,notrunc bs=8k seek=5\n    elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"${BOOTLOADER_IMG}\" ]]; then\n        echo -e \"${INFO} 02. Write bootloader: [ ${BOOTLOADER_IMG} ]\"\n        dd if=\"${BOOTLOADER_IMG}\" of=\"${DEV_EMMC}\" conv=fsync,notrunc bs=8k seek=1\n    elif [[ -n \"${MYBOX_UBOOT}\" && -f \"${MYBOX_UBOOT}\" ]]; then\n        echo -e \"${INFO} 03. Restore original bootloader from backup: [ ${MYBOX_UBOOT} ]\"\n        dd if=\"${MYBOX_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync bs=512 skip=1 seek=1 count=8191\n    fi\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to write bootloader using [ dd ].\"\n}\n\n# Copy boot partition files to eMMC\ncopy_bootfs() {\n    cd /\n    echo -e \"${STEPS} Processing BOOTFS partition...\"\n\n    PART_BOOT=\"${DEV_EMMC}p1\"\n\n    if grep -q ${PART_BOOT} /proc/mounts; then\n        echo -e \"${INFO} Unmounting BOOT partition.\"\n        umount -f ${PART_BOOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${PART_BOOT} ].\"\n    fi\n\n    echo -e \"${INFO} Formatting BOOTFS partition...\"\n    mkfs.vfat -F 32 -n \"BOOT_EMMC\" ${PART_BOOT}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format BOOTFS with [ mkfs.vfat ].\"\n\n    mount -o rw ${PART_BOOT} ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount BOOTFS partition.\"\n\n    echo -e \"${INFO} Copying BOOTFS partition data...\"\n    cp -rf /boot/* ${DIR_INSTALL}\n    rm -rf ${DIR_INSTALL}/'System Volume Information'\n\n    # Update [ /boot/uEnv.txt ] settings\n    uenv_conf_file=\"${DIR_INSTALL}/uEnv.txt\"\n    [[ -f \"${uenv_conf_file}\" ]] && {\n        echo -e \"${INFO} Update the [ uEnv.txt ] file.\"\n        BOOT_CONF=\"uEnv.conf\"\n        sed -i \"s|root=.*console=ttyS0|root=${uenv_mount_string} console=ttyS0|g\" ${uenv_conf_file}\n        sed -i \"s|sun.*.dtb|${FDTFILE}|g\" ${uenv_conf_file}\n    }\n\n    # Update [ /boot/armbianEnv.txt ] settings\n    armbianenv_conf_file=\"${DIR_INSTALL}/armbianEnv.txt\"\n    [[ -f \"${armbianenv_conf_file}\" ]] && {\n        echo -e \"${INFO} Update the [ armbianEnv.conf ] file.\"\n        BOOT_CONF=\"armbianEnv.conf\"\n        sed -i \"s|^fdtfile=.*|fdtfile=${PLATFORM}/${FDTFILE}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootfstype=.*|rootfstype=${file_system_type}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootdev=.*|rootdev=${armbianenv_rootdev}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootflags=.*|rootflags=${armbianenv_rootflags}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^overlay_prefix=.*|overlay_prefix=${FAMILY}|g\" ${armbianenv_conf_file}\n    }\n\n    # Update [ /boot/extlinux/extlinux.conf ] settings\n    boot_extlinux_file=\"${DIR_INSTALL}/extlinux/extlinux.conf\"\n    [[ -f \"${boot_extlinux_file}\" ]] && {\n        echo -e \"${INFO} Update the [ extlinux.conf ] file.\"\n        BOOT_CONF=\"extlinux.conf\"\n        sed -i \"s|root=.*console=ttyS0|root=${uenv_mount_string} console=ttyS0|g\" ${boot_extlinux_file}\n        sed -i \"s|sun.*.dtb|${FDTFILE}|g\" ${boot_extlinux_file}\n    }\n\n    # Replace eMMC boot files\n    [[ -f \"${DIR_INSTALL}/boot-emmc.scr\" ]] && mv -f ${DIR_INSTALL}/boot-emmc.scr ${DIR_INSTALL}/boot.scr\n    [[ -f \"${DIR_INSTALL}/boot-emmc.cmd\" ]] && mv -f ${DIR_INSTALL}/boot-emmc.cmd ${DIR_INSTALL}/boot.cmd\n\n    sync && sleep 3\n    umount -f ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${DIR_INSTALL} ].\"\n}\n\n# Copy root partition files to eMMC\ncopy_rootfs() {\n    cd /\n    echo -e \"${STEPS} Processing ROOTFS partition...\"\n\n    PART_ROOT=\"${DEV_EMMC}p2\"\n\n    if grep -q ${PART_ROOT} /proc/mounts; then\n        echo -e \"${INFO} Unmounting ROOT partition.\"\n        umount -f ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${PART_ROOT} ].\"\n    fi\n\n    echo -e \"${INFO} Formatting ROOTFS partition...\"\n    if [[ \"${file_system_type}\" == \"btrfs\" ]]; then\n        mkfs.btrfs -f -U ${ROOTFS_UUID} -L \"ROOTFS_EMMC\" -m single ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format using [ mkfs.btrfs ]\"\n\n        mount -t btrfs -o compress=zstd:6 ${PART_ROOT} ${DIR_INSTALL}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount ROOTFS partition.\"\n    else\n        mkfs.ext4 -F -q -U ${ROOTFS_UUID} -L \"ROOTFS_EMMC\" -b 4k -m 0 ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format using [ mkfs.ext4 ]\"\n\n        mount -t ext4 ${PART_ROOT} ${DIR_INSTALL}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount ROOTFS partition.\"\n    fi\n\n    echo -e \"${INFO} Copying ROOTFS partition data...\"\n    # Create relevant directories\n    mkdir -p ${DIR_INSTALL}/{boot/,dev/,media/,mnt/,proc/,run/,sys/,tmp/}\n    chmod 1777 ${DIR_INSTALL}/tmp\n    # Copy the relevant directory\n    COPY_SRC=\"etc home opt root selinux srv usr var\"\n    for src in ${COPY_SRC}; do\n        if [[ -d \"${src}\" ]]; then\n            echo -e \"${INFO} Copying [ ${src} ] ...\"\n            tar -cf - ${src} | (\n                cd ${DIR_INSTALL}\n                tar -xpf -\n            )\n        fi\n    done\n    # Create relevant symbolic link\n    ln -sf usr/bin ${DIR_INSTALL}/bin\n    ln -sf usr/lib ${DIR_INSTALL}/lib\n    ln -sf usr/sbin ${DIR_INSTALL}/sbin\n\n    echo -e \"${INFO} Generate the new fstab file.\"\n    rm -f ${DIR_INSTALL}/etc/fstab\n    cat >${DIR_INSTALL}/etc/fstab <<EOF\nUUID=${ROOTFS_UUID}    /        ${file_system_type}    ${fstab_mount_string}      0 1\nLABEL=BOOT_EMMC        /boot    vfat                   discard,defaults           0 2\ntmpfs                  /tmp     tmpfs                  defaults,nosuid            0 0\n\nEOF\n\n    echo -e \"${INFO} Update parameters related to the releases file.\"\n    ophub_release_file=\"${DIR_INSTALL}${ophub_release_file}\"\n    sed -i \"s|^ROOTFS_TYPE=.*|ROOTFS_TYPE='${file_system_type}'|g\" ${ophub_release_file}\n    sed -i \"s|^BOOT_CONF=.*|BOOT_CONF='${BOOT_CONF}'|g\" ${ophub_release_file}\n    sed -i \"s|^DISK_TYPE=.*|DISK_TYPE='emmc'|g\" ${ophub_release_file}\n\n    # Remove useless scripts\n    rm -f ${DIR_INSTALL}/usr/sbin/armbian-tf\n    rm -f ${DIR_INSTALL}/root/.no_rootfs_resize\n\n    sync && sleep 3\n    umount -f ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${DIR_INSTALL} ].\"\n}\n\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\necho -e \"${STEPS} Installing Armbian to eMMC...\"\n\n# Check dependencies\ncheck_depends\n# Initialize all variables\ninit_var \"${@}\"\n# Set the type of file system\nset_rootfs_type\n# Create emmc partition\ncreate_partition\n# Copy bootfs partition files\ncopy_bootfs\n# Copy rootfs partition files\ncopy_rootfs\n\necho -e \"${SUCCESS} Installation completed successfully. Run [ poweroff ], remove the installation media, then re-insert the power supply to boot Armbian.\"\nexit 0\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/aml_autoscript.cmd",
    "content": "if printenv bootfromsd; then exit; else setenv ab 0; fi;\nsetenv bootcmd 'run start_autoscript; run storeboot'\nsetenv start_autoscript 'if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi; run start_emmc_autoscript'\nsetenv start_emmc_autoscript 'if fatload mmc 1 1020000 emmc_autoscript; then autoscr 1020000; fi;'\nsetenv start_mmc_autoscript 'if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;'\nsetenv start_usb_autoscript 'for usbdev in 0 1 2 3; do if fatload usb ${usbdev} 1020000 s905_autoscript; then autoscr 1020000; fi; done'\nsetenv upgrade_step 2\nsaveenv\nsleep 1\nreboot\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/armbian_first_run.txt.template",
    "content": "#-----------------------------------------------------------------\n# Armbian first run configuration\n# Set optional end user configuration\n#\t- Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt\n#\t- Settings below will be applied only on 1st run of Armbian\n#-----------------------------------------------------------------\n\n#-----------------------------------------------------------------\n# General:\n# 1 = delete this file, after first run setup is completed.\n\nFR_general_delete_this_file_after_completion=1\n\n#-----------------------------------------------------------------\n#Networking:\n# Change default network settings\n# Set to 1 to apply any network related settings below\n\nFR_net_change_defaults=0\n\n# Enable WiFi or Ethernet.\n#\tNB: If both are enabled, WiFi will take priority and Ethernet will be disabled.\n\nFR_net_ethernet_enabled=1\nFR_net_wifi_enabled=0\n\n#Enter your WiFi creds\n#\tSECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.\n\nFR_net_wifi_ssid='MySSID'\nFR_net_wifi_key='MyWiFiKEY'\n\n#\tCountry code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n\nFR_net_wifi_countrycode='GB'\n\n#If you want to use a static ip, set it here\n\nFR_net_use_static=0\nFR_net_static_ip='192.168.0.100'\nFR_net_static_mask='255.255.255.0'\nFR_net_static_gateway='192.168.0.1'\nFR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, separated by a space.\n#-----------------------------------------------------------------\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/boot-emmc.cmd",
    "content": "echo \"Start AMLOGIC mainline U-boot\"\nif printenv bootfromsd; then exit; fi;\nsetenv loadaddr \"0x44000000\"\nsetenv devtype \"mmc\"\nsetenv l_mmc \"2 1 0\"\nfor devnum in ${l_mmc} ; do\n\tif test -e ${devtype} ${devnum} uEnv.txt; then\n\t\tload ${devtype} ${devnum} ${loadaddr} uEnv.txt\n\t\tenv import -t ${loadaddr} ${filesize}\n\t\tsetenv bootargs ${APPEND}\n\t\tif printenv mac; then\n\t\t\tsetenv bootargs ${bootargs} mac=${mac}\n\t\telif printenv eth_mac; then\n\t\t\tsetenv bootargs ${bootargs} mac=${eth_mac}\n\t\telif printenv ethaddr; then\n\t\t\tsetenv bootargs ${bootargs} mac=${ethaddr}\n\t\tfi\n\t\tif load ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then\n\t\t\tif load ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then\n\t\t\t\tif load ${devtype} ${devnum} ${fdt_addr_r} ${FDT}; then\n\t\t\t\t\tfdt addr ${fdt_addr_r}\n\t\t\t\t\tbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tfi\ndone\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/boot-emmc.ini",
    "content": "ODROIDN2-UBOOT-CONFIG\n\n# set load addresses\nsetenv env_addr 0x10400000\nsetenv kernel_addr 0x11000000\nsetenv initrd_addr 0x15000000\nsetenv dtb_addr 0x1000000\n\nsetenv devtype \"mmc\"\nsetenv devnum \"0\"\n\n# load uEnv.txt\nload ${devtype} ${devnum} ${env_addr} uEnv.txt && env import -t ${env_addr} ${filesize}\nsetenv bootargs ${APPEND}\n\n# Load kernel, dtb\nload ${devtype} ${devnum} ${kernel_addr} ${LINUX}\nload ${devtype} ${devnum} ${initrd_addr} ${INITRD}\nload ${devtype} ${devnum} ${dtb_addr} ${FDT}\nfdt addr ${dtb_addr}\n\n# boot\nbooti ${kernel_addr} ${initrd_addr} ${dtb_addr}\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/boot.cmd",
    "content": "echo \"Start AMLOGIC mainline U-boot\"\nif printenv bootfromsd; then exit; fi;\nsetenv loadaddr \"0x44000000\"\nsetenv l_mmc \"0 1 2 3\"\nfor devtype in \"usb mmc\" ; do\n\tif test \"${devtype}\" = \"mmc\"; then\n\t\tsetenv l_mmc \"1\"\n\tfi \n\tfor devnum in ${l_mmc} ; do\n\t\tif test -e ${devtype} ${devnum} uEnv.txt; then\n\t\t\tload ${devtype} ${devnum} ${loadaddr} uEnv.txt\n\t\t\tenv import -t ${loadaddr} ${filesize}\n\t\t\tsetenv bootargs ${APPEND}\n\t\t\tif printenv mac; then\n\t\t\t\tsetenv bootargs ${bootargs} mac=${mac}\n\t\t\telif printenv eth_mac; then\n\t\t\t\tsetenv bootargs ${bootargs} mac=${eth_mac}\n\t\t\telif printenv ethaddr; then\n\t\t\t\tsetenv bootargs ${bootargs} mac=${ethaddr}\n\t\t\tfi\n\t\t\tif load ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then\n\t\t\t\tif load ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then\n\t\t\t\t\tif load ${devtype} ${devnum} ${fdt_addr_r} ${FDT}; then\n\t\t\t\t\t\tfdt addr ${fdt_addr_r}\n\t\t\t\t\t\tbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tdone\ndone\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/boot.ini",
    "content": "ODROIDN2-UBOOT-CONFIG\n\n# set load addresses\nsetenv env_addr 0x10400000\nsetenv kernel_addr 0x11000000\nsetenv initrd_addr 0x15000000\nsetenv dtb_addr 0x1000000\n\nif test \"${devtype}\" = \"\"; then setenv devtype \"mmc\"; fi\n\n# load uEnv.txt\nload ${devtype} ${devnum} ${env_addr} uEnv.txt && env import -t ${env_addr} ${filesize}\nsetenv bootargs ${APPEND}\n\n# Load kernel, dtb\nload ${devtype} ${devnum} ${kernel_addr} ${LINUX}\nload ${devtype} ${devnum} ${initrd_addr} ${INITRD}\nload ${devtype} ${devnum} ${dtb_addr} ${FDT}\nfdt addr ${dtb_addr}\n\n# boot\nbooti ${kernel_addr} ${initrd_addr} ${dtb_addr}\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/emmc_autoscript.cmd",
    "content": "if fatload mmc 1 0x1000000 u-boot.emmc; then go 0x1000000; fi;\nsetenv dtb_addr 0x1000000\nsetenv env_addr 0x1040000\nsetenv kernel_addr 0x11000000\nsetenv initrd_addr 0x15000000\nsetenv boot_start booti ${kernel_addr} ${initrd_addr} ${dtb_addr}\nsetenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; elif printenv ethaddr; then setenv bootargs ${bootargs} mac=${ethaddr}; fi'\nif fatload mmc 1 ${env_addr} uEnv.txt && env import -t ${env_addr} ${filesize}; setenv bootargs ${APPEND}; then if fatload mmc 1 ${kernel_addr} ${LINUX}; then if fatload mmc 1 ${initrd_addr} ${INITRD}; then if fatload mmc 1 ${dtb_addr} ${FDT}; then run addmac; run boot_start; fi; fi; fi; fi;\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/extlinux/extlinux.conf.bak",
    "content": "label Armbian\n    kernel /zImage\n    initrd /uInitrd\n    fdt /dtb/amlogic/meson-g12b-gtking-pro.dtb\n    append root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 loglevel=1 voutmode=hdmi disablehpd=false overscan=100 sdrmode=auto\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/s905_autoscript.cmd",
    "content": "echo \"start amlogic old u-boot\"\nif fatload mmc 0 ${loadaddr} boot_android; then if test ${ab} = 0; then setenv ab 1; saveenv; exit; else setenv ab 0; saveenv; fi; fi;\nif fatload usb 0 ${loadaddr} boot_android; then if test ${ab} = 0; then setenv ab 1; saveenv; exit; else setenv ab 0; saveenv; fi; fi;\nif fatload mmc 0 0x1000000 u-boot.ext; then go 0x1000000; fi;\nif fatload usb 0 0x1000000 u-boot.ext; then go 0x1000000; fi;\nsetenv kernel_addr_r 0x11000000\nsetenv ramdisk_addr_r 0x15000000\nsetenv fdt_addr_r 0x1000000\nsetenv l_mmc \"0\"\nfor devtype in \"mmc usb\" ; do if test \"${devtype}\" = \"usb\"; then echo \"start test usb\"; setenv l_mmc \"0 1 2 3\"; fi; for devnum in ${l_mmc} ; do if test -e ${devtype} ${devnum} uEnv.txt; then fatload ${devtype} ${devnum} ${loadaddr} uEnv.txt; env import -t ${loadaddr} ${filesize}; setenv bootargs ${APPEND}; if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi; if fatload ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then if fatload ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then if fatload ${devtype} ${devnum} ${fdt_addr_r} ${FDT}; then fdt addr ${fdt_addr_r}; booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}; fi; fi; fi; fi; done; done;\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/bootfs/uEnv.txt",
    "content": "LINUX=/zImage\nINITRD=/uInitrd\nFDT=/dtb/amlogic/meson-g12b-gtking-pro.dtb\nAPPEND=root=LABEL=ROOTFS console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-install",
    "content": "#!/bin/bash\n#================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function: Install Armbian to eMMC for Amlogic devices\n# Copyright (C) 2021- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2022- https://github.com/7Ji/ampart\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-install [-m yes/no] [-a yes/no] [-l yes/no]\n# Optional parameters: -m = use mainline u-boot (default: no)\n#                      -a = use ampart partition table adjustment tool (default: yes)\n#                      -l = show a list of all devices (default: no)\n#\n# Examples:\n#  Use mainline u-boot       : armbian-install -m yes\n#  Disable ampart tool       : armbian-install -a no\n#  Show all available devices: armbian-install -l yes\n#\n#======================================== Functions list ========================================\n#\n# error_msg          : Output error message and abort execution\n# check_depends      : Check and install required dependencies\n# init_var           : Initialize all runtime variables and parse options\n# show_aml_model     : Display the list of supported Amlogic devices\n# set_rootfs_type    : Select the root filesystem type\n# ampart_tool        : Repartition eMMC using ampart tool\n# create_partition   : Create eMMC partition layout\n# copy_bootfs        : Copy boot partition files to eMMC\n# copy_rootfs        : Copy root partition files to eMMC\n#\n#==================================== Set default parameters ====================================\n#\n# Use mainline u-boot by default (-m)\nauto_mainline_uboot=\"no\"\n# Use ampart partition tool by default (-a)\nuse_ampart=\"yes\"\n# Show all device list by default (-l)\nshow_all_list=\"no\"\n\n# Set install list profile\nmodel_conf=\"/etc/model_database.conf\"\n# Add custom armbian firmware information\nophub_release_file=\"/etc/ophub-release\"\n# Set the installation file preprocessing directory\ntmp_path=\"/ddbr\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#================================================================================================\n\n# Encountered a critical error, output the message and abort execution\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Check dependencies\ncheck_depends() {\n    echo -e \"${STEPS} Checking dependencies...\"\n\n    is_missing=\"0\"\n    necessary_packages=(\"tar\" \"hexdump\" \"mkfs.vfat\" \"mkfs.ext4\" \"mkfs.btrfs\" \"parted\" \"losetup\" \"fdisk\" \"lsblk\")\n    install_packages=(\"tar\" \"bsdextrautils\" \"dosfstools\" \"e2fsprogs\" \"btrfs-progs\" \"parted\" \"mount\" \"fdisk\" \"util-linux\")\n\n    i=\"1\"\n    for package in ${necessary_packages[*]}; do\n        [[ -n \"$(which \"${package}\" 2>/dev/null)\" ]] || is_missing=\"1\"\n        ((i++))\n    done\n\n    if [[ \"${is_missing}\" -eq \"1\" ]]; then\n        echo -e \"${INFO} Installing necessary dependencies.\"\n        sudo apt-get update\n        sudo apt-get install -y ${install_packages[*]}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to install dependencies, aborting!\"\n    else\n        echo -e \"${INFO} Dependency check completed. Proceeding installation...\"\n    fi\n}\n\n# Initialize all variables\ninit_var() {\n    echo -e \"${STEPS} Initializing the environment...\"\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    get_all_ver=\"$(getopt \"m:a:l:\" \"${@}\")\"\n\n    while [[ -n \"${1}\" ]]; do\n        case \"${1}\" in\n        -m | --Mainline_u-boot)\n            if [[ -n \"${2}\" ]]; then\n                [[ \"${2}\" == \"yes\" ]] && auto_mainline_uboot=\"yes\" || auto_mainline_uboot=\"no\"\n                shift\n            else\n                error_msg \"Invalid -m parameter [ ${2} ]!\"\n            fi\n            ;;\n        -a | --Ampart_tool)\n            if [[ -n \"${2}\" ]]; then\n                [[ \"${2}\" == \"yes\" ]] && use_ampart=\"yes\" || use_ampart=\"no\"\n                shift\n            else\n                error_msg \"Invalid -a parameter [ ${2} ]!\"\n            fi\n            ;;\n        -l | --List_all)\n            if [[ -n \"${2}\" ]]; then\n                [[ \"${2}\" == \"yes\" ]] && show_all_list=\"yes\" || show_all_list=\"no\"\n                shift\n            else\n                error_msg \"Invalid -l parameter [ ${2} ]!\"\n            fi\n            ;;\n        *)\n            error_msg \"Invalid option [ ${1} ]!\"\n            ;;\n        esac\n        shift\n    done\n\n    # Display settings results\n    echo -e \"${INFO} Use mainline u-boot: [ ${auto_mainline_uboot} ]\"\n    echo -e \"${INFO} Use ampart tool: [ ${use_ampart} ]\"\n    echo -e \"${INFO} Show all devices: [ ${show_all_list} ]\"\n\n    # Find a list of devices of the same family\n    SEARCH_FAMILY=\"\"\n    [[ \"${show_all_list}\" == \"no\" ]] && {\n        [[ -s \"${ophub_release_file}\" ]] || error_msg \"[ ${ophub_release_file} ] file is missing!\"\n        source \"${ophub_release_file}\" && SEARCH_FAMILY=\"$(basename ${FAMILY})\"\n        [[ -n \"${SEARCH_FAMILY}\" ]] && SEARCH_FAMILY=\":${SEARCH_FAMILY}:\"\n    }\n\n    # Check if the ${model_conf} file exists\n    [[ -s \"${model_conf}\" ]] || error_msg \"[ ${model_conf} ] file is missing!\"\n    model_database=\"$(cat ${model_conf} | sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' | grep -E \"^[0-9]{1,3}:.*${SEARCH_FAMILY}.*\")\"\n    if [[ -z \"${model_database}\" ]]; then\n        if [[ \"${SEARCH_FAMILY}\" == \":meson-gxbb:\" ]]; then\n            error_msg \"The [ s905 ] series do not support writing to eMMC. Please use it via USB.\"\n        else\n            error_msg \"The [ ${SEARCH_FAMILY} ] series in the [ ${model_conf} ] file is empty and does not support write to eMMC!\"\n        fi\n    fi\n\n    # Check if current system is already running from eMMC\n    root_devname=\"$(df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print substr($3, 1, length($3)-2)}')\"\n    if lsblk -l | grep -E \"^${root_devname}boot0\" >/dev/null; then\n        error_msg \"System is already installed to eMMC!\"\n    fi\n\n    # Find emmc disk, first find emmc containing boot0 partition\n    install_emmc=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?boot0)' | sed \"s/boot0//g\")\"\n    # Find emmc disk, find emmc that does not contain the boot0 partition\n    [[ -z \"${install_emmc}\" ]] && install_emmc=\"$(lsblk -l -o NAME | grep -oE '(mmcblk[0-9]?)' | grep -vE ^${root_devname} | sort -u)\"\n    # Check if emmc exists\n    [[ -z \"${install_emmc}\" ]] && error_msg \"No internal eMMC storage found on this device!\"\n    # Location of eMMC\n    DEV_EMMC=\"/dev/${install_emmc}\"\n    echo -e \"${INFO} Detected eMMC device: [ ${DEV_EMMC} ]\"\n\n    # Create a file preprocessing directory\n    DIR_INSTALL=\"${tmp_path}/install\"\n    [[ -d \"${DIR_INSTALL}\" ]] && rm -rf ${DIR_INSTALL}\n    mkdir -p ${DIR_INSTALL} && chmod 777 ${tmp_path}\n\n    # Regenerate new machine-id\n    rm -f /etc/machine-id /var/lib/dbus/machine-id\n    dbus-uuidgen --ensure=/etc/machine-id\n    dbus-uuidgen --ensure\n\n    # Generate New ROOTFS UUID\n    ROOTFS_UUID=\"$(cat /proc/sys/kernel/random/uuid)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && ROOTFS_UUID=\"$(uuidgen)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && error_msg \"The new UUID is invalid, cannot continue.\"\n\n    # Get kernel TEXT_OFFSET, For u-boot.ext and u-boot.emmc\n    # With TEXT_OFFSET patch is [ 0108 ], without TEXT_OFFSET patch is [ 0000 ] and need to ues [ UBOOT_OVERLOAD ] file.\n    NEED_OVERLOAD=\"yes\"\n    [[ \"$(hexdump -n 15 -x \"/boot/zImage\" 2>/dev/null | head -n 1 | awk '{print $7}')\" == \"0108\" ]] && NEED_OVERLOAD=\"no\"\n}\n\n# Search the model list\nsearch_aml_model() {\n    local search_soc_id=\"${1}\"\n    local ret_count=\"$(echo \"${model_database}\" | grep -E \"^${search_soc_id}:\" | wc -l)\"\n    if [[ \"${ret_count}\" -eq \"1\" ]]; then\n        echo \"${model_database}\" | grep -E \"^${search_soc_id}:\"\n    fi\n}\n\n# Functions: Displays a list of supported amlogic devices\n# Configure: View ${model_database}\n# 1.ID  2.MODEL  3.SOC  4.FDTFILE  5.UBOOT_OVERLOAD  6.MAINLINE_UBOOT  7.BOOTLOADER_IMG  8.DESCRIPTION\n# 9.KERNEL_TAGS  10.PLATFORM  11.FAMILY  12.BOOT_CONF  13.CONTRIBUTORS  14.BOARD  15.BUILD\nshow_aml_model() {\n    echo -e \"${STEPS} Start selecting device...\"\n\n    # Define split line style\n    split_line=\"-----------------------------------------------------------------------------------------------------\"\n    # Print header information\n    printf \"%-s\\n\" \"${split_line}\"\n    printf \"%-5s %-10s %-45s %-50s\\n\" ID SOC MODEL DTB\n    printf \"%-s\\n\" \"${split_line}\"\n    # Print device list\n    echo \"${model_database}\" | awk -F':' '{print $1,$3,$2,$4}' | while read line; do\n        # Print device information\n        printf \"%-5s %-10s %-45s %-50s\\n\" $(echo \"${line}\")\n        # Add a split line every 10 lines\n        [[ \"$(echo ${line} | awk '{print $1}')\" == *\"0\" ]] && printf \"%-s\\n\" \"${split_line}\"\n    done\n    # Print custom options and end split lines\n    printf \"%-5s %-10s %-45s %-50s\\n\" 0 Other Customize Enter-custom-dtb-name\n    printf \"%-s\\n\" \"${split_line}\"\n\n    # Display device options\n    echo -ne \"${OPTIONS} Please Input ID: \"\n    read boxid\n    if [[ \"${boxid}\" -eq \"0\" ]]; then\n        read -p \"Please Input SoC Name(such as s9xxx): \" AMLOGIC_SOC\n        AMLOGIC_SOC=\"${AMLOGIC_SOC}\"\n        #\n        read -p \"Please Input DTB Name(such as meson-xxx.dtb): \" FDTFILE\n        FDTFILE=\"${FDTFILE}\"\n        #\n        read -p \"Please Input UBOOT_OVERLOAD Name(such as u-boot-xxx.bin): \" UBOOT_OVERLOAD\n        UBOOT_OVERLOAD=\"${UBOOT_OVERLOAD}\"\n        #\n        read -p \"Please Input MAINLINE_UBOOT Name(such as xxx-u-boot.bin.sd.bin): \" MAINLINE_UBOOT\n        MAINLINE_UBOOT=\"${MAINLINE_UBOOT}\"\n        #\n        read -p \"Please Input BOOTLOADER_IMG Name(such as xxx-bootloader.img): \" BOOTLOADER_IMG\n        BOOTLOADER_IMG=\"${BOOTLOADER_IMG}\"\n    else\n        ret=\"$(search_aml_model \"${boxid}\")\"\n        [[ -z \"${ret}\" ]] && error_msg \"Input error, exit!\"\n\n        MODEL_NAME=\"$(echo \"${ret}\" | awk -F ':' '{print $2}')\"\n        AMLOGIC_SOC=\"$(echo \"${ret}\" | awk -F ':' '{print $3}')\"\n        FDTFILE=\"$(echo \"${ret}\" | awk -F ':' '{print $4}')\"\n        UBOOT_OVERLOAD=\"$(echo \"${ret}\" | awk -F ':' '{print $5}')\"\n        MAINLINE_UBOOT=\"$(echo \"${ret}\" | awk -F ':' '{print $6}')\"\n        BOOTLOADER_IMG=\"$(echo \"${ret}\" | awk -F ':' '{print $7}')\"\n    fi\n\n    echo -e \"${INFO} Input Box ID: [ ${boxid} ]\"\n    echo -e \"${INFO} Model Name: [ ${MODEL_NAME} ]\"\n    echo -e \"${INFO} FDTFILE: [ ${FDTFILE} ]\"\n    echo -e \"${INFO} MAINLINE_UBOOT: [ ${MAINLINE_UBOOT} ]\"\n    echo -e \"${INFO} BOOTLOADER_IMG:  [ ${BOOTLOADER_IMG} ]\"\n    echo -e \"${INFO} UBOOT_OVERLOAD: [ ${UBOOT_OVERLOAD} ]\"\n    echo -e \"${INFO} NEED_OVERLOAD: [ ${NEED_OVERLOAD} ]\"\n\n    # Check DTB file\n    [[ -n \"${FDTFILE}\" && -f \"/boot/dtb/amlogic/${FDTFILE}\" ]] || error_msg \"DTB file [ ${FDTFILE} ] not found. Installation aborted!\"\n    # Check UBOOT_OVERLOAD file\n    [[ -n \"${UBOOT_OVERLOAD}\" && -f \"/boot/${UBOOT_OVERLOAD}\" ]] || error_msg \"U-Boot overload file [ ${UBOOT_OVERLOAD} ] not found. Installation aborted!\"\n}\n\n# Select the root filesystem type\nset_rootfs_type() {\n    echo -e \"${STEPS} Selecting root filesystem type...\"\n    cat <<EOF\n-----------------------------------------------\n  ID   TYPE\n-----------------------------------------------\n  1    ext4\n  2    btrfs\n-----------------------------------------------\nEOF\n    echo -ne \"${OPTIONS} Please Input ID (1/2): \"\n    read filetype\n    if [[ \"${filetype}\" -eq \"2\" || \"${filetype}\" == \"btrfs\" ]]; then\n        file_system_type=\"btrfs\"\n        uenv_mount_string=\"UUID=${ROOTFS_UUID} rootflags=compress=zstd:6 rootfstype=btrfs\"\n        fstab_mount_string=\"defaults,noatime,compress=zstd:6\"\n    else\n        file_system_type=\"ext4\"\n        uenv_mount_string=\"UUID=${ROOTFS_UUID} rootflags=data=writeback rw rootfstype=ext4\"\n        fstab_mount_string=\"defaults,noatime,nodiratime,commit=600,errors=remount-ro\"\n    fi\n    echo -e \"${INFO} Input Type ID: [ ${filetype} ]\"\n    echo -e \"${INFO} Selected filesystem type: [ ${file_system_type} ]\"\n}\n\n# Project repository:   https://github.com/7Ji/ampart\n# Download from:        https://github.com/7Ji/ampart/releases/download/v1.2/ampart-v1.2-aarch64-static.gz\n# Function description: ampart is a partitioning tool which can modify the proprieary partition table on internal eMMC.\nampart_tool() {\n    # declare the partition layout\n    local snapshot_expected='data::-1:4'\n\n    # Note there's no quote around ${snapshot_expected}\n    ampart \"${DEV_EMMC}\" --mode dclone ${snapshot_expected} &>/dev/null\n    if ((${?})); then\n        # Handle the situation where ampart fails to change the layout\n        return 1\n    fi\n\n    local log=\"$(ampart \"${DEV_EMMC}\" --mode dsnapshot 2>/dev/null)\"\n    if ((${?})); then\n        # Handle the situation where ampart fails to read the new partitions\n        return 2\n    fi\n\n    local snapshots\n    readarray -d $'\\n' -t snapshots <<<\"${log}\"\n\n    # compare snapshots, 0 here refers to the decimal one\n    if [[ \"${snapshots[0]}\" == \"${snapshot_expected}\" ]]; then\n        # Successfully written the partitions\n        return 0\n    else\n        # Result partitions different, maybe should handle it\n        return 3\n    fi\n}\n\n# Create eMMC partition layout\ncreate_partition() {\n    cd /\n    echo -e \"${STEPS} Creating eMMC partition layout...\"\n\n    # Backup the bootloader, necessary for system recovery\n    [[ -d \"/usr/lib/u-boot\" ]] || mkdir -p /usr/lib/u-boot\n    MYBOX_UBOOT=\"/usr/lib/u-boot/mybox-bootloader.img\"\n    if [[ ! -f \"${MYBOX_UBOOT}\" ]]; then\n        echo -e \"${INFO} Start backing up the default bootloader.\"\n        dd if=\"${DEV_EMMC}\" of=\"${MYBOX_UBOOT}\" bs=1M count=4 conv=fsync\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Using dd to backup [ ${MYBOX_UBOOT} ] failed.\"\n    else\n        MAGIC_SIG=\"$(head -c 512 \"${MYBOX_UBOOT}\" 2>/dev/null | tail -c 2 | hexdump -e '1/1 \"%02x\"' 2>/dev/null || true)\"\n        if [[ \"${MAGIC_SIG}\" != \"55aa\" ]]; then\n            echo -e \"${INFO} Existing backup is invalid (No 55aa signature). Re-backing up...\"\n            dd if=\"${DEV_EMMC}\" of=\"${MYBOX_UBOOT}\" bs=1M count=4 conv=fsync\n            [[ \"${?}\" -eq \"0\" ]] || error_msg \"Using dd to backup [ ${MYBOX_UBOOT} ] failed.\"\n        else\n            echo -e \"${INFO} Bootloader backup file [ ${MYBOX_UBOOT} ] already exists.\"\n        fi\n    fi\n\n    # Clear emmc disk data\n    exists_pts=\"$(parted ${DEV_EMMC} print 2>/dev/null | grep 'primary' | wc -l)\"\n    if [[ \"${exists_pts}\" -gt \"0\" ]]; then\n        echo -e \"${INFO} Deleting existing [ ${exists_pts} ] partition(s).\"\n        i=1\n        while [[ \"${i}\" -le \"${exists_pts}\" ]]; do\n            umount -f ${DEV_EMMC}p${i} 2>/dev/null\n            parted -s ${DEV_EMMC} rm ${i}\n            [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to delete partition [ ${i} ]. Please try again.\"\n            ((i++))\n        done\n    fi\n\n    # Use the ampart partition tool\n    AMPART_STATUS=\"no\"\n    [[ -x \"/usr/bin/ampart\" && \"${use_ampart}\" == \"yes\" ]] && {\n        ampart_tool\n        [[ \"${?}\" -eq \"0\" ]] && AMPART_STATUS=\"yes\" && echo -e \"${STEPS} Successfully repartitioned eMMC with ampart.\"\n    }\n\n    # Set partition size (Unit: MiB)\n    if [[ \"${AMPART_STATUS}\" == \"yes\" ]]; then\n        BLANK1=\"117\" # After using the ampart to part disk, space after [ 117 MiB ] could be used.\n        BOOT=\"512\"\n        BLANK2=\"0\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s912\" && \"${boxid}\" -eq \"213\" ]]; then\n        BLANK1=\"700\" # OneCloudPro-V1.2\n        BOOT=\"512\"\n        BLANK2=\"220\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s912\" && \"${boxid}\" -eq \"214\" ]]; then\n        BLANK1=\"256\" # new OneCloudPro-V1.2 based on base image android_tv_onethingcloud-money-maker-pro-3rd-s912.tar.xz\n        BOOT=\"256\"\n        BLANK2=\"0\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s912\" || \"${AMLOGIC_SOC}\" == \"s905d\" ]]; then\n        BLANK1=\"68\"\n        BOOT=\"512\"\n        BLANK2=\"220\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s905x\" ]]; then\n        BLANK1=\"700\"\n        BOOT=\"512\"\n        BLANK2=\"0\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s905l3a\" && \"${boxid}\" -eq \"304\" ]]; then\n        BLANK1=\"570\" # e900v22c/d: The first [ 570 MiB ] is not writable.\n        BOOT=\"512\"\n        BLANK2=\"0\"\n    elif [[ \"${AMLOGIC_SOC}\" == \"s905l3a\" && \"${boxid}\" -eq \"305\" ]]; then\n        BLANK1=\"108\" # CM311-1a-YST: Must skip [ 108 MiB ]\n        BOOT=\"512\"   # A total of [ 1024 MiB ] can be used in this block, gave up [ 1024-512=512 MiB ]\n        BLANK2=\"778\" # Rootfs partition could be set after [ 1398 MiB ] of the total disk, Multi-backward offset 100 MiB, [ 1398-108-512=778 MiB ]\n    elif [[ \"${AMLOGIC_SOC}\" == \"s905l3b\" ]]; then\n        BLANK1=\"128\" # https://github.com/janko888/MBH-M30xA\n        BOOT=\"512\"   # M302A/M304A, Compatible with Android 4 and Android 9 firmware\n        BLANK2=\"720\"\n    elif [[ \"${FDTFILE}\" == \"meson-sm1-skyworth-lb2004-a4091.dtb\" ]]; then\n        BLANK1=\"108\" # Tencent Aurora 3Pro: Must skip [ 108 MiB ]\n        BOOT=\"512\"   # A total of [ 768 MiB ] can be used in this block, gave up [ 768-512=256 MiB ]\n        BLANK2=\"562\" # Rootfs partition could be set after [ 1182 MiB ] of the total disk, [ 1182-108-512=562 MiB ]\n    elif [[ \"${boxid}\" -eq \"525\" ]]; then\n        BLANK1=\"108\" # Whale(S905X3): Must skip [ 108 MiB ]\n        BOOT=\"512\"   # A total of [ 1024 MiB ] can be used in this block, gave up [ 1024-512=512 MiB ]\n        BLANK2=\"650\" # Rootfs partition could be set after [ 1270 MiB ] of the total disk, [ 1270-108-512=650 MiB ]\n    elif [[ \"${boxid}\" -eq \"409\" || \"${boxid}\" -eq \"410\" ]]; then\n        BLANK1=\"700\" # WXY-OES(A311D), WXY-OES-Plus(s922x): Must skip [ 700 MiB ]\n        BOOT=\"512\"\n        BLANK2=\"0\"\n    else\n        BLANK1=\"68\"\n        BOOT=\"512\"   # S905x3: A total of [ 1120 MiB ] can be used in this block, and the remaining [ 608 MiB ] can be used.\n        BLANK2=\"770\" # Rootfs partition could be set after [ 1350 MiB ] of the total disk.\n    fi\n\n    # Format emmc disk\n    echo -e \"${INFO} Creating MBR partition table and partitions.\"\n    parted -s \"${DEV_EMMC}\" mklabel msdos\n    parted -s \"${DEV_EMMC}\" mkpart primary fat32 $((BLANK1))MiB $((BLANK1 + BOOT - 1))MiB\n    parted -s \"${DEV_EMMC}\" mkpart primary ${file_system_type} $((BLANK1 + BOOT + BLANK2))MiB 100%\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to create eMMC partition using [ parted ].\"\n\n    # Write bootloader\n    if [[ -n \"${MAINLINE_UBOOT}\" && -f \"/usr/lib/u-boot/${MAINLINE_UBOOT}\" && \"${auto_mainline_uboot}\" == \"yes\" ]]; then\n        echo -e \"${INFO} 01. Write Mainline bootloader: [ ${MAINLINE_UBOOT} ]\"\n        dd if=\"/usr/lib/u-boot/${MAINLINE_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync bs=1 count=444\n        dd if=\"/usr/lib/u-boot/${MAINLINE_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync bs=512 skip=1 seek=1\n    elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"/usr/lib/u-boot/${BOOTLOADER_IMG}\" ]]; then\n        echo -e \"${INFO} 02. Write Android bootloader: [ ${BOOTLOADER_IMG} ]\"\n        dd if=\"/usr/lib/u-boot/${BOOTLOADER_IMG}\" of=\"${DEV_EMMC}\" conv=fsync bs=1 count=444\n        dd if=\"/usr/lib/u-boot/${BOOTLOADER_IMG}\" of=\"${DEV_EMMC}\" conv=fsync bs=512 skip=1 seek=1\n    elif [[ -n \"${MYBOX_UBOOT}\" && -f \"${MYBOX_UBOOT}\" ]]; then\n        echo -e \"${INFO} 03. Write the mybox bootloader: [ ${MYBOX_UBOOT} ]\"\n        dd if=\"${MYBOX_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync bs=1 count=444\n        dd if=\"${MYBOX_UBOOT}\" of=\"${DEV_EMMC}\" conv=fsync bs=512 skip=1 seek=1 count=8191\n    fi\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to write bootloader using [ dd ].\"\n}\n\n# Copy boot partition files to eMMC\ncopy_bootfs() {\n    cd /\n    echo -e \"${STEPS} Processing BOOTFS partition...\"\n\n    PART_BOOT=\"${DEV_EMMC}p1\"\n\n    if grep -q ${PART_BOOT} /proc/mounts; then\n        echo -e \"${INFO} Unmounting BOOT partition.\"\n        umount -f ${PART_BOOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${PART_BOOT} ].\"\n    fi\n\n    echo -e \"${INFO} Formatting BOOTFS partition...\"\n    sleep 1\n    mkfs.vfat -F 32 -n \"BOOT_EMMC\" ${PART_BOOT}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format BOOTFS with [ mkfs.vfat ].\"\n\n    mount -o rw ${PART_BOOT} ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount BOOTFS partition.\"\n\n    echo -e \"${INFO} Copying BOOTFS partition data...\"\n    cp -rf /boot/* ${DIR_INSTALL}\n    # Remove useless files\n    rm -rf ${DIR_INSTALL}/'System Volume Information'\n    rm -f ${DIR_INSTALL}/s9*\n    rm -f ${DIR_INSTALL}/aml*\n    # Replace eMMC boot files\n    [[ -f \"${DIR_INSTALL}/boot-emmc.scr\" ]] && mv -f ${DIR_INSTALL}/boot-emmc.scr ${DIR_INSTALL}/boot.scr\n    [[ -f \"${DIR_INSTALL}/boot-emmc.cmd\" ]] && mv -f ${DIR_INSTALL}/boot-emmc.cmd ${DIR_INSTALL}/boot.cmd\n    [[ -f \"${DIR_INSTALL}/boot-emmc.ini\" ]] && mv -f ${DIR_INSTALL}/boot-emmc.ini ${DIR_INSTALL}/boot.ini\n    [[ -f \"${DIR_INSTALL}/boot.ini\" ]] && sed -i \"s|u-boot.ext|u-boot.emmc|g\" ${DIR_INSTALL}/boot.ini\n\n    # Update [ /boot/uEnv.txt ] settings\n    uenv_conf_file=\"${DIR_INSTALL}/uEnv.txt\"\n    [[ -f \"${uenv_conf_file}\" ]] && {\n        echo -e \"${INFO} Update the [ uEnv.txt ] file.\"\n        BOOT_CONF=\"uEnv.conf\"\n        sed -i \"s|root=.*console=ttyAML0|root=${uenv_mount_string} console=ttyAML0|g\" ${uenv_conf_file}\n        sed -i \"s|meson.*.dtb|${FDTFILE}|g\" ${uenv_conf_file}\n    }\n\n    # Update [ /boot/extlinux/extlinux.conf ] settings\n    boot_extlinux_file=\"${DIR_INSTALL}/extlinux/extlinux.conf\"\n    [[ -f \"${boot_extlinux_file}\" ]] && {\n        echo -e \"${INFO} Update the [ extlinux.conf ] file.\"\n        BOOT_CONF=\"extlinux.conf\"\n        sed -i \"s|root=.*console=ttyAML0|root=${uenv_mount_string} console=ttyAML0|g\" ${boot_extlinux_file}\n        sed -i \"s|meson.*.dtb|${FDTFILE}|g\" ${boot_extlinux_file}\n    }\n\n    # Copy u-boot.ext and u-boot.emmc\n    if { [[ \"${NEED_OVERLOAD}\" == \"yes\" || \"${auto_mainline_uboot}\" == \"yes\" ]]; } &&\n        { [[ -n \"${UBOOT_OVERLOAD}\" && -f \"${DIR_INSTALL}/${UBOOT_OVERLOAD}\" ]]; }; then\n        echo -e \"${INFO} Copy [ ${UBOOT_OVERLOAD} ] to u-boot.emmc\"\n        if [[ -f \"${DIR_INSTALL}/u-boot.ext\" ]]; then\n            cp -f ${DIR_INSTALL}/u-boot.ext ${DIR_INSTALL}/u-boot.emmc\n        else\n            cp -f ${DIR_INSTALL}/${UBOOT_OVERLOAD} ${DIR_INSTALL}/u-boot.ext\n            cp -f ${DIR_INSTALL}/${UBOOT_OVERLOAD} ${DIR_INSTALL}/u-boot.emmc\n        fi\n        chmod +x ${DIR_INSTALL}/u-boot.ext\n        chmod +x ${DIR_INSTALL}/u-boot.emmc\n    fi\n\n    sync && sleep 3\n    umount -f ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${DIR_INSTALL} ].\"\n}\n\n# Copy root partition files to eMMC\ncopy_rootfs() {\n    cd /\n    echo -e \"${STEPS} Processing ROOTFS partition...\"\n\n    PART_ROOT=\"${DEV_EMMC}p2\"\n\n    if grep -q ${PART_ROOT} /proc/mounts; then\n        echo -e \"${INFO} Unmounting ROOT partition.\"\n        umount -f ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${PART_ROOT} ].\"\n    fi\n\n    echo -e \"${INFO} Formatting ROOTFS partition...\"\n    if [[ \"${file_system_type}\" == \"btrfs\" ]]; then\n        mkfs.btrfs -f -U ${ROOTFS_UUID} -L \"ROOTFS_EMMC\" -m single ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format ROOTFS with [ mkfs.btrfs ]\"\n\n        mount -t btrfs -o compress=zstd:6 ${PART_ROOT} ${DIR_INSTALL}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount ROOTFS.\"\n    else\n        mkfs.ext4 -F -q -U ${ROOTFS_UUID} -L \"ROOTFS_EMMC\" -b 4k -m 0 ${PART_ROOT}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to format ROOTFS with [ mkfs.ext4 ]\"\n\n        mount -t ext4 ${PART_ROOT} ${DIR_INSTALL}\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to mount ROOTFS partition.\"\n    fi\n\n    echo -e \"${INFO} Copying ROOTFS partition data...\"\n    # Create relevant directories\n    mkdir -p ${DIR_INSTALL}/{boot/,dev/,media/,mnt/,proc/,run/,sys/,tmp/}\n    chmod 1777 ${DIR_INSTALL}/tmp\n    # Copy the relevant directory\n    COPY_SRC=\"etc home opt root selinux srv usr var\"\n    for src in ${COPY_SRC}; do\n        if [[ -d \"${src}\" ]]; then\n            echo -e \"${INFO} Copying [ ${src} ] ...\"\n            tar -cf - ${src} | (\n                cd ${DIR_INSTALL}\n                tar -xpf -\n            )\n        fi\n    done\n    # Create relevant symbolic link\n    ln -sf usr/bin ${DIR_INSTALL}/bin\n    ln -sf usr/lib ${DIR_INSTALL}/lib\n    ln -sf usr/sbin ${DIR_INSTALL}/sbin\n\n    echo -e \"${INFO} Generate the new fstab file.\"\n    rm -f ${DIR_INSTALL}/etc/fstab\n    cat >${DIR_INSTALL}/etc/fstab <<EOF\nUUID=${ROOTFS_UUID}    /        ${file_system_type}    ${fstab_mount_string}      0 1\nLABEL=BOOT_EMMC        /boot    vfat                   defaults                   0 2\ntmpfs                  /tmp     tmpfs                  defaults,nosuid            0 0\n\nEOF\n\n    echo -e \"${INFO} Update parameters related to the releases file.\"\n    ophub_release_file=\"${DIR_INSTALL}${ophub_release_file}\"\n    sed -i \"s|^MODEL_ID=.*|MODEL_ID='${boxid}'|g\" ${ophub_release_file}\n    sed -i \"s|^MODEL_NAME=.*|MODEL_NAME='${MODEL_NAME}'|g\" ${ophub_release_file}\n    sed -i \"s|^SOC=.*|SOC='${AMLOGIC_SOC}'|g\" ${ophub_release_file}\n    sed -i \"s|^FDTFILE=.*|FDTFILE='${FDTFILE}'|g\" ${ophub_release_file}\n    sed -i \"s|^MAINLINE_UBOOT=.*|MAINLINE_UBOOT='/usr/lib/u-boot/${MAINLINE_UBOOT}'|g\" ${ophub_release_file}\n    sed -i \"s|^BOOTLOADER_IMG=.*|BOOTLOADER_IMG='/usr/lib/u-boot/${BOOTLOADER_IMG}'|g\" ${ophub_release_file}\n    sed -i \"s|^UBOOT_OVERLOAD=.*|UBOOT_OVERLOAD='${UBOOT_OVERLOAD}'|g\" ${ophub_release_file}\n    sed -i \"s|^ROOTFS_TYPE=.*|ROOTFS_TYPE='${file_system_type}'|g\" ${ophub_release_file}\n    sed -i \"s|^BOOT_CONF=.*|BOOT_CONF='${BOOT_CONF}'|g\" ${ophub_release_file}\n    sed -i \"s|^DISK_TYPE=.*|DISK_TYPE='emmc'|g\" ${ophub_release_file}\n    sed -i \"s|^MLUBOOT_STATUS=.*|MLUBOOT_STATUS='${auto_mainline_uboot}'|g\" ${ophub_release_file}\n    sed -i \"s|^AMPART_STATUS=.*|AMPART_STATUS='${AMPART_STATUS}'|g\" ${ophub_release_file}\n\n    # Remove useless scripts\n    rm -f ${DIR_INSTALL}/usr/sbin/armbian-tf\n    rm -f ${DIR_INSTALL}/root/.no_rootfs_resize\n\n    sync && sleep 3\n    umount -f ${DIR_INSTALL}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Failed to umount [ ${DIR_INSTALL} ].\"\n}\n\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo $0 ]\"\necho -e \"${STEPS} Installing Armbian to internal eMMC...\"\n\n# Check dependencies\ncheck_depends\n# Initialize all variables\ninit_var \"${@}\"\n# Display the model list\nshow_aml_model\n# Set the type of file system\nset_rootfs_type\n# Create emmc partition\ncreate_partition\n# Copy bootfs partition files\ncopy_bootfs\n# Copy rootfs partition files\ncopy_rootfs\n\necho -e \"${SUCCESS} Installation completed successfully. Run [ poweroff ], remove the installation media, then re-insert the power supply to boot the new system.\"\nexit 0\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd",
    "content": "#!/bin/bash\n#==========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: LED Screen Display Control Tool\n# Copyright (C) 2022- https://github.com/unifreq/openwrt_packit\n# Copyright (C) 2022- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Function          : Command\n# Default           : armbian-openvfd\n# One-key to open   : armbian-openvfd <boxid>\n# One-key to stop   : armbian-openvfd 0\n# Update config     : armbian-openvfd -u\n#\n#============================= Functions list =============================\n#\n# do_start          : Enable LED screen display\n# do_stop           : Disable LED screen display\n# do_update_conf    : Update OpenVFD configuration files\n# do_select_box     : Select and apply device configuration\n#\n#==========================================================================\n#\n# Openvfd files storage path\nopenvfd_path=\"/usr/share/openvfd\"\nopenvfd_service=\"${openvfd_path}/vfdservice\"\n# The openvfd files download repository\nopenvfd_repo=\"https://github.com/ophub/amlogic-s9xxx-armbian.git\"\nopenvfd_dir=\"build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd\"\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nOPTIONS=\"[\\033[93m OPTIONS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==========================================================================\n\n# Output error message and abort\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\n# Update OpenVFD configuration files\ndo_update_conf() {\n    echo -e \"${STEPS} Updating OpenVFD configuration files...\"\n\n    # Check dependencies\n    [[ -z \"$(dpkg -l | awk '{print $2}' | grep -w \"^git$\")\" ]] && sudo apt-get update && sudo apt-get install -y git\n\n    # Get the latest scripts\n    git_tmp_path=\"$(mktemp -d)\"\n    cd ${git_tmp_path}\n    git init --quiet\n    git config core.sparseCheckout true\n    echo \"${openvfd_dir}/*\" >>.git/info/sparse-checkout\n    git remote add origin ${openvfd_repo}\n    git pull --quiet --depth=1 origin main\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to download scripts from [ ${openvfd_repo} ].\"\n\n    # Update related files\n    mkdir -p ${openvfd_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${openvfd_dir}/* ${openvfd_path}\n    [[ \"${?}\" -ne \"0\" ]] && error_msg \"Failed to sync scripts from [ ${openvfd_repo} ].\"\n    chmod +x ${openvfd_path}/vfdservice\n\n    # Clean up temporary files\n    rm -rf ${git_tmp_path} 2>/dev/null\n\n    sync && sleep 3\n    echo -e \"${SUCCESS} OpenVFD configuration files updated successfully.\"\n    exit 0\n}\n\n# Enable LED screen display\ndo_start() {\n    echo -e \"${STEPS} Enabling LED screen display...\"\n\n    # Check config files and services\n    conf_file=\"${openvfd_path}/conf/${1}\"\n    if [[ -s \"${conf_file}\" && -x \"${openvfd_service}\" ]]; then\n        source \"${conf_file}\" 2>/dev/null\n        echo -e \"${INFO} Using LED Profiles: ${conf_file}\"\n    else\n        error_msg \"The LED profile [ ${conf_file} ] does not exist!\"\n    fi\n\n    modprobe openvfd vfd_gpio_clk=${vfd_gpio_clk} \\\n        vfd_gpio_dat=${vfd_gpio_dat} \\\n        vfd_gpio_stb=${vfd_gpio_stb:-0,0,0xFF} \\\n        vfd_gpio0=${vfd_gpio0:-0,0,0xFF} \\\n        vfd_gpio1=${vfd_gpio1:-0,0,0xFF} \\\n        vfd_gpio2=${vfd_gpio2:-0,0,0xFF} \\\n        vfd_gpio3=${vfd_gpio3:-0,0,0xFF} \\\n        vfd_gpio_protocol=${vfd_gpio_protocol:-0,0} \\\n        vfd_chars=${vfd_chars} vfd_dot_bits=${vfd_dot_bits} \\\n        vfd_display_type=${vfd_display_type}\n\n    \"${openvfd_service}\" &\n\n    trap \"killall ${openvfd_service}; rmmod openvfd; exit\" 2 3 15\n\n    if [[ -n \"${functions}\" ]]; then\n        for func in ${functions}; do\n            echo -e \"${INFO} turn led ${func} on ... \"\n            echo \"${func}\" >/sys/class/leds/openvfd/led_on 2>/dev/null\n        done\n    fi\n\n    echo -e \"${SUCCESS} LED display enabled!\"\n    exit 0\n}\n\n# Disable LED screen display\ndo_stop() {\n    echo -e \"${STEPS} Disabling LED screen display...\"\n\n    killall -9 vfdservice 2>/dev/null\n    rmmod openvfd -f 2>/dev/null\n\n    echo -e \"${SUCCESS} LED display disabled!\"\n    exit 0\n}\n\n# Select and apply device configuration\ndo_select_box() {\n    case \"${1}\" in\n    11 | x96max) do_start x96max.conf ;;\n    12 | x96maxplus) do_start x96maxplus.conf ;;\n    13 | x96air) do_start x96air.conf ;;\n    14 | h96max-x3) do_start h96max-x3.conf ;;\n    15 | hk1-x3) do_start hk1-x3.conf ;;\n    16 | hk1box) do_start hk1box.conf ;;\n    17 | tx3) do_start tx3.conf ;;\n    18 | tx3-mini) do_start tx3-mini.conf ;;\n    19 | t95) do_start t95.conf ;;\n    20 | t95z-plus) do_start t95z-plus.conf ;;\n    21 | tx9-pro) do_start tx9-pro.conf ;;\n    22 | x92) do_start x92.conf ;;\n    23 | whale) do_start whale.conf ;;\n    24 | x88pro-x3) do_start x88pro-x3.conf ;;\n    99 | diy) do_start diy.conf ;;\n    0 | stop) do_stop ;;\n    1 | quit) echo \"quit!\" && exit 0 ;;\n    *) error_msg \"Invalid input!\" ;;\n    esac\n}\n\n# Execute according to the classification of input parameters\ncase \"${1}\" in\n-u | u | -update | update)\n    do_update_conf\n    ;;\n[0-9]*)\n    do_select_box \"${1}\"\n    ;;\n*)\n    clear\n    cat <<EOF\n\n        ┌────────[ Enable LED ]─────────┐\n        │                               │\n        │    11. x96max (s905x2)        │\n        │    12. x96maxplus (s905x3)    │\n        │    13. x96air (s905x3)        │\n        │    14. h96max-x3 (s905x3)     │\n        │    15. hk1-x3 (s905x3)        │\n        │    16. hk1box (s905x3)        │\n        │    17. tx3 (s905x3)           │\n        │    18. tx3-mini (s905w)       │\n        │    19. t95 (s905x)            │\n        │    20. t95z-plus (s912)       │\n        │    21. tx9-pro (s912)         │\n        │    22. x92 (s912)             │\n        │    23. whale (s905x3)         │\n        |    24. x88pro-x3 (s905x3)     |\n        │    99. diy                    │\n        │                               │\n        ├──────[ Other Operations ]─────┤\n        │                               │\n        │    -u. update                 │\n        │     0. stop                   │\n        │     1. quit                   │\n        │                               │\n        └───────────────────────────────┘\n\nEOF\n    echo -ne \"${OPTIONS} Please Input ID: \"\n    read boxid\n    do_select_box \"${boxid}\"\n    ;;\nesac\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/h96max-x3.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# H96 Max X3 (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='0,0,0xFF'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,4,3,2,1'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,3,2,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x00,0x00,0x00,0x06'\n\nfunctions='alarm usb play pause colon eth wifi'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/hk1-x3.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# HK1 X3 (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='0,0,0xFF'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,4,3,2,1'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,3,2,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x00,0x00,0x00,0x06'\n\nfunctions='wifi eth usb alarm play pause'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/hk1box.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# HK1Box / Vontar X3 (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='0,0,0xFF'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,4,3,2,1'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,3,2,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x00,0x00,0x00,0x06'\n\nfunctions='alarm usb play pause colon lan wlan'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/t95.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# T95m (S905X) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-gxl-gpio.h\n# [2] Reserved - must be 0.\n\nvfd_gpio_clk='1,4,0'\nvfd_gpio_dat='1,3,0'\nvfd_gpio_stb='1,2,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,1,2,3,4'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0.\n# [2] - Flags. (bit 0 = '1' - Common Anode display, bits [1-7] - Reserved.)\n# [3] - Controller.\n\nvfd_display_type='0x01,0x00,0x00,0x00'\n\nfunctions=''\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/t95z-plus.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# T95Z Plus configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-gxl-gpio.h\n# [2] Reserved - must be 0.\n\nvfd_gpio_clk='0,71,0'\nvfd_gpio_dat='0,72,0'\nvfd_gpio_stb='0,70,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,1,2,3,4'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0.\n# [2] - Flags. (bit 0 = '1' - Common Anode display, bits [1-7] - Reserved.)\n# [3] - Controller.\n\nvfd_display_type='0x01,0x00,0x00,0x00'\n\nfunctions='wifi eth usb alarm play pause'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/tx3-mini.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# Tanix TX3-MINI (S905W) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,76,0'\nvfd_gpio_dat='0,75,0'\nvfd_gpio_stb='1,4,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,3,2,1,0'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,3,2,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x01,0x00,0x00,0x00'\n\n#functions='alarm usb play pause colon lan wlan'\nfunctions='usb colon eth wifi'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/tx3.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# Tanix TX3 (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='0,0,0xFF'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='0,4,3,2,1'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,3,2,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x01,0x00,0x00,0x06'\n\n#functions='alarm usb play pause colon lan wlan'\nfunctions=''\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/tx9-pro.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# Tanix TX9 Pro (S912) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-gxl-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,75,0'\nvfd_gpio_dat='0,74,0'\nvfd_gpio_stb='0,53,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x00,0x00,0x00,0x00'\n\n#functions='alarm usb play pause colon lan wlan'\nfunctions=''\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/whale.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# Whale (S905X3) configuration\n# Share by: https://github.com/9runner\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='1,10,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x01,0x06'  # ok\n\nfunctions='usb apps setup sd hdmi cvbs'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x88pro-x3.conf",
    "content": "#--------------------\n# X88 PRO X3 (S905X3) configuration\n# shared by https://github.com/araczkowski\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='1,10,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x00,0x06'  # ok\n\nfunctions='usb apps setup sd hdmi cvbs'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x92.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# X92 S912 configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-gxl-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='0,66,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x01,0x00'\n\n#functions='alarm usb play pause colon lan wlan'\nfunctions=''\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96air.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# X96 Air (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='1,10,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x01,0x00'  # ok\n\nfunctions='usb apps setup sd hdmi cvbs'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96max.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# X96 Max (S905X2) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='1,10,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x01,0x00'  # ok\n\nfunctions='usb apps setup sd hdmi cvbs'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf",
    "content": "# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.\n#\n# X96 Max Plus (S905X3) configuration\n#--------------------\n#gpio_xxx:\n# [0] 0 = &gpio, 1 = &gpio_ao.\n# [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h\n# [0] Reserved - must be 0.\n\nvfd_gpio_clk='0,64,0'\nvfd_gpio_dat='0,63,0'\nvfd_gpio_stb='1,10,0'\n\n#chars:\n# < DHHMM > Order of display chars (D=dots, represented by a single char)\n\nvfd_chars='4,0,1,2,3'\n\n#dot_bits:\n# Order of dot bits. Typical configurations:\n# Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots\n# Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6\n# Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots\n# APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6\n# Display Type 3 Power, LAN, Col, Low Wifi, High Wifi\n# N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6\n\nvfd_dot_bits='0,1,2,3,4,5,6'\n\n#display_type:\n# [0] - Display type.\n# [1] - Reserved - must be 0..\n# [2] - Flags. (bit 0 = '1' - Common Anode display)\n# [3] - Controller.\n\nvfd_display_type='0x02,0x00,0x01,0x00'  # ok\n\nfunctions='usb apps setup sd hdmi cvbs'\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/rockchip/bootfs/armbianEnv.txt",
    "content": "verbosity=1\nbootlogo=false\nfdtfile=rockchip/rk3399-king3399.dtb\nrootdev=/dev/mmcblk0p2\nrootfstype=ext4\nrootflags=rw,errors=remount-ro\noverlay_prefix=rk3399\noverlays=\nextraargs=rw rootwait\nextraboardargs=net.ifnames=0 max_loop=128\ndocker_optimizations=on"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/rockchip/bootfs/armbian_first_run.txt.template",
    "content": "#-----------------------------------------------------------------\n# Armbian first run configuration\n# Set optional end user configuration\n#\t- Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt\n#\t- Settings below will be applied only on 1st run of Armbian\n#-----------------------------------------------------------------\n\n#-----------------------------------------------------------------\n# General:\n# 1 = delete this file, after first run setup is completed.\n\nFR_general_delete_this_file_after_completion=1\n\n#-----------------------------------------------------------------\n#Networking:\n# Change default network settings\n# Set to 1 to apply any network related settings below\n\nFR_net_change_defaults=0\n\n# Enable WiFi or Ethernet.\n#\tNB: If both are enabled, WiFi will take priority and Ethernet will be disabled.\n\nFR_net_ethernet_enabled=1\nFR_net_wifi_enabled=0\n\n#Enter your WiFi creds\n#\tSECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.\n\nFR_net_wifi_ssid='MySSID'\nFR_net_wifi_key='MyWiFiKEY'\n\n#\tCountry code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n\nFR_net_wifi_countrycode='GB'\n\n#If you want to use a static ip, set it here\n\nFR_net_use_static=0\nFR_net_static_ip='192.168.0.100'\nFR_net_static_mask='255.255.255.0'\nFR_net_static_gateway='192.168.0.1'\nFR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, separated by a space.\n#-----------------------------------------------------------------\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/rockchip/bootfs/boot.cmd",
    "content": "# DO NOT EDIT THIS FILE\n#\n# Please edit /boot/armbianEnv.txt to set supported parameters\n#\n\nsetenv load_addr \"0x9000000\"\nsetenv overlay_error \"false\"\n# default values\nsetenv rootdev \"/dev/mmcblk0p1\"\nsetenv verbosity \"1\"\nsetenv console \"both\"\nsetenv bootlogo \"false\"\nsetenv rootfstype \"ext4\"\nsetenv docker_optimizations \"on\"\nsetenv earlycon \"off\"\n\necho \"Boot script loaded from ${devtype} ${devnum}\"\n\nif test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then\n\tload ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt\n\tenv import -t ${load_addr} ${filesize}\nfi\n\nif test \"${logo}\" = \"disabled\"; then setenv logo \"logo.nologo\"; fi\n\nif test \"${console}\" = \"display\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=tty1\"; fi\nif test \"${console}\" = \"serial\" || test \"${console}\" = \"both\"; then setenv consoleargs \"console=ttyS2,1500000 ${consoleargs}\"; fi\nif test \"${earlycon}\" = \"on\"; then setenv consoleargs \"earlycon ${consoleargs}\"; fi\nif test \"${bootlogo}\" = \"true\"; then\n\tsetenv consoleargs \"splash plymouth.ignore-serial-consoles ${consoleargs}\"\nelse\n\tsetenv consoleargs \"splash=verbose ${consoleargs}\"\nfi\n\n# get PARTUUID of first partition on SD/eMMC the boot script was loaded from\nif test \"${devtype}\" = \"mmc\"; then part uuid mmc ${devnum}:1 partuuid; fi\n\nsetenv bootargs \"root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}\"\n\nif test \"${docker_optimizations}\" = \"on\"; then setenv bootargs \"${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1\"; fi\n\nload ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd\nload ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image\n\nload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nfdt addr ${fdt_addr_r}\nfdt resize 65536\nfor overlay_file in ${overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then\n\t\techo \"Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nfor overlay_file in ${user_overlays}; do\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then\n\t\techo \"Applying user provided DT overlay ${overlay_file}.dtbo\"\n\t\tfdt apply ${load_addr} || setenv overlay_error \"true\"\n\tfi\ndone\nif test \"${overlay_error}\" = \"true\"; then\n\techo \"Error applying DT overlays, restoring original DT\"\n\tload ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}\nelse\n\tif load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then\n\t\techo \"Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\n\tif test -e ${devtype} ${devnum} ${prefix}fixup.scr; then\n\t\tload ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr\n\t\techo \"Applying user provided fixup script (fixup.scr)\"\n\t\tsource ${load_addr}\n\tfi\nfi\nkaslrseed\nbooti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\n\n# Recompile with:\n# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr\n"
  },
  {
    "path": "build-armbian/armbian-files/platform-files/rockchip/bootfs/extlinux/extlinux.conf.bak",
    "content": "LABEL Armbian\n  LINUX /Image\n  INITRD /uInitrd\n  FDT /dtb/rockchip/rk3399-king3399.dtb\n  APPEND root=LABEL=ROOTFS console=ttyS2,1500000 console=tty1 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 max_loop=128 bootsplash.bootfile=bootsplash.armbian\n"
  },
  {
    "path": "compile-kernel/README.cn.md",
    "content": "# 内核编译与使用指南\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\n本项目编译的内核兼容 `Armbian` 和 `OpenWrt` 系统，可用于 [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian)、[amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt)、[flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions) 和 [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) 等项目。既可在编译固件时集成，也可安装到已有系统中使用。\n\n你可以根据需要调整内核配置，例如添加驱动和补丁。也可以编译带有个性化签名的内核，如 `5.10.95-happy-new-year`、`5.10.96-beijing-winter-olympics`、`5.10.99-valentines-day` 等。\n\n## 内核仓库\n\n在 [ophub/kernel](https://github.com/ophub/kernel) 的 [Releases](https://github.com/ophub/kernel/releases) 中提供了预编译的内核文件。\n\n## 本地编译\n\n- ### 在 Ubuntu 系统下运行\n\n1. 克隆仓库到本地：`git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. 安装必要的软件包（以 Ubuntu 24.04 为例）：\n\n进入 `~/amlogic-s9xxx-armbian` 根目录，然后执行安装命令：\n\n```yaml\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# For Ubuntu-24.04\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. 进入 `~/amlogic-s9xxx-armbian` 根目录，执行 `sudo ./recompile -k 5.15.100` 等指定参数命令即可编译内核。脚本将自动下载并安装编译环境和内核源代码，并完成全部配置。编译完成的内核文件保存在当前源码树的 `compile-kernel/output` 目录中，或通过 `-h` 参数指定的目录中。\n\n- ### 在 Armbian 系统下运行\n\n可以直接在 [Armbian](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 系统中编译内核，也可以在 Ubuntu/Debian 等系统上通过 [Docker](https://hub.docker.com/u/ophub) 容器运行 Armbian 系统来编译内核。Armbian 系统 Docker 镜像的制作方法可参考 [armbian_docker](./tools/script/docker) 构建脚本。\n\n1. 更新本地编译环境和配置文件：`armbian-kernel -u`\n\n2. 编译内核：执行 `armbian-kernel -k 5.15.100` 等指定参数命令即可编译内核。脚本将自动下载并安装编译环境和内核源代码，并完成全部配置。编译完成的内核文件保存在 `/opt/kernel/compile-kernel/output` 目录中。\n\n- ### 本地编译参数说明\n\n| 参数    | 含义        | 说明                             |\n| ------ | ----------- | ------------------------------- |\n| -r     | Repository  | 指定编译内核的源代码仓库。可选择 `github.com` 上的内核源代码仓库，例如 `-r unifreq`。参数格式支持 `owner/repo@branch` 三部分组合，其中所有者名称 `owner` 为必选参数，仓库名称 `/repo` 和分支名称 `@branch` 为可选参数。当仅指定所有者名称时，将自动匹配该所有者下名称符合 `linux-5.x.y` 格式且分支为 `main` 的内核源代码仓库。若仓库名称或分支名称不同，请使用组合方式指定，如 `owner@branch`、`owner/repo` 或 `owner/repo@branch`。默认值：`unifreq` |\n| -k     | Kernel      | 指定内核版本，如 `-k 5.15.100`。多个内核以 `_` 分隔，如 `-k 5.15.100_5.15.50`。使用 `-k all` 表示编译全部主线内核，当前等价于 `-k 5.10.y_5.15.y_6.1.y_6.6.y_6.12.y_6.18.y`，内核列表会随上游内核源码仓库 [unifreq](https://github.com/unifreq) 的维护状态动态调整。 |\n| -a     | AutoKernel  | 设置是否自动采用同系列最新版本内核。设为 `true` 时，将自动检查 `-k` 指定的内核（如 `5.15.100`）同系列是否存在更新版本，若存在则自动切换为最新版。设为 `false` 时则编译指定版本。默认值：`true` |\n| -m     | MakePackage | 设置内核构建的包列表。设为 `all` 时生成 `Image、modules、dtbs` 全部文件；设为 `dtbs` 时仅生成 3 个 DTB 文件。默认值：`all` |\n| -f     | configFlavor | 指定从内核仓库 [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) 下载的配置文件 `config-*` 到本地 [tools/config](tools/config) 目录。若本地已存在对应内核版本的配置文件且未设置此参数，则跳过下载。可选项为内核仓库中存在的[目录名](https://github.com/ophub/kernel/tree/main/kernel-config/release)，例如：`stable` / `rk3588` / `rk35xx` / `h6`。默认值：`stable` |\n| -p     | AutoPatch   | 设置是否应用自定义内核补丁。设为 `true` 时将使用 [tools/patch](tools/patch) 目录下的内核补丁，详细说明参考[内核补丁添加方法](../documents/README.cn.md#9-编译-armbian-内核)。默认值：`false` |\n| -n     | CustomName  | 设置内核自定义签名。例如设为 `-ophub` 时，生成的内核名称为 `5.15.100-ophub`。签名中请勿包含空格。默认值：`-ophub` |\n| -t     | Toolchain   | 设置编译内核的工具链。可选项：`clang / gcc / gcc-<version>`。默认值：`gcc` |\n| -z     | CompressFormat | 设置内核中 initrd 使用的压缩格式。可选项：`xz / gzip / zstd / lzma`。默认值：`xz` |\n| -d     | DeleteSource | 设置内核编译完成后是否删除源代码。可选项：`true / false`。默认值：`false` |\n| -s     | SilentLog   | 设置编译时是否启用静默模式以减少日志输出。可选项：`true / false`。默认值：`false` |\n| -l     | EnableLog   | 设置是否将编译过程记录到日志文件：`/var/log/kernel_compile_*.log`。可选项：`true / false`。默认值：`false` |\n| -c     | CcacheClear | 设置编译前是否清除 ccache 缓存。可选项：`true / false`。默认值：`false` |\n| -h     | DockerHostpath | 设置内核编译时 Docker 容器在宿主机的挂载路径。默认使用当前目录。 |\n| -i     | DockerImage | 设置编译内核的 Docker 容器镜像。默认值：`ophub/armbian-trixie:arm64` |\n\n- `sudo ./recompile` : 使用默认配置编译内核。\n- `sudo ./recompile -k 5.15.100` : 使用默认配置，并通过 `-k` 进行指定需要编译的内核版本，多个版本同时编译时使用 `_` 进行连接。\n- `sudo ./recompile -k 5.15.100 -f stable` : 使用默认配置，并通过 `-k 5.15.100` 参数指定需要编译的内核版本，通过 `-f stable` 参数指定从内核仓库下载 `stable` 目录下的配置文件。\n- `sudo ./recompile -k 5.15.100 -a true` : 使用默认配置，并通过 `-a` 参数设置编译内核时，是否自动升级到同系列最新内核。\n- `sudo ./recompile -k 5.15.100 -n -ophub` : 使用默认配置，并通过 `-n` 参数设置内核自定义签名。\n- `sudo ./recompile -k 5.15.100 -m dtbs` : 使用默认配置，并通过 `-m` 参数指定仅制作 dtbs 文件。\n- `sudo ./recompile -k 5.15.100_6.1.10 -a true -n -ophub` : 使用默认配置，并通过多个参数进行设置。\n\n’ 提示：推荐使用 `unifreq` 的 [linux-6.1.y](https://github.com/unifreq/linux-6.1.y)、[linux-5.15.y](https://github.com/unifreq/linux-5.15.y)、[linux-5.10.y](https://github.com/unifreq/linux-5.10.y) 等仓库的内核源代码进行编译，其中已针对相关设备添加了驱动和补丁。配置文件推荐使用 [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) 中的模板，已针对支持的设备进行了预配置，可在此基础上进行个性化定制。\n\n## 使用 GitHub Actions 编译内核\n\n1. 在 [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面选择 **_`Compile the kernel`_**，点击 **_`Run workflow`_** 按钮即可开始编译。\n\n2. 详见模板 [compile-kernel-via-docker.yml](../.github/workflows/compile-kernel-via-docker.yml)。代码如下：\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n’ 注意：若你 `fork` 仓库并进行了修改，使用时须将 Actions 的用户名改为你自己的仓库，例如：\n\n```yaml\nuses: YOUR-REPO/amlogic-s9xxx-armbian@main\n```\n\n- ### GitHub Action 输入参数说明\n\n相关参数与`本地编译命令`相对应，请参考上述说明。\n\n| 参数               | 默认值            | 说明                                                      |\n|-------------------|------------------|-----------------------------------------------------------|\n| build_target      | kernel           | 固定参数 `kernel`，设置编译目标为内核。                        |\n| kernel_source     | unifreq          | 指定编译内核的源代码仓库。默认值：`unifreq`。功能参考 `-r`      |\n| kernel_version    | 6.12.y_6.18.y    | 指定内核版本，如 `5.15.100`。功能参考 `-k`                |\n| kernel_auto       | true             | 设置是否自动采用同系列最新版本内核。默认值：`true`。功能参考 `-a`  |\n| kernel_package    | all              | 设置内核构建的包列表。默认值：`all`。功能参考 `-m`             |\n| kernel_sign       | -ophub           | 设置内核自定义签名。默认值：`-ophub`。功能参考 `-n`             |\n| kernel_toolchain  | gcc              | 设置编译内核的工具链。默认值：`gcc`。功能参考 `-t`             |\n| config_flavor     | stable           | 指定从内核仓库 [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) 下载的配置文件 `config-*` 到本地 [tools/config](tools/config) 目录。若本地已存在对应内核版本的配置文件且未设置此参数，则跳过下载。可选项为内核仓库中存在的[目录名](https://github.com/ophub/kernel/tree/main/kernel-config/release)，例如：`stable` / `rk3588` / `rk35xx` / `h6`。默认值：`stable`。若同时设置了 `kernel_config` 参数，最终优先采用 `config_flavor` 指定的配置文件。这两个参数互斥，可任选其一：通过前者使用 [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) 的内核配置文件，或通过后者使用你自己仓库的配置文件。功能参考 `-f` |\n| kernel_config     | false            | 默认使用 [tools/config](tools/config) 目录下的配置模板。可指定你仓库中存放内核配置文件的目录，如 `kernel/config_path`。该目录下的配置模板须以内核主版本命名，如 `config-5.10`、`config-5.15` 等。 |\n| kernel_patch      | false            | 指定你仓库中自定义内核补丁文件的目录。若设置此参数，编译前将自动从指定目录下载补丁文件；未设置则跳过。 |\n| auto_patch        | false            | 设置是否应用自定义内核补丁。默认值：`false`。功能参考 `-p` |\n| compress_format   | xz               | 设置内核中 initrd 使用的压缩格式。默认值：`xz`。功能参考 `-z` |\n| delete_source     | false            | 设置编译完成后是否删除内核源代码。默认值：`false`。功能参考 `-d` |\n| silent_log        | false            | 设置编译时是否启用静默模式以减少日志输出。默认值：`false`。功能参考 `-s` |\n| enable_log        | false            | 设置是否将编译过程记录到日志文件：`/var/log/kernel_compile_*.log`。默认值：`false`。功能参考 `-l` |\n| ccache_clear      | false            | 设置编译前是否清除 ccache 缓存。默认值：`false`。功能参考 `-c` |\n| docker_hostpath   | .                | 设置内核编译时 Docker 容器在宿主机的挂载路径。默认使用当前目录。功能参考 `-h` |\n| docker_image      | ophub/armbian-trixie:arm64 | 设置编译内核的 Docker 容器镜像。功能参考 `-i` |\n\n- ### GitHub Action 输出变量说明\n\n上传到 `Releases` 需要给仓库设置 `Workflow 读写权限`，详见[使用说明](../documents/README.cn.md#2-设置隐私变量-github_token)。\n\n| 参数                            | 默认值                 | 说明                           |\n| ------------------------------ | --------------------- | ------------------------------ |\n| ${{ env.PACKAGED_OUTPUTTAGS }} | 6.12.y_6.18.y         | 编译完成的内核名称                |\n| ${{ env.PACKAGED_OUTPUTPATH }} | compile-kernel/output | 编译完成的内核文件所在目录      |\n| ${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058            | 编译日期（月.日.时分）            |\n| ${{ env.PACKAGED_STATUS }}     | success               | 编译状态：success / failure     |\n\n## 内核使用指南\n\n本项目编译的内核兼容 `Armbian` 和 `OpenWrt` 系统。以下以 ophub 的项目为例进行说明。\n\n### 在 Armbian 系统中使用\n\n以下分别介绍如何在编译 Armbian 固件时集成内核，以及如何将内核安装到已有系统中。\n\n- #### 使用内核编译 Armbian 固件\n\nArmbian 固件编译支持本地操作，也支持通过 github.com 的 Actions 在线编译。本地编译方法详见：[本地化打包](../README.cn.md#本地化打包)，使用 Actions 在线编译的方法详见：[使用 GitHub Actions 进行编译](../README.cn.md#使用-github-actions-进行编译)\n\n- #### 将内核安装到已有的 Armbian 系统\n\n使用 `armbian-update` 命令可将编译好的内核安装到已有的 Armbian 系统中，具体操作方法详见：[更新 Armbian 内核](../README.cn.md#更新-armbian-内核)\n\n- #### 自定义编译驱动模块\n\n在 Linux 主线内核中，部分驱动尚未被支持，可自行编译所需的驱动模块。具体操作方法详见：[编译驱动模块](../documents/README.cn.md#93-如何自定义编译驱动模块)\n\n### 在 OpenWrt 系统中使用\n\n以下分别介绍如何在 OpenWrt 系统编译固件时集成内核，以及如何将内核安装到已有系统中。\n\n- #### 使用内核编译 OpenWrt 固件\n\nOpenWrt 固件编译支持本地操作，也支持通过 github.com 的 Actions 在线编译。本地编译方法详见：[本地化打包](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#本地化打包)，使用 Actions 在线编译的方法详见：[使用 Github Actions 进行编译](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#使用-github-actions-进行编译)\n\n- #### 将内核安装到已有的 OpenWrt 系统\n\n使用 [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic/blob/main/README.cn.md) 插件可将编译好的内核安装到已有的 OpenWrt 系统中，具体操作方法详见：[升级 OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#升级-openwrt)\n"
  },
  {
    "path": "compile-kernel/README.ja.md",
    "content": "# カーネルのコンパイルと使用ガイド\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\n本プロジェクトでコンパイルしたカーネルは `Armbian` と `OpenWrt` システムに対応しており、[amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian)、[amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt)、[flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions)、[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) などのプロジェクトで使用できます。ファームウェアのコンパイル時に統合することも、既存のシステムにインストールして使用することもできます。\n\n必要に応じてカーネル設定を調整し、ドライバやパッチを追加できます。また、`5.10.95-happy-new-year`、`5.10.96-beijing-winter-olympics`、`5.10.99-valentines-day` など、個性的な署名付きカーネルをコンパイルすることもできます。\n\n## カーネルリポジトリ\n\n[ophub/kernel](https://github.com/ophub/kernel) の [Releases](https://github.com/ophub/kernel/releases) にコンパイル済みのカーネルファイルが提供されています。\n\n## ローカルコンパイル\n\n- ### Ubuntu システムでの実行\n\n1. リポジトリをローカルにクローン：`git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. 必要なパッケージのインストール（Ubuntu 24.04 を例として）：\n\n`~/amlogic-s9xxx-armbian` ルートディレクトリに移動し、インストールコマンドを実行します：\n\n```yaml\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# For Ubuntu-24.04\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. `~/amlogic-s9xxx-armbian` ルートディレクトリに移動し、`sudo ./recompile -k 5.15.100` などの指定パラメータコマンドを実行してカーネルをコンパイルします。スクリプトはコンパイル環境とカーネルソースコードを自動的にダウンロード・インストールし、すべての設定を完了します。コンパイル済みのカーネルファイルは現在のソースツリーの `compile-kernel/output` ディレクトリ、または `-h` パラメータで指定したディレクトリに保存されます。\n\n- ### Armbian システムでの実行\n\n[Armbian](https://github.com/ophub/amlogic-s9xxx-armbian/releases) システム上で直接カーネルをコンパイルすることも、Ubuntu/Debian などのシステム上で [Docker](https://hub.docker.com/u/ophub) コンテナを介して Armbian システムを実行してカーネルをコンパイルすることもできます。Armbian システムの Docker イメージの作成方法は [armbian_docker](./tools/script/docker) ビルドスクリプトを参照してください。\n\n1. ローカルコンパイル環境と設定ファイルの更新：`armbian-kernel -u`\n\n2. カーネルのコンパイル：`armbian-kernel -k 5.15.100` などの指定パラメータコマンドを実行してカーネルをコンパイルします。スクリプトはコンパイル環境とカーネルソースコードを自動的にダウンロード・インストールし、すべての設定を完了します。コンパイル済みのカーネルファイルは `/opt/kernel/compile-kernel/output` ディレクトリに保存されます。\n\n- ### ローカルコンパイルパラメータの説明\n\n| パラメータ | 意味          | 説明                             |\n| --------- | ------------ | ------------------------------- |\n| -r     | Repository  | カーネルソースコードリポジトリを指定します。`github.com` 上のカーネルソースコードリポジトリを選択でき、例えば `-r unifreq`。パラメータ形式は `owner/repo@branch` の3部分の組み合わせをサポートし、オーナー名 `owner` は必須、リポジトリ名 `/repo` とブランチ名 `@branch` は任意です。オーナー名のみ指定した場合、そのオーナー配下で `linux-5.x.y` 形式の名前かつ `main` ブランチのカーネルソースコードリポジトリを自動的にマッチします。リポジトリ名やブランチ名が異なる場合は、`owner@branch`、`owner/repo`、`owner/repo@branch` のように組み合わせて指定してください。デフォルト値：`unifreq` |\n| -k     | Kernel      | カーネルバージョンを指定します。例：`-k 5.15.100`。複数のカーネルは `_` で区切ります。例：`-k 5.15.100_5.15.50`。`-k all` を使用するとすべてのメインラインカーネルをコンパイルし、現在は `-k 5.10.y_5.15.y_6.1.y_6.6.y_6.12.y_6.18.y` と同等です。カーネルリストは上流カーネルソースリポジトリ [unifreq](https://github.com/unifreq) のメンテナンス状況に応じて動的に調整されます。 |\n| -a     | AutoKernel  | 同系列の最新バージョンカーネルを自動的に採用するかどうかを設定します。`true` に設定すると、`-k` で指定したカーネル（例：`5.15.100`）と同じ系列にさらに新しいバージョンがあるか自動的にチェックし、存在する場合は最新版に自動切り替えします。`false` に設定すると指定バージョンをコンパイルします。デフォルト値：`true` |\n| -m     | MakePackage | カーネルビルドのパッケージリストを設定します。`all` に設定すると `Image、modules、dtbs` のすべてのファイルを生成し、`dtbs` に設定すると DTB ファイル3つのみ生成します。デフォルト値：`all` |\n| -f     | configFlavor | カーネルリポジトリ [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) から設定ファイル `config-*` をローカルの [tools/config](tools/config) ディレクトリにダウンロードする際のフレーバーを指定します。対応するカーネルバージョンの設定ファイルがローカルに既に存在し、このパラメータが未設定の場合はダウンロードをスキップします。選択肢はカーネルリポジトリに存在する[ディレクトリ名](https://github.com/ophub/kernel/tree/main/kernel-config/release)で、例：`stable` / `rk3588` / `rk35xx` / `h6`。デフォルト値：`stable` |\n| -p     | AutoPatch   | カスタムカーネルパッチを適用するかどうかを設定します。`true` に設定すると [tools/patch](tools/patch) ディレクトリのカーネルパッチを使用します。詳細は[カーネルパッチの追加方法](../documents/README.ja.md#9-armbian-カーネルのコンパイル)を参照してください。デフォルト値：`false` |\n| -n     | CustomName  | カーネルのカスタム署名を設定します。例えば `-ophub` に設定すると、生成されるカーネル名は `5.15.100-ophub` になります。署名にスペースを含めないでください。デフォルト値：`-ophub` |\n| -t     | Toolchain   | カーネルコンパイルのツールチェーンを設定します。選択肢：`clang / gcc / gcc-<version>`。デフォルト値：`gcc` |\n| -z     | CompressFormat | カーネル内の initrd で使用する圧縮フォーマットを設定します。選択肢：`xz / gzip / zstd / lzma`。デフォルト値：`xz` |\n| -d     | DeleteSource | カーネルのコンパイル完了後にソースコードを削除するかどうかを設定します。選択肢：`true / false`。デフォルト値：`false` |\n| -s     | SilentLog   | コンパイル時にサイレントモードを有効にしてログ出力を削減するかどうかを設定します。選択肢：`true / false`。デフォルト値：`false` |\n| -l     | EnableLog   | コンパイルプロセスをログファイルに記録するかどうかを設定します：`/var/log/kernel_compile_*.log`。選択肢：`true / false`。デフォルト値：`false` |\n| -c     | CcacheClear | コンパイル前に ccache キャッシュをクリアするかどうかを設定します。選択肢：`true / false`。デフォルト値：`false` |\n| -h     | DockerHostpath | カーネルコンパイル時の Docker コンテナのホストマシン上のマウントパスを設定します。デフォルトは現在のディレクトリを使用します。 |\n| -i     | DockerImage | カーネルコンパイル用の Docker コンテナイメージを設定します。デフォルト値：`ophub/armbian-trixie:arm64` |\n\n- `sudo ./recompile` ：デフォルト設定でカーネルをコンパイルします。\n- `sudo ./recompile -k 5.15.100` ：デフォルト設定を使用し、`-k` でコンパイルするカーネルバージョンを指定します。複数バージョンを同時にコンパイルする場合は `_` で連結します。\n- `sudo ./recompile -k 5.15.100 -f stable` ：デフォルト設定を使用し、`-k 5.15.100` でカーネルバージョンを指定、`-f stable` でカーネルリポジトリの `stable` ディレクトリから設定ファイルをダウンロードします。\n- `sudo ./recompile -k 5.15.100 -a true` ：デフォルト設定を使用し、`-a` パラメータでカーネルコンパイル時に同系列の最新カーネルへ自動アップグレードするかどうかを設定します。\n- `sudo ./recompile -k 5.15.100 -n -ophub` ：デフォルト設定を使用し、`-n` パラメータでカーネルのカスタム署名を設定します。\n- `sudo ./recompile -k 5.15.100 -m dtbs` ：デフォルト設定を使用し、`-m` パラメータで dtbs ファイルのみを生成するよう指定します。\n- `sudo ./recompile -k 5.15.100_6.1.10 -a true -n -ophub` ：デフォルト設定を使用し、複数のパラメータで設定を行います。\n\n💡 ヒント：`unifreq` の [linux-6.1.y](https://github.com/unifreq/linux-6.1.y)、[linux-5.15.y](https://github.com/unifreq/linux-5.15.y)、[linux-5.10.y](https://github.com/unifreq/linux-5.10.y) などのリポジトリのカーネルソースコードを使用してコンパイルすることをお勧めします。これらには対象デバイス向けのドライバとパッチが追加されています。設定ファイルは [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) のテンプレートの使用を推奨します。サポートデバイス向けに事前設定されており、これをベースにカスタマイズできます。\n\n## GitHub Actions でのカーネルコンパイル\n\n1. [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) ページで **_`Compile the kernel`_** を選択し、**_`Run workflow`_** ボタンをクリックするとコンパイルを開始できます。\n\n2. テンプレート [compile-kernel-via-docker.yml](../.github/workflows/compile-kernel-via-docker.yml) を参照してください。コードは以下の通りです：\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n💡 注意：リポジトリを `fork` して変更を加えた場合、使用時に Actions のユーザー名を自分のリポジトリに変更する必要があります。例：\n\n```yaml\nuses: YOUR-REPO/amlogic-s9xxx-armbian@main\n```\n\n- ### GitHub Action 入力パラメータの説明\n\n関連パラメータは`ローカルコンパイルコマンド`に対応しています。上記の説明を参照してください。\n\n| パラメータ           | デフォルト値       | 説明                                                      |\n|-------------------|------------------|-----------------------------------------------------------|\n| build_target      | kernel           | 固定パラメータ `kernel`。コンパイル対象をカーネルに設定します。     |\n| kernel_source     | unifreq          | カーネルソースコードリポジトリを指定します。デフォルト値：`unifreq`。機能は `-r` を参照 |\n| kernel_version    | 6.12.y_6.18.y    | カーネルバージョンを指定します。例：`5.15.100`。機能は `-k` を参照 |\n| kernel_auto       | true             | 同系列の最新バージョンカーネルを自動採用するかどうかを設定します。デフォルト値：`true`。機能は `-a` を参照 |\n| kernel_package    | all              | カーネルビルドのパッケージリストを設定します。デフォルト値：`all`。機能は `-m` を参照 |\n| kernel_sign       | -ophub           | カーネルのカスタム署名を設定します。デフォルト値：`-ophub`。機能は `-n` を参照 |\n| kernel_toolchain  | gcc              | カーネルコンパイルのツールチェーンを設定します。デフォルト値：`gcc`。機能は `-t` を参照 |\n| config_flavor     | stable           | カーネルリポジトリ [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) から設定ファイル `config-*` をローカルの [tools/config](tools/config) ディレクトリにダウンロードする際のフレーバーを指定します。対応するカーネルバージョンの設定ファイルがローカルに既に存在し、このパラメータが未設定の場合はダウンロードをスキップします。選択肢はカーネルリポジトリに存在する[ディレクトリ名](https://github.com/ophub/kernel/tree/main/kernel-config/release)で、例：`stable` / `rk3588` / `rk35xx` / `h6`。デフォルト値：`stable`。`kernel_config` パラメータも同時に設定した場合、最終的には `config_flavor` で指定した設定ファイルが優先されます。この2つのパラメータは排他的で、どちらか一方を選択できます：前者で [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) のカーネル設定ファイルを使用するか、後者で独自リポジトリの設定ファイルを使用します。機能は `-f` を参照 |\n| kernel_config     | false            | デフォルトでは [tools/config](tools/config) ディレクトリの設定テンプレートを使用します。リポジトリ内のカーネル設定ファイルが保存されているディレクトリを指定できます。例：`kernel/config_path`。このディレクトリの設定テンプレートはカーネルメジャーバージョンで命名する必要があります。例：`config-5.10`、`config-5.15` など。 |\n| kernel_patch      | false            | リポジトリ内のカスタムカーネルパッチファイルのディレクトリを指定します。このパラメータを設定すると、コンパイル前に指定ディレクトリからパッチファイルを自動ダウンロードします。未設定の場合はスキップします。 |\n| auto_patch        | false            | カスタムカーネルパッチを適用するかどうかを設定します。デフォルト値：`false`。機能は `-p` を参照 |\n| compress_format   | xz               | カーネル内の initrd で使用する圧縮フォーマットを設定します。デフォルト値：`xz`。機能は `-z` を参照 |\n| delete_source     | false            | コンパイル完了後にカーネルソースコードを削除するかどうかを設定します。デフォルト値：`false`。機能は `-d` を参照 |\n| silent_log        | false            | コンパイル時にサイレントモードを有効にしてログ出力を削減するかどうかを設定します。デフォルト値：`false`。機能は `-s` を参照 |\n| enable_log        | false            | コンパイルプロセスをログファイルに記録するかどうかを設定します：`/var/log/kernel_compile_*.log`。デフォルト値：`false`。機能は `-l` を参照 |\n| ccache_clear      | false            | コンパイル前に ccache キャッシュをクリアするかどうかを設定します。デフォルト値：`false`。機能は `-c` を参照 |\n| docker_hostpath   | .                | カーネルコンパイル時の Docker コンテナのホストマシン上のマウントパスを設定します。デフォルトは現在のディレクトリ。機能は `-h` を参照 |\n| docker_image      | ophub/armbian-trixie:arm64 | カーネルコンパイル用の Docker コンテナイメージを設定します。機能は `-i` を参照 |\n\n- ### GitHub Action 出力変数の説明\n\n`Releases` へのアップロードには、リポジトリに `Workflow の読み書き権限` を設定する必要があります。詳細は[使用説明](../documents/README.ja.md#2-プライバシー変数-github_token-等の設定)を参照してください。\n\n| パラメータ                         | デフォルト値            | 説明                           |\n| -------------------------------- | --------------------- | ------------------------------ |\n| ${{ env.PACKAGED_OUTPUTTAGS }}   | 6.12.y_6.18.y         | コンパイル済みカーネル名          |\n| ${{ env.PACKAGED_OUTPUTPATH }}   | compile-kernel/output | コンパイル済みカーネルファイルのディレクトリ |\n| ${{ env.PACKAGED_OUTPUTDATE }}   | 04.13.1058            | コンパイル日付（月.日.時分）       |\n| ${{ env.PACKAGED_STATUS }}       | success               | コンパイル状態：success / failure |\n\n## カーネル使用ガイド\n\n本プロジェクトでコンパイルしたカーネルは `Armbian` と `OpenWrt` システムに対応しています。以下では ophub のプロジェクトを例に説明します。\n\n### Armbian システムでの使用\n\n以下では、Armbian ファームウェアのコンパイル時にカーネルを統合する方法と、既存のシステムにカーネルをインストールする方法をそれぞれ紹介します。\n\n- #### カーネルを使用した Armbian ファームウェアのコンパイル\n\nArmbian ファームウェアのコンパイルはローカル操作と github.com の Actions を使用したオンラインコンパイルの両方をサポートしています。ローカルコンパイル方法の詳細は[ローカルパッケージング](../README.ja.md#ローカルパッケージング)を、Actions を使用したオンラインコンパイル方法の詳細は[GitHub Actions でのコンパイル](../README.ja.md#github-actionsを使用したコンパイル)を参照してください。\n\n- #### 既存の Armbian システムへのカーネルインストール\n\n`armbian-update` コマンドを使用して、コンパイル済みのカーネルを既存の Armbian システムにインストールできます。具体的な操作方法の詳細は[Armbian カーネルの更新](../README.ja.md#armbianカーネルの更新)を参照してください。\n\n- #### カスタムドライバモジュールのコンパイル\n\nLinux メインラインカーネルでは一部のドライバがまだサポートされていないため、必要なドライバモジュールを自分でコンパイルできます。具体的な操作方法の詳細は[ドライバモジュールのコンパイル](../documents/README.ja.md#93-カスタムドライバモジュールのコンパイル方法)を参照してください。\n\n### OpenWrt システムでの使用\n\n以下では、OpenWrt システムでファームウェアをコンパイルする際にカーネルを統合する方法と、既存のシステムにカーネルをインストールする方法をそれぞれ紹介します。\n\n- #### カーネルを使用した OpenWrt ファームウェアのコンパイル\n\nOpenWrt ファームウェアのコンパイルはローカル操作と github.com の Actions を使用したオンラインコンパイルの両方をサポートしています。ローカルコンパイル方法の詳細は[ローカルパッケージング](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#本地化打包)を、Actions を使用したオンラインコンパイル方法の詳細は[GitHub Actions でのコンパイル](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#使用-github-actions-进行编译)を参照してください。\n\n- #### 既存の OpenWrt システムへのカーネルインストール\n\n[luci-app-amlogic](https://github.com/ophub/luci-app-amlogic/blob/main/README.cn.md) プラグインを使用して、コンパイル済みのカーネルを既存の OpenWrt システムにインストールできます。具体的な操作方法の詳細は[OpenWrt のアップグレード](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#升级-openwrt)を参照してください。\n"
  },
  {
    "path": "compile-kernel/README.md",
    "content": "# Kernel Compilation and Usage Guide\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nThe compiled kernel is compatible with both `Armbian` and `OpenWrt` systems. It can be used in projects such as [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions), and [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit). The kernel can be integrated during firmware compilation or installed into an existing system.\n\nYou can adjust the kernel configuration as needed—for example, adding drivers and patches. You can also compile personalized kernels with custom signatures, such as `5.10.95-happy-new-year`, `5.10.96-beijing-winter-olympics`, `5.10.99-valentines-day`, and so on.\n\n## Kernel Repository\n\nPre-compiled kernels are available in the [Releases](https://github.com/ophub/kernel/releases) of [ophub/kernel](https://github.com/ophub/kernel).\n\n## Local Compilation\n\n- ### Running on Ubuntu System\n\n1. Clone the repository to local: `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`\n\n2. Install the required packages (for Ubuntu 24.04):\n\nNavigate to the `~/amlogic-s9xxx-armbian` root directory, then run the installation command:\n\n```yaml\nsudo apt-get update -y\nsudo apt-get full-upgrade -y\n# For Ubuntu-24.04\nsudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)\n```\n\n3. Navigate to the `~/amlogic-s9xxx-armbian` root directory, then run `sudo ./recompile -k 5.15.100` or other specified parameters to compile the kernel. The script automatically downloads and installs the build environment and kernel source code, and completes all necessary configuration. The compiled kernel files are saved in the `compile-kernel/output` directory within the source tree, or in the directory specified by the `-h` option.\n\n- ### Running on Armbian System\n\nYou can compile the kernel directly in an [Armbian](https://github.com/ophub/amlogic-s9xxx-armbian/releases) system, or run the Armbian system within a [Docker](https://hub.docker.com/u/ophub) container on Ubuntu/Debian to compile the kernel. For instructions on creating the Armbian Docker image, refer to the [armbian_docker](./tools/script/docker) build script.\n\n1. Update the local build environment and configuration files: `armbian-kernel -u`\n\n2. Compile the kernel: Run `armbian-kernel -k 5.15.100` or other specified parameters to compile the kernel. The script automatically downloads and installs the build environment and kernel source code, and completes all necessary configuration. The compiled kernel files are saved in the `/opt/kernel/compile-kernel/output` directory.\n\n- ### Local Compilation Parameter Reference\n\n| Parameter | Meaning      | Description |\n| --------- | ----------- | ----------- |\n| -r        | Repository  | Specifies the kernel source code repository for compilation. You can choose a kernel source code repository from `github.com`, e.g., `-r unifreq`. The parameter format supports a combination of three components: `owner/repo@branch`. The owner name `owner` is required; the repository name `/repo` and branch name `@branch` are optional. When only the owner name is specified, the script automatically matches a repository named `linux-5.x.y` on the `main` branch under that owner. If the repository name or branch name differs, specify them in combination, e.g., `owner@branch`, `owner/repo`, or `owner/repo@branch`. Default: `unifreq` |\n| -k        | Kernel      | Specifies the kernel version, e.g., `-k 5.15.100`. Multiple kernels are separated with `_`, e.g., `-k 5.15.100_5.15.50`. Using `-k all` compiles all mainline kernels, currently equivalent to `-k 5.10.y_5.15.y_6.1.y_6.6.y_6.12.y_6.18.y`. The kernel list is dynamically adjusted based on the maintenance status of the upstream source repository [unifreq](https://github.com/unifreq). |\n| -a        | AutoKernel  | Sets whether to automatically adopt the latest version within the same kernel series. When set to `true`, the script checks if a newer version exists in the same series as the kernel specified via `-k` (e.g., `5.15.100`), and automatically switches to the latest version if available. When set to `false`, the specified kernel version is compiled as-is. Default: `true` |\n| -m        | MakePackage | Sets the package list for building the kernel. When set to `all`, all files including `Image, modules, dtbs` are built. When set to `dtbs`, only the 3 DTB files are generated. Default: `all` |\n| -f        | configFlavor | Specifies which configuration file `config-*` to download from the kernel repository [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) to the local [tools/config](tools/config)￼ directory. If a configuration file matching the kernel version already exists locally and this parameter is not set, the download is skipped. Available options correspond to the [directory names](https://github.com/ophub/kernel/tree/main/kernel-config/release) in the kernel repository, e.g., `stable` / `rk3588` / `rk35xx` / `h6`. Default: `stable`. |\n| -p        | AutoPatch   | Sets whether to apply custom kernel patches. When set to `true`, patches from the [tools/patch](tools/patch) directory are applied. For details, refer to [how to add kernel patches](../documents/README.md#9-compiling-armbian-kernel). Default: `false` |\n| -n        | CustomName  | Sets the custom signature appended to the kernel version. For example, setting `-ophub` produces a kernel named `5.15.100-ophub`. Do not include spaces in the custom signature. Default: `-ophub` |\n| -t        | Toolchain   | Sets the toolchain for kernel compilation. Options: `clang / gcc / gcc-<version>`. Default: `gcc` |\n| -z        | CompressFormat | Sets the compression format for initrd in the kernel. Options: `xz / gzip / zstd / lzma`. Default: `xz` |\n| -d        | DeleteSource | Sets whether to delete the kernel source code after compilation. Options: `true / false`. Default: `false` |\n| -s        | SilentLog   | Sets whether to enable silent mode to reduce log output during compilation. Options: `true / false`. Default: `false` |\n| -l        | EnableLog   | Sets whether to log the kernel compilation process to a file: `/var/log/kernel_compile_*.log`. Options: `true / false`. Default: `false` |\n| -c        | CcacheClear | Sets whether to clear the ccache before compilation. Options: `true / false`. Default: `false` |\n| -h     | DockerHostpath | Sets the host mount path for kernel compilation in Docker. Default: current directory. |\n| -i     | DockerImage | Sets the Docker container image used for kernel compilation. Default: `ophub/armbian-trixie:arm64` |\n\n- `sudo ./recompile`: Compile the kernel using the default configuration.\n- `sudo ./recompile -k 5.15.100`: Use the default configuration and specify the kernel version to be compiled through `-k`. Multiple versions are connected using `_` for simultaneous compilation.\n- `sudo ./recompile -k 5.15.100 -f stable` : Use the default configuration and specify the kernel version to be compiled through `-k 5.15.100`, and specify the configuration files to be downloaded from the `stable` directory of the kernel repository through `-f stable`.\n- `sudo ./recompile -k 5.15.100 -a true`: Use the default configuration and set whether to automatically upgrade to the latest kernel of the same series during kernel compilation through the `-a` parameter.\n- `sudo ./recompile -k 5.15.100 -n -ophub`: Use the default configuration and set the kernel custom signature through the `-n` parameter.\n- `sudo ./recompile -k 5.15.100 -m dtbs`: Use the default configuration and specify only the creation of dtbs files through the `-m` parameter.\n- `sudo ./recompile -k 5.15.100_6.1.10 -a true -n -ophub`: Use the default configuration and set multiple parameters.\n\n💡 Tip: We recommend using the kernel source code from repositories such as [linux-6.1.y](https://github.com/unifreq/linux-6.1.y), [linux-5.15.y](https://github.com/unifreq/linux-5.15.y), [linux-5.10.y](https://github.com/unifreq/linux-5.10.y) of `unifreq` for compilation, who added drivers and patches for related boxes. It is recommended to use the template in [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release), which has been pre-configured according to the related boxes and can be customized based on this.\n\n## Compile Kernel Using GitHub Actions\n\n1. In the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, select **_`Compile the kernel`_** and click the **_`Run workflow`_** button to compile.\n\n2. See the use of the template [compile-kernel-via-docker.yml](../.github/workflows/compile-kernel-via-docker.yml). The code is as follows:\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 6.12.y_6.18.y\n    kernel_auto: true\n    kernel_sign: -yourname\n```\n\n’ Note: If you `fork` the repository and make modifications, you must change the Actions `username` to your own repository when using it, for example:\n\n```yaml\nuses: YOUR-REPO/amlogic-s9xxx-armbian@main\n```\n\n- ### GitHub Action Input Parameters\n\nThese parameters correspond to the `local compilation commands`. Refer to the descriptions above.\n\n| Parameter        | Default Value | Description                                                     |\n|------------------|---------------|-----------------------------------------------------------------|\n| build_target     | kernel        | Fixed parameter `kernel`. Sets the compilation target to the kernel. |\n| kernel_source    | unifreq       | Specifies the kernel source code repository for compilation. Default: `unifreq`. Refer to `-r` for details. |\n| kernel_version   | 6.12.y_6.18.y | Specifies the kernel version, e.g., `5.15.100`. Refer to `-k` for details. |\n| kernel_auto      | true          | Sets whether to automatically adopt the latest version within the same kernel series. Default: `true`. Refer to `-a` for details. |\n| kernel_package   | all           | Sets the package list for building the kernel. Default: `all`. Refer to `-m` for details. |\n| kernel_sign      | -ophub        | Sets the custom signature for the kernel. Default: `-ophub`. Refer to `-n` for details. |\n| kernel_toolchain | gcc           | Sets the toolchain for kernel compilation. Default: `gcc`. Refer to `-t` for details. |\n| config_flavor    | stable        | Specifies which configuration file `config-*` to download from the kernel repository [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release) to the local [tools/config](tools/config)￼ directory. If a configuration file matching the kernel version already exists locally and this parameter is not set, the download is skipped. Available options correspond to the [directory names](https://github.com/ophub/kernel/tree/main/kernel-config/release) in the kernel repository, e.g., `stable` / `rk3588` / `rk35xx` / `h6`. Default: `stable`. If `kernel_config` is also set, the configuration file specified by `config_flavor` takes precedence. These two parameters are mutually exclusive: use one to select kernel configuration files from [ophub/kernel](https://github.com/ophub/kernel/tree/main/kernel-config/release), or the other to use files from your own repository. Refer to `-f` for details. |\n| kernel_config    | false         | By default, uses the configuration templates in the [tools/config](tools/config) directory. You can specify the directory in your repository containing kernel configuration files, e.g., `kernel/config_path`. The configuration files in that directory must follow the naming convention based on major kernel version, e.g., `config-5.10`, `config-5.15`, etc. |\n| kernel_patch     | false         | Sets the directory in your repository containing custom kernel patch files. If specified, patch files are automatically downloaded from the designated directory before compilation. If not set, this step is skipped. |\n| auto_patch       | false         | Sets whether to apply custom kernel patches. Default: `false`. Refer to `-p` for details. |\n| compress_format  | xz            | Sets the compression format for initrd in the kernel. Default: `xz`. Refer to `-z` for details. |\n| delete_source    | false         | Sets whether to delete the kernel source code after compilation. Default: `false`. Refer to `-d` for details. |\n| silent_log       | false         | Sets whether to enable silent mode to reduce log output during compilation. Default: `false`. Refer to `-s` for details. |\n| enable_log       | false         | Sets whether to log the kernel compilation process to a file: `/var/log/kernel_compile_*.log`. Default: `false`. Refer to `-l` for details. |\n| ccache_clear     | false         | Sets whether to clear the ccache before compilation. Default: `false`. Refer to `-c` for details. |\n| docker_hostpath  | .             | Sets the host mount path for kernel compilation in Docker. Defaults to the current working directory. Refer to `-h` for details. |\n| docker_image     | ophub/armbian-trixie:arm64 | Sets the Docker container image used for kernel compilation. Refer to `-i` for details. |\n\n- ### GitHub Action Output Variables\n\nTo upload to `Releases`, you need to set `Workflow read/write permissions` for the repository. For details, see [Usage Instructions](../documents/README.md#2-set-up-private-variable-github_token).\n\n| Parameter                        | Default Value   | Description                            |\n|----------------------------------|-----------------|----------------------------------------|\n| ${{ env.PACKAGED_OUTPUTTAGS }}   | 6.12.y_6.18.y   | The name of the compiled kernel.       |\n| ${{ env.PACKAGED_OUTPUTPATH }}   | compile-kernel/output | The directory path where the compiled kernel files are stored. |\n| ${{ env.PACKAGED_OUTPUTDATE }}   | 04.13.1058      | Compilation date (month.day.hourminute). |\n| ${{ env.PACKAGED_STATUS }}       | success         | Compilation status: success / failure. |\n\n## Kernel Usage Guide\n\nThe compiled kernel supports both `Armbian` and `OpenWrt` systems. The following examples use ophub's projects.\n\n### Using in Armbian\n\nThe following sections describe how to integrate the kernel during Armbian firmware compilation and how to install it in an existing system.\n\n- #### Compiling Armbian Firmware with the Kernel\n\nArmbian firmware compilation supports both local and online workflows via GitHub Actions. For local compilation, see [Local Packaging](../README.md#local-packaging). For online compilation via Actions, see [Using GitHub Actions for Compilation](../README.md#using-github-actions-for-compilation).\n\n- #### Installing the Kernel in an Existing Armbian System\n\nUse the `armbian-update` command to install the compiled kernel into an existing Armbian system. For detailed instructions, see [Update Armbian Kernel](../README.md#update-armbian-kernel).\n\n- #### Compiling Custom Driver Modules\n\nSome drivers are not yet included in the Linux mainline kernel. You can compile custom driver modules as needed. For instructions, see [Compile Driver Module](../documents/README.md#93-how-to-customize-compilation-of-driver-modules).\n\n### Using in OpenWrt\n\nThe following sections describe how to integrate the kernel during OpenWrt firmware compilation and how to install it in an existing system.\n\n- #### Compiling OpenWrt Firmware with the Kernel\n\nOpenWrt firmware compilation supports both local and online workflows via GitHub Actions. For local compilation, see [Local Packaging](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#local-packaging). For online compilation via Actions, see [Use GitHub Actions for Compilation](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#use-gitHub-actions-for-compilation).\n\n- #### Installing the Kernel in an Existing OpenWrt System\n\nUse the [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic) plugin to install the compiled kernel into an existing OpenWrt system. For detailed instructions, see [Update OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#update-openwrt).\n"
  },
  {
    "path": "compile-kernel/tools/config/.gitkeep",
    "content": ""
  },
  {
    "path": "compile-kernel/tools/patch/.gitkeep",
    "content": ""
  },
  {
    "path": "compile-kernel/tools/script/armbian-compile-kernel-depends",
    "content": "acl aptly aria2 bc binfmt-support binutils bison btrfs-progs build-essential busybox ca-certificates ccache clang coreutils cpio crossbuild-essential-arm64 cryptsetup curl debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr distcc dosfstools dwarves e2fsprogs f2fs-tools fakeroot flex gawk gcc gdisk git gpg gzip imagemagick jq kmod libbison-dev libcrypto++-dev libelf-dev libfdt-dev libfile-fcntllock-perl libfl-dev libfuse-dev libgmp3-dev libmpc-dev libncurses-dev libpython3-dev libssl-dev libusb-1.0-0-dev linux-base lld llvm locales lz4 lzma lzop make mtools ncurses-base ncurses-term nfs-kernel-server openssl p7zip p7zip-full parallel parted patchutils pigz pixz pkg-config pv python3 python3-dev python3-setuptools qemu-user-static rename rsync sudo swig tar u-boot-tools udev unzip util-linux uuid uuid-dev uuid-runtime vim wget whiptail xfsprogs xz-utils zip zlib1g-dev zstd"
  },
  {
    "path": "compile-kernel/tools/script/armbian_compile_kernel.sh",
    "content": "#!/bin/bash\n#==================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Run on Armbian, Compile the kernel.\n# Copyright (C) 2021~ https://www.kernel.org\n# Copyright (C) 2021~ https://github.com/unifreq\n# Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: armbian-kernel\n# Command optional parameters please refer to the source code repository\n#\n#================================= Functions list =================================\n#\n# error_msg           : Output error message and exit\n# log_to_file         : Log kernel compilation output to a file\n#\n# init_var            : Initialize all variables\n# toolchain_check     : Check and install the toolchain\n# query_version       : Query the latest kernel version\n# apply_patch         : Apply custom kernel patches\n# get_kernel_source   : Get the kernel source code\n# get_kernel_config   : Get the kernel config files\n#\n# collect_headers     : Collect kernel headers for building modules\n# compile_env         : Set up the kernel compilation environment\n# compile_dtbs        : Compile the dtbs\n# compile_kernel      : Compile the kernel\n# generate_uinitrd    : Generate initrd.img and uInitrd\n# packit_dtbs         : Package dtbs files\n# packit_kernel       : Package boot, modules, and header files\n# create_debs_image   : Create deb packages for linux-image\n# create_debs_libc    : Create deb packages for linux-libc-dev\n# create_debs_headers : Create deb packages for linux-headers\n# create_debs_dtb     : Create deb packages for linux-dtb\n# create_debs         : Create all deb packages\n# compile_selection   : Choose to compile dtbs or all kernels\n# clean_tmp           : Clean up temporary files\n#\n# loop_recompile      : Loop to compile kernels\n#\n#========================= Set make environment variables =========================\n#\n# Related file storage path\ncurrent_path=\"${PWD}\"\ncompile_path=\"${current_path}/compile-kernel\"\nconfig_path=\"${compile_path}/tools/config\"\nscript_path=\"${compile_path}/tools/script\"\nkernel_patch_path=\"${compile_path}/tools/patch\"\nkernel_path=\"${compile_path}/kernel\"\noutput_path=\"${compile_path}/output\"\n[[ -d \"${kernel_path}\" ]] || mkdir -p ${kernel_path}\n[[ -d \"${output_path}\" ]] || mkdir -p ${output_path}\n\n# Set the temporary backup path for the current system kernel\ntmp_backup_path=\"/ddbr/tmp\"\nboot_backup_path=\"${tmp_backup_path}/boot\"\nmodules_backup_path=\"${tmp_backup_path}/modules\"\n\n# Set the system file path to be used\narch_info=\"$(uname -m)\"\nhost_release=\"$(cat /etc/os-release 2>/dev/null | grep '^VERSION_CODENAME=.*' | cut -d\"=\" -f2)\"\ninitramfs_conf=\"/etc/initramfs-tools/update-initramfs.conf\"\nophub_release_file=\"/etc/ophub-release\"\n\n# Set the default for downloading kernel sources from github.com\nrepo_owner=\"unifreq\"\nrepo_branch=\"main\"\nbuild_kernel=(\"6.12.y\" \"6.18.y\")\nall_kernel=(\"5.10.y\" \"5.15.y\" \"6.1.y\" \"6.6.y\" \"6.12.y\" \"6.18.y\")\n# Set whether to use the latest kernel, options: [ true / false ]\nauto_kernel=\"true\"\n# Set whether to apply custom kernel patches, options: [ true / false ]\nauto_patch=\"false\"\n# Set custom signature for the kernel\ncustom_name=\"-ophub\"\npkg_maintainer=\"ophub <noreply@ophub.org>\"\n# Set the kernel compile object, options: [ dtbs / all ]\npackage_list=\"all\"\n# Set the compression format, options: [ gzip / lzma / xz / zstd ]\ncompress_format=\"xz\"\n# Set whether to clear ccache before compiling the kernel, options: [ true / false ]\nccache_clear=\"false\"\n# Set whether to automatically delete the source code after the kernel is compiled\ndelete_source=\"false\"\n# Set make log silent output, options: [ true / false ]\nsilent_log=\"false\"\n# Set whether to log compilation output to file, options: [ true / false ]\nenable_log=\"false\"\noutput_logfile=\"/var/log/kernel_compile_$(date +%Y-%m-%d_%H-%M-%S).log\"\n\n# Set the kernel configuration download repository, branch and path\nkernel_config_repo=\"https://github.com/ophub/kernel\"\nkernel_config_repo_branch=\"main\"\nkernel_config_path=\"kernel-config/release\"\n# Set the kernel config tag directory, options: [ stable / rk3588 / rk35xx / h6 ]\nconfig_flavor=\"stable\"\nconfig_download=\"false\"\n\n# Compile toolchain download mirror, run on Armbian\ndev_repo=\"https://github.com/ophub/kernel/releases/download/dev\"\n# Arm GNU Toolchain source: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads\ngun_file=\"arm-gnu-toolchain-15.2.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\"\n# Set the toolchain path\ntoolchain_path=\"/usr/local/toolchain\"\n# Set the default cross-compilation toolchain: [ clang / gcc / gcc-14.2, etc. ]\ntoolchain_name=\"gcc\"\n\n# CCACHE Configuration\n# Force specific cache directory (Override defaults)\nexport CCACHE_DIR=\"/root/.ccache\"\n# Rewrite absolute paths to relative (Enable Host/Docker sharing)\nexport CCACHE_BASEDIR=\"${compile_path}\"\nexport CCACHE_NOHASHDIR=\"true\"\n# Check compiler by content hash, not modification time\nexport CCACHE_SLOPPINESS=\"time_macros,file_macro,include_file_ctime,include_file_mtime,system_headers,locale\"\nexport CCACHE_COMPILERCHECK=\"content\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nWARNING=\"[\\033[93m WARNING \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==================================================================================\n\nerror_msg() {\n    echo -e \" ${ERROR} ${1}\"\n    exit 1\n}\n\nlog_to_file() {\n    echo -e \"${STEPS} Initializing kernel compilation log...\"\n\n    if touch \"${output_logfile}\" 2>/dev/null; then\n        echo -e \"${INFO} Kernel compilation log will be saved to: [ ${output_logfile} ]\"\n        exec &> >(tee -a \"${output_logfile}\")\n    else\n        echo -e \"${WARNING} Failed to create log file [ ${output_logfile} ]. Logging to console only.\"\n    fi\n}\n\ninit_var() {\n    echo -e \"${STEPS} Initializing variables...\"\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"k:a:n:m:p:r:t:c:d:s:z:l:f:h:i:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -k | --Kernel)\n            if [[ -n \"${2}\" ]]; then\n                if [[ \"${2}\" == \"all\" ]]; then\n                    build_kernel=(${all_kernel[@]})\n                else\n                    oldIFS=\"${IFS}\"\n                    IFS=\"_\"\n                    build_kernel=(${2})\n                    IFS=\"${oldIFS}\"\n                fi\n                shift 2\n            else\n                error_msg \"Invalid -k parameter [ ${2} ]!\"\n            fi\n            ;;\n        -f | --configFlavor)\n            if [[ -n \"${2}\" ]]; then\n                config_flavor=\"${2}\"\n                config_download=\"true\"\n                shift 2\n            else\n                error_msg \"Invalid -f parameter [ ${2} ]!\"\n            fi\n            ;;\n        -a | --AutoKernel)\n            if [[ -n \"${2}\" ]]; then\n                auto_kernel=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -a parameter [ ${2} ]!\"\n            fi\n            ;;\n        -n | --customName)\n            if [[ -n \"${2}\" ]]; then\n                custom_name=\"${2// /}\"\n                [[ -n \"${custom_name}\" ]] || custom_name=\"-ophub\"\n                [[ \"${custom_name:0:1}\" != \"-\" ]] && custom_name=\"-${custom_name}\"\n                shift 2\n            else\n                error_msg \"Invalid -n parameter [ ${2} ]!\"\n            fi\n            ;;\n        -m | --MakePackage)\n            if [[ -n \"${2}\" ]]; then\n                package_list=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -m parameter [ ${2} ]!\"\n            fi\n            ;;\n        -p | --AutoPatch)\n            if [[ -n \"${2}\" ]]; then\n                auto_patch=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -p parameter [ ${2} ]!\"\n            fi\n            ;;\n        -r | --Repository)\n            if [[ -n \"${2}\" ]]; then\n                repo_owner=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -r parameter [ ${2} ]!\"\n            fi\n            ;;\n        -t | --Toolchain)\n            if [[ -n \"${2}\" ]]; then\n                toolchain_name=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -t parameter [ ${2} ]!\"\n            fi\n            ;;\n        -z | --CompressFormat)\n            if [[ -n \"${2}\" ]]; then\n                compress_format=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -z parameter [ ${2} ]!\"\n            fi\n            ;;\n        -d | --DeleteSource)\n            if [[ -n \"${2}\" ]]; then\n                delete_source=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -d parameter [ ${2} ]!\"\n            fi\n            ;;\n        -s | --SilentLog)\n            if [[ -n \"${2}\" ]]; then\n                silent_log=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -s parameter [ ${2} ]!\"\n            fi\n            ;;\n        -c | --CcacheClear)\n            if [[ -n \"${2}\" ]]; then\n                ccache_clear=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -c parameter [ ${2} ]!\"\n            fi\n            ;;\n        -l | --EnableLog)\n            if [[ -n \"${2}\" ]]; then\n                enable_log=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -l parameter [ ${2} ]!\"\n            fi\n            ;;\n        # Ignore parameters used by the host system\n        -h | -i)\n            if [[ -n \"${2}\" ]]; then\n                shift 2\n            else\n                error_msg \"Invalid ${1} parameter [ ${2} ]!\"\n            fi\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n\n    # Receive the value entered by the [ -r ] parameter\n    input_r_value=\"${repo_owner//https\\:\\/\\/github\\.com\\//}\"\n    code_owner=\"$(echo \"${input_r_value}\" | awk -F '@' '{print $1}' | awk -F '/' '{print $1}')\"\n    code_repo=\"$(echo \"${input_r_value}\" | awk -F '@' '{print $1}' | awk -F '/' '{print $2}')\"\n    code_branch=\"$(echo \"${input_r_value}\" | awk -F '@' '{print $2}')\"\n    #\n    [[ -n \"${code_owner}\" ]] || error_msg \"The [ -r ] parameter is invalid.\"\n    [[ -n \"${code_branch}\" ]] || code_branch=\"${repo_branch}\"\n\n    # Set the gcc version code\n    [[ \"${toolchain_name}\" =~ ^gcc-[0-9]+.[0-9]+ ]] && {\n        gcc_version_code=\"${toolchain_name#*-}\"\n        gun_file=\"arm-gnu-toolchain-${gcc_version_code}.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\"\n    }\n\n    # Set compilation parameters\n    export SRC_ARCH=\"arm64\"\n    export LOCALVERSION=\"${custom_name}\"\n\n    # Get Armbian PLATFORM value\n    PLATFORM=\"$(cat ${ophub_release_file} 2>/dev/null | grep -E \"^PLATFORM=.*\" | cut -d\"'\" -f2)\"\n    [[ -n \"${PLATFORM}\" ]] && echo -e \"${INFO} Armbian PLATFORM: [ ${PLATFORM} ]\"\n}\n\ntoolchain_check() {\n    cd ${current_path}\n    echo -e \"${STEPS} Checking the toolchain for kernel compilation...\"\n\n    # Install dependencies\n    sudo apt-get -qq update\n    sudo apt-get -qq install -y $(cat compile-kernel/tools/script/armbian-compile-kernel-depends)\n\n    echo -e \"${INFO} Configuring Git for large file downloads...\"\n    git config --global http.postBuffer 524288000\n    git config --global core.compression 0\n    git config --global http.version HTTP/1.1\n\n    echo -e \"${INFO} Checking and installing the [ ${toolchain_name} ] toolchain...\"\n    # Set the default path\n    path_os_variable=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin\"\n\n    # Download the cross-compilation toolchain: [ clang / gcc ]\n    [[ -d \"/etc/apt/sources.list.d\" ]] || mkdir -p /etc/apt/sources.list.d\n    if [[ \"${toolchain_name}\" == \"clang\" ]]; then\n        # Install LLVM\n        echo -e \"${INFO} Installing the LLVM toolchain...\"\n        sudo apt-get -qq install -y lsb-release software-properties-common gnupg\n        curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s all\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"LLVM installation failed.\"\n\n        # Set cross compilation parameters\n        export PATH=\"${path_os_variable}\"\n        export CROSS_COMPILE=\"aarch64-linux-gnu-\"\n        export CC=\"ccache clang\"\n        export LD=\"ld.lld\"\n        export MFLAGS=\" LLVM=1 LLVM_IAS=1 \"\n    else\n        # Download Arm GNU Toolchain\n        [[ -d \"${toolchain_path}\" ]] || mkdir -p ${toolchain_path}\n        if [[ ! -d \"${toolchain_path}/${gun_file//.tar.xz/}/bin\" ]]; then\n            echo -e \"${INFO} Downloading the ARM GNU toolchain [ ${gun_file} ]...\"\n\n            # Download the ARM GNU toolchain. If it fails, wait 1 minute and try again, try 10 times.\n            for i in {1..10}; do\n                curl -fsSL \"${dev_repo}/${gun_file}\" -o \"${toolchain_path}/${gun_file}\"\n                [[ \"${?}\" -eq \"0\" ]] && break || sleep 60\n            done\n            [[ \"${?}\" -eq \"0\" ]] || error_msg \"GNU toolchain file download failed.\"\n\n            # Decompress the ARM GNU toolchain\n            tar -xJf ${toolchain_path}/${gun_file} -C ${toolchain_path}\n            rm -f ${toolchain_path}/${gun_file}\n\n            # List and check directory names, and change them all to lowercase\n            for dir in $(ls ${toolchain_path}); do\n                if [[ -d \"${toolchain_path}/${dir}\" && \"${dir}\" != \"${dir,,}\" ]]; then\n                    mv -f ${toolchain_path}/${dir} ${toolchain_path}/${dir,,}\n                fi\n            done\n            [[ -d \"${toolchain_path}/${gun_file//.tar.xz/}/bin\" ]] || error_msg \"The gcc is not set!\"\n        fi\n\n        # Add ${PATH} variable\n        path_gcc=\"${toolchain_path}/${gun_file//.tar.xz/}/bin:${path_os_variable}\"\n        export PATH=\"${path_gcc}\"\n\n        # Set cross compilation parameters\n        export CROSS_COMPILE=\"${toolchain_path}/${gun_file//.tar.xz/}/bin/aarch64-none-linux-gnu-\"\n        export CC=\"ccache ${CROSS_COMPILE}gcc\"\n        export LD=\"${CROSS_COMPILE}ld.bfd\"\n        export MFLAGS=\"\"\n    fi\n\n    # Setup ccache\n    echo -e \"${INFO} Setting up ccache...\"\n    ccache -M 10G 2>/dev/null\n    ccache -z 2>/dev/null\n}\n\nquery_version() {\n    cd ${current_path}\n    echo -e \"${STEPS} Querying the latest kernel version...\"\n\n    # Set empty array\n    tmp_arr_kernels=()\n\n    # Query the latest kernel in a loop\n    i=1\n    for KERNEL_VAR in ${build_kernel[@]}; do\n        echo -e \"${INFO} (${i}) Auto query the latest kernel version of the same series for [ ${KERNEL_VAR} ]\"\n        # Identify the kernel mainline\n        MAIN_LINE=\"$(echo ${KERNEL_VAR} | awk -F '.' '{print $1\".\"$2}')\"\n\n        if [[ -z \"${code_repo}\" ]]; then linux_repo=\"linux-${MAIN_LINE}.y\"; else linux_repo=\"${code_repo}\"; fi\n        github_kernel_repo=\"${code_owner}/${linux_repo}/${code_branch}\"\n        github_kernel_ver=\"https://raw.githubusercontent.com/${github_kernel_repo}/Makefile\"\n        # latest_version=\"125\"\n        latest_version=\"$(curl -s ${github_kernel_ver} | grep -oE \"SUBLEVEL =.*\" | head -n 1 | grep -oE '[0-9]{1,3}')\"\n        if [[ \"${?}\" -eq \"0\" && -n \"${latest_version}\" ]]; then\n            tmp_arr_kernels[${i}]=\"${MAIN_LINE}.${latest_version}\"\n        else\n            error_msg \"Failed to query the kernel version in [ github.com/${github_kernel_repo} ]\"\n        fi\n        echo -e \"${INFO} (${i}) [ ${tmp_arr_kernels[$i]} ] is github.com/${github_kernel_repo} latest kernel. \\n\"\n\n        ((i++))\n    done\n\n    # Reset the kernel array to the latest kernel version\n    unset build_kernel\n    build_kernel=\"${tmp_arr_kernels[@]}\"\n}\n\napply_patch() {\n    cd ${current_path}\n    echo -e \"${STEPS} Applying custom kernel patches...\"\n\n    # Apply the common kernel patches\n    if [[ -d \"${kernel_patch_path}/common-kernel-patches\" ]]; then\n        echo -e \"${INFO} Copying common kernel patches...\"\n        rm -f ${kernel_path}/${local_kernel_path}/*.patch\n        cp -vf ${kernel_patch_path}/common-kernel-patches/*.patch -t ${kernel_path}/${local_kernel_path}\n\n        cd ${kernel_path}/${local_kernel_path}\n        for file in *.patch; do\n            echo -e \"${INFO} Applying kernel patch file: [ ${file} ]\"\n            patch -p1 <\"${file}\" || echo -e \"${WARNING} Failed to apply the patch, skipping.\"\n        done\n        rm -f *.patch\n    else\n        echo -e \"${INFO} No common kernel patches found, skipping.\"\n    fi\n\n    # Apply the dedicated kernel patches\n    if [[ -d \"${kernel_patch_path}/${local_kernel_path}\" ]]; then\n        echo -e \"${INFO} Copying [ ${local_kernel_path} ] version dedicated kernel patches...\"\n        rm -f ${kernel_path}/${local_kernel_path}/*.patch\n        cp -vf ${kernel_patch_path}/${local_kernel_path}/*.patch -t ${kernel_path}/${local_kernel_path}\n\n        cd ${kernel_path}/${local_kernel_path}\n        for file in *.patch; do\n            echo -e \"${INFO} Applying kernel patch file: [ ${file} ]\"\n            patch -p1 <\"${file}\" || echo -e \"${WARNING} Failed to apply the patch, skipping.\"\n        done\n        rm -f *.patch\n    else\n        echo -e \"${INFO} No [ ${local_kernel_path} ] version dedicated kernel patches found, skipping.\"\n    fi\n}\n\nget_kernel_source() {\n    cd ${current_path}\n    echo -e \"${STEPS} Downloading the kernel source code...\"\n\n    [[ -d \"${kernel_path}\" ]] || mkdir -p ${kernel_path}\n\n    if [[ ! -d \"${kernel_path}/${local_kernel_path}\" ]]; then\n        echo -e \"${INFO} Cloning from [ https://github.com/${server_kernel_repo} -b ${code_branch} ]\"\n\n        # Clone the latest kernel source code. If it fails, wait 1 minute and try again, try 10 times.\n        for i in {1..10}; do\n            git clone -q --single-branch --depth=1 --branch=${code_branch} https://github.com/${server_kernel_repo} ${kernel_path}/${local_kernel_path}\n            [[ \"${?}\" -eq \"0\" ]] && break || sleep 60\n        done\n        [[ \"${?}\" -eq \"0\" ]] || error_msg \"[ https://github.com/${server_kernel_repo} ] Clone failed.\"\n    else\n        # Get a local kernel version\n        local_makefile=\"${kernel_path}/${local_kernel_path}/Makefile\"\n        local_makefile_version=\"$(cat ${local_makefile} | grep -oE \"VERSION =.*\" | head -n 1 | grep -oE '[0-9]{1,3}')\"\n        local_makefile_patchlevel=\"$(cat ${local_makefile} | grep -oE \"PATCHLEVEL =.*\" | head -n 1 | grep -oE '[0-9]{1,3}')\"\n        local_makefile_sublevel=\"$(cat ${local_makefile} | grep -oE \"SUBLEVEL =.*\" | head -n 1 | grep -oE '[0-9]{1,3}')\"\n\n        # Local version and server version comparison\n        if [[ \"${auto_kernel}\" =~ ^(true|yes)$ ]] && [[ \"${kernel_sub}\" -gt \"${local_makefile_sublevel}\" ]]; then\n            # Pull the latest source code of the server\n            cd ${kernel_path}/${local_kernel_path}\n            git checkout ${code_branch} && git reset --hard origin/${code_branch} && git pull\n            unset kernel_version\n            kernel_version=\"${local_makefile_version}.${local_makefile_patchlevel}.${kernel_sub}\"\n            echo -e \"${INFO} Synchronize the upstream source code, compile the kernel version [ ${kernel_version} ].\"\n        else\n            # Reset to local kernel version number\n            unset kernel_version\n            kernel_version=\"${local_makefile_version}.${local_makefile_patchlevel}.${local_makefile_sublevel}\"\n            echo -e \"${INFO} Use local source code, compile the kernel version [ ${kernel_version} ].\"\n        fi\n    fi\n\n    # Remove the local version number\n    rm -f ${kernel_path}/${local_kernel_path}/localversion\n\n    # Apply custom kernel patches\n    [[ \"${auto_patch}\" =~ ^(true|yes)$ ]] && apply_patch\n}\n\nget_kernel_config() {\n    echo -e \"${STEPS} Downloading the kernel config files...\"\n\n    # Check if the kernel config file already exists\n    if [[ -s \"${config_path}/config-${kernel_verpatch}\" && \"${config_download}\" == \"false\" ]]; then\n        echo -e \"${INFO} The kernel config file [ config-${kernel_verpatch} ] already exists, skipping download.\"\n        echo -e \"${INFO} Config files: \\n$(ls -lh ${config_path}/ 2>/dev/null)\"\n        return\n    fi\n\n    # Download the kernel config files\n    tmp_path=\"$(mktemp -d)\"\n    for i in {1..10}; do\n        git clone --quiet --single-branch --depth=1 --branch=${kernel_config_repo_branch} ${kernel_config_repo} ${tmp_path}\n        [[ \"${?}\" -eq 0 ]] && break || sleep 60\n    done\n    [[ \"${?}\" -eq 0 ]] || error_msg \"Failed to clone the [ ${kernel_config_repo} ] repository.\"\n\n    rm -rf ${config_path}/*\n    cp -f ${tmp_path}/${kernel_config_path}/${config_flavor}/config-* ${config_path}/\n    [[ \"${?}\" -eq 0 ]] || error_msg \"Failed to copy the kernel config file.\"\n    echo -e \"${INFO} Kernel config files [ ${config_flavor} ] downloaded to [ ${config_path} ].\"\n    echo -e \"${INFO} Config files: \\n$(ls -lh ${config_path}/ 2>/dev/null)\"\n}\n\ncollect_headers() {\n    cd ${kernel_path}/${local_kernel_path}\n\n    # Set headers files list\n    head_list=\"$(mktemp)\"\n    (\n        find . arch/${SRC_ARCH} -maxdepth 1 -name Makefile\\*\n        find include scripts -type f -o -type l\n        find arch/${SRC_ARCH} -name Kbuild.platforms -o -name Platform\n        find $(find arch/${SRC_ARCH} -name include -o -name scripts -type d) -type f\n    ) >${head_list}\n\n    # Set object files list\n    obj_list=\"$(mktemp)\"\n    {\n        [[ -n \"$(grep \"^CONFIG_OBJTOOL=y\" include/config/auto.conf 2>/dev/null)\" ]] && echo \"tools/objtool/objtool\"\n        find arch/${SRC_ARCH}/include Module.symvers include scripts -type f\n        [[ -n \"$(grep \"^CONFIG_GCC_PLUGINS=y\" include/config/auto.conf 2>/dev/null)\" ]] && find scripts/gcc-plugins -name \\*.so\n    } >${obj_list}\n\n    # Install related files to the specified directory\n    tar --exclude '*.orig' -c -f - -C ${kernel_path}/${local_kernel_path} -T ${head_list} | tar -xf - -C ${output_path}/header\n    tar --exclude '*.orig' -c -f - -T ${obj_list} | tar -xf - -C ${output_path}/header\n\n    # Copy the necessary files to the specified directory\n    cp -af include/config \"${output_path}/header/include\"\n    cp -af include/generated \"${output_path}/header/include\"\n    cp -af arch/${SRC_ARCH}/include/generated \"${output_path}/header/arch/${SRC_ARCH}/include\"\n    cp -af .config Module.symvers ${output_path}/header\n\n    # Delete temporary files\n    rm -f ${head_list} ${obj_list}\n}\n\ncompile_env() {\n    cd ${current_path}\n    echo -e \"${STEPS} Checking local compilation environment...\"\n\n    # Get kernel output name\n    kernel_outname=\"${kernel_version}${custom_name}\"\n    echo -e \"${INFO} Compile kernel output name [ ${kernel_outname} ]. \\n\"\n\n    # Set package version and architecture\n    pkg_version=\"${kernel_version}\"\n    pkg_arch=\"arm64\"\n    pkg_revision=\"1\"\n    deb_path=\"${output_path}/deb-${kernel_version}\"\n\n    # Create a temp directory\n    rm -rf ${output_path}/{boot/,dtb/,modules/,header/,libc_headers/,${kernel_version}/,deb-${kernel_version}/}\n    mkdir -p ${output_path}/{boot/,dtb/{allwinner/,amlogic/,rockchip/},modules/,header/,libc_headers/,${kernel_version}/,deb-${kernel_version}/}\n\n    cd ${kernel_path}/${local_kernel_path}\n    echo -e \"${STEPS} Setting compilation parameters...\"\n\n    # Show variable\n    echo -e \"${INFO} ARCH: [ ${SRC_ARCH} ]\"\n    echo -e \"${INFO} LOCALVERSION: [ ${LOCALVERSION} ]\"\n    echo -e \"${INFO} CROSS_COMPILE: [ ${CROSS_COMPILE} ]\"\n    echo -e \"${INFO} CC: [ ${CC} ]\"\n    echo -e \"${INFO} LD: [ ${LD} ]\"\n\n    # Set generic make string\n    MAKE_SET_STRING=\" ARCH=${SRC_ARCH} CROSS_COMPILE=${CROSS_COMPILE} ${MFLAGS} LOCALVERSION=${LOCALVERSION} \"\n\n    # Make clean/mrproper\n    make ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" mrproper\n\n    # Clear ccache if enabled\n    [[ \"${ccache_clear}\" =~ ^(true|yes)$ ]] && {\n        echo -e \"${INFO} Clear ccache before compiling the kernel...\"\n        ccache -C 2>/dev/null\n    }\n\n    # Check .config file\n    if [[ ! -s \".config\" ]]; then\n        [[ -s \"${config_path}/config-${kernel_verpatch}\" ]] || error_msg \"Missing [ config-${kernel_verpatch} ] template!\"\n        echo -e \"${INFO} Copy [ ${config_path}/config-${kernel_verpatch} ] to [ .config ]\"\n        cp -f ${config_path}/config-${kernel_verpatch} .config\n    else\n        echo -e \"${INFO} Use the .config file in the current directory.\"\n    fi\n    # Clear kernel signature\n    sed -i \"s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\\\"\\\"|\" .config\n\n    # Enable/Disabled Linux Kernel Clang LTO\n    [[ \"${toolchain_name}\" == \"clang\" ]] && {\n        kernel_x=\"$(echo \"${kernel_version}\" | cut -d '.' -f1)\"\n        kernel_y=\"$(echo \"${kernel_version}\" | cut -d '.' -f2)\"\n        if [[ \"${kernel_x}\" -ge \"6\" ]] || [[ \"${kernel_x}\" -eq \"5\" && \"${kernel_y}\" -ge \"12\" ]]; then\n            scripts/config -e LTO_CLANG_THIN\n        else\n            scripts/config -d LTO_CLANG_THIN\n        fi\n\n        # Add RUST support for version 6.1.y and later versions\n        if [[ \"${kernel_x}\" -gt 6 ]] || [[ \"${kernel_x}\" -eq 6 && \"${kernel_y}\" -ge 1 ]]; then\n            echo -e \"${INFO} Kernel version [ ${kernel_version} ] requires RUST. Preparing the environment...\"\n            curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\n            export PATH=\"${HOME}/.cargo/bin:${PATH}\"\n\n            echo -e \"${INFO} Setting Rust toolchain to version required by the kernel...\"\n            rustup override set $(scripts/min-tool-version.sh rustc)\n\n            echo -e \"${INFO} Adding rust-src component...\"\n            rustup component add rust-src\n\n            echo -e \"${INFO} Installing correct bindgen version...\"\n            cargo uninstall bindgen-cli bindgen >/dev/null 2>&1 || true\n            BINDGEN_VERSION=\"$(scripts/min-tool-version.sh bindgen 2>/dev/null || echo \"0.65.1\")\"\n            cargo install --locked --version \"${BINDGEN_VERSION}\" bindgen-cli 2>/dev/null || cargo install --locked --version \"${BINDGEN_VERSION}\" bindgen\n\n            echo -e \"${INFO} Rust environment is ready. Enabling RUST support in kernel config...\"\n            scripts/config -e RUST\n            scripts/config -e RUST_IS_AVAILABLE\n        else\n            echo -e \"${INFO} Skip Rust environment configuration for kernel version [ ${kernel_version} ]\"\n        fi\n    }\n\n    # Make menuconfig\n    #make ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" menuconfig\n\n    # Set max process\n    PROCESS=\"$(($(nproc 2>/dev/null || echo 2) - 1))\"\n    [[ -z \"${PROCESS}\" || \"${PROCESS}\" -lt \"1\" ]] && PROCESS=\"1\" && echo \"PROCESS: 1\"\n}\n\ncompile_dtbs() {\n    cd ${kernel_path}/${local_kernel_path}\n\n    # Make dtbs\n    echo -e \"${STEPS} Compiling dtbs [ ${local_kernel_path} ]...\"\n    make ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" dtbs -j${PROCESS}\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The dtbs compiled successfully.\"\n}\n\ncompile_kernel() {\n    cd ${kernel_path}/${local_kernel_path}\n\n    # Set the make log silent output\n    [[ \"${silent_log}\" =~ ^(true|yes)$ ]] && silent_print=\"-s\" || silent_print=\"\"\n\n    # Make kernel\n    echo -e \"${STEPS} Compiling kernel [ ${local_kernel_path} ]...\"\n    make ${silent_print} ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" Image modules dtbs -j${PROCESS}\n    #make ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" bindeb-pkg KDEB_COMPRESS=xz KBUILD_DEBARCH=arm64 -j${PROCESS}\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The kernel compiled successfully.\" || error_msg \"Kernel compilation failed.\"\n\n    # Install modules\n    echo -e \"${STEPS} Installing modules...\"\n    make ${silent_print} ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" INSTALL_MOD_PATH=${output_path}/modules modules_install\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} Modules installed successfully.\" || error_msg \"Modules installation failed.\"\n\n    # Strip debug information\n    STRIP=\"${CROSS_COMPILE}strip\"\n    find ${output_path}/modules -name \"*.ko\" -print0 | xargs -0 ${STRIP} --strip-debug 2>/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} Modules stripped successfully.\" || echo -e \"${WARNING} Modules stripping failed.\"\n\n    # Collect kernel headers for building external modules\n    echo -e \"${STEPS} Collecting kernel headers...\"\n    collect_headers\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} Kernel headers collected successfully.\" || error_msg \"Kernel headers collection failed.\"\n\n    # Install libc headers (for linux-libc-dev package)\n    echo -e \"${STEPS} Installing libc headers...\"\n    make ${silent_print} ${MAKE_SET_STRING} CC=\"${CC}\" LD=\"${LD}\" INSTALL_HDR_PATH=${output_path}/libc_headers headers_install\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} Libc headers installed successfully.\" || error_msg \"Libc headers installation failed.\"\n}\n\ngenerate_uinitrd() {\n    cd ${current_path}\n    echo -e \"${STEPS} Initializing uInitrd generation environment...\"\n\n    # Backup current system files for /boot\n    echo -e \"${INFO} Backup the files in the [ ${boot_backup_path} ] directory.\"\n    rm -rf ${boot_backup_path} && mkdir -p ${boot_backup_path}\n    mv -f /boot/{config-*,initrd.img-*,System.map-*,vmlinuz-*,uInitrd*,*Image} -t ${boot_backup_path} 2>/dev/null\n    # Copy /boot related files into armbian system\n    [[ -d \"/boot\" ]] || mkdir -p /boot\n    cp -f ${kernel_path}/${local_kernel_path}/System.map /boot/System.map-${kernel_outname}\n    cp -f ${kernel_path}/${local_kernel_path}/.config /boot/config-${kernel_outname}\n    cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/Image /boot/vmlinuz-${kernel_outname}\n    if [[ -z \"${PLATFORM}\" || \"${PLATFORM}\" =~ ^(rockchip|allwinner)$ ]]; then\n        cp -f /boot/vmlinuz-${kernel_outname} /boot/Image\n    else\n        cp -f /boot/vmlinuz-${kernel_outname} /boot/zImage\n    fi\n    #echo -e \"${INFO} Kernel copy results in the [ /boot ] directory: \\n$(ls -l /boot) \\n\"\n\n    # Backup current system files for /usr/lib/modules\n    echo -e \"${INFO} Backup the files in the [ ${modules_backup_path} ] directory.\"\n    rm -rf ${modules_backup_path} && mkdir -p ${modules_backup_path}\n    mv -f /usr/lib/modules/$(uname -r) -t ${modules_backup_path} 2>/dev/null\n    # Copy modules files\n    [[ -d \"/usr/lib/modules\" ]] || mkdir -p /usr/lib/modules\n    cp -rf ${output_path}/modules/lib/modules/${kernel_outname} -t /usr/lib/modules\n    #echo -e \"${INFO} Kernel copy results in the [ /usr/lib/modules ] directory: \\n$(ls -l /usr/lib/modules) \\n\"\n\n    # COMPRESS: [ gzip | lzma | xz | zstd | lz4 ]\n    [[ \"${compress_format}\" =~ ^(gzip|lzma|xz|zstd|lz4)$ ]] || {\n        echo -e \"${WARNING} The compression format [ ${compress_format} ] is invalid, reset to [ xz ] format.\"\n        compress_format=\"xz\"\n    }\n    compress_initrd_file=\"/etc/initramfs-tools/initramfs.conf\"\n    if [[ -f \"${compress_initrd_file}\" ]]; then\n        sed -i \"s|^COMPRESS=.*|COMPRESS=${compress_format}|g\" ${compress_initrd_file}\n        compress_settings=\"$(cat ${compress_initrd_file} | grep -E ^COMPRESS=)\"\n        echo -e \"${INFO} Set the [ ${compress_settings} ] in the initramfs.conf file.\"\n    else\n        error_msg \"The [ ${compress_initrd_file} ] file does not exist.\"\n    fi\n\n    cd /boot\n    echo -e \"${STEPS} Generating uInitrd file...\"\n\n    # Enable update_initramfs\n    [[ -f \"${initramfs_conf}\" ]] && sed -i \"s|^update_initramfs=.*|update_initramfs=yes|g\" ${initramfs_conf}\n\n    # Generate uInitrd file directly under armbian system\n    update-initramfs -c -k ${kernel_outname}\n\n    # Disable update_initramfs\n    [[ -f \"${initramfs_conf}\" ]] && sed -i \"s|^update_initramfs=.*|update_initramfs=no|g\" ${initramfs_conf}\n\n    if [[ -f \"uInitrd\" ]]; then\n        echo -e \"${SUCCESS} The initrd.img and uInitrd files generated successfully.\"\n        [[ ! -L \"uInitrd\" ]] && mv -vf uInitrd uInitrd-${kernel_outname}\n    else\n        echo -e \"${WARNING} The initrd.img and uInitrd files were not updated.\"\n    fi\n\n    echo -e \"${INFO} File situation in the /boot directory after update: \\n$(ls -hl *${kernel_outname})\"\n\n    # Restore the files in the [ /boot ] directory\n    mv -f *${kernel_outname} ${output_path}/boot\n    mv -f ${boot_backup_path}/* -t . 2>/dev/null\n\n    # Restore the files in the [ /usr/lib/modules ] directory\n    rm -rf /usr/lib/modules/${kernel_outname}\n    mv -f ${modules_backup_path}/* -t /usr/lib/modules 2>/dev/null\n\n    # Remove temporary backup directory\n    sync && sleep 3\n    rm -rf ${boot_backup_path} ${modules_backup_path}\n}\n\npackit_dtbs() {\n    # Pack 3 dtbs files\n    echo -e \"${STEPS} Packing the [ ${kernel_outname} ] dtbs packages...\"\n\n    cd ${output_path}/dtb/allwinner\n    cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/allwinner/*.dtb . 2>/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && {\n        [[ -d \"${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/allwinner/overlay\" ]] && {\n            mkdir -p overlay\n            cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/allwinner/overlay/*.dtbo overlay/ 2>/dev/null\n        }\n        tar -czf dtb-allwinner-${kernel_outname}.tar.gz *\n        mv -f *.tar.gz ${output_path}/${kernel_version}\n        echo -e \"${SUCCESS} The [ dtb-allwinner-${kernel_outname}.tar.gz ] file packaged successfully.\"\n    }\n\n    cd ${output_path}/dtb/amlogic\n    cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/amlogic/*.dtb . 2>/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && {\n        [[ -d \"${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/amlogic/overlay\" ]] && {\n            mkdir -p overlay\n            cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/amlogic/overlay/*.dtbo overlay/ 2>/dev/null\n        }\n        tar -czf dtb-amlogic-${kernel_outname}.tar.gz *\n        mv -f *.tar.gz ${output_path}/${kernel_version}\n        echo -e \"${SUCCESS} The [ dtb-amlogic-${kernel_outname}.tar.gz ] file packaged successfully.\"\n    }\n\n    cd ${output_path}/dtb/rockchip\n    cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/rockchip/*.dtb . 2>/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && {\n        [[ -d \"${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/rockchip/overlay\" ]] && {\n            mkdir -p overlay\n            cp -f ${kernel_path}/${local_kernel_path}/arch/${SRC_ARCH}/boot/dts/rockchip/overlay/*.dtbo overlay/ 2>/dev/null\n        }\n        tar -czf dtb-rockchip-${kernel_outname}.tar.gz *\n        mv -f *.tar.gz ${output_path}/${kernel_version}\n        echo -e \"${SUCCESS} The [ dtb-rockchip-${kernel_outname}.tar.gz ] file packaged successfully.\"\n    }\n}\n\npackit_kernel() {\n    # Pack 3 kernel files\n    echo -e \"${STEPS} Packing the [ ${kernel_outname} ] boot, modules and header packages...\"\n\n    cd ${output_path}/boot\n    rm -rf dtb-*\n    chmod +x *\n    tar -czf boot-${kernel_outname}.tar.gz *\n    mv -f *.tar.gz ${output_path}/${kernel_version}\n    echo -e \"${SUCCESS} The [ boot-${kernel_outname}.tar.gz ] file packaged successfully.\"\n\n    cd ${output_path}/modules/lib/modules\n    tar -czf modules-${kernel_outname}.tar.gz *\n    mv -f *.tar.gz ${output_path}/${kernel_version}\n    echo -e \"${SUCCESS} The [ modules-${kernel_outname}.tar.gz ] file packaged successfully.\"\n\n    cd ${output_path}/header\n    tar -czf header-${kernel_outname}.tar.gz *\n    mv -f *.tar.gz ${output_path}/${kernel_version}\n    echo -e \"${SUCCESS} The [ header-${kernel_outname}.tar.gz ] file packaged successfully.\"\n}\n\ncreate_debs_image() {\n    cd ${output_path}\n\n    # 01. Create linux-image deb package (includes boot files and modules)\n    echo -e \"${STEPS} Creating the [ linux-image ] deb packages...\"\n\n    image_pkg=\"linux-image${custom_name}\"\n    image_dir=\"${deb_path}/${image_pkg}\"\n    mkdir -p ${image_dir}/{DEBIAN,boot,usr/lib/modules}\n\n    # Copy boot files\n    cp -rf ${output_path}/boot/* ${image_dir}/boot/\n    rm -f ${image_dir}/boot/*.tar.gz 2>/dev/null\n\n    # Copy modules files\n    cp -rf ${output_path}/modules/lib/modules/${kernel_outname} ${image_dir}/usr/lib/modules/\n    rm -f ${image_dir}/usr/lib/modules/${kernel_outname}/{build,source} 2>/dev/null\n\n    # Generate boot file list for preinst\n    boot_file_list=\"$(cd ${image_dir} && find boot -type f | sort)\"\n\n    # Create copyright file\n    mkdir -p ${image_dir}/usr/share/doc/${image_pkg}\n    cat >${image_dir}/usr/share/doc/${image_pkg}/copyright <<EOF\nThis is the Linux kernel image, modules and boot files.\n\nThe Linux kernel is licensed under the GPL v2 license.\nSee /usr/share/common-licenses/GPL-2 for the full license text.\n\nCopyright: Linux kernel contributors\nMaintainer: ${pkg_maintainer}\nEOF\n\n    # Calculate installed size (in KB)\n    image_size=$(du -sk ${image_dir} | cut -f1)\n\n    # Create control file for linux-image package\n    cat >${image_dir}/DEBIAN/control <<EOF\nPackage: ${image_pkg}\nVersion: ${pkg_version}-${pkg_revision}${custom_name}\nArchitecture: ${pkg_arch}\nMaintainer: ${pkg_maintainer}\nInstalled-Size: ${image_size}\nProvides: linux-image\nConflicts: linux-image\nReplaces: linux-image\nSection: kernel\nPriority: optional\nDescription: Linux kernel image ${kernel_outname}\n Kernel image and modules for ${kernel_outname}\n This package contains vmlinuz, config, System.map, uInitrd and kernel modules.\nEOF\n\n    # Create preinst script to remove boot files and modules before install\n    cat >${image_dir}/DEBIAN/preinst <<EOF\n#!/bin/bash\nset -e\n\n# Remove only boot files that will be overwritten by this package\nwhile IFS= read -r f; do\n    [[ -n \"\\${f}\" ]] && rm -f \"/\\${f}\" 2>/dev/null || true\ndone <<'BOOT_LIST'\n${boot_file_list}\nBOOT_LIST\n\n# Remove old modules files that will be overwritten by this package\nfor d in /usr/lib/modules/*; do\n    if [[ -d \"\\${d}\" ]]; then\n        rm -f \"\\${d}/build\" \"\\${d}/source\" 2>/dev/null || true\n        rm -f \"\\${d}\"/modules.* 2>/dev/null || true\n    fi\ndone\n\n# Cleaning up beforehand ensures a fresh unpack with no leftover files.\nrm -rf /usr/lib/modules/${kernel_outname} 2>/dev/null || true\n\nexit 0\nEOF\n    chmod 755 ${image_dir}/DEBIAN/preinst\n\n    # Create prerm script to remove modules before uninstall\n    cat >${image_dir}/DEBIAN/prerm <<EOF\n#!/bin/bash\nset -e\n\n# Only clean modules files on remove/purge, NOT during upgrade\ncase \"\\${1}\" in\n    remove|purge)\n        rm -rf /usr/lib/modules/${kernel_outname}/modules.* 2>/dev/null || true\n        ;;\nesac\nexit 0\nEOF\n    chmod 755 ${image_dir}/DEBIAN/prerm\n\n    # Create postrm script to remove modules after uninstall\n    cat >${image_dir}/DEBIAN/postrm <<EOF\n#!/bin/bash\nset -e\n\n# Only remove modules on remove/purge, NOT during upgrade\ncase \"\\${1}\" in\n    remove|purge)\n        rm -rf /usr/lib/modules/${kernel_outname} 2>/dev/null || true\n        ;;\nesac\nexit 0\nEOF\n    chmod 755 ${image_dir}/DEBIAN/postrm\n\n    # Create postinst script for linux-image- package\n    cat >${image_dir}/DEBIAN/postinst <<'POSTINST'\n#!/bin/bash\nset -e\n\n# Read platform info from ophub-release\nophub_release_file=\"/etc/ophub-release\"\nif [[ -f \"${ophub_release_file}\" ]]; then\n    source \"${ophub_release_file}\"\nfi\n\ncd /boot\n\n# Handle kernel image based on platform\nif [[ -f vmlinuz-KERNEL_NAME ]]; then\n    case \"${PLATFORM}\" in\n    amlogic)\n        [[ -f zImage ]] && rm -f zImage\n        cp -f vmlinuz-KERNEL_NAME zImage\n        ;;\n    rockchip)\n        [[ -f Image ]] && rm -f Image\n        ln -sf vmlinuz-KERNEL_NAME Image\n        ;;\n    allwinner)\n        [[ -f Image ]] && rm -f Image\n        cp -f vmlinuz-KERNEL_NAME Image\n        ;;\n    *)\n        # Default: Copy to both Image and zImage for compatibility\n        [[ -f Image ]] && rm -f Image\n        [[ -f zImage ]] && rm -f zImage\n        cp -f vmlinuz-KERNEL_NAME Image\n        cp -f vmlinuz-KERNEL_NAME zImage\n        ;;\n    esac\nfi\n\n# Run depmod to generate modules.dep and map files\ndepmod -a KERNEL_NAME 2>/dev/null || true\n\n# Generate initrd.img and uInitrd if not exist\nif [[ ! -f /boot/initrd.img-KERNEL_NAME || ! -f /boot/uInitrd-KERNEL_NAME ]]; then\n    echo \"initrd.img-KERNEL_NAME or uInitrd-KERNEL_NAME not found, generating with update-initramfs...\"\n    if command -v update-initramfs >/dev/null 2>&1; then\n        initramfs_conf=\"/etc/initramfs-tools/update-initramfs.conf\"\n        [[ -f \"${initramfs_conf}\" ]] && sed -i \"s|^update_initramfs=.*|update_initramfs=yes|g\" \"${initramfs_conf}\"\n\n        update-initramfs -c -k KERNEL_NAME\n\n        [[ -f \"${initramfs_conf}\" ]] && sed -i \"s|^update_initramfs=.*|update_initramfs=no|g\" \"${initramfs_conf}\"\n    else\n        echo \"WARNING: update-initramfs not found, system may not boot correctly!\"\n    fi\nfi\n\n# Handle uInitrd based on platform and model\nif [[ \"${MODEL_ID}\" =~ ^(r304|r306)$ ]]; then\n    # Special handling for MODEL_ID r304 and r306\n    [[ -f initrd.img-KERNEL_NAME ]] && {\n        [[ -f uInitrd ]] && rm -f uInitrd\n        ln -sf initrd.img-KERNEL_NAME uInitrd\n    }\nelif [[ -f uInitrd-KERNEL_NAME ]]; then\n    [[ -f uInitrd ]] && rm -f uInitrd\n    case \"${PLATFORM}\" in\n    amlogic|allwinner)\n        cp -f uInitrd-KERNEL_NAME uInitrd\n        ;;\n    rockchip)\n        ln -sf uInitrd-KERNEL_NAME uInitrd\n        ;;\n    *)\n        cp -f uInitrd-KERNEL_NAME uInitrd\n        ;;\n    esac\nfi\n\n# Clean up old kernels (keep only the newly installed kernel)\n# This matches armbian-update behavior\nCURRENT_KERNEL=\"KERNEL_NAME\"\n\n# Clean old boot files (config, initrd.img, System.map, uInitrd, vmlinuz)\nfor f in /boot/config-* /boot/initrd.img-* /boot/System.map-* /boot/uInitrd-* /boot/vmlinuz-*; do\n    [[ -f \"${f}\" ]] || continue\n    [[ \"${f}\" == *\"${CURRENT_KERNEL}\"* ]] && continue\n    rm -f \"${f}\" 2>/dev/null || true\ndone\n\n# Clean old modules directories\nfor d in /usr/lib/modules/*; do\n    [[ -d \"${d}\" ]] || continue\n    [[ \"${d}\" == *\"${CURRENT_KERNEL}\"* ]] && continue\n    rm -rf \"${d}\" 2>/dev/null || true\ndone\n\n# Remove old linux-image packages from dpkg database (background, wait for dpkg lock release)\n(\n    # Wait for the parent dpkg process to release the lock\n    while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done\n    for pkg in $(dpkg-query -W -f='${Package}\\n' 2>/dev/null | grep -E \"^linux-image-\"); do\n        [[ \"${pkg}\" == \"CURRENT_IMAGE_PKG\" ]] && continue\n        dpkg --purge --force-depends \"${pkg}\" 2>/dev/null || true\n    done\n) &\n\nexit 0\nPOSTINST\n    sed -i \"s|KERNEL_NAME|${kernel_outname}|g\" ${image_dir}/DEBIAN/postinst\n    sed -i \"s|CURRENT_IMAGE_PKG|${image_pkg}|g\" ${image_dir}/DEBIAN/postinst\n    chmod 755 ${image_dir}/DEBIAN/postinst\n\n    # Build the deb package (include version in filename since package name has no version)\n    image_deb=\"linux-image_${pkg_version}-${pkg_revision}${custom_name}_${pkg_arch}.deb\"\n    dpkg-deb -Zxz --build ${image_dir} ${deb_path}/${image_deb} >/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The [ ${image_deb} ] file packaged successfully.\"\n}\n\ncreate_debs_libc() {\n    cd ${output_path}\n\n    # 02. Create linux-libc-dev deb package\n    echo -e \"${STEPS} Creating the [ linux-libc-dev ] deb packages...\"\n\n    libc_pkg=\"linux-libc-dev${custom_name}\"\n    libc_dir=\"${deb_path}/${libc_pkg}\"\n    mkdir -p ${libc_dir}/{DEBIAN,usr/include}\n\n    # Copy libc headers and organize for aarch64\n    cp -rf ${output_path}/libc_headers/include/* ${libc_dir}/usr/include/\n\n    # Move arch-specific asm headers to aarch64-linux-gnu directory\n    if [[ -d \"${libc_dir}/usr/include/asm\" ]]; then\n        mkdir -p ${libc_dir}/usr/include/aarch64-linux-gnu\n        mv ${libc_dir}/usr/include/asm ${libc_dir}/usr/include/aarch64-linux-gnu/\n    fi\n\n    # Create copyright file\n    mkdir -p ${libc_dir}/usr/share/doc/${libc_pkg}\n    cat >${libc_dir}/usr/share/doc/${libc_pkg}/copyright <<EOF\nThis is the Linux kernel headers for libc development.\n\nThe Linux kernel is licensed under the GPL v2 license.\nSee /usr/share/common-licenses/GPL-2 for the full license text.\n\nCopyright: Linux kernel contributors\nMaintainer: ${pkg_maintainer}\nEOF\n\n    # Calculate installed size\n    libc_size=$(du -sk ${libc_dir} | cut -f1)\n\n    # Create control file for linux-libc-dev package\n    cat >${libc_dir}/DEBIAN/control <<EOF\nPackage: ${libc_pkg}\nVersion: ${pkg_version}-${pkg_revision}${custom_name}\nArchitecture: ${pkg_arch}\nMaintainer: ${pkg_maintainer}\nInstalled-Size: ${libc_size}\nProvides: linux-libc-dev\nConflicts: linux-libc-dev\nReplaces: linux-libc-dev\nSection: kernel\nPriority: optional\nMulti-Arch: same\nDescription: Linux Kernel Headers for development ${kernel_outname}\n This package provides headers from the Linux kernel for use by\n glibc and other userspace libraries and programs.\nEOF\n\n    # Create preinst script to remove old linux-libc-dev packages before install\n    cat >${libc_dir}/DEBIAN/preinst <<EOF\n#!/bin/bash\nset -e\n\nexit 0\nEOF\n    chmod 755 ${libc_dir}/DEBIAN/preinst\n\n    # Create postinst script to clean old linux-libc-dev packages\n    cat >${libc_dir}/DEBIAN/postinst <<'POSTINST'\n#!/bin/bash\nset -e\n\n# Remove old linux-libc-dev packages\n(\n    while fuser /var/lib/dpkg/lock >/dev/null 2>&1 || fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done\n    for pkg in $(dpkg-query -W -f='${Package}\\n' 2>/dev/null | grep -E '^linux-libc-dev-'); do\n        [[ \"${pkg}\" == \"CURRENT_LIBC_PKG\" ]] && continue\n        dpkg --purge --force-depends \"${pkg}\" 2>/dev/null || true\n    done\n) &\n\nexit 0\nPOSTINST\n    sed -i \"s|CURRENT_LIBC_PKG|${libc_pkg}|g\" ${libc_dir}/DEBIAN/postinst\n    chmod 755 ${libc_dir}/DEBIAN/postinst\n\n    # Build the deb package (include version in filename since package name has no version)\n    libc_deb=\"linux-libc-dev_${pkg_version}-${pkg_revision}${custom_name}_${pkg_arch}.deb\"\n    dpkg-deb -Zxz --build ${libc_dir} ${deb_path}/${libc_deb} >/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The [ ${libc_deb} ] file packaged successfully.\"\n}\n\ncreate_debs_headers() {\n    cd ${output_path}\n\n    # 03. Create linux-headers deb package\n    echo -e \"${STEPS} Creating the [ linux-headers ] deb packages...\"\n\n    headers_pkg=\"linux-headers${custom_name}\"\n    headers_dir=\"${deb_path}/${headers_pkg}\"\n    mkdir -p ${headers_dir}/{DEBIAN,usr/src}\n\n    # Copy header files\n    cp -rf ${output_path}/header ${headers_dir}/usr/src/linux-headers-${kernel_outname}\n\n    # Create copyright file\n    mkdir -p ${headers_dir}/usr/share/doc/${headers_pkg}\n    cat >${headers_dir}/usr/share/doc/${headers_pkg}/copyright <<EOF\nThis is the Linux kernel headers for building external modules.\n\nThe Linux kernel is licensed under the GPL v2 license.\nSee /usr/share/common-licenses/GPL-2 for the full license text.\n\nCopyright: Linux kernel contributors\nMaintainer: ${pkg_maintainer}\nEOF\n\n    # Calculate installed size\n    headers_size=$(du -sk ${headers_dir} | cut -f1)\n\n    # Create control file for linux-headers package\n    {\n        cat <<EOF\nPackage: ${headers_pkg}\nVersion: ${pkg_version}-${pkg_revision}${custom_name}\nArchitecture: ${pkg_arch}\nMaintainer: ${pkg_maintainer}\nInstalled-Size: ${headers_size}\nDepends: ${image_pkg}\nProvides: linux-headers\nConflicts: linux-headers\nReplaces: linux-headers\nSection: kernel\nPriority: optional\nDescription: Linux kernel headers ${kernel_outname}\n Header files for building modules for Linux kernel ${kernel_outname}\nEOF\n    } >${headers_dir}/DEBIAN/control\n\n    # Create preinst script to remove old linux-headers files before install\n    cat >${headers_dir}/DEBIAN/preinst <<'PREINST'\n#!/bin/bash\nset -e\nexit 0\nPREINST\n    chmod 755 ${headers_dir}/DEBIAN/preinst\n\n    # Create prerm script to remove build and source symlinks before uninstall\n    cat >${headers_dir}/DEBIAN/prerm <<EOF\n#!/bin/bash\nset -e\n\n# Only remove symlinks on remove/purge, NOT during upgrade\ncase \"\\${1}\" in\n    remove|purge)\n        rm -rf /usr/lib/modules/${kernel_outname}/{build,source} 2>/dev/null || true\n        ;;\nesac\nexit 0\nEOF\n    chmod 755 ${headers_dir}/DEBIAN/prerm\n\n    # Create postrm script to remove header files after uninstall\n    cat >${headers_dir}/DEBIAN/postrm <<EOF\n#!/bin/bash\nset -e\n\n# Only remove headers on remove/purge, NOT during upgrade\ncase \"\\${1}\" in\n    remove|purge)\n        rm -rf /usr/src/linux-headers-${kernel_outname} 2>/dev/null || true\n        ;;\nesac\nexit 0\nEOF\n    chmod 755 ${headers_dir}/DEBIAN/postrm\n\n    # Create postinst script to create build symlink and clean old headers\n    cat >${headers_dir}/DEBIAN/postinst <<'POSTINST'\n#!/bin/bash\nset -e\nCURRENT_KERNEL=\"KERNEL_NAME\"\n\n# Ensure build symlink exists in modules directory\nif [[ -d /usr/lib/modules/${CURRENT_KERNEL} ]]; then\n    cd /usr/lib/modules/${CURRENT_KERNEL}\n    [[ -L build ]] || ln -sf /usr/src/linux-headers-${CURRENT_KERNEL} build\nfi\n\n# Clean old kernel headers directories\nfor d in /usr/src/linux-headers-*; do\n    [[ -d \"${d}\" ]] || continue\n    [[ \"${d}\" == *\"${CURRENT_KERNEL}\"* ]] && continue\n    rm -rf \"${d}\" 2>/dev/null || true\ndone\n\n# Remove old linux-headers packages from dpkg database (background, wait for dpkg lock release)\n(\n    while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done\n    for pkg in $(dpkg-query -W -f='${Package}\\n' 2>/dev/null | grep -E \"^linux-headers-\"); do\n        [[ \"${pkg}\" == \"CURRENT_HEADERS_PKG\" ]] && continue\n        dpkg --purge --force-depends \"${pkg}\" 2>/dev/null || true\n    done\n) &\n\nexit 0\nPOSTINST\n    sed -i \"s|KERNEL_NAME|${kernel_outname}|g\" ${headers_dir}/DEBIAN/postinst\n    sed -i \"s|CURRENT_HEADERS_PKG|${headers_pkg}|g\" ${headers_dir}/DEBIAN/postinst\n    chmod 755 ${headers_dir}/DEBIAN/postinst\n\n    headers_deb=\"linux-headers_${pkg_version}-${pkg_revision}${custom_name}_${pkg_arch}.deb\"\n    dpkg-deb -Zxz --build ${headers_dir} ${deb_path}/${headers_deb} >/dev/null\n    [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The [ ${headers_deb} ] file packaged successfully.\"\n}\n\ncreate_debs_dtb() {\n    cd ${output_path}\n\n    # 04. Create linux-dtb deb packages for each platform\n    echo -e \"${STEPS} Creating the [ linux-dtb ] deb packages...\"\n\n    declare -A platform_family=([\"amlogic\"]=\"meson64\" [\"rockchip\"]=\"rockchip64\" [\"allwinner\"]=\"sunxi64\")\n    platform_list=(\"amlogic\" \"rockchip\" \"allwinner\")\n    for platform in \"${platform_list[@]}\"; do\n        dtb_source=\"${output_path}/dtb/${platform}\"\n        family=\"${platform_family[${platform}]}\"\n        # Check if dtb files exist for this platform (at least 30 files)\n        dtb_count=\"$(ls ${dtb_source}/*.dtb 2>/dev/null | wc -l)\"\n        if [[ \"${dtb_count}\" -le \"30\" ]]; then\n            echo -e \"${INFO} No DTB files for ${family} (${platform}), skipping...\"\n            continue\n        fi\n\n        #echo -e \"${INFO} Creating linux-dtb-${family} deb package...\"\n        dtb_pkg=\"linux-dtb-${family}${custom_name}\"\n        dtb_dir=\"${deb_path}/${dtb_pkg}\"\n        mkdir -p ${dtb_dir}/{DEBIAN,boot/dtb/${platform}}\n\n        # Copy dtb files\n        cp -rf ${dtb_source}/* ${dtb_dir}/boot/dtb/${platform}/\n\n        # Create copyright file\n        mkdir -p ${dtb_dir}/usr/share/doc/${dtb_pkg}\n        cat >${dtb_dir}/usr/share/doc/${dtb_pkg}/copyright <<EOF\nThis is the Linux kernel device tree blob files for ${family} (${platform}) platform.\n\nThe Linux kernel is licensed under the GPL v2 license.\nSee /usr/share/common-licenses/GPL-2 for the full license text.\n\nCopyright: Linux kernel contributors\nMaintainer: ${pkg_maintainer}\nEOF\n\n        # Calculate installed size\n        dtb_size=$(du -sk ${dtb_dir} | cut -f1)\n\n        # Create control file for linux-dtb package\n        cat >${dtb_dir}/DEBIAN/control <<EOF\nPackage: ${dtb_pkg}\nVersion: ${pkg_version}-${pkg_revision}${custom_name}\nArchitecture: ${pkg_arch}\nMaintainer: ${pkg_maintainer}\nInstalled-Size: ${dtb_size}\nDepends: ${image_pkg}\nProvides: linux-dtb-${family}\nConflicts: linux-dtb-${family}\nReplaces: linux-dtb-${family}\nSection: kernel\nPriority: optional\nDescription: Linux kernel DTB files for ${family} ${kernel_outname}\n Device tree blob files for ${family} (${platform}) platform\nEOF\n\n        # Create preinst script to remove dtb files before installation\n        cat >${dtb_dir}/DEBIAN/preinst <<EOF\n#!/bin/bash\nset -e\n\n# Remove only files that will be overwritten by this package\nrm -rf /boot/dtb/* 2>/dev/null || true\n\nexit 0\nEOF\n        chmod 755 ${dtb_dir}/DEBIAN/preinst\n\n        # Create postinst script to manage dtb symlinks and clean old packages\n        cat >${dtb_dir}/DEBIAN/postinst <<EOF\n#!/bin/bash\nset -e\n\nCURRENT_KERNEL=\"KERNEL_NAME\"\n\n# Clean old dtb symlinks (e.g., /boot/dtb-xxx)\nfor l in /boot/dtb-*; do\n    [[ -L \"\\${l}\" || -d \"\\${l}\" ]] || continue\n    [[ \"\\${l}\" == *\"\\${CURRENT_KERNEL}\"* ]] && continue\n    rm -rf \"\\${l}\" 2>/dev/null || true\ndone\n\n# Platform-specific handling for rockchip\nif [[ \"DTB_FAMILY\" == \"rockchip64\" || \"DTB_PLATFORM\" == \"rockchip\" ]]; then\n    # Create dtb symlink for rockchip platform (matches armbian-update behavior)\n    cd /boot\n    [[ -d dtb ]] && ln -sf dtb dtb-\\${CURRENT_KERNEL}\nfi\n\nexit 0\nEOF\n        sed -i \"s|KERNEL_NAME|${kernel_outname}|g\" ${dtb_dir}/DEBIAN/postinst\n        sed -i \"s|DTB_FAMILY|${family}|g\" ${dtb_dir}/DEBIAN/postinst\n        sed -i \"s|DTB_PLATFORM|${platform}|g\" ${dtb_dir}/DEBIAN/postinst\n        chmod 755 ${dtb_dir}/DEBIAN/postinst\n\n        # Build the deb package\n        dtb_deb=\"linux-dtb-${family}_${pkg_version}-${pkg_revision}${custom_name}_${pkg_arch}.deb\"\n        dpkg-deb -Zxz --build ${dtb_dir} ${deb_path}/${dtb_deb} >/dev/null\n        [[ \"${?}\" -eq \"0\" ]] && echo -e \"${SUCCESS} The [ ${dtb_deb} ] file packaged successfully.\"\n    done\n}\n\ncreate_debs() {\n    cd ${output_path}\n\n    # Create deb packages for kernel installation\n    echo -e \"${STEPS} Creating all deb packages...\"\n\n    # Create all deb packages\n    create_debs_image\n    create_debs_libc\n    create_debs_headers\n    create_debs_dtb\n}\n\ncompile_selection() {\n    # Compile by selection\n    if [[ \"${package_list}\" == \"dtbs\" ]]; then\n        compile_dtbs\n        packit_dtbs\n    else\n        compile_kernel\n        generate_uinitrd\n        packit_dtbs\n        packit_kernel\n        create_debs\n    fi\n\n    cd ${output_path}/${kernel_version}\n    # Add sha256sum integrity verification file\n    sha256sum *.tar.gz >sha256sums 2>/dev/null || true\n\n    cd ${output_path}/deb-${kernel_version}\n    # Cleanup temporary build directories, keep only .deb files\n    find . -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \\;\n    # Add sha256sum integrity verification file\n    sha256sum *.deb >sha256sums 2>/dev/null || true\n\n    cd ${output_path}\n    # Package all kernel tar files into a single tar.gz file\n    tar -czf ${kernel_version}.tar.gz ${kernel_version}\n    echo -e \"${SUCCESS} All kernel tar packages packaged successfully.\"\n    # Package all kernel deb files into a single tar.gz file\n    tar -czf deb-${kernel_version}.tar.gz deb-${kernel_version}\n    echo -e \"${SUCCESS} All kernel deb packages packaged successfully.\"\n\n    echo -e \"${INFO} Kernel series files are stored in [ ${output_path} ].\"\n    echo -e \"${INFO} Current space usage: \\n$(df -hT ${output_path}) \\n\"\n}\n\nclean_tmp() {\n    cd ${current_path}\n    echo -e \"${STEPS} Cleaning up temporary files...\"\n\n    sync && sleep 3\n    rm -rf ${output_path}/{boot/,dtb/,modules/,header/,libc_headers/,${kernel_version}/,deb-${kernel_version}/} || true\n    [[ \"${delete_source}\" =~ ^(true|yes)$ ]] && rm -rf ${kernel_path}/* || true\n    rm -rf ${tmp_backup_path} || true\n\n    # Show ccache statistics\n    echo -e \"${INFO} ccache statistics:\"\n    ccache -s 2>/dev/null\n\n    echo -e \"${SUCCESS} Cleanup completed successfully.\"\n}\n\nloop_recompile() {\n    cd ${current_path}\n\n    j=\"1\"\n    for k in ${build_kernel[@]}; do\n        # kernel_version, such as [ 6.1.15 ]\n        kernel_version=\"${k}\"\n        # kernel <VERSION> and <PATCHLEVEL>, such as [ 6.1 ]\n        kernel_verpatch=\"$(echo ${kernel_version} | awk -F '.' '{print $1\".\"$2}')\"\n        # kernel <SUBLEVEL>, such as [ 15 ]\n        kernel_sub=\"$(echo ${kernel_version} | awk -F '.' '{print $3}')\"\n\n        # The loop variable assignment\n        if [[ -z \"${code_repo}\" ]]; then\n            server_kernel_repo=\"${code_owner}/linux-${kernel_verpatch}.y\"\n            local_kernel_path=\"linux-${kernel_verpatch}.y\"\n        else\n            server_kernel_repo=\"${code_owner}/${code_repo}\"\n            local_kernel_path=\"${code_repo}-${code_branch}\"\n        fi\n\n        # Show compilation start information\n        echo -e \"${INFO} Armbian space usage before compilation: \\n$(df -hT ${kernel_path}) \\n\"\n\n        # Check disk space size\n        echo -ne \"(${j}) Compiling kernel [\\033[92m ${kernel_version} \\033[0m]. \"\n        now_remaining_space=\"$(df -Tk ${kernel_path} | tail -n1 | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))\"\n        if [[ \"${now_remaining_space}\" -le \"15\" ]]; then\n            echo -e \"${WARNING} Remaining space is less than 15G, exiting compilation.\"\n            break\n        else\n            echo \"Remaining space is ${now_remaining_space}G.\"\n        fi\n\n        # Execute the following functions in sequence\n        get_kernel_source\n        get_kernel_config\n        compile_env\n        compile_selection\n        clean_tmp\n\n        ((j++))\n    done\n}\n\n# Show welcome message\necho -e \"${STEPS} Starting kernel compilation with Armbian...\"\necho -e \"${INFO} The Armbian environment: [ ${host_release} / ${arch_info} ]\"\n\n# Check script permission, supports running on Armbian system.\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo ./${0} ]\"\n[[ \"${arch_info}\" == \"aarch64\" ]] || error_msg \"The script only supports running under Armbian system.\"\n\n# Initialize variables\ninit_var \"${@}\"\n# Output log to file\n[[ \"${enable_log}\" =~ ^(true|yes)$ ]] && log_to_file\n# Check and install the toolchain\ntoolchain_check\n# Query the latest kernel version\n[[ \"${auto_kernel}\" =~ ^(true|yes)$ ]] && query_version\n\n# Show compile settings\necho -e \"${INFO} Kernel compilation toolchain: [ ${toolchain_name} ]\"\necho -e \"${INFO} Kernel source: [ ${code_owner} ]\"\necho -e \"${INFO} Kernel patch: [ ${auto_patch} ]\"\necho -e \"${INFO} Kernel arch: [ ${SRC_ARCH} ]\"\necho -e \"${INFO} Kernel package: [ ${package_list} ]\"\necho -e \"${INFO} Kernel signature: [ ${custom_name} ]\"\necho -e \"${INFO} Latest kernel version: [ ${auto_kernel} ]\"\necho -e \"${INFO} Kernel initrd compress: [ ${compress_format} ]\"\necho -e \"${INFO} Ccache clear: [ ${ccache_clear} ]\"\necho -e \"${INFO} Delete source: [ ${delete_source} ]\"\necho -e \"${INFO} Silent log: [ ${silent_log} ]\"\necho -e \"${INFO} Kernel list: [ $(echo ${build_kernel[@]} | xargs) ] \\n\"\n\n# Loop to compile the kernel\nloop_recompile\n\n# Show compilation end information\necho -e \"${STEPS} Armbian space usage after compilation: \\n$(df -hT ${kernel_path}) \\n\"\necho -e \"${SUCCESS} Kernel compilation completed successfully.\"\n"
  },
  {
    "path": "compile-kernel/tools/script/docker/Dockerfile",
    "content": "FROM scratch\nADD armbian-rootfs.tar.gz /\n\n# Install necessary packages\nRUN apt-get update && apt-get install -y \\\n    tzdata \\\n    ca-certificates \\\n    gnupg2 \\\n    openssh-server \\\n    nginx \\\n    && rm -rf /var/lib/apt/lists/*\n\n# Set timezone\nENV TZ=Etc/UTC\nRUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && \\\n    echo \"${TZ}\" > /etc/timezone\n\n# Copy custom startup script\nCOPY docker_startup.sh /usr/local/bin/docker_startup.sh\n# Make the script executable\nRUN chmod +x /usr/local/bin/docker_startup.sh\n\n# Expose necessary ports (SSH and HTTP/HTTPS)\nEXPOSE 22 80 443\n\n# Set the default command to run our script\nCMD [\"/usr/local/bin/docker_startup.sh\"]\n"
  },
  {
    "path": "compile-kernel/tools/script/docker/build_armbian_docker_image.sh",
    "content": "#!/bin/bash\n#================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Build Armbian docker image.\n# Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian\n#\n#\n# Command: ./compile-kernel/tools/script/docker/build_armbian_docker_image.sh\n#\n#======================================== Functions list ========================================\n#\n# error_msg     : Output error message and exit\n# check_docker  : Check and install Docker environment\n# find_armbian  : Find Armbian rootfs file (armbian/*rootfs.tar.gz)\n# build_docker  : Build the Armbian Docker image\n# export_docker : Export offline Docker image\n#\n#================================ Set make environment variables ================================\n#\n# Set default parameters\ncurrent_path=\"${PWD}\"\narmbian_path=\"${current_path}/armbian\"\narmbian_rootfs_file=\"*rootfs.tar.gz\"\ndocker_path=\"${current_path}/compile-kernel/tools/script/docker\"\nout_path=\"${current_path}/out\"\n# Set Docker image name and tag\n[[ -n \"${1}\" ]] && docker_os=\"${1}\" || docker_os=\"server\"\n[[ -n \"${2}\" ]] && docker_arch=\"${2}\" || docker_arch=\"arm64\"\n\n# Set default parameters\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nWARNING=\"[\\033[93m WARNING \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#================================================================================================\n\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\ncheck_docker() {\n    echo -e \"${STEPS} Checking Docker environment...\"\n\n    # Check if docker command exists\n    if command -v docker >/dev/null 2>&1; then\n        local docker_ver=\"$(docker --version 2>/dev/null)\"\n        echo -e \"${INFO} Docker is installed: [ ${docker_ver} ]\"\n\n        # Check if Docker daemon is running\n        if docker info >/dev/null 2>&1; then\n            echo -e \"${INFO} Docker daemon is running.\"\n        else\n            echo -e \"${WARNING} Docker daemon is not running, attempting to start...\"\n            sudo systemctl start docker 2>/dev/null || sudo service docker start 2>/dev/null\n            sleep 3\n            docker info >/dev/null 2>&1 || error_msg \"Failed to start Docker daemon.\"\n            echo -e \"${SUCCESS} Docker daemon started successfully.\"\n        fi\n        return 0\n    fi\n\n    echo -e \"${INFO} Docker is not installed, installing...\"\n    # Install Docker using the official convenience script\n    curl -fsSL https://get.docker.com | sudo sh\n    sudo usermod -aG docker ${USER}\n\n    # Verify installation\n    command -v docker >/dev/null 2>&1 || error_msg \"Docker installation failed.\"\n\n    # Start and enable Docker service\n    sudo systemctl start docker 2>/dev/null || sudo service docker start 2>/dev/null\n    sudo systemctl enable docker 2>/dev/null\n    sleep 3\n    docker info >/dev/null 2>&1 || error_msg \"Docker installed but daemon failed to start.\"\n\n    echo -e \"${SUCCESS} Docker installed and started successfully: [ $(docker --version) ]\"\n}\n\nfind_armbian() {\n    cd ${current_path}\n    echo -e \"${STEPS} Searching for Armbian rootfs file...\"\n\n    # Find whether the Armbian file exists\n    armbian_file_name=\"$(ls ${armbian_path}/${armbian_rootfs_file} 2>/dev/null | head -n 1 | awk -F \"/\" '{print $NF}')\"\n    if [[ -n \"${armbian_file_name}\" ]]; then\n        echo -e \"${INFO} Armbian docker image file: [ ${armbian_file_name} ].\"\n    else\n        error_msg \"There is no [ ${armbian_rootfs_file} ] file in the [ ${armbian_path} ] directory.\"\n    fi\n\n    # Check whether the Dockerfile exists\n    [[ -f \"${docker_path}/Dockerfile\" ]] || error_msg \"Missing Dockerfile.\"\n}\n\nbuild_docker() {\n    cd ${current_path}\n    echo -e \"${STEPS} Building Armbian Docker image...\"\n\n    # Move the docker image to the output directory\n    rm -rf ${out_path} && mkdir -p ${out_path}\n    cp -f ${armbian_path}/${armbian_file_name} ${out_path}/${armbian_file_name}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Docker image move failed.\"\n    echo -e \"${INFO} Docker rootfs file added successfully.\"\n\n    # Add Dockerfile\n    cp -f ${docker_path}/Dockerfile ${out_path}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Dockerfile addition failed.\"\n    cp -f ${docker_path}/docker_startup.sh ${out_path}\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Custom startup script addition failed.\"\n    sed -i \"s|^ADD armbian-.*.tar.gz|ADD ${armbian_file_name}|g\" ${out_path}/Dockerfile\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Dockerfile version codename replacement failed.\"\n    echo -e \"${INFO} Dockerfile added successfully.\"\n\n    # Display the output directory\n    sync && sleep 3\n    echo -e \"${INFO} Docker files list: \\n$(ls -lh ${out_path})\"\n}\n\nexport_docker() {\n    cd ${current_path}\n\n    echo -e \"${STEPS} Building and exporting offline Docker image...\"\n\n    # Set image name and tag (Docker requires lowercase image names)\n    local docker_image_name=\"armbian-docker-${docker_os}-${docker_arch}\"\n    local full_image=\"${docker_image_name}:${docker_arch}\"\n\n    # Build docker image locally\n    cd ${out_path}\n    docker build --platform linux/${docker_arch} -t \"${full_image}\" .\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Docker image build failed.\"\n    echo -e \"${INFO} Docker image [ ${full_image} ] built successfully.\"\n\n    # Clean up build artifacts, keep only the exported image\n    rm -f ${out_path}/{${armbian_file_name},Dockerfile,docker_startup.sh}\n\n    # Export image to tar.gz file\n    local export_file=\"${out_path}/${docker_image_name}.tar.gz\"\n    (set -o pipefail && docker save \"${full_image}\" | gzip >\"${export_file}\")\n    [[ \"${?}\" -eq \"0\" ]] || error_msg \"Docker image export failed.\"\n\n    # Display export info\n    local file_size=\"$(ls -lh ${export_file} | awk '{print $5}')\"\n    echo -e \"${SUCCESS} Offline Docker image exported: [ ${export_file} ] (${file_size})\"\n    echo -e \"${INFO} Users can import with: [ docker load -i $(basename ${export_file}) ]\"\n}\n\n# Show welcome message\necho -e \"${STEPS} Welcome to the Armbian Docker Image Builder.\"\necho -e \"${INFO} Current path: [ ${current_path} ]\"\n#\ncheck_docker\nfind_armbian\nbuild_docker\nexport_docker\n#\necho -e \"${SUCCESS} Docker image files created successfully.\"\n"
  },
  {
    "path": "compile-kernel/tools/script/docker/build_armbian_rootfs_file.sh",
    "content": "#!/bin/bash\n#==========================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Build Armbian rootfs file.\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Optional parameters:\n# -v, --VERSION_CODENAME: Set the version codename of Armbian rootfs file, e.g., bookworm, resolute, etc.\n# -s, --SSHD_CONFIG:      Enable or disable sshd_config file, default is false.\n# -c, --COMMAND_COLORS:   Enable or disable command colors, default is false.\n# -k, --COMPILE_KERNEL:   Add armbian-kernel and uInitrd generation script, default none.\n#\n# Usage: ./compile-kernel/tools/script/docker/build_armbian_rootfs_file.sh -v bookworm -s true -c true -k true\n#        ./compile-kernel/tools/script/docker/build_armbian_rootfs_file.sh -v bookworm\n#\n#===================== Set make environment variables =====================\n#\n# Set environment variables\ncurrent_path=\"${PWD}\"\nbuild_path=\"${current_path}/build\"\nimage_path=\"${build_path}/output/images\"\ncache_path=\"${build_path}/cache/rootfs\"\ntmp_rootfs=\"${image_path}/tmp_rootfs\"\n\n#\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nWARNING=\"[\\033[93m WARNING \\033[0m]\"\nNOTE=\"[\\033[93m NOTE \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==========================================================================\n\nerror_msg() {\n    echo -e \" ${ERROR} ${1}\"\n    exit 1\n}\n\ninit_var() {\n    echo -e \"${STEPS} Initializing variables...\"\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"v:s:c:k:p:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -v | --VERSION_CODENAME)\n            if [[ -n \"${2}\" ]]; then\n                version_codename=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -v parameter [ ${2} ]!\"\n            fi\n            ;;\n        -s | --SSHD_CONFIG)\n            if [[ -n \"${2}\" ]]; then\n                sshd_config_enable=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -s parameter [ ${2} ]!\"\n            fi\n            ;;\n        -c | --COMMAND_COLORS)\n            if [[ -n \"${2}\" ]]; then\n                command_colors=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -c parameter [ ${2} ]!\"\n            fi\n            ;;\n        -k | --COMPILE_KERNEL)\n            if [[ -n \"${2}\" ]]; then\n                compile_kernel=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -k parameter [ ${2} ]!\"\n            fi\n            ;;\n        -p | --PLATFORM_TYPE)\n            if [[ -n \"${2}\" ]]; then\n                platform_type=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -p parameter [ ${2} ]!\"\n            fi\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n\n    echo -e \"${INFO} VERSION CODENAME: [ ${version_codename} ]\"\n}\n\nredo_rootfs() {\n    echo -e \"${STEPS} Rebuilding Armbian [ ${version_codename} ] rootfs file...\"\n\n    # Searching for Armbian image\n    image_file=\"$(basename $(ls ${image_path}/*.img 2>/dev/null | head -n 1))\"\n    # Get image version, such as 25.11.0\n    image_version=\"$(echo \"${image_file}\" | grep -oE '[0-9]{2}\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1)\"\n    # Get image kernel version, such as 6.12.56\n    image_kernel=\"$(echo \"${image_file}\" | grep -oE '[0-9]+\\.[0-9]{1,2}\\.[0-9]{1,3}' | grep -v \"${image_version}\" | head -n 1)\"\n    # Set image save name\n    image_save_name=\"Armbian_${image_version}-trunk_${version_codename}_${platform_type:-arm64}_${image_kernel}.img\"\n\n    # Searching for rootfs file\n    rootfs_file=\"$(ls ${cache_path}/rootfs-*.tar.zst 2>/dev/null | head -n 1)\"\n    rootfs_save_name=\"Armbian_${image_version}-${version_codename}_${platform_type:-arm64}_${image_kernel}_rootfs.tar.gz\"\n\n    # Create temporary directory\n    mkdir -p ${tmp_rootfs}\n    sudo chown root:root ${tmp_rootfs}\n    [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 01. Temporary directory created successfully.\" || error_msg \"01. Failed to create directory!\"\n\n    # Redo Armbian rootfs\n    if [[ -n \"${rootfs_file}\" ]]; then\n        sudo tar -mxf ${rootfs_file} -C ${tmp_rootfs}/\n        [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 02. Armbian rootfs unpacked successfully.\" || error_msg \"02. Failed to unpack rootfs file!\"\n\n        cd ${tmp_rootfs}/\n\n        # 03. Set sshd_config\n        if [[ -n \"${sshd_config_enable}\" && \"${sshd_config_enable}\" =~ ^(true|yes)$ ]]; then\n            # SSH access is enabled by default\n            ssh_config=\"etc/ssh/sshd_config\"\n            [[ -f \"${ssh_config}\" ]] && {\n                sudo sed -i \"s|^#*Port .*|Port 22|g\" ${ssh_config}\n                sudo sed -i \"s|^#*PermitRootLogin .*|PermitRootLogin yes|g\" ${ssh_config}\n                sudo sed -i \"s|^#*PasswordAuthentication .*|PasswordAuthentication yes|g\" ${ssh_config}\n                [[ -d \"var/run/sshd\" ]] || sudo mkdir -p -m0755 var/run/sshd\n                echo -e \"${INFO} 03.01 sshd_config adjusted successfully.\"\n            } || error_msg \"03.01 Failed to adjust sshd_config!\"\n\n            # Set root password to 1234\n            [[ -f \"etc/shadow\" ]] && {\n                rootnewpasswd=\"$(openssl passwd -6 \"1234\")\"\n                sudo sed -i \"s|^root:\\*|root:${rootnewpasswd}|\" etc/shadow\n                echo -e \"${INFO} 03.02 Default account adjusted successfully.\"\n            } || error_msg \"03.02 Failed to adjust root password!\"\n        else\n            echo -e \"${NOTE} 03. Skipping sshd_config adjustment.\"\n        fi\n\n        # 04. Set command colors\n        if [[ -n \"${command_colors}\" && \"${command_colors}\" =~ ^(true|yes)$ ]]; then\n            # Set terminal colors\n            [[ -f \"usr/bin/dircolors\" ]] && {\n                # Set the default color for command\n                sudo chmod +x usr/bin/dircolors\n\n                # Add color support for command and set the default prompt\n                sudo tee -a root/.bashrc >/dev/null <<'EOF'\n\n# enable color support of ls and also add handy aliases\nif [ -x /usr/bin/dircolors ]; then\n    test -r ~/.dircolors && eval \"$(dircolors -b ~/.dircolors)\" || eval \"$(dircolors -b)\"\n    alias ls='ls --color=auto'\n    alias grep='grep --color=auto'\n    alias fgrep='fgrep --color=auto'\n    alias egrep='egrep --color=auto'\nfi\n\n# Color prompt (green username@hostname + blue path)\nPS1='\\[\\e[1;32m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]\\$ '\n\nEOF\n                # Add the bashrc file to the root profile\n                sudo tee -a root/.profile >/dev/null <<'EOF'\n\nif [ -f \"$HOME/.bashrc\" ]; then\n    . \"$HOME/.bashrc\"\nfi\n\nEOF\n                echo -e \"${INFO} 04. Default color scheme adjusted successfully.\"\n            } || error_msg \"04. Failed to adjust dircolors!\"\n        else\n            echo -e \"${NOTE} 04. Skipping sshd_config adjustment.\"\n        fi\n\n        # 05. Add armbian-kernel script\n        if [[ -n \"${compile_kernel}\" && \"${compile_kernel}\" =~ ^(true|yes)$ ]]; then\n            down_script=\"https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/refs/heads/main/build-armbian/armbian-files/common-files/usr/sbin/armbian-kernel\"\n            add_script=\"usr/sbin/armbian-kernel\"\n            sudo mkdir -p usr/sbin/\n            sudo wget -q --show-progress --no-check-certificate -O ${add_script} ${down_script}\n            [[ \"${?}\" == \"0\" ]] && {\n                sudo chmod +x ${add_script}\n                sudo chown root:root ${add_script}\n                echo -e \"${INFO} 05.01. armbian-kernel script added successfully.\"\n            } || error_msg \"05.01. Failed to add armbian-kernel script!\"\n\n            # Add uInitrd generation script\n            sudo mkdir -p etc/initramfs/post-update.d/\n            sudo chown root:root etc/initramfs/post-update.d/\n            sudo tee etc/initramfs/post-update.d/99-uboot >/dev/null <<'EOF'\n#!/bin/bash -e\n\ntempname=\"/boot/uInitrd-$1\"\necho \"update-initramfs: Armbian: Converting to u-boot format: ${tempname}\" >&2\nmkimage -A arm64 -O linux -T ramdisk -C gzip -n uInitrd -d $2 $tempname\n\necho \"update-initramfs: Armbian: Symlinking ${tempname} to /boot/uInitrd\" >&2\nln -sfv $(basename $tempname) /boot/uInitrd || {\n        echo \"update-initramfs: Symlink failed, moving ${tempname} to /boot/uInitrd\" >&2\n        mv -v $tempname /boot/uInitrd\n}\n\necho \"update-initramfs: Armbian: done.\" >&2\n\nexit 0\n\nEOF\n            sudo chmod +x etc/initramfs/post-update.d/99-uboot\n            [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 05.02. uInitrd generation script added successfully.\" || error_msg \"05.02. Failed to adjust uInitrd!\"\n        else\n            echo -e \"${NOTE} 05. Skipping armbian-kernel script addition.\"\n        fi\n\n        # Compress the rootfs file\n        sudo tar -czf ${rootfs_save_name} *\n        sudo mv -f ${rootfs_save_name} ../\n        [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 06. Armbian rootfs created successfully.\" || error_msg \"06. Failed to redo rootfs!\"\n    else\n        error_msg \"02. Failed to find rootfs file!\"\n    fi\n\n    # Rename Armbian image\n    if [[ -n \"${image_file}\" ]]; then\n        cd ${image_path}/\n        mv -f ${image_file} ${image_save_name}\n        pigz -qf *.img || gzip -qf *.img\n        [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 07. Armbian image renamed successfully.\" || error_msg \"07. Failed to rename the image!\"\n    else\n        error_msg \"07. Failed to find Armbian image!\"\n    fi\n\n    # Clean up files in the image directory\n    cd ${image_path}/\n    sudo rm -rf $(ls . | grep -vE \".img.gz|.tar.gz\" | xargs) 2>/dev/null\n    #for file in *; do [[ ! -d \"${file}\" ]] && sha256sum \"${file}\" >\"${file}.sha\"; done\n    [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 08. The files in the current directory:\\n$(ls -lh .)\" || error_msg \"08. Failed to clean up!\"\n\n    # Delete Armbian build source codes and temporary files\n    cd ${build_path}/\n    sudo rm -rf $(ls . | grep -v \"^output$\" | xargs)\n    [[ \"${?}\" == \"0\" ]] && echo -e \"${INFO} 09. Armbian source code cleaned up successfully.\" || error_msg \"09. Failed to clean up!\"\n\n    cd ${current_path}/\n    sync && sleep 3\n}\n\necho -e \"${STEPS} Starting to rebuild the Armbian rootfs file...\"\necho -e \"${INFO} Current path: [ ${current_path} ]\"\n\n# Initialize variables\ninit_var \"${@}\"\n# Redo Armbian rootfs\nredo_rootfs\n\necho -e \"${SUCCESS} Armbian rootfs file rebuilt successfully.\"\n"
  },
  {
    "path": "compile-kernel/tools/script/docker/docker_startup.sh",
    "content": "#!/bin/bash\n#============================== [License Information] ===============================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Custom startup script for Armbian Docker container.\n# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian\n#\n#======================== [Container Initialization Section] ========================\n#\n# Try to start Nginx service in the background if it exists.\nstart_nginx_service() {\n    echo \"[SETUP] Checking and starting Nginx service...\"\n    if ! command -v nginx >/dev/null 2>&1; then\n        echo \"[INFO] Nginx not found, skipping.\"\n        return\n    fi\n\n    # Test Nginx configuration before trying to start it.\n    if nginx -t; then\n        echo \"[INFO] Nginx configuration test passed.\"\n        # Start Nginx in the background.\n        nginx || echo \"[WARNING] Failed to start Nginx daemon, but script will continue.\"\n    else\n        # If the configuration is bad, report it clearly and do not start.\n        echo \"[ERROR] Nginx configuration test failed! Nginx will not be started.\"\n    fi\n}\n\n# Placeholder for other tasks.\nother_initialization() {\n    echo \"[SETUP] Performing other initialization tasks...\"\n    # Add any other necessary commands here, for example:\n    # cp -rf /path/to/website_code /var/www/html/myblog\n}\n\necho \"[INIT] Container initialization started...\"\n# Start Nginx services.\nstart_nginx_service\n# Perform other setup tasks.\nother_initialization\n\n#======================== [Start the Main Foreground Process] ========================\n#\n# This command keeps the container alive. Its lifecycle is the container's lifecycle.\n# We choose sshd as the primary foreground process.\necho \"[INIT] Initialization complete. Starting main process...\"\nif command -v sshd >/dev/null 2>&1; then\n    echo \"[RUN] Starting SSHD as the main process...\"\n    # Ensure the sshd run directory exists.\n    mkdir -p /var/run/sshd\n    # Use 'exec' to replace this script with the sshd process.\n    exec /usr/sbin/sshd -D\nelse\n    # Fallback if sshd is somehow not installed.\n    echo \"[RUN] FATAL: sshd command not found.\"\n    echo \"[RUN] Starting 'tail -f /dev/null' to keep the container alive for debugging.\"\n    exec tail -f /dev/null\nfi\n"
  },
  {
    "path": "compile-kernel/tools/script/ubuntu2204-build-armbian-depends",
    "content": "acl aptly aria2 axel bc binfmt-support binutils-aarch64-linux-gnu bison bsdextrautils btrfs-progs build-essential busybox ca-certificates ccache clang coreutils cpio crossbuild-essential-arm64 cryptsetup curl debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr distcc dosfstools dwarves e2fsprogs expect f2fs-tools fakeroot fdisk file flex gawk gcc-arm-linux-gnueabi gdisk git gpg gzip imagemagick jq kmod libbison-dev libc6-dev-armhf-cross libcrypto++-dev libelf-dev libfdt-dev libfile-fcntllock-perl libfl-dev libfuse-dev libgcc-12-dev-arm64-cross libgmp3-dev liblz4-tool libmpc-dev libncurses-dev libpython3-dev libssl-dev libusb-1.0-0-dev linux-base lld llvm locales lz4 lzma lzop make mtools ncurses-base ncurses-term nfs-kernel-server ntpdate openssl p7zip p7zip-full parallel parted patchutils pbzip2 pigz pixz pkg-config pv python3 python3-dev python3-setuptools qemu-user-static rdfind rename rsync sudo swig tar tree u-boot-tools udev unzip util-linux uuid uuid-dev uuid-runtime vim wget whiptail xfsprogs xsltproc xz-utils zip zlib1g-dev zstd"
  },
  {
    "path": "compile-kernel/tools/script/ubuntu2404-build-armbian-depends",
    "content": "acl aptly aria2 axel bc binfmt-support binutils-aarch64-linux-gnu bison bsdextrautils btrfs-progs build-essential busybox ca-certificates ccache clang coreutils cpio crossbuild-essential-arm64 cryptsetup curl debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr distcc dosfstools dwarves e2fsprogs expect f2fs-tools fakeroot fdisk file flex gawk gcc-arm-linux-gnueabi gdisk git gpg gzip imagemagick jq kmod libbison-dev libc6-dev-armhf-cross libcrypto++-dev libelf-dev libfdt-dev libfile-fcntllock-perl libfl-dev libfuse-dev libgcc-12-dev-arm64-cross libgmp3-dev liblz4-tool libmpc-dev libncurses-dev libpython3-dev libssl-dev libusb-1.0-0-dev linux-base lld llvm locales lz4 lzma lzop make mtools ncurses-base ncurses-term nfs-kernel-server ntpdate openssl p7zip p7zip-full parallel parted patchutils pbzip2 pigz pixz pkg-config pv python3 python3-dev python3-setuptools qemu-user-static rdfind rename rsync sudo swig tar tree u-boot-tools udev unzip util-linux uuid uuid-dev uuid-runtime vim wget whiptail xfsprogs xsltproc xz-utils zip zlib1g-dev zstd"
  },
  {
    "path": "documents/README.cn.md",
    "content": "# Armbian 构建及使用方法\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nGitHub Actions 是 Microsoft 推出的一项服务，提供高性能的虚拟服务器环境，可用于构建、测试、打包和部署项目。公开仓库可免费无时间限制地使用，单次编译时间长达 6 小时，足以满足 Armbian 的编译需求（通常 3 小时左右即可完成编译）。本项目仅供技术交流，不足之处敬请谅解。请勿发起网络攻击或恶意使用 GitHub Actions。\n\n# 目录\n\n- [Armbian 构建及使用方法](#armbian-构建及使用方法)\n- [目录](#目录)\n  - [1. 注册自己的 Github 的账户](#1-注册自己的-github-的账户)\n  - [2. 设置隐私变量 GITHUB\\_TOKEN 等](#2-设置隐私变量-github_token-等)\n  - [3. Fork 仓库并设置工作流权限](#3-fork-仓库并设置工作流权限)\n  - [4. 个性化 Armbian 系统定制文件说明](#4-个性化-armbian-系统定制文件说明)\n  - [5. 编译系统](#5-编译系统)\n    - [5.1 手动编译](#51-手动编译)\n    - [5.2 定时编译](#52-定时编译)\n    - [5.3 自定义默认系统配置](#53-自定义默认系统配置)\n    - [5.4 使用逻辑卷扩大 Github Actions 编译空间](#54-使用逻辑卷扩大-github-actions-编译空间)\n    - [5.5 制作 Armbian Docker 镜像](#55-制作-armbian-docker-镜像)\n  - [6. 保存系统](#6-保存系统)\n  - [7. 下载系统](#7-下载系统)\n  - [8. 安装 Armbian 到 EMMC](#8-安装-armbian-到-emmc)\n    - [8.1 Amlogic 系列安装方法](#81-amlogic-系列安装方法)\n    - [8.2 Rockchip 系列安装方法](#82-rockchip-系列安装方法)\n      - [8.2.1 Radxa-Rock5B 的安装方法](#821-radxa-rock5b-的安装方法)\n        - [8.2.1.1 安装系统至 microSD](#8211-安装系统至-microsd)\n        - [8.2.1.2 安装系统至 eMMC](#8212-安装系统至-emmc)\n        - [8.2.1.3 安装系统至 NVMe](#8213-安装系统至-nvme)\n      - [8.2.2 电犀牛 R66S 的安装方法](#822-电犀牛-r66s-的安装方法)\n      - [8.2.3 电犀牛 R68S 的安装方法](#823-电犀牛-r68s-的安装方法)\n      - [8.2.4 贝壳云的安装方法](#824-贝壳云的安装方法)\n      - [8.2.5 我家云的安装方法](#825-我家云的安装方法)\n      - [8.2.6 泰山派的安装方法](#826-泰山派的安装方法)\n    - [8.3 Allwinner 系列安装方法](#83-allwinner-系列安装方法)\n    - [8.4 Docker 版本的 Armbian 安装方法](#84-docker-版本的-armbian-安装方法)\n      - [8.4.1 安装 Docker 运行环境](#841-安装-docker-运行环境)\n      - [8.4.2 设置 macvlan 网络](#842-设置-macvlan-网络)\n      - [8.4.3 运行 Armbian Docker 容器](#843-运行-armbian-docker-容器)\n  - [9. 编译 Armbian 内核](#9-编译-armbian-内核)\n    - [9.1 如何添加自定义内核补丁](#91-如何添加自定义内核补丁)\n    - [9.2 如何制作内核补丁](#92-如何制作内核补丁)\n    - [9.3 如何自定义编译驱动模块](#93-如何自定义编译驱动模块)\n  - [10. 更新 Armbian 内核](#10-更新-armbian-内核)\n  - [11. 安装常用软件](#11-安装常用软件)\n  - [12. 常见问题](#12-常见问题)\n    - [12.1 每个盒子的 dtb 和 u-boot 对应关系表](#121-每个盒子的-dtb-和-u-boot-对应关系表)\n    - [12.2 LED 屏显示控制说明](#122-led-屏显示控制说明)\n    - [12.3 如何恢复原安卓 TV 系统](#123-如何恢复原安卓-tv-系统)\n      - [12.3.1 使用 armbian-ddbr 备份恢复](#1231-使用-armbian-ddbr-备份恢复)\n      - [12.3.2 使用 Amlogic 刷机工具恢复](#1232-使用-amlogic-刷机工具恢复)\n    - [12.4 设置盒子从 USB/TF/SD 中启动](#124-设置盒子从-usbtfsd-中启动)\n      - [12.4.1 初次安装 Armbian 系统](#1241-初次安装-armbian-系统)\n      - [12.4.2 重新安装 Armbian 系统](#1242-重新安装-armbian-系统)\n    - [12.5 禁用红外接收器](#125-禁用红外接收器)\n    - [12.6 启动引导文件的选择](#126-启动引导文件的选择)\n    - [12.7 网络设置](#127-网络设置)\n      - [12.7.1 使用 interfaces 设置网络](#1271-使用-interfaces-设置网络)\n        - [12.7.1.1 由 DHCP 动态分配 IP 地址](#12711-由-dhcp-动态分配-ip-地址)\n        - [12.7.1.2 手动设置静态 IP 地址](#12712-手动设置静态-ip-地址)\n        - [12.7.1.3 在 docker 中使用 OpenWrt 建立互通网络](#12713-在-docker-中使用-openwrt-建立互通网络)\n      - [12.7.2 使用 NetworkManager 管理网络](#1272-使用-networkmanager-管理网络)\n        - [12.7.2.1 新建网络连接](#12721-新建网络连接)\n          - [12.7.2.1.1 获取网络接口名称](#127211-获取网络接口名称)\n          - [12.7.2.1.2 获取现有网络连接名称](#127212-获取现有网络连接名称)\n          - [12.7.2.1.3 新建有线网络连接](#127213-新建有线网络连接)\n          - [12.7.2.1.4 新建无线网络连接](#127214-新建无线网络连接)\n        - [12.7.2.2 修改无线网络连接中的 WiFi SSID or PASSWD](#12722-修改无线网络连接中的-wifi-ssid-or-passwd)\n        - [12.7.2.3 修改网络地址分配方式](#12723-修改网络地址分配方式)\n          - [12.7.2.3.1 静态 IP 地址 - IPv4](#127231-静态-ip-地址---ipv4)\n          - [12.7.2.3.2 DHCP 获取动态 IP 地址 - IPv4 / IPv6](#127232-dhcp-获取动态-ip-地址---ipv4--ipv6)\n        - [12.7.2.4 修改网络连接 MAC 地址](#12724-修改网络连接-mac-地址)\n          - [12.7.2.4.1 方法一：使用 `nmcli` 命令修改 MAC 地址](#127241-方法一使用-nmcli-命令修改-mac-地址)\n          - [12.7.2.4.2 方法二：通过配置文件修改 MAC 地址](#127242-方法二通过配置文件修改-mac-地址)\n        - [12.7.2.5 如何禁用 IPv6](#12725-如何禁用-ipv6)\n      - [12.7.3 如何启用无线](#1273-如何启用无线)\n      - [12.7.4 如何启用蓝牙](#1274-如何启用蓝牙)\n    - [12.8 如何添加开机启动任务](#128-如何添加开机启动任务)\n    - [12.9 如何更新系统中的服务脚本](#129-如何更新系统中的服务脚本)\n    - [12.10 如何获取 eMMC 上的安卓系统分区信息](#1210-如何获取-emmc-上的安卓系统分区信息)\n      - [12.10.1 获取分区信息](#12101-获取分区信息)\n      - [12.10.2 分区信息分享](#12102-分区信息分享)\n      - [12.10.3 分区信息解读](#12103-分区信息解读)\n      - [12.10.4 用于 eMMC 安装](#12104-用于-emmc-安装)\n    - [12.11 如何制作 u-boot 文件](#1211-如何制作-u-boot-文件)\n      - [12.11.1 如何制作 Amlogic 设备的 u-boot 文件](#12111-如何制作-amlogic-设备的-u-boot-文件)\n        - [12.11.1.1 如何提取 bootloader 和 dtb 文件](#121111-如何提取-bootloader-和-dtb-文件)\n        - [12.11.1.2 如何制作 acs.bin 文件](#121112-如何制作-acsbin-文件)\n        - [12.11.1.3 如何编译 u-boot 文件](#121113-如何编译-u-boot-文件)\n      - [12.11.2 如何制作 Rockchip 设备的 u-boot 文件](#12112-如何制作-rockchip-设备的-u-boot-文件)\n        - [12.11.2.1 如何使用 Radxa 的 u-boot 制作脚本](#121121-如何使用-radxa-的-u-boot-制作脚本)\n        - [12.11.2.2 如何使用 cm9vdA 的 u-boot 制作脚本](#121122-如何使用-cm9vda-的-u-boot-制作脚本)\n    - [12.12 内存大小识别错误](#1212-内存大小识别错误)\n    - [12.13 如何反编译 dtb 文件](#1213-如何反编译-dtb-文件)\n    - [12.14 如何修改 cmdline 设置](#1214-如何修改-cmdline-设置)\n    - [12.15 如何添加新的支持设备](#1215-如何添加新的支持设备)\n      - [12.15.1 添加设备配置文件](#12151-添加设备配置文件)\n      - [12.15.2 添加系统文件](#12152-添加系统文件)\n      - [12.15.3 添加 u-boot 文件](#12153-添加-u-boot-文件)\n        - [12.15.3.1 查看分区信息布局情况](#121531-查看分区信息布局情况)\n        - [12.15.3.2 备份关键分区](#121532-备份关键分区)\n        - [12.15.3.3 添加特殊分区写入文件](#121533-添加特殊分区写入文件)\n      - [12.15.4 添加流程控制文件](#12154-添加流程控制文件)\n    - [12.16 如何解决写入 eMMC 时 I/O 错误的问题](#1216-如何解决写入-emmc-时-io-错误的问题)\n    - [12.17 如何解决 Bullseye 版本没有声音的问题](#1217-如何解决-bullseye-版本没有声音的问题)\n    - [12.18 如何编译 boot.scr 文件](#1218-如何编译-bootscr-文件)\n    - [12.19 如何开启远程桌面和修改默认端口](#1219-如何开启远程桌面和修改默认端口)\n    - [12.20 TCP 拥塞控制优化方案](#1220-tcp-拥塞控制优化方案)\n\n## 1. 注册自己的 Github 的账户\n\n注册账户以进行后续的系统定制操作。点击 github.com 网站右上角的 `Sign up` 按钮，根据提示完成注册。\n\n## 2. 设置隐私变量 GITHUB_TOKEN 等\n\n根据 [GitHub 文档](https://docs.github.com/zh/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)，在每个工作流作业开始时，GitHub 会自动创建唯一的 `GITHUB_TOKEN` 机密以在工作流中使用。可以使用 `${{ secrets.GITHUB_TOKEN }}` 在工作流作业中进行身份验证。\n\n在 Actions 中制作 [Armbian Docker](../.github/workflows/build-armbian-arm64-docker-image.yml) 镜像并推送到 Docker Hub 时，需要设置 `DOCKERHUB_USERNAME` 和 `DOCKERHUB_PASSWORD` 两个隐私变量。在自己的仓库页面，点击右上角的 `Settings` > `Secrets and variables` > `Actions` > `Repository secrets` > `New repository secret` 按钮，添加如下两个隐私变量：\n\n- 变量名 `DOCKERHUB_USERNAME`：值是登录 Docker Hub 的用户名\n- 变量名 `DOCKERHUB_PASSWORD`：值是登录 Docker Hub 的密码\n\n## 3. Fork 仓库并设置工作流权限\n\n打开仓库 https://github.com/ophub/amlogic-s9xxx-armbian ，点击右上角的 Fork 按钮，将仓库代码复制到自己的账户下。Fork 完成后，访问自己账户中的 amlogic-s9xxx-armbian 仓库，在右上角的 `Settings` > `Actions` > `General` > `Workflow permissions` 下选择 `Read and write permissions` 并保存。操作示意如下：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/167585338-841d3b05-8d98-4d73-ba72-475aad4a95a9.png width=\"300\" />\n</div>\n\n## 4. 个性化 Armbian 系统定制文件说明\n\n系统编译流程由 [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) 文件控制，workflows 目录下的其他 .yml 文件用于实现不同功能。编译时采用 Armbian 官方的最新代码进行实时编译，相关参数请参阅官方文档。\n\n```yaml\n- name: Compile Armbian [ ${{ inputs.set_release }} ]\n  id: compile\n  if: ${{ steps.down.outputs.status }} == 'success' && !cancelled()\n  run: |\n    # Compile method and parameter description: https://docs.armbian.com/Developer-Guide_Build-Options\n    cd build/\n        ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=odroidn2 BRANCH=current BUILD_MINIMAL=no \\\n                      BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \\\n                      COMPRESS_OUTPUTIMAGE=\"sha\" SHARE_LOG=yes\n    echo \"status=success\" >> ${GITHUB_OUTPUT}\n```\n\n使用 `ophub` 打包 Armbian 时，可通过 `armbian_files` 参数将自定义文件添加或覆盖至 ophub 的 [common-files](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/armbian-files/common-files) 目录。目录结构必须与 Armbian 根目录保持一致，以确保文件被正确覆盖到固件中（例如：默认配置文件应存放于 `etc/default/` 子目录下）。示例如下：\n\n```yaml\n- name: Rebuild Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img.gz\n    armbian_files: files\n    ...\n```\n\n## 5. 编译系统\n\n系统编译支持多种方式，包括手动编译、定时编译以及特定事件触发编译。\n\n### 5.1 手动编译\n\n在仓库导航栏中点击 Actions，依次点击 Build armbian > Run workflow > Run workflow 即可开始编译。全部流程约需 3 小时。操作示意如下：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163203938-e7762b09-e6b8-4cf5-b1f1-9c67c1a29953.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204044-9c7a7429-47ee-4fce-b7dd-e217bebf6133.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204127-6b16b558-7e78-4c22-a28a-7b37b5a34fa3.png width=\"300\" />\n</div>\n\n### 5.2 定时编译\n\n在 [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) 文件里，使用 Cron 设置定时编译，5 个不同位置分别代表的意思为 分钟 (0 - 59) / 小时 (0 - 23) / 日期 (1 - 31) / 月份 (1 - 12) / 星期几 (0 - 6)(星期日 - 星期六)。通过修改不同位置的数值来设定时间。系统默认使用 UTC 标准时间，请根据你所在国家时区的不同进行换算。\n\n```yaml\nschedule:\n  - cron: '0 17 * * *'\n```\n\n### 5.3 自定义默认系统配置\n\n默认系统配置信息记录在 [model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) 文件中，`BOARD` 名称必须唯一。\n\n其中 `BUILD` 值为 `yes` 的是默认构建的设备，这些设备可直接使用对应系统。默认值为 `no` 的设备未包含在默认构建中，使用时需下载相同 `FAMILY` 的已构建系统。写入 `USB` 后，在电脑上打开 `USB 中的 boot 分区`，修改 `/boot/uEnv.txt` 文件中的 `FDT dtb 名称`，即可适配列表中的其他设备。\n\n本地编译时通过 `-b` 参数指定，GitHub Actions 编译时通过 `armbian_board` 参数指定。`-b all` 表示构建所有 `BUILD` 为 `yes` 的设备。指定 `BOARD` 参数时，无论 `BUILD` 值为 `yes` 或 `no` 均可构建，例如：`-b r68s_s905x3-tx3_s905l3a-cm311`\n\n### 5.4 使用逻辑卷扩大 Github Actions 编译空间\n\nGitHub Actions 默认编译空间为 84G，去除系统和必要软件包后可用空间约 50G。编译全部固件时可能遇到空间不足的问题，可通过逻辑卷将编译空间扩大至约 110G。参照 [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) 文件中的方法，使用以下命令创建逻辑卷，并在编译时使用逻辑卷路径。\n\n```yaml\n- name: Create simulated physical disk\n  run: |\n    mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n    root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n    sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n    sudo truncate -s \"${root_size}\"G /root.img\n    sudo losetup /dev/loop6 /mnt/mnt.img\n    sudo losetup /dev/loop7 /root.img\n    sudo pvcreate /dev/loop6\n    sudo pvcreate /dev/loop7\n    sudo vgcreate github /dev/loop6 /dev/loop7\n    sudo lvcreate -n runner -l 100%FREE github\n    sudo mkfs.xfs /dev/github/runner\n    sudo mkdir -p /builder\n    sudo mount /dev/github/runner /builder\n    sudo chown -R runner.runner /builder\n    df -Th\n```\n\n### 5.5 制作 Armbian Docker 镜像\n\nArmbian 系统 [Docker](https://hub.docker.com/u/ophub) 镜像的制作方法请参考 [armbian_docker](../compile-kernel/tools/script/docker) 制作脚本。\n\n## 6. 保存系统\n\n系统保存设置同样在 [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) 文件中控制。编译完成的系统将通过脚本自动上传至 GitHub 官方的 Releases。\n\n```yaml\n- name: Upload Armbian image to Release\n  uses: ncipollo/release-action@main\n  if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()\n  with:\n    tag: Armbian_${{ env.ARMBIAN_RELEASE }}_${{ env.PACKAGED_OUTPUTDATE }}\n    artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n    allowUpdates: true\n    token: ${{ secrets.GITHUB_TOKEN }}\n    body: |\n      These are the Armbian OS image\n      * OS information\n      Default username: root\n      Default password: 1234\n      Install command: armbian-install\n      Update command: armbian-update\n```\n\n## 7. 下载系统\n\n从仓库首页右下角的 Release 版块进入，选择与自身设备型号对应的系统。操作示意如下：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163204798-0d98524c-73df-4876-8912-fcae2845fbba.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204879-4898babf-fa00-4e63-89ea-235129e2ce1d.png width=\"300\" />\n</div>\n\n## 8. 安装 Armbian 到 EMMC\n\nAmlogic、Rockchip 和 Allwinner 的安装方法各不相同。不同设备支持不同的存储介质，包括外置 microSD 卡、eMMC 和 NVMe 等，以下按设备类型分别介绍安装方法。首先从 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 下载对应设备的 Armbian 系统，解压为 .img 格式备用，然后根据设备类型参照以下相应章节进行安装。\n\n安装完成后，将设备接入`路由器`，开机约 `2 分钟`后，在路由器中查找设备名称为 Armbian 的 `IP` 地址，使用 `SSH` 工具连接即可进行管理配置。默认用户名为 `root`，默认密码为 `1234`，默认端口为 `22`\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972715-addcd695-970a-43d6-8a34-24a9c4bc80a2.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972773-fc9e9ef9-69a7-4279-8329-6fad1cf2f5b9.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972818-b72e18cd-17d1-4f9f-a0fa-b6c22eef041d.png width=\"600\" />\n</div>\n\n### 8.1 Amlogic 系列安装方法\n\n登录 Armbian 系统 (默认用户: root, 默认密码: 1234) → 输入命令：\n\n```shell\narmbian-install\n```\n\n| 可选参数  | 默认值   | 选项     | 说明                |\n| -------  | ------- | ------  | -----------------   |\n| -m       | no      | yes/no  | 使用 Mainline u-boot |\n| -a       | yes     | yes/no  | 使用 [ampart](https://github.com/7Ji/ampart) 分区表调整工具 |\n| -l       | no      | yes/no  | List. 显示全部设备列表 |\n\n举例: `armbian-install -m yes -a no`\n\n### 8.2 Rockchip 系列安装方法\n\n各设备的安装方法如下。\n\n#### 8.2.1 Radxa-Rock5B 的安装方法\n\nRadxa-Rock5B 支持 microSD/eMMC/NVMe 等多种存储介质，安装方法因介质而异。下载 [rk3588_spl_loader_v1.08.111.bin 和 spi_image.img](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/rock5b) 文件备用。下载 [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/Radxa_rock5b_RKDevTool_Release_v2.96__DriverAssitant_v5.1.1.tar.gz) 工具及驱动备用。下载 [Rufus](https://rufus.ie/) 或者 [balenaEtcher](https://www.balena.io/etcher/) 写盘工具备用。\n\n##### 8.2.1.1 安装系统至 microSD\n\n使用 Rufus 或 balenaEtcher 等工具将 Armbian 系统镜像写入 microSD，然后将 microSD 插入设备即可使用。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972996-300f223b-f6f6-48af-86ca-bdc842e5017d.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202973216-85b1a21b-0763-4a36-8c57-84490e071fdd.png width=\"600\" />\n</div>\n\n##### 8.2.1.2 安装系统至 eMMC\n\n使用 microSD 卡安装：将 Armbian 系统镜像写入 microSD 卡，将 microSD 卡插入设备并启动，上传 `armbian.img` 镜像文件到 microSD 卡，使用 `dd` 命令将 Armbian 镜像写入 NVMe，命令如下：\n\n```Shell\ndd if=armbian.img  of=/dev/mmcblk1  bs=1M status=progress\n```\n\n- 使用 USB 转 eMMC 读卡器安装：将 eMMC 模块与电脑连接，使用 Rufus 或 balenaEtcher 等工具将 Armbian 系统镜像写入 eMMC，然后将 eMMC 插入设备即可使用。\n- 使用 Maskrom 模式安装：关闭开发板电源。按住金色按钮。将 USB-A 转 C 型电缆插入 ROCK 5B C 型端口，另一端插入 PC。松开金色按钮。检查 USB 设备提示找到一个 MASKROM 设备。右键单击列表的空白区域，然后选择加载 `rock-5b-emmc.cfg` 配置文件（配置文件和 RKDevTool 在同一个目录下）。将 `rk3588_spl_loader_v1.08.111.bin` 和 `Armbian.img` 按下图所示设置，选择写入即可。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954901-c829d74d-c75a-4fd3-9bd0-aa3cdf2b77b4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954998-c08514e2-8760-4c0f-b5f7-0d30be635aa5.png width=\"600\" />\n</div>\n\n##### 8.2.1.3 安装系统至 NVMe\n\nROCK-5B 主板配备 SPI 闪存，将引导加载程序写入 SPI 闪存后，可支持 SoC maskrom 模式不直接支持的启动介质（如 SATA、USB3 或 NVMe）。使用 NVMe 启动前需先写入 SPI 文件，方法如下：\n\n关闭开发板电源，移除 MicroSD 卡、eMMC 模块等可启动设备。按住金色（或部分修订版上的银色）按钮，将 USB-A 转 Type-C 线缆插入 ROCK-5B 的 Type-C 端口，另一端插入 PC。松开按钮，检查 USB 设备是否发现 MASKROM 设备。在列表框中右键选择加载配置，在资源管理器中选择配置文件（配置文件和 RKDevTool 在同一目录下），根据下图选择 `rk3588_spl_loader_v1.08.111.bin` 和 `spi_image.img` 文件，点击写入即可，如下图所示：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961420-8316c96c-2796-43ed-b5ed-2fa5bfa1ddff.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961447-49c0941a-e233-4b2a-b96b-b47636ce3cf2.png width=\"600\" />\n</div>\n\n- 使用读卡器安装：将 M.2 NVMe SSD 插入 M.2 NVMe SSD 转 USB3.0 读卡器以连接到主机。使用 Rufus 或 balenaEtcher 等工具将 Armbian 系统镜像写入 NVMe，然后将 NVMe 插入设备即可使用。\n- 使用 microSD 卡安装：将 Armbian 系统镜像写入 microSD 卡，将 microSD 卡插入设备并启动，上传 `armbian.img` 镜像文件到 microSD 卡，使用 `dd` 命令将 Armbian 镜像写入 NVMe 中，命令如下：\n\n```Shell\ndd if=armbian.img  of=/dev/nvme0n1  bs=1M status=progress\n```\n\n#### 8.2.2 电犀牛 R66S 的安装方法\n\n使用 Rufus 或 balenaEtcher 等工具将 Armbian 系统镜像写入 microSD，然后将 microSD 插入设备即可使用。\n\n#### 8.2.3 电犀牛 R68S 的安装方法\n\n- 下载 [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) 工具及驱动，解压并安装 DriverAssitant 驱动程序，打开 RKDevTool 工具备用。\n- R68s 在关机状态下，先插入 USB 双公头线，然后按住 Recovery 键并插上 12V 电源，两秒之后松开 Recovery 键，刷机工具会`发现一个 LOADER 设备`。\n- 在 RKDevTool 工具操作界面的空白处点右键，添加项。\n- 地址是 `0x00000000`，名字是 `armbian`，路径点击右侧选择 `armbian.img` 系统文件。\n- 选择添加的 armbian 一行外，`取消其他行的选择`，点击`执行`写入即可。\n- 补充说明：如果 eMMC 中写入了其他系统，请先在高级功能里擦除，再写入 Armbian 系统。如果无法擦除，先重新写入一次 `MiniLoaderAll.bin` 引导文件，然后再次进入 `MASKROM` 写入 Armbian 系统。MiniLoaderAll.bin 引导文件设置：地址 `0xCCCCCCCC`, 名字 `Loader`, 路径选择 RKDevTool 刷机工具 Image 目录下的 `MiniLoaderAll.bin` 文件。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202970301-d798677b-e875-4971-ac8f-ee58b2a1e686.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970405-cb68cb78-cd0f-43ee-b807-5e594ab73099.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970488-5f18c574-c11f-486f-8fe8-002f3ba2f3f4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970577-87549acf-b98b-441f-bb31-e4fd6608108d.png width=\"600\" />\n</div>\n\n#### 8.2.4 贝壳云的安装方法\n\n方法转载自 [milton](https://www.cnblogs.com/milton/p/15391525.html) 的教程。刷机需要进入 Maskrom 模式。先断开所有连接，通过短接 CLK 和 GND（使用 TTL 的 GND, 或者旁边小按钮的 GND 均可）这两个触点，然后将 USB 连接到 PC 就会检测到 MASKROM 设备了。短接点位置如下：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202977817-fb12d291-47e2-47e4-88c3-e21f9ae57922.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202977900-50b4770d-8444-42a0-8478-3234043455bd.png width=\"600\" />\n</div>\n\n打开 RKDevTool 刷机工具，右键添加项。\n\n- 地址 `0xCCCCCCCC`, 名字 `Boot`, 路径[选择](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/beikeyun) `rk3328_loader_v1.14.249.bin`。\n- 地址 `0x00000000`, 名字 `system`, 路径选择要刷的 `Armbian.img` 系统。\n- 勾选`强制按地址写入`，点`执行`，等右侧下载面板显示进度完成即可。\n\n#### 8.2.5 我家云的安装方法\n\n方法转载自 [cc747](https://post.smzdm.com/p/a4wkdo7l/) 的教程。刷机需要进入 Maskrom 模式。确保设备处于断电状态，拔掉所有线缆。用 USB 双公头线，一头插入我家云的 USB2.0 接口，一头插入电脑。用回形针插入 Reset 孔并按住不松开。插入电源线，等待数秒，直到 RKDevTool 下方出现`发现一个LOADER设备`后松开回形针。将 RKDevTool 切换到`高级功能`点击`进入Maskrom`按钮，提示`发现一个MASKROM设备`。右键添加项。\n\n- 地址 `0xCCCCCCCC`, 名字 `Boot`, 路径[选择](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/chainedbox) `rk3328_loader_v1.14.249.bin`。\n- 地址 `0x00000000`, 名字 `system`, 路径选择要刷的 `Armbian.img` 系统。\n- 勾选`强制按地址写入`，点`执行`，等右侧下载面板显示进度完成即可。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a6d2d8c0-35c5-44ba-be35-fd2e2758729b width=\"600\" /><br />\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/13aab016-1b93-4ff1-b1ef-c202bd357068 width=\"600\" />\n</div>\n\n#### 8.2.6 泰山派的安装方法\n- 下载 [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) 工具及驱动，解压并安装 DriverAssitant 驱动程序，打开 RKDevTool 工具。(注意，请使用2.86版本工具而不是2.92，2.92版本刷入时会闪退)\n- 泰山派关机状态下按住 Recovery 键后插入type-c数据线，待 RKDevTool 提示`发现一个 LOADER 设备`后松开 Recovery 键。右键添加项。\n- 地址 `0x00000000`, 名字 `system`, 路径选择要刷的 `Armbian.img` 系统。\n- 点击执行，等待进度条完成即可\n\n\n### 8.3 Allwinner 系列安装方法\n\n登录 Armbian 系统 (默认用户: root, 默认密码: 1234) → 输入命令：\n\n```shell\narmbian-install\n```\n\n### 8.4 Docker 版本的 Armbian 安装方法\n\n可以在 Ubuntu/Debian/Armbian 系统中使用 Docker 版本的 Armbian 镜像。这些镜像托管在 [Docker Hub](https://hub.docker.com/r/ophub) 上，可以直接下载使用。\n\n提供了四个不同内核版本的 Armbian Docker 镜像：`armbian-trixie`，`armbian-bookworm`，`armbian-noble`，`armbian-resolute`。每个版本均提供 `arm64` 和 `amd64` 架构，可根据需要选择。\n\n其中 armbian-trixie 基于 debian13，armbian-bookworm 基于 debian12，armbian-noble 基于 ubuntu24.04，armbian-resolute 基于 ubuntu26.04。\n\narm64 版本适用于 Amlogic/Rockchip/Allwinner 等平台架构的设备，amd64 版本适用于 x86_64 架构的电脑和服务器。\n\n#### 8.4.1 安装 Docker 运行环境\n\n```shell\ncurl -fsSL https://get.docker.com | sh\nsudo usermod -aG docker $USER\nsudo newgrp docker\n```\n\n#### 8.4.2 设置 macvlan 网络\n\n```shell\n# 查看已有的 docker 网络是否包含 macvlan 网络\ndocker network ls\n\n# 如果没有 macvlan 网络，则创建 macvlan 网络\n# 其中的网段、网关和网卡名称根据自己的实际网络修改\ndocker network create -d macvlan \\\n    --subnet=10.1.1.0/24 \\\n    --gateway=10.1.1.1 \\\n    -o parent=eth0 \\\n    macvlan\n```\n\n#### 8.4.3 运行 Armbian Docker 容器\n\n以 `armbian-trixie:arm64` 镜像为例，说明如何运行 Armbian 容器。\n\n```shell\n# 以后台方式运行 Armbian 容器\n# 其中的容器名称，IP 地址，镜像版本等根据自己的实际情况修改\ndocker run -itd --name=armbian-trixie \\\n    --privileged \\\n    --network macvlan \\\n    --ip 10.1.1.15 \\\n    --hostname=armbian-trixie \\\n    -e TZ=Asia/Shanghai \\\n    --restart unless-stopped \\\n    ophub/armbian-trixie:arm64\n\n# 查看 Armbian 容器日志\ndocker logs -f armbian-trixie\n\n# 进入 Armbian 容器\ndocker exec -it armbian-trixie bash\n\n# 退出 Armbian 容器\nexit\n\n# 停止并删除 Armbian 容器\ndocker rm -f armbian-trixie\n```\n\n## 9. 编译 Armbian 内核\n\n支持在 Ubuntu、Debian 或 Armbian 系统中编译内核，同时支持本地编译和 GitHub Actions 云编译，具体方法详见 [内核编译说明](../../compile-kernel/README.cn.md)。\n\n### 9.1 如何添加自定义内核补丁\n\n当内核补丁目录 [tools/patch](../../compile-kernel/tools/patch) 中有通用内核补丁目录（`common-kernel-patches`），或者有 `与内核源码库同名` 的目录时（例如 [linux-5.15.y](https://github.com/unifreq/linux-5.15.y)），可以使用 `-p true` 自动应用内核补丁。补丁目录的命名规范如下：\n\n```shell\n~/amlogic-s9xxx-armbian\n    └── compile-kernel\n        └── tools\n            └── patch\n                ├── common-kernel-patches  # 固定目录名：存放各版本都通用的内核补丁\n                ├── linux-5.15.y           # 与内核源码库同名：存放专用补丁\n                ├── linux-6.1.y\n                ├── linux-5.10.y-rk35xx\n                └── more kernel directory...\n```\n\n- 在本地编译内核时，可以手动创建相应目录，添加对应的自定义内核补丁。\n- 在 GitHub Actions 云编译时，可通过 `kernel_patch` 参数指定内核补丁在仓库中的目录，例如 [kernel](https://github.com/ophub/kernel) 仓库中 [compile-beta-kernel.yml](https://github.com/ophub/kernel/blob/main/.github/workflows/compile-beta-kernel.yml) 的使用方法：\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 5.15.1_6.1.1\n    kernel_auto: true\n    kernel_patch: kernel-patch/beta\n    auto_patch: true\n```\n\n当使用 `kernel_patch` 参数指定自定义内核补丁时，补丁目录请参照上述规范进行命名。\n\n### 9.2 如何制作内核补丁\n\n- 从 [Armbian](https://github.com/armbian/build) 和 [OpenWrt](https://github.com/openwrt/openwrt) 等仓库获取：例如 [armbian/patch/kernel](https://github.com/armbian/build/tree/main/patch/kernel/archive) 和 [openwrt/rockchip/patches-6.1](https://github.com/openwrt/openwrt/tree/main/target/linux/rockchip/patches-6.1)，[lede/rockchip/patches-5.15](https://github.com/coolsnowwolf/lede/tree/master/target/linux/rockchip/patches-5.15) 等，这些基于主线内核的仓库中的补丁通常可直接使用。\n- 从 github.com 仓库的 commits 中获取：在对应的 `commit` 地址后添加 `.patch` 后缀即可生成补丁。\n\n添加自定义内核补丁前，需先与上游内核源码仓库 [unifreq/linux-k.x.y](https://github.com/unifreq) 进行比对，确认该补丁尚未被合入，以避免冲突。通过测试的内核补丁，建议向 unifreq 维护的系列内核仓库提交。社区的每一份贡献，都将使 Armbian 和 OpenWrt 系统更加稳定可靠。\n\n### 9.3 如何自定义编译驱动模块\n\nLinux 主线内核中部分驱动尚未内置，可自行编译驱动模块。请选择支持主线内核的驱动，安卓驱动通常不兼容主线内核，无法编译。示例如下：\n\n```shell\n# 第一步，更新最新内核\n# 由于早期的 header 文件不全，所以需要更新到最新的内核。\n# 各内核版本要求不低于 5.10.222, 5.15.163, 6.1.100, 6.6.41。\narmbian-sync\narmbian-update -k 6.1\n\n\n# 第二步，安装编译工具\nmkdir -p /usr/local/toolchain\ncd /usr/local/toolchain\n# 下载编译工具\nwget https://github.com/ophub/kernel/releases/download/dev/arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# 解压\ntar -Jxf arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# 安装其他编译依赖包（可选项，可根据错误提示手动安装缺少项）\narmbian-kernel -u\n\n\n# 第三步，下载驱动，编译\n# 下载驱动源码\ncd ~/\ngit clone https://github.com/jwrdegoede/rtl8189ES_linux\ncd rtl8189ES_linux\n# 设置编译环境\ngun_file=\"arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\"\ntoolchain_path=\"/usr/local/toolchain\"\ntoolchain_name=\"gcc\"\nexport CROSS_COMPILE=\"${toolchain_path}/${gun_file//.tar.xz/}/bin/aarch64-none-linux-gnu-\"\nexport CC=\"${CROSS_COMPILE}gcc\"\nexport LD=\"${CROSS_COMPILE}ld.bfd\"\nexport ARCH=\"arm64\"\nexport KSRC=/usr/lib/modules/$(uname -r)/build\n# 根据源码的实际路径设置 M 变量\nexport M=\"/root/rtl8189ES_linux\"\n# 编译驱动\nmake\n\n\n# 第四步，安装驱动\nsudo cp -f 8189es.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/\n# 更新模块依赖关系\nsudo depmod -a\n# 加载驱动模块\nsudo modprobe 8189es\n# 检查驱动是否加载成功\nlsmod | grep 8189es\n# 可以看到成功加载驱动\n8189es               1843200  0\ncfg80211              917504  2 8189es,brcmfmac\n```\n\n图示如下：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a89cbe6-df38-4862-8d11-9d977e0f4191\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a1d0bb9-44d4-4de5-9907-47e5f20747a7\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1bd2eff-4c57-4e91-a870-08b0f8b1fe16\">\n</div>\n\n## 10. 更新 Armbian 内核\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\n# 使用 root 用户运行 (sudo -i)\n# 如果不指定参数，将更新为最新版本。\narmbian-update\n```\n\n| 可选参数  | 默认值        | 选项           | 说明                              |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r       | ophub/kernel | `<owner>/<repo>` | 设置从 github.com 下载内核的仓库  |\n| -u       | 自动化        | stable/flippy/beta/rk3588/rk35xx/h6 | 设置使用的内核的 [tags 后缀](https://github.com/ophub/kernel/releases) |\n| -k       | 最新版        | 内核版本       | 设置[内核版本](https://github.com/ophub/kernel/releases/tag/kernel_stable)  |\n| -b       | yes          | yes/no        | 更新内核时自动备份当前系统使用的内核    |\n| -d       | deb          | tar/deb       | 设置优先使用的内核包格式。若指定格式不存在，脚本将自动尝试另一种格式。如需编译自定义驱动推荐选择 `deb` 格式。 |\n| -m       | no           | yes/no        | 使用主线 u-boot                    |\n| -s       | 无           | 无/磁盘名称     | [SOS] 恢复 eMMC/NVMe/sdX 等磁盘中的系统内核 |\n| -h       | 无           | 无             | 查看使用帮助                       |\n\n举例: `armbian-update -k 5.15 -u stable -d deb`\n\n通过 `-k` 参数指定内核版本号时，既可精确指定版本号（如 `armbian-update -k 5.15.50`），也可指定内核系列（如 `armbian-update -k 5.15`），指定系列时将自动使用该系列的最新版本。\n\n更新内核时将自动备份当前使用的内核至 `/ddbr/backup` 目录，保留最近 3 个版本。若新内核不稳定，可随时恢复至备份版本：\n```shell\n# 进入备份的内核目录，如 6.6.12\ncd /ddbr/backup/6.6.12\n# 执行更新内核命令，会自动安装当前目录下的内核\narmbian-update\n```\n\n[SOS]：当因异常情况导致更新不完整、系统无法从 eMMC/NVMe/sdX 启动时，可从 USB 等其他磁盘启动任意版本的 Armbian 系统，然后运行 `armbian-update -s` 命令将 USB 中的系统内核恢复至 eMMC/NVMe/sdX，实现系统救援。不指定磁盘参数时，默认从 USB 设备恢复 eMMC/NVMe/sdX 中的内核。若设备有多个磁盘，可精确指定目标磁盘名称，示例如下：\n\n```shell\n# 恢复 eMMC 中的内核\narmbian-update -s mmcblk1\n# 恢复 NVMe 中的内核\narmbian-update -s nvme0n1\n# 恢复移动存储设备中的内核\narmbian-update -s sda\n# 磁盘名称可以简写为 mmcblk0/mmcblk1/nvme0n1/nvme1n1/sda/sdb/sdc 等，也可以使用完整的名称，如 /dev/sda\narmbian-update -s /dev/sda\n# 当设备只有 eMMC/NVMe/sdX 中的一个内置存储时，可以省略磁盘名称参数\narmbian-update -s\n```\n\n如果您因网络问题无法访问 github.com 进行在线更新，可以手动下载内核文件并上传至 Armbian 系统的任意目录。随后进入该目录，运行 `armbian-update` 命令即可执行本地安装。若当前目录下存在完整的内核文件集，系统将优先使用本地文件进行更新。内核支持 `tar` 和 `deb` 两种格式，各自所需的 4 个核心文件如下：\n\n- `tar` 格式更新所需的 4 个文件为：`header-xxx.tar.gz`，`boot-xxx.tar.gz`，`dtb-xxx.tar.gz`，`modules-xxx.tar.gz`。\n- `deb` 格式更新所需的 4 个文件为：`linux-image-xxx.deb`，`linux-dtb-xxx.deb`，`linux-headers-xxx.deb`，`linux-libc-dev-xxx.deb`。\n- 无需移除其他无关的内核文件，即使它们同时存在也不会影响更新，系统能够精准识别所需文件。在设备支持的内核范围内，您可以自由切换版本，例如从 6.6.12 内核变更为 5.15.50 内核。\n\n通过 `-r`/`-u`/`-b`/`-d` 等参数设置的自定义选项，可固化至配置文件 `/etc/ophub-release` 的相关参数中，无需每次手动输入。对应设置为：\n\n```shell\n# 自定义修改参数的赋值\n-r  :  KERNEL_REPO='ophub/kernel'\n-u  :  KERNEL_TAGS='stable'\n-b  :  KERNEL_BACKUP='yes'\n-d  :  DOWNLOAD_TYPE='deb'\n```\n\n## 11. 安装常用软件\n\n登录 Armbian 系统 → 输入命令：\n\n```shell\narmbian-software\n```\n\n使用 `armbian-software -u` 命令可更新本地软件中心列表。根据用户在 [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中的反馈，逐步整合常用[软件](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf)，支持一键安装、更新和卸载。包括 `docker 镜像`、`桌面软件`、`应用服务` 等。详见更多[说明](armbian_software.md)。\n\n根据所在国家或地区，使用 `armbian-apt` 命令选择合适的软件源以提高下载速度。例如，选择中国的清华大学源：\n\n```shell\narmbian-apt\n\n[ STEPS ] Welcome to the Armbian source change script.\n[ INFO ] Please select a [ bookworm ] mirror site.\n  ┌──────┬───────────────────┬────────────────────────────────┐\n  │  ID  │  Country/Region   │  Mirror Site                   │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   0  │  -                │  Restore default source        │\n  │   1  │  China            │  mirrors.tuna.tsinghua.edu.cn  │\n  │   2  │  China            │  mirrors.bfsu.edu.cn           │\n  │   3  │  China            │  mirrors.aliyun.com            │\n  │   4  │  Hongkong, China  │  mirrors.xtom.hk               │\n  │   5  │  Taiwan, China    │  opensource.nchc.org.tw        │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   6  │  United States    │  mirrors.ocf.berkeley.edu      │\n  │   7  │  United States    │  mirrors.xtom.com              │\n  │   8  │  United States    │  mirrors.mit.edu               │\n  │   9  │  Canada           │  mirror.csclub.uwaterloo.ca    │\n  │  10  │  Canada           │  muug.ca/mirror                │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  11  │  Finland          │  mirror.kumi.systems           │\n  │  12  │  Netherlands      │  mirrors.xtom.nl               │\n  │  13  │  Germany          │  mirrors.xtom.de               │\n  │  14  │  Russia           │  mirror.yandex.ru              │\n  │  15  │  India            │  in.mirror.coganng.com         │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  16  │  Estonia          │  mirrors.xtom.ee               │\n  │  17  │  Australia        │  mirrors.xtom.au               │\n  │  18  │  South Korea      │  mirror.yuki.net.uk            │\n  │  19  │  Singapore        │  mirror.sg.gs                  │\n  │  20  │  Japan            │  mirrors.xtom.jp               │\n  └──────┴───────────────────┴────────────────────────────────┘\n[ OPTIONS ] Please Input ID: 1\n[ INFO ] Your selected source ID is: [ 1 ]\n[ STEPS ] Start to change the source of the system: [ mirrors.tuna.tsinghua.edu.cn ]\n[ INFO ] The system release is: [ bookworm ]\n[ SUCCESS ] Change the source of the system successfully.\n```\n\n## 12. 常见问题\n\n以下汇总了使用 Armbian 过程中可能遇到的常见问题。\n\n### 12.1 每个盒子的 dtb 和 u-boot 对应关系表\n\n支持的设备列表位于 Armbian 系统的配置文件 [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf)。\n\n### 12.2 LED 屏显示控制说明\n\n请查阅[说明](led_screen_display_control.md)\n\n### 12.3 如何恢复原安卓 TV 系统\n\n通常使用 `armbian-ddbr` 对设备的安卓 TV 系统进行备份和恢复。\n\n此外，也可通过线刷方式将安卓系统写入 eMMC。安卓系统镜像可在 [Tools](https://github.com/ophub/kernel/releases/tag/tools) 中查找。\n\n#### 12.3.1 使用 armbian-ddbr 备份恢复\n\n建议在安装 Armbian 系统前，先备份设备原有的安卓 TV 系统，以便后续需要时恢复。从 `TF/SD/USB` 启动 Armbian 系统后，输入 `armbian-ddbr` 命令，根据提示输入 `b` 执行备份，备份文件存放路径为 `/ddbr/BACKUP-arm-64-emmc.img.gz`，请妥善保存。需要恢复时，将备份文件上传至 `TF/SD/USB` 设备的相同路径，输入 `armbian-ddbr` 命令，根据提示输入 `r` 执行恢复。\n\n#### 12.3.2 使用 Amlogic 刷机工具恢复\n\n- 通常情况下，重新接入电源后若能从 USB 启动，重新安装即可，可多次尝试。\n\n- 若接入显示器后屏幕黑屏且无法从 USB 启动，则需对设备进行短接初始化。先将设备恢复至原安卓系统，再重新刷入 Armbian。首先下载并安装 [amlogic_usb_burning_tool](https://github.com/ophub/kernel/releases/tag/tools) 系统恢复工具。准备一条 [USB 双公头数据线](https://user-images.githubusercontent.com/68696949/159267576-74ad69a5-b6fc-489d-b1a6-0f8f8ff28634.png)，准备一个 [曲别针](https://user-images.githubusercontent.com/68696949/159267790-38cf4681-6827-4cb6-86b2-19c7f1943342.png)。\n\n- 以 x96max+ 为例，确认主板上[短接点](https://user-images.githubusercontent.com/68696949/110590933-67785300-81b3-11eb-9860-986ef35dca7d.jpg)的位置，下载设备的 [Android TV 系统包](https://github.com/ophub/kernel/releases/tag/tools)。其他常见设备的安卓 TV 系统及对应短接点示意图也可在此[下载查看](https://github.com/ophub/kernel/releases/tag/tools)。\n\n```shell\n操作方法：\n\n1. 打开刷机软件 USB Burning Tool:\n   [ 文件 → 导入系统包 ]: X96Max_Plus2_20191213-1457_ATV9_davietPDA_v1.5.img\n   [ 选择 ]：擦除 flash\n   [ 选择 ]：擦除 bootloader\n   点击 [ 开始 ] 按钮\n2. 使用 [ 曲别针 ] 将盒子主板上的 [ 两个短接点进行短接连接 ]，\n   并同时使用 [ USB 双公头数据线 ] 将 [ 盒子 ] 与 [ 电脑 ] 进行连接。\n3. 当看到 [ 进度条开始走动 ] 后，拿走曲别针，不再短接。\n4. 当看到 [ 进度条 100% ], 则刷机完成，盒子已经恢复成 Android TV 系统。\n   点击 [ 停止 ] 按钮, 拔掉 [ 盒子 ] 和 [ 电脑 ] 之间的 [ USB 双公头数据线] 。\n5. 如果以上某个步骤失败，就再来一次，直至成功。\n   如果进度条没有走动，可以尝试插入电源。通常情况下不用电源支持供电，只 USB 双公头的供电即可满足刷机要求。\n```\n\n恢复出厂设置完成后，设备已还原为 Android TV 系统。后续安装 Armbian 的操作与首次安装相同，按原流程操作即可。\n\n### 12.4 设置盒子从 USB/TF/SD 中启动\n\n根据实际情况，选择初次安装或重新安装 Armbian 系统的对应方法。\n\n#### 12.4.1 初次安装 Armbian 系统\n\n- 将写好系统的 USB/TF/SD 插入设备。\n- 开启开发者模式: 设置 → 关于本机 → 版本号 (如: X96max plus...), 快速点击版本号 5 次，直到系统显示 `开启开发者模式` 提示。\n- 开启 USB 调试模式: 系统 → 高级选项 → 开发者选项 (设置 `开启USB调试` 为启用)。启用 `ADB` 调试。\n- 安装 ADB 工具：下载 [adb](https://github.com/ophub/kernel/releases/tag/tools) 并解压，将 `adb.exe`，`AdbWinApi.dll`，`AdbWinUsbApi.dll` 三个文件复制到 `c://windows/` 目录下的 `system32` 和 `syswow64` 文件夹中。打开 `cmd` 命令面板，执行 `adb --version` 命令，若有输出则表示安装成功。\n- 进入 `cmd` 命令模式，输入 `adb connect 192.168.1.137` 命令（其中 IP 根据设备实际情况修改，可在路由器管理界面查看），连接成功后将显示 `connected to 192.168.1.137:5555`\n- 输入 `adb shell reboot update` 命令，设备将重启并从 USB/TF/SD 启动。通过浏览器访问系统 IP 地址或使用 SSH 连接即可进入系统。\n\n#### 12.4.2 重新安装 Armbian 系统\n\n- 正常情况下，将写好 Armbian 的 U 盘插入 USB 即可直接启动，USB 启动优先于 eMMC。\n- 若个别设备无法从 U 盘启动，可将 eMMC 中 Armbian 系统 `/boot` 目录下的 `boot.scr` 文件重命名（如 `boot.scr.bak`），再插入 U 盘即可正常启动。\n\n### 12.5 禁用红外接收器\n\n系统默认启用红外接收器支持。若将设备用作服务器，建议禁用 IR 内核模块以防止误触关机。完全禁用 IR 的方法：添加以下内容\n\n```shell\nblacklist meson_ir\n```\n\n至 `/etc/modprobe.d/blacklist.conf` 并重启。\n\n### 12.6 启动引导文件的选择\n\n- 目前已知设备中，仅 `T95(s905x)` / `T95Z-Plus(s912)` / `BesTV-R3300L(s905l-b)` 等少数设备需要使用 `/bootfs/extlinux/extlinux.conf` 文件，系统已默认添加。其他设备如有需要，将系统写入 USB 后打开 `boot` 分区，将系统自带的 `/boot/extlinux/extlinux.conf.bak` 文件名称中的 `.bak` 删除即可使用。写入 eMMC 时，`armbian-install` 会自动检查并在 `extlinux.conf` 文件存在时自动创建。\n\n- 其他设备仅需 `/boot/uEnv.txt` 即可启动，请勿修改 `extlinux.conf.bak` 文件。\n\n### 12.7 网络设置\n\n#### 12.7.1 使用 interfaces 设置网络\n\n网络配置文件 `/etc/network/interfaces` 的默认内容如下：\n\n```shell\nsource /etc/network/interfaces.d/*\n# Network is managed by Network manager\nauto lo\niface lo inet loopback\n```\n\n##### 12.7.1.1 由 DHCP 动态分配 IP 地址\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\niface eth0 inet dhcp\n```\n\n##### 12.7.1.2 手动设置静态 IP 地址\n\n其中的 IP 和网关和 DNS 根据自己的网络情况修改。\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\nallow-hotplug eth0\niface eth0 inet static\nhwaddress ether 12:34:56:78:9A:DA\naddress 192.168.1.100\nnetmask 255.255.255.0\ngateway 192.168.1.1\ndns-nameservers 192.168.1.1\n```\n\n##### 12.7.1.3 在 docker 中使用 OpenWrt 建立互通网络\n\n其中的 MAC 地址根据自己的需要修改。\n\n```shell\nsource /etc/network/interfaces.d/*\n\nallow-hotplug eth0\nno-auto-down eth0\nauto eth0\niface eth0 inet manual\n\nauto macvlan\niface macvlan inet dhcp\n        pre-up ip link add macvlan link eth0 type macvlan mode bridge\n        post-down ip link del macvlan link eth0 type macvlan mode bridge\n\nauto lo\niface lo inet loopback\n```\n\n#### 12.7.2 使用 NetworkManager 管理网络\n\n##### 12.7.2.1 新建网络连接\n\n新建或修改网络连接前的准备工作\n\n###### 12.7.2.1.1 获取网络接口名称\n\n查看设备中可用的网络接口。\n\n```shell\nnmcli device | grep -E \"^[e].*|^[w].*|^[D].*|^[T].*\" | awk '{printf \"%-19s%-19s\\n\",$1,$2}'\n```\n\n执行命令后返回内容, `DEVICE` 列显示网络接口名称, `TYPE` 列显示网络接口类型。\n\n其中 `eth0` = 第1块有线网卡的名称, `eth1` = 第2块有线网卡的名称, 以此类推, 无线网卡同理。\n\n```shell\nDEVICE             TYPE\neth0               ethernet\neth1               ethernet\neth2               ethernet\neth3               ethernet\nwlan0              wifi\nwlan1              wifi\n```\n\n###### 12.7.2.1.2 获取现有网络连接名称\n\n查看设备现有的网络连接（包含已启用和未启用的连接）。新建连接时，建议使用不同于现有连接的名称。\n\n```shell\nnmcli connection show | grep -E \".*|^[N].*\" | awk '{printf \"%-19s%-19s\\n\", $1,$3}'\n```\n\n执行命令后返回内容, `NAME` 列显示现有网络连接名称, `TYPE` 列显示网络接口类型。\n\n其中 `ethernet` = 有线网卡, `wifi` = 无线网卡, `bridge` = 网桥\n\n```shell\nNAME               TYPE\ncnc                ethernet\nlan                ethernet\nlte                ethernet\ntel                ethernet\ndocker0            bridge\ntitanium           wifi\ncpe                wifi\n```\n\n###### 12.7.2.1.3 新建有线网络连接\n\n在网络接口 `eth0` 上新建网络连接并立即生效 (`动态 IP 地址` - `IPv4 / IPv6`)。\n\n```shell\n# Set ENV\nMYCON=ether1                  # 新建网络连接名称\nMYETH=eth0                    # 网络接口名称 = eth0 / eth1 / eht2 / eth3\nIPV6AGM=stable-privacy        # IPv6 地址状态模式 = stable-privacy / eui64\n\n# Add ETH\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM\nnmcli connection up $MYCON\nip -c -br address\n```\n\n在网络接口 `eth0` 上新建网络连接并立即生效 (`静态 IP 地址` - `IPv4`)。\n\n```shell\n# Set ENV\nMYCON=ether1                  # 网络连接名称\nMYETH=eth0                    # 网络接口名称 = eth0 / eth1 / eht2 / eth3\nIP=192.168.67.167/24          # HOST IP 地址, 其中 24 是子网掩码 对应 255.255.255.0\nGW=192.168.67.1               # 网关\nDNS=119.29.29.29,223.5.5.5    # DNS 服务器地址\n\n# Chg CON\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.1.4 新建无线网络连接\n\n在网络接口 `wlan0` 上新建网络连接并立即生效 (`动态 IP 地址` - `IPv4 / IPv6`)。\n\n```shell\n# Set ENV\nMYCON=ssid                    # 新建网络连接名称, 建议使用 WiFi SSID 来指定连接名称\nMYSSID=ssid                   # WiFi SSID 区分大小写\nMYPSWD=passwd                 # WiFi 密码\nMYWSKM=wpa-psk                # 安全性选择 WPA-WPA2 = wpa-psk or WPA3 = sae （无线路由器或 AP 中查看是哪一种加密方式）\nMYWLAN=wlan0                  # 网络接口名称 = wlan0 / wlan1\nIPV6AGM=stable-privacy        # IPv6 地址状态模式 = stable-privacy / eui64\n\n# Add WLAN\nnmcli connection add \\\ncon-name $MYCON \\\ntype wifi \\\nifname $MYWLAN \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.2 修改无线网络连接中的 WiFi SSID or PASSWD\n\n修改无线网络连接 `ssid` 中的 `WiFi SSID or PASSWD` 并立即生效。\n\n```shell\n# Set ENV\nMYCON=ssid                    # 无线网络连接名称\nMYSSID=ssid                   # WiFi SSID 区分大小写\nMYPSWD=passwd                 # WiFi 密码\nMYWSKM=wpa-psk                # 安全性选择 WPA-WPA2 = wpa-psk or WPA3 = sae\n\n# Add WLAN\nnmcli connection modify $MYCON \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.3 修改网络地址分配方式\n\n###### 12.7.2.3.1 静态 IP 地址 - IPv4\n\n在网络连接 `ether1` 上修改 IP 地址分配方式为 `静态 IP 地址` 并立即生效。\n\n*适用 有线连接 / 无线连接\n\n```shell\n# Set ENV\nMYCON=ether1                  # 网络连接名称\nIP=192.168.67.167/24          # HOST IP 地址, 其中 24 是子网掩码 对应 255.255.255.0\nGW=192.168.67.1               # 网关\nDNS=119.29.29.29,223.5.5.5    # DNS 服务器地址\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.3.2 DHCP 获取动态 IP 地址 - IPv4 / IPv6\n\n在网络连接 `ether1` 上修改 IP 地址分配方式为 `DHCP 获取动态 IP 地址` 并立即生效。\n\n*适用 有线连接 / 无线连接\n\n```shell\n# Set ENV\nMYCON=ether1                  # 网络连接名称\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method auto \\\nipv6.method auto\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.4 修改网络连接 MAC 地址\n\n在网络连接上修改 `MAC 地址` 以解决局域网 MAC 地址冲突问题。\n\n###### 12.7.2.4.1 方法一：使用 `nmcli` 命令修改 MAC 地址\n\n```shell\n# 使用 nmcli connection show 命令查看网络连接名称\nnmcli connection show\n# 返回的结果中包含网口名字，例如'Wired connection 1'\nNAME                UUID                                  TYPE      DEVICE\nWired connection 1  24d63dc7-c46f-3bf1-912f-1c33eb94338b  ethernet  eth0\nlo                  35ca24e5-bdc0-4658-8ac8-435ee22e07f3  loopback  lo\nWired connection 2  59660b21-b460-30e0-8cb3-89b886556955  ethernet  --\n\n# 设置变量\nMYCON='Wired connection 1'    # 网络连接名称, 注意匹配网络接口类型\nMYTYPE='802-3-ethernet'       # 网络接口类型 = 有线网卡        / 无线网卡\n                              #            = 802-3-ethernet / 802-11-wireless\nMYMAC='12:34:56:78:9A:BC'     # 设置新的 MAC 地址\n\n# 执行修改\nnmcli connection modify \"${MYCON}\" ${MYTYPE}.cloned-mac-address ${MYMAC}\nnmcli connection up \"${MYCON}\"\nip -c a show \"${MYCON}\"\n```\n\n* 新建或修改部分网络参数, 网络连接可能会被断开, 并重新连接网络。\n* 由于软硬件环境不同（盒子, 系统, 网络设备等）, 生效所需时间 `1-15` 秒左右, 更长时间未生效的建议检查软硬件环境。\n\n###### 12.7.2.4.2 方法二：通过配置文件修改 MAC 地址\n\n添加 Mac 地址覆盖配置文件。\n\n```shell\nsudo mkdir -p /etc/systemd/network/\nsudo nano /etc/systemd/network/10-mac-override.link\n```\n\n添加以下内容：\n\n```shell\n[Match]\n# 设置需要修改 MAC 地址的网络接口名称\nOriginalName=eth0\n\n[Link]\n# 设置符合规范的 MAC 地址\nMACAddress=02:55:66:77:88:99\n```\n\n重启后生效。\n\n##### 12.7.2.5 如何禁用 IPv6\n\n您可以使用 `nmcli` 实用程序在命令行中禁用 `IPv6` 协议，参考来源 [disable-ipv6](https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-networkmanager-to-disable-ipv6-for-a-specific-connection_configuring-and-managing-networking)。\n\n第一步，先使用 `nmcli connection show` 命令查看网络连接列表，返回结果如下：\n\n```shell\nNAME                 UUID                                   TYPE       DEVICE\nWired connection 1   8a7e0151-9c66-4e6f-89ee-65bb2d64d366   ethernet   eth0\n...\n```\n\n第二步，将连接的 ipv6.method 参数设为 disabled ：\n\n```shell\nnmcli connection modify \"Wired connection 1\" ipv6.method \"disabled\"\n```\n\n第三步，重新连接网络：\n\n```shell\nnmcli connection up \"Wired connection 1\"\n```\n\n第四步，查看网络连接状态，如果没有显示 inet6 条目，则 IPv6 在该设备上被禁用：\n\n```shell\nip address show eth0\n```\n\n第五步，验证 `/proc/sys/net/ipv6/conf/eth0/disable_ipv6` 文件现在是否包含值 `1`\n\n```shell\n# cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6\n1\n```\n\n也可以通过修改 `/etc/sysctl.conf` 文件来禁用 IPv6：\n\n```shell\n# Disable IPv6 by default\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\n```\n\n#### 12.7.3 如何启用无线\n\n部分设备支持无线网络，启用方法如下：\n\n```shell\n# 安装管理工具\nsudo apt-get install network-manager\n\n# 查看网络设备\nsudo nmcli dev\n\n# 启用无线\nsudo nmcli r wifi on\n\n# 扫描无线\nsudo nmcli dev wifi\n\n# 连接无线\nsudo nmcli dev wifi connect \"wifi名称\" password \"wifi密码\"\n\n# 显示已保存的网络连接列表\nsudo nmcli connection show\n\n# 断开连接\nsudo nmcli connection down \"wifi名称\"\n\n# 忘记连接并取消自动连接\nsudo nmcli connection delete \"wifi名称\"\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230541872-565a655e-2781-4170-8898-0ae096725506.png\">\n</div>\n\n#### 12.7.4 如何启用蓝牙\n\n部分设备支持蓝牙，启用方法如下：\n\n```shell\n# 安装蓝牙支持\narmbian-config >> Network >> BT: Install Bluetooth support\n\n# 重启系统\nreboot\n```\n\n系统重启后，检查蓝牙驱动是否正常加载。桌面系统可通过菜单连接蓝牙设备，也可通过终端命令操作。\n\n```shell\ndmesg | grep Bluetooth\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230545883-755a137d-f574-4b32-a26b-bea9cfbf6384.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230544120-5a63dcd4-9716-40d2-ba59-c27f7b9937f8.png\">\n</div>\n\n```shell\n# 连接蓝牙设备\narmbian-config >> Network >> BT: Discover and connect Bluetooth devices\n```\n\n也可以在终端中使用命令安装：\n```shell\n# 查看蓝牙服务运行状态\nsudo systemctl status bluetooth\n\n# 如果未启动，先开启蓝牙服务\nsudo systemctl enable bluetooth\nsudo systemctl start bluetooth\n\n# 扫描附近的蓝牙设备\nbluetoothctl scan on\n\n# 启用蓝牙发现\nbluetoothctl discoverable on\n\n# 进行蓝牙 MAC 地址配对\nbluetoothctl pair 12:34:56:78:90:AB\n\n# 查看配对好的蓝牙设备\nbluetoothctl paired-devices\n\n# 连接蓝牙设备\nbluetoothctl connect 12:34:56:78:90:AB\n\n# 信任设备，方便以后直接连接\nbluetoothctl trust 12:34:56:78:90:AB\n\n# 断开蓝牙设备\nbluetoothctl disconnect 12:34:56:78:90:AB\n\n# 解除蓝牙配对\nbluetoothctl remove 12:34:56:78:90:AB\n\n# 阻止连接设备\nbluetoothctl block 12:34:56:78:90:AB\n```\n\n### 12.8 如何添加开机启动任务\n\n系统已内置自定义开机启动任务脚本，路径为 [/etc/custom_service/start_service.sh](../build-armbian/armbian-files/common-files/etc/custom_service/start_service.sh)，可根据个人需求在该脚本中添加自定义任务。\n\n### 12.9 如何更新系统中的服务脚本\n\n使用 `armbian-sync` 命令可一键将本地系统中的全部服务脚本更新至最新版本。\n\n若 `armbian-sync` 更新失败，可能因命令版本过旧，可通过以下方法手动更新：\n\n```shell\nwget https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/main/build-armbian/armbian-files/common-files/usr/sbin/armbian-sync -O /usr/sbin/armbian-sync\n\nchmod +x /usr/sbin/armbian-sync\n\narmbian-sync\n```\n\n### 12.10 如何获取 eMMC 上的安卓系统分区信息\n\n将 Armbian 系统写入 eMMC 时，需先确认设备的安卓系统分区表，确保数据写入安全区域，避免破坏原分区表导致系统无法启动。若写入了不安全的区域，可能无法启动或出现如下错误：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187075834-4ac40263-52ae-4538-a4b1-d6f0d5b9c856.png\">\n</div>\n\n#### 12.10.1 获取分区信息\n\n若使用 2022.11 之后本仓库发布的 Armbian，可复制粘贴以下命令获取包含完整分区信息的网址（设备本身无需联网）\n\n```shell\nampart /dev/mmcblk2 --mode webreport 2>/dev/null\n```\n\n*ampart 的 webreport 模式为 2023.02.03 发布的 v1.2 版本引入的，如果你使用上面的命令无输出，则可能为不支持直接输出网址的旧版，你可以转而使用下面这条命令：*\n\n```shell\necho \"https://7ji.github.io/ampart-web-reporter/?dsnapshot=$(ampart /dev/mmcblk2 --mode dsnapshot 2>/dev/null | head -n 1)&esnapshot=$(ampart /dev/mmcblk2 --mode esnapshot 2>/dev/null | head -n 1)\"\n```\n\n生成的网址格式类似如下：\n\n```shell\nhttps://7ji.github.io/ampart-web-reporter/?esnapshot=bootloader:0:4194304:0%20reserved:37748736:67108864:0%20cache:113246208:754974720:2%20env:876609536:8388608:0%20logo:893386752:33554432:1%20recovery:935329792:33554432:1%20rsv:977272832:8388608:1%20tee:994050048:8388608:1%20crypt:1010827264:33554432:1%20misc:1052770304:33554432:1%20instaboot:1094713344:536870912:1%20boot:1639972864:33554432:1%20system:1681915904:1073741824:1%20params:2764046336:67108864:2%20bootfiles:2839543808:754974720:2%20data:3602907136:4131389440:4&dsnapshot=logo::33554432:1%20recovery::33554432:1%20rsv::8388608:1%20tee::8388608:1%20crypt::33554432:1%20misc::33554432:1%20instaboot::536870912:1%20boot::33554432:1%20system::1073741824:1%20cache::536870912:2%20params::67108864:2%20data::-1:4\n```\n\n将此网址复制到浏览器打开，即可查看格式清晰的 DTB 分区信息和 eMMC 分区信息：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287642-e1b7be27-4d2c-4ac3-9fcc-15e06aebb97e.png\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287654-d1929e21-d2b3-4fb6-bcf0-c454c88e21b9.png\">\n</div>\n\n#### 12.10.2 分区信息分享\n\n需要向他人分享分区信息时（如向本仓库汇报新设备情况或寻求帮助），请优先分享网址而非截图。若网址过长，可使用免费的短链接服务。\n\n- 一方面，网页上的分区信息每次访问时均会动态生成，分区可写入的标注及表格格式等可能随时更新。\n- 另一方面，截图中的分区参数无法被方便地复制用于计算。\n\n此外，无需额外将参数整理为表格文件，网页表格布局已专门设计为可直接复制粘贴导入 Excel 或 LibreOffice Calc。\n\n#### 12.10.3 分区信息解读\n\nDTB 表记录了安卓 DTB 中每台设备**系统**期望的分区布局，通常以一个大小为自动填充的 `data` 分区结尾。因此，相同系统（必然包括同型号）的设备，DTB 分区布局一定相同。设备上实际的分区布局因 eMMC 容量不同而有所差异，但始终由 DTB 分区布局决定（即已知 DTB 分区布局 +eMMC 准确大小，必然可推知 eMMC 分区情况。 *上面的 DTB 分区信息和 eMMC 分区信息并非来自同一个盒子，你看出来了吗？*）。\n\neMMC 表是设备上实际的 eMMC 分区布局。其中每一行表示一块存储区域，该区域可能是一个分区，也可能是分区间的间隙（由于晶晨的设计决策，每个分区之间至少有 8M 的间隙，原计划留作他用，但直至 S905X4 仍未使用，造成空间浪费）。对应分区的行中，字体为黑色，且偏移和掩码栏均有数值；对应空隙的行中，字体为灰色，偏移和掩码栏没有数值，且分区名为 `gap` 。\n\neMMC 表中，每一块存储区域的最后一栏为可写入的情况，绿色且 `yes` 表示这一区域可以写入，红色且 `no` 表示这一区域绝对不可以写入，黄色且有标注则表示某前提的下可以写入，或者只有部分可以写入。\n\n以上表为例，`bootloader` 分区对应的 `0+4M` (`0M~4M`)绝对不可写入，其后的 `32M` 空隙（`4M~36M`）可以写入，`reserved` 分区对应的 `36M+64M` (`36M~100M`)绝对不可写入，其后的空隙一直到 `env` 前的空隙（`100M~836M`）都可以写入，`env` 的1M往后（`837M一直到结尾`）在不需要安卓启动 logo 的情况下都可以写入，则 eMMC 上所有可写入的范围为：\n\n- 4M~36M\n- 100M~836M\n- 837M~结尾\n\n在需要安卓启动 logo 的情况下，额外的，`logo`分区对应的 852M + 32M (`852M~884M`)不能写入，则 eMMC 上所有的可写入范围为：\n\n- 4M~36M\n- 100M~836M\n- 837M~852M\n- 884M~结尾\n\n#### 12.10.4 用于 eMMC 安装\n\n若设备在使用 `armbian-install` 且 `-a` 参数（使用 [ampart](https://github.com/7Ji/ampart) 调整 eMMC 分区布局）为 `yes`（默认值）时失败，则该设备无法使用最优分区布局（即把 DTB 分区信息调整为只有 `data` ，再由此生成 eMMC 分区信息，然后将所有还存在的分区均向前挪动，如此一来，117M 向后的空间便均可使用），你需要在 [armbian-install](../build-armbian/armbian-files/common-files/usr/sbin/armbian-install) 中修改对应的分区信息。\n\n此文件中，声明分区布局的关键参数有三个：`BLANK1`, `BOOT`, `BLANK2`。其中 `BLANK1` 表示从 eMMC 开头算起的不可使用的大小；`BOOT` 表示 `BLANK1` 之后用于存放内核、DTB 等文件的分区大小，建议不小于 256M；`BLANK2` 表示 `BOOT` 之后不可使用的大小；在此之后的空间会全部用来创建 `ROOT` 分区，储存整个系统中 `/boot` 挂载点以外的数据。三者均应为整数，且单位为MiB (1 MiB = 1024 KiB = 1024^2 Byte)\n\n以上述不需要 `logo` 分区的情况为例，为充分利用所有可用空间，由于 `4M~36M` 区域过小无法用作 `BOOT`，只能将其计入 `BLANK1`。`100M~836M` 区域足以用作 `BOOT`，可将其 736M 全部分配给 `BOOT`。其后 `836M~837M` 的不可用区域计入 `BLANK2`，相应参数配置如下（以 `s905x3` 为例，其他 SoC 需修改对应代码块）：\n\n```shell\n# Set partition size (Unit: MiB)\nelif [[ \"${AMLOGIC_SOC}\" == \"s905x3\" ]]; then\n    BLANK1=\"100\"\n    BOOT=\"736\"\n    BLANK2=\"1\"\n```\n\n### 12.11 如何制作 u-boot 文件\n\nu-boot 是引导系统启动的关键文件。Amlogic、Allwinner 和 Rockchip 设备在源码获取和编译流程上略有差异。\n\n#### 12.11.1 如何制作 Amlogic 设备的 u-boot 文件\n\n由于 Amlogic 系列设备厂商大多不开源，需先从设备上提取 u-boot 相关文件，再进行编译。以下方法来自 [unifreq](https://github.com/unifreq) 分享的制作教程。\n\n##### 12.11.1.1 如何提取 bootloader 和 dtb 文件\n\n提取过程需使用 HxD 软件，可从 [官网下载链接](https://mh-nexus.de/en/downloads.php?product=HxD20) 或 [备份下载链接](https://github.com/ophub/kernel/releases/download/tools/HxDSetup.2.5.0.0.zip) 获取并安装。\n\n在 `cmd` 面板中依次执行以下命令提取相关文件并下载至本地。\n\n```shell\n# 使用 adb 工具进入盒子\nadb connect 192.168.1.111\nadb shell\n\n# 导出 bootloader 命令\ndd if=/dev/block/bootloader of=/data/local/bootloader.bin\n\n# 导出 dtb 命令\ncat /dev/dtb >/data/local/mybox.dtb\n\n# 导出 gpio 命令\ncat /sys/kernel/debug/gpio >/data/local/mybox_gpio.txt\n\n# 依次把 bootloader、dtb 和 gpio 文件都下载到本地电脑C盘根目录下的 mybox 文件夹\nadb pull /data/local/bootloader.bin C:\\mybox\nadb pull /data/local/mybox.dtb C:\\mybox\nadb pull /data/local/mybox_gpio.txt C:\\mybox\n```\n\n##### 12.11.1.2 如何制作 acs.bin 文件\n\n主线 u-boot 中最关键的是 acs.bin 文件，用于内存初始化，原厂 u-boot 位于系统起始 4MB 区域。使用前面获取的 `bootloader.bin` 提取 `acs.bin` 文件。\n\n打开 HxD 软件，打开上面导出的 `bootloader.bin` 文件，`右键 - 选择范围`，起始位置 `F200`，长度 `1000`，选`十六进制`。\n\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056711-1b58ce71-2a7d-4e9b-a976-e5f278edaa53.png\">\n\n复制选择的结果，然后新建文件，插入式粘贴，警告忽略，另存为 acs.bin 文件。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056725-0a0e60af-6a21-4a6b-a2d5-f3d46b438a6a.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056827-8419c738-3428-473e-9a95-ab7270170d98.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056852-9f62f16a-f7f1-4c34-a2c2-78358d198f9a.png\">\n</div>\n\n若 bootloader 已锁定，则该区域的代码将显示为乱码，无法使用。正常情况下，该区域应包含大量 `0`，`cfg` 会连续出现数次，并夹杂 `ddr` 相关字样，此类代码为有效可用数据。\n\n##### 12.11.1.3 如何编译 u-boot 文件\n\n制作 u-boot 需要 https://github.com/unifreq/amlogic-boot-fip 和 https://github.com/unifreq/u-boot 两个源码仓库，用于编译设备所需的 u-boot 文件。\n\n在 amlogic-boot-fip 源码中，各机型仅 acs.bin 文件不同，其余文件通用。\n\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187057209-c4716384-46ef-4922-9710-8da7ae6db1e4.png\">\n\n制作方法详见 https://github.com/unifreq/u-boot/tree/master/doc/board/amlogic 中的说明，选择对应设备型号进行编译测试。\n\n根据 [unifreq](https://github.com/unifreq) 的方法制作 u-boot，需要使用设备的 acs.bin、dts 和 config 文件。其中安卓系统导出的 dts 无法直接转换为 Armbian 格式，需自行编写对应的 dts 文件。根据设备的具体硬件差异（如开关、LED、电源控制、TF 卡、SDIO WiFi 模块等），参照内核源码库中相似的 [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) 文件进行修改。\n\n以制作 X96Max Plus 的 u-boot 为例：\n\n```shell\n~/make-uboot\n    ├── amlogic-boot-fip\n    │   ├── x96max-plus                                     # 自己创建目录\n    │   │   ├── asc.bin                                     # 自己制作源文件\n    │   │   └── other-copy-files...                         # 复制其他目录的文件\n    │   │\n    │   ├── other-source-directories...\n    │   └── other-source-files...\n    │\n    └── u-boot\n        ├── configs\n        │   └── x96max-plus_defconfig                       # 自己制作源文件\n        ├── arch\n        │   └── arm\n        │       └── dts\n        │           ├── meson-sm1-x96-max-plus-u-boot.dtsi  # 自己制作源文件\n        │           ├── meson-sm1-x96-max-plus.dts          # 自己制作源文件\n        │           └── Makefile                            # 编辑\n        ├── fip\n        │   ├── u-boot.bin                                  # 生成文件\n        │   └── u-boot.bin.sd.bin                           # 生成文件\n        ├── u-boot.bin                                      # 生成文件\n        │\n        ├── other-source-directories...\n        └── other-source-files...\n```\n\n- 下载 [amlogic-boot-fip](https://github.com/unifreq/amlogic-boot-fip) 源码。在根目录创建 [x96max-plus](https://github.com/unifreq/amlogic-boot-fip/tree/master/x96max-plus) 目录，其中除自行制作的 `asc.bin` 文件外，其余文件可从其他目录复制。\n- 下载 [u-boot](https://github.com/unifreq/u-boot) 源码。制作对应的 [x96max-plus_defconfig](https://github.com/unifreq/u-boot/blob/master/configs/x96max-plus_defconfig) 文件放入 [configs](https://github.com/unifreq/u-boot/tree/master/configs) 目录。制作对应的 [meson-sm1-x96-max-plus-u-boot.dtsi](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus-u-boot.dtsi) 和 [meson-sm1-x96-max-plus.dts](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus.dts) 文件放入 [arch/arm/dts](https://github.com/unifreq/u-boot/tree/master/arch/arm/dts) 目录，并编辑此目录中的 [Makefile](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/Makefile) 文件，添加 `meson-sm1-x96-max-plus.dtb` 文件的索引。\n- 进入 u-boot 源码根目录，按照文档 https://github.com/unifreq/u-boot/blob/master/doc/board/amlogic/x96max-plus.rst 中的步骤操作。\n\n最终生成两类文件：u-boot 根目录下的 `u-boot.bin` 为 `/boot` 目录使用的精简版 u-boot（对应仓库中的 [overload](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) 目录）；在 `fip` 目录下的 `u-boot.bin` 和 `u-boot.bin.sd.bin` 是 `/usr/lib/u-boot/` 目录下使用的完整版 u-boot 文件（对应仓库中的 [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) 目录），完整版两个文件相差 512 字节，较大的文件在头部填充了 512 字节的 0。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189039426-c127631f-77ca-4fcb-9fb6-4220045d712b.png\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189029320-e43a4cc9-b4b5-4de4-92fe-b17bd29020d0.png\">\n</div>\n\n💡提示：写入 eMMC 测试前，请先阅读 12.3 节的救砖方法。务必确认已掌握短接点位置、备有原厂 .img 格式的安卓系统文件，并已成功测试短接刷机流程后，方可进行写入测试。\n\n#### 12.11.2 如何制作 Rockchip 设备的 u-boot 文件\n\nRockchip 设备的大部分厂商已开源 u-boot 源码，可在厂商源码仓库中获取并编译。同时，一些开源贡献者也分享了便捷的 u-boot 编译脚本，以下通过实例介绍几种编译方法。\n\n##### 12.11.2.1 如何使用 Radxa 的 u-boot 制作脚本\n\n以编译 [Rock5b(rk3588)](https://wiki.radxa.com/Rock5/guide/build-u-boot-on-5b) 为例。\n\n```shell\n# 01.安装依赖\nsudo apt-get update\nsudo apt-get install -y git device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison\n\n# 02.克隆源码\nmkdir ~/rk3588-sdk && cd ~/rk3588-sdk\ngit clone -b stable-5.10-rock5 https://github.com/radxa/u-boot.git\ngit clone -b master https://github.com/radxa/rkbin.git\ngit clone -b debian https://github.com/radxa/build.git\n\n# 源码说明：\n# ~/rk3588-sdk/build/：Radxa 辅助脚本文件和用于构建 U-Boot、Linux 内核和根文件系统的配置文件。\n# ~/rk3588-sdk/rkbin/：预构建的 Rockchip 二进制文件，包括第一阶段加载程序和 ATF（Arm Trustzone固件）。\n# ~/rk3588-sdk/u-boot/：用于启动操作系统（如 Linux 或 Android）的第二阶段引导加载程序。\n\n# 03.编译 u-boot （For ROCK 5B）\ncd ~/rk3588-sdk\n./build/mk-uboot.sh rk3588-rock-5b\n\n# 04.构建成功后，将放置在 ~/rk3588-sdk/out/u-boot 目录\n~/rk3588-sdk/out/u-boot\n├── idbloader.img\n├── rk3588_spl_loader_v1.08.111.bin\n├── spi\n│   └── spi_image.img\n└── u-boot.itb\n```\n\n通过在 [radxa/build](https://github.com/radxa/build) 源码的 `board_configs.sh` 和 `mk-uboot.sh` 中添加更多选项，可编译其他设备的 u-boot 文件。例如编译 [Beelink-IPC-R(rk3588)](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415#issuecomment-1508234307) 设备的方法。\n\n##### 12.11.2.2 如何使用 cm9vdA 的 u-boot 制作脚本\n\ncm9vdA 的开源项目 [cm9vdA/build-linux](https://github.com/cm9vdA/build-linux) 提供了编译 u-boot 和 kernel 的脚本及使用方法。以下为部分 Rockchip 设备 u-boot 编译的过程记录，摘录供参考。\n\n- 编译 Lenovo-Leez-P710(rk3399) 设备的 u-boot：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609#issuecomment-1681494735)\n- 编译 DLFR100(rk3399) 设备的 u-boot：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522#issuecomment-1622919423)\n- 编译 ZYSJ(rk3399) 设备的 u-boot：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380#issuecomment-1539325464)\n\n\n### 12.12 内存大小识别错误\n\n若内存大小识别不正确（4G 内存识别为 1-2G 属异常，识别为 3.7G 属正常），可尝试手动复制 `/boot/UBOOT_OVERLOAD` 文件（注意是`复制`而非`改名`，改名后安装或更新操作将导致无法启动）：USB 中使用时保存为 `/boot/u-boot.ext`，eMMC 中使用时保存为 `/boot/u-boot.emmc`。\n\n除排查内存识别问题外，请勿手动复制 u-boot 文件，错误操作可能导致无法启动或其他问题。\n\n### 12.13 如何反编译 dtb 文件\n\n部分新设备不在当前支持列表中（或存在硬件变体），可通过反编译 dtb 文件调整相关参数进行适配尝试。\n\n```shell\n# 安装依赖\nsudo apt-get update\nsudo apt-get install -y device-tree-compiler\n\n# 1. 反编译命令（使用 dtb 文件生成 dts 源码）\ndtc -I dtb -O dts -o xxx.dts xxx.dtb\n\n# 2. 编译命令（使用 dts 编译生成 dtb 文件）\ndtc -I dts -O dtb -o xxx.dtb xxx.dts\n\n# 3.保存数据并重启\nsync && reboot\n\n# 4.[自选动作]根据需求进行测试\n# 例如在解决 12.16 中介绍的问题时，重新安装测试\narmbian-install\n```\n\n### 12.14 如何修改 cmdline 设置\n\nAmlogic 设备在 `/boot/uEnv.txt` 文件中配置。Rockchip 和 Allwinner 设备在 `/boot/armbianEnv.txt` 文件中配置（添加至 `extraargs` 或 `extraboardargs` 参数）。使用 `/boot/extlinux/extlinux.conf` 的设备在该文件中配置。每次修改后需重启生效。\n\n- 例如 `Home Assistant Supervisor` 仅支持 `docker cgroup v1`，而当前 docker 默认安装 v2 版本。如需切换至 v1，可在 cmdline 中添加 `systemd.unified_cgroup_hierarchy=0` 参数，重启后即可切换至 `docker cgroup v1`。\n\n- 通过在 cmdline 中添加 `max_loop=128` 设置，可以调整允许的 loop 挂载数量。\n\n- 通过在 cmdline 中添加 `usbcore.usbfs_memory_mb=1024` 设置，可以永久将 USBFS 内存缓冲区从默认的 `16 mb` 改为更大（`cat /sys/module/usbcore/parameters/usbfs_memory_mb`），提升 USB 传输大文件的能力。\n\n- 通过在 cmdline 中添加 `usbcore.usb3_disable=1` 设置，可以禁用 USB 3.0 的所有设备。\n\n- 通过在 cmdline 中添加 `extraargs=video=HDMI-A-1:1920x1080@60` 设置，可以将视频显示模式强制为 1080p。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/216220941-47db0183-7b26-4768-81cf-2ee73d59d23e.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a600dcad-d817-47eb-b529-4014019915b3\">\n</div>\n\n### 12.15 如何添加新的支持设备\n\n为设备构建 Armbian 系统需要 `设备配置文件`、`系统文件`、`u-boot 文件`和`流程控制文件` 四部分，具体添加方法如下：\n\n#### 12.15.1 添加设备配置文件\n\n在配置文件 [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) 中，根据设备的测试结果添加对应配置信息。其中 `BUILD` 值为 `yes` 的是默认构建的设备，对应的 `BOARD` 值`必须唯一`，这些设备可直接使用默认构建的 Armbian 系统。\n\n默认值为 `no` 的设备未包含在默认构建中，使用时需下载相同 `FAMILY` 的 Armbian 系统。写入 `USB` 后，在电脑上打开 `USB 中的 boot 分区`，修改 `/boot/uEnv.txt` 文件中的 `FDT dtb 名称`，即可适配列表中的其他设备。\n\n#### 12.15.2 添加系统文件\n\n通用文件放在：`build-armbian/armbian-files/common-files` 目录下，各平台通用。\n\n平台文件分别放在 `build-armbian/armbian-files/platform-files/<platform>` 目录下，[Amlogic](../build-armbian/armbian-files/platform-files/amlogic)、[Rockchip](../build-armbian/armbian-files/platform-files/rockchip) 和 [Allwinner](../build-armbian/armbian-files/platform-files/allwinner) 各自共享平台文件。其中 `bootfs` 目录存放 /boot 分区文件，`rootfs` 目录存放 Armbian 系统文件。\n\n若个别设备有特殊配置需求，在 `build-armbian/armbian-files/different-files` 目录下创建以 `BOARD` 命名的独立目录，按需建立 `bootfs` 目录添加 `/boot` 分区文件，或建立 `rootfs` 目录添加系统文件。目录结构以 Armbian 系统中的实际路径为准，可用于添加新文件或覆盖通用文件和平台文件中的同名文件。\n\n#### 12.15.3 添加 u-boot 文件\n\n`Amlogic` 系列的设备，共用 [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) 文件和 [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) 文件，新增文件分别放入对应目录。`bootloader` 文件在系统构建时将自动添加至 Armbian 系统的 `/usr/lib/u-boot` 目录，`u-boot` 文件自动添加至 `/boot` 目录。\n\n`Rockchip` 和 `Allwinner` 系列的设备，为每个设备添加以 `BOARD` 命名的独立 [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot) 文件目录，对应的系列文件放在此目录中。\n\n构建 Armbian 镜像时，这些 u-boot 文件将根据 [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) 中的配置，由 rebuild 脚本写入对应的 Armbian 镜像文件中。\n\n能使用标准 U-Boot 文件的设备，建议优先直接使用。部分设备可能无法编译或获取适用的 U-Boot，若这类设备已能正常运行 Ubuntu 等 Linux 系统，可尝试保留引导相关的关键分区来安装 Armbian 或 OpenWrt。通常需要保留的关键分区包括 `bootloader`、`reserved` 和 `env`。\n\n这些分区可备份后，在制作新的 Armbian 或 OpenWrt 镜像时写回相应位置。制作完成的包含原系统引导分区的镜像，可直接使用 `dd` 命令写入 eMMC，也可使用相应系统的内置工具安装，例如 Armbian 的 `armbian-install` 命令，或 OpenWrt 的 `晶晨宝盒` 插件。\n\n目前采用此方法的设备有 [oes(a311d)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666)，[oes-plus(s922x)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029)，[oec-turbo(rk3566)](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736)，以下以 `oes(a311d)` 设备为例说明具体操作流程。\n\n##### 12.15.3.1 查看分区信息布局情况\n\n```shell\nampart /dev/mmcblk2\n\n# 得到的分区信息如下：\n# ===================================================================================\n# IO seek EPT: Seeking to 37748736\n# EPT report: 20 partitions in the table:\n# ===================================================================================\n# ID| name            |          offset|(   human)|            size|(   human)| masks\n# -----------------------------------------------------------------------------------\n#  0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0\n#     (GAP)                                                 2000000 (  32.00M)\n#  1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  2: cache                     6c00000 ( 108.00M)         20000000 ( 512.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n#  3: env                      27400000 ( 628.00M)           800000 (   8.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  ... other partitions ...\n# ===================================================================================\n```\n\n##### 12.15.3.2 备份关键分区\n\n```shell\ndd if=/dev/mmcblk2 of=bootloader.bin bs=1M count=4 skip=0\ndd if=/dev/mmcblk2 of=reserved.bin bs=1M count=8 skip=36\ndd if=/dev/mmcblk2 of=env.bin bs=1M count=1 skip=628\n```\n\n备份的文件放在 [u-boot](https://github.com/ophub/u-boot) 仓库对应的目录 [u-boot/amlogic/bootloader/a311d-oes](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader/a311d-oes) 里面。\n\n注意到 reserved 分区为 64MB，但仅备份了 8MB。原因在于 `oes(a311d)` 设备上 `reserved` 分区的前 8MB 为关键数据，后续 56MB 为空白，无需备份。具体查看方法：\n\n```shell\n# 首先，备份 reserved 分区完整的 64MB 大小的文件：\ndd if=/dev/mmcblk2 of=reserved_64M.bin bs=1M count=64 skip=36\n\n# 然后，把我们备份出来的 reserved_64M.bin 文件的前 8MB 提取出来：\ndd if=reserved_64M.bin of=reserved_first_8M.bin bs=1M count=8\n\n# 接下来，查看十六进制内容：\nhexdump -C reserved_first_8M.bin | less\n\n# 现在，我们查看返回结果最后几行的内容：\n0071ffd0  4c 5e a8 1f fc 5b 5b 98  ae ef b0 97 0c 3b e8 c2  |L^...[[......;..|\n0071ffe0  c8 e0 b2 74 3d 67 d5 3d  24 7b 63 b7 c7 73 f5 d8  |...t=g.=${c..s..|\n0071fff0  a1 b8 38 a7 57 d6 b4 b5  e8 1c ba c0 07 0f f5 79  |..8.W..........y|\n00720000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n00800000\n```\n\n分析输出结果，最后一个包含非零数据的行的地址是 `0071fff0`。从地址 `00720000` 开始，所有内容都变成了 `00`（零）。hexdump 工具使用 （`*`） 来表示重复的行，这意味着从 `00720000` 一直到 `00800000` (即8MB的末尾) 都是零。把效数据地址 `0x00720000` 换算成十进制是 `7,471,104` 字节，也就是 `7471104 / 1024 / 1024 = 7.125 MB` 大小，因此取整备份 8MB 即可。env 分区同理，仅前 80KB 为有效数据，其余为空白，因此仅备份 1MB。\n\n##### 12.15.3.3 添加特殊分区写入文件\n\n具体实现细节请参考文件 [/etc/armbian-board-release.conf](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/different-files/a311d-oes/rootfs/etc/armbian-board-release.conf) 中定义的 `write_board_bootloader` 函数。该函数在镜像重构（rebuild）过程中被调用。此外，该配置文件也是功能强大的设备定制中心。您不仅可以通过 `skip_mb=\"700\"` 等参数来精确控制镜像分区的布局与大小，还可以添加自定义脚本，以实现对内核或其他系统文件的特殊处理。所有针对特定设备的高级定制操作均集中在此文件中统一管理，确保配置清晰高效。\n\n#### 12.15.4 添加流程控制文件\n\n在 [yml 工作流控制文件](../.github/workflows/build-armbian-arm64-server-image.yml) 的 `armbian_board` 中添加对应的 `BOARD` 选项，使其支持在 GitHub Actions 中使用。\n\n### 12.16 如何解决写入 eMMC 时 I/O 错误的问题\n\n部分设备可从 USB/SD/TF 正常启动 Armbian，但写入 eMMC 时会出现 I/O 写入错误，例如 [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/989) 中的案例，报错内容如下：\n\n```shell\n[  284.338449] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.341544] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.446972] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.450074] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.497746] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.500871] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n```\n\n此时可调整 dtb 中的工作模式速度和频率以稳定存储读写。SDR 模式下频率为速度的 2 倍，DDR 模式下频率等于速度。可用模式如下：\n\n```shell\nsd-uhs-sdr12\nsd-uhs-sdr25\nsd-uhs-sdr50\nsd-uhs-ddr50\nsd-uhs-sdr104\n\nmax-frequency = <208000000>;\n```\n\n以内核源码的 [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) 文件中的代码片段举例：\n\n```shell\n/* SD card */\n&sd_emmc_b {\n\tstatus = \"okay\";\n\n\tbus-width = <4>;\n\tcap-sd-highspeed;\n\tsd-uhs-sdr12;\n\tsd-uhs-sdr25;\n\tsd-uhs-sdr50;\n\tmax-frequency = <100000000>;\n};\n\n/* eMMC */\n&sd_emmc_c {\n\tstatus = \"okay\";\n\n\tbus-width = <8>;\n\tcap-mmc-highspeed;\n\tmax-frequency = <100000000>;\n};\n```\n\n通常将 `&sd_emmc_c` 的频率从 `max-frequency = <200000000>;` 下调至 `max-frequency = <100000000>;` 即可解决。若无效可继续下调至 `50000000` 进行测试，同时可通过调整 `&sd_emmc_b` 配置 `USB/SD/TF`，或使用 `sd-uhs-sdr` 限速。可通过修改 dts 文件并[编译](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel)生成测试文件，也可参照 `12.13 节` 的方法对现有 dtb 文件进行反编译修改。反编译 dtb 文件时使用十六进制值，其中十进制的 `200000000` 对应的十六进制为 `0xbebc200`，十进制的 `100000000` 对应的十六进制为 `0x5f5e100`，十进制的 `50000000` 对应的十六进制为 `0x2faf080`，十进制的 `25000000` 对应的十六进制为 `0x17d7840`。\n\n除软件层面的优化外，还可通过[硬件升级](https://github.com/ophub/amlogic-s9xxx-armbian/issues/998)和[动手改造](https://www.right.com.cn/forum/thread-901586-1-1.html)解决。\n\n### 12.17 如何解决 Bullseye 版本没有声音的问题\n\n声音问题的错误日志信息：\n\n```shell\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: dpcm_fe_dai_prepare() failed (-22)\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0\n```\n\n请参考 [Bullseye NO Sound](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1000) 中的方法进行设置。\n\n```shell\ncurl -fsSOL https://github.com/ophub/kernel/releases/download/tools/bullseye_g12_sound-khadas-utils-4-2-any.tar.gz\ntar -xzf bullseye_g12_sound-khadas-utils-4-2-any.tar.gz -C /\n\nsystemctl enable sound.service\nsystemctl restart sound.service\n```\n\n重启 Armbian 进行测试。若声音仍无输出，可能是设备使用了旧版 conf 对应的音频输出路径，需在 /usr/bin/g12_sound.sh 中注释掉 `L137-L142` 的新配置（该配置主要适用于 G12B/S922X，旧版 G12A/S905X2 及基于 G12A 的 SM1/S905X3 大多不兼容），并取消 `L130-L134` 旧配置的注释。\n\n### 12.18 如何编译 boot.scr 文件\n\nArmbian 系统 `/boot` 目录下，`boot.scr` 是系统引导文件，由 `boot.cmd` 源码文件编译生成。修改 `boot.cmd` 后，通过 `mkimage` 命令重新编译即可生成新的 `boot.scr`。\n\n通常无需修改这两个文件，如有调整需求可参考以下方法。\n\n```shell\n# 安装依赖\nsudo apt-get update\nsudo apt-get install -y u-boot-tools\n\n# 编辑 boot.cmd 文件\ncd /boot\ncopy /boot/boot.cmd /boot/boot.cmd.bak\ncopy /boot/boot.scr /boot/boot.scr.bak\nnano boot.cmd\n\n# 编译命令\nmkimage -C none -A arm -T script -d boot.cmd boot.scr\n\n# 重启测试\nsync\nreboot\n\n# 补充说明\n# 在 Amlogic 设备中，在 USB 中使用的是 /boot/boot.scr 文件，写入 eMMC 时使用的是 /boot/boot-emmc.scr 文件。\n```\n\n### 12.19 如何开启远程桌面和修改默认端口\n\n在软件中心 `armbian-software` 中选择 `201` 安装桌面。安装过程中会询问是否开启远程桌面，输入 `y` 即可启用。远程桌面默认端口为 `3389`，可根据需要自定义端口：\n\n```shell\nsudo nano /etc/xrdp/xrdp.ini\n# 修改为自定义端口，例如 5000\nport=5000\n```\n\n### 12.20 TCP 拥塞控制优化方案\n\n针对不同性能的设备，建议采用差异化的网络栈配置以获得最佳体验。请根据您的设备实际情况，编辑配置文件 `/etc/sysctl.conf` 并修改以下两行：\n- 千兆设备（高性能/现代架构）：建议使用 `fq + bbr` 组合，以最大化吞吐量并提升抗丢包能力。\n- 百兆设备（低性能/老旧架构）：建议使用 `fq_codel + cubic` 组合，以降低 CPU 负载并确保低延迟稳定性。\n\n```shell\n# 方案 A：千兆设备/高性能推荐 (Gigabit/High Performance)\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\n# 方案 B：百兆设备/低性能推荐 (100M/Low Performance)\n# net.core.default_qdisc = fq_codel\n# net.ipv4.tcp_congestion_control = cubic\n```\n"
  },
  {
    "path": "documents/README.ja.md",
    "content": "# Armbian の構築と使用方法\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nGitHub Actions は Microsoft が提供するサービスであり、高性能な仮想サーバー環境を利用して、プロジェクトの構築、テスト、パッケージング、デプロイが可能です。パブリックリポジトリでは時間制限なく無料で利用でき、1回のコンパイル時間は最大6時間で、Armbian のコンパイルニーズを十分に満たします（通常3時間程度で完了します）。本プロジェクトは技術交流のみを目的としており、不備がありましたらご容赦ください。ネットワーク攻撃や GitHub Actions の悪用はお控えください。\n\n# 目次\n\n- [Armbian の構築と使用方法](#armbian-の構築と使用方法)\n- [目次](#目次)\n  - [1. 自分の Github アカウントを登録する](#1-自分の-github-アカウントを登録する)\n  - [2. プライバシー変数 GITHUB\\_TOKEN 等の設定](#2-プライバシー変数-github_token-等の設定)\n  - [3. リポジトリをフォークしてワークフロー権限を設定する](#3-リポジトリをフォークしてワークフロー権限を設定する)\n  - [4. Armbian システムのカスタマイズファイルの説明](#4-armbian-システムのカスタマイズファイルの説明)\n  - [5. システムのコンパイル](#5-システムのコンパイル)\n    - [5.1 手動コンパイル](#51-手動コンパイル)\n    - [5.2 定期コンパイル](#52-定期コンパイル)\n    - [5.3 デフォルトシステム設定のカスタマイズ](#53-デフォルトシステム設定のカスタマイズ)\n    - [5.4 論理ボリュームを使用して Github Actions のコンパイル領域を拡張する](#54-論理ボリュームを使用して-github-actions-のコンパイル領域を拡張する)\n    - [5.5 Armbian Docker イメージの作成](#55-armbian-docker-イメージの作成)\n  - [6. システムの保存](#6-システムの保存)\n  - [7. システムのダウンロード](#7-システムのダウンロード)\n  - [8. Armbian を EMMC にインストールする](#8-armbian-を-emmc-にインストールする)\n    - [8.1 Amlogic シリーズのインストール方法](#81-amlogic-シリーズのインストール方法)\n    - [8.2 Rockchip シリーズのインストール方法](#82-rockchip-シリーズのインストール方法)\n      - [8.2.1 Radxa-Rock5B のインストール方法](#821-radxa-rock5b-のインストール方法)\n        - [8.2.1.1 microSD へのシステムインストール](#8211-microsd-へのシステムインストール)\n        - [8.2.1.2 eMMC へのシステムインストール](#8212-emmc-へのシステムインストール)\n        - [8.2.1.3 NVMe へのシステムインストール](#8213-nvme-へのシステムインストール)\n      - [8.2.2 電犀牛 R66S のインストール方法](#822-電犀牛-r66s-のインストール方法)\n      - [8.2.3 電犀牛 R68S のインストール方法](#823-電犀牛-r68s-のインストール方法)\n      - [8.2.4 貝殻クラウドのインストール方法](#824-貝殻クラウドのインストール方法)\n      - [8.2.5 我家クラウドのインストール方法](#825-我家クラウドのインストール方法)\n      - [8.2.6 泰山派のインストール方法](#826-泰山派のインストール方法)\n    - [8.3 Allwinner シリーズのインストール方法](#83-allwinner-シリーズのインストール方法)\n    - [8.4 Docker 版 Armbian のインストール方法](#84-docker-版-armbian-のインストール方法)\n      - [8.4.1 Docker 実行環境のインストール](#841-docker-実行環境のインストール)\n      - [8.4.2 macvlan ネットワークの設定](#842-macvlan-ネットワークの設定)\n      - [8.4.3 Armbian Docker コンテナの実行](#843-armbian-docker-コンテナの実行)\n  - [9. Armbian カーネルのコンパイル](#9-armbian-カーネルのコンパイル)\n    - [9.1 カスタムカーネルパッチの追加方法](#91-カスタムカーネルパッチの追加方法)\n    - [9.2 カーネルパッチの作成方法](#92-カーネルパッチの作成方法)\n    - [9.3 カスタムドライバモジュールのコンパイル方法](#93-カスタムドライバモジュールのコンパイル方法)\n  - [10. Armbian カーネルの更新](#10-armbian-カーネルの更新)\n  - [11. よく使うソフトウェアのインストール](#11-よく使うソフトウェアのインストール)\n  - [12. よくある質問](#12-よくある質問)\n    - [12.1 各デバイスの dtb と u-boot の対応表](#121-各デバイスの-dtb-と-u-boot-の対応表)\n    - [12.2 LED ディスプレイ制御の説明](#122-led-ディスプレイ制御の説明)\n    - [12.3 元の Android TV システムの復元方法](#123-元の-android-tv-システムの復元方法)\n      - [12.3.1 armbian-ddbr を使用したバックアップと復元](#1231-armbian-ddbr-を使用したバックアップと復元)\n      - [12.3.2 Amlogic フラッシュツールを使用した復元](#1232-amlogic-フラッシュツールを使用した復元)\n    - [12.4 デバイスを USB/TF/SD から起動する設定](#124-デバイスを-usbtfsd-から起動する設定)\n      - [12.4.1 Armbian システムの初回インストール](#1241-armbian-システムの初回インストール)\n      - [12.4.2 Armbian システムの再インストール](#1242-armbian-システムの再インストール)\n    - [12.5 赤外線レシーバーの無効化](#125-赤外線レシーバーの無効化)\n    - [12.6 ブートファイルの選択](#126-ブートファイルの選択)\n    - [12.7 ネットワーク設定](#127-ネットワーク設定)\n      - [12.7.1 interfaces を使用したネットワーク設定](#1271-interfaces-を使用したネットワーク設定)\n        - [12.7.1.1 DHCP による動的 IP アドレスの割り当て](#12711-dhcp-による動的-ip-アドレスの割り当て)\n        - [12.7.1.2 静的 IP アドレスの手動設定](#12712-静的-ip-アドレスの手動設定)\n        - [12.7.1.3 Docker 内で OpenWrt を使用した相互通信ネットワークの構築](#12713-docker-内で-openwrt-を使用した相互通信ネットワークの構築)\n      - [12.7.2 NetworkManager を使用したネットワーク管理](#1272-networkmanager-を使用したネットワーク管理)\n        - [12.7.2.1 新しいネットワーク接続の作成](#12721-新しいネットワーク接続の作成)\n          - [12.7.2.1.1 ネットワークインターフェース名の取得](#127211-ネットワークインターフェース名の取得)\n          - [12.7.2.1.2 既存のネットワーク接続名の取得](#127212-既存のネットワーク接続名の取得)\n          - [12.7.2.1.3 新しい有線ネットワーク接続の作成](#127213-新しい有線ネットワーク接続の作成)\n          - [12.7.2.1.4 新しい無線ネットワーク接続の作成](#127214-新しい無線ネットワーク接続の作成)\n        - [12.7.2.2 無線ネットワーク接続の WiFi SSID または PASSWD の変更](#12722-無線ネットワーク接続の-wifi-ssid-または-passwd-の変更)\n        - [12.7.2.3 ネットワークアドレス割り当て方式の変更](#12723-ネットワークアドレス割り当て方式の変更)\n          - [12.7.2.3.1 静的 IP アドレス - IPv4](#127231-静的-ip-アドレス---ipv4)\n          - [12.7.2.3.2 DHCP による動的 IP アドレスの取得 - IPv4 / IPv6](#127232-dhcp-による動的-ip-アドレスの取得---ipv4--ipv6)\n        - [12.7.2.4 ネットワーク接続の MAC アドレスの変更](#12724-ネットワーク接続の-mac-アドレスの変更)\n          - [12.7.2.4.1 方法1：`nmcli` コマンドで MAC アドレスを変更する](#127241-方法1nmcli-コマンドで-mac-アドレスを変更する)\n          - [12.7.2.4.2 方法2：設定ファイルで MAC アドレスを変更する](#127242-方法2設定ファイルで-mac-アドレスを変更する)\n        - [12.7.2.5 IPv6 を無効にする方法](#12725-ipv6-を無効にする方法)\n      - [12.7.3 ワイヤレスの有効化方法](#1273-ワイヤレスの有効化方法)\n      - [12.7.4 Bluetooth の有効化方法](#1274-bluetooth-の有効化方法)\n    - [12.8 起動時のタスク追加方法](#128-起動時のタスク追加方法)\n    - [12.9 システム内のサービススクリプトの更新方法](#129-システム内のサービススクリプトの更新方法)\n    - [12.10 eMMC 上の Android システムのパーティション情報の取得方法](#1210-emmc-上の-android-システムのパーティション情報の取得方法)\n      - [12.10.1 パーティション情報の取得](#12101-パーティション情報の取得)\n      - [12.10.2 パーティション情報の共有](#12102-パーティション情報の共有)\n      - [12.10.3 パーティション情報の解読](#12103-パーティション情報の解読)\n      - [12.10.4 eMMC インストールへの使用](#12104-emmc-インストールへの使用)\n    - [12.11 u-boot ファイルの作成方法](#1211-u-boot-ファイルの作成方法)\n      - [12.11.1 Amlogic デバイスの u-boot ファイルの作成方法](#12111-amlogic-デバイスの-u-boot-ファイルの作成方法)\n        - [12.11.1.1 bootloader と dtb ファイルの抽出方法](#121111-bootloader-と-dtb-ファイルの抽出方法)\n        - [12.11.1.2 acs.bin ファイルの作成方法](#121112-acsbin-ファイルの作成方法)\n        - [12.11.1.3 u-boot ファイルのコンパイル方法](#121113-u-boot-ファイルのコンパイル方法)\n      - [12.11.2 Rockchip デバイスの u-boot ファイルの作成方法](#12112-rockchip-デバイスの-u-boot-ファイルの作成方法)\n        - [12.11.2.1 Radxa の u-boot 作成スクリプトの使用方法](#121121-radxa-の-u-boot-作成スクリプトの使用方法)\n        - [12.11.2.2 cm9vdA の u-boot 作成スクリプトの使用方法](#121122-cm9vda-の-u-boot-作成スクリプトの使用方法)\n    - [12.12 メモリサイズの誤認識](#1212-メモリサイズの誤認識)\n    - [12.13 dtb ファイルの逆コンパイル方法](#1213-dtb-ファイルの逆コンパイル方法)\n    - [12.14 cmdline 設定の変更方法](#1214-cmdline-設定の変更方法)\n    - [12.15 新しいサポートデバイスの追加方法](#1215-新しいサポートデバイスの追加方法)\n      - [12.15.1 デバイス設定ファイルの追加](#12151-デバイス設定ファイルの追加)\n      - [12.15.2 システムファイルの追加](#12152-システムファイルの追加)\n      - [12.15.3 u-boot ファイルの追加](#12153-u-boot-ファイルの追加)\n        - [12.15.3.1 パーティション情報レイアウトの確認](#121531-パーティション情報レイアウトの確認)\n        - [12.15.3.2 重要なパーティションのバックアップ](#121532-重要なパーティションのバックアップ)\n        - [12.15.3.3 特殊パーティション書き込みファイルの追加](#121533-特殊パーティション書き込みファイルの追加)\n      - [12.15.4 フロー制御ファイルの追加](#12154-フロー制御ファイルの追加)\n    - [12.16 eMMC への書き込み時の I/O エラーの解決方法](#1216-emmc-への書き込み時の-io-エラーの解決方法)\n    - [12.17 Bullseye バージョンで音が出ない問題の解決方法](#1217-bullseye-バージョンで音が出ない問題の解決方法)\n    - [12.18 boot.scr ファイルのコンパイル方法](#1218-bootscr-ファイルのコンパイル方法)\n    - [12.19 リモートデスクトップの有効化とデフォルトポートの変更方法](#1219-リモートデスクトップの有効化とデフォルトポートの変更方法)\n    - [12.20 TCP 輻輳制御の最適化方法](#1220-tcp-輻輳制御の最適化方法)\n\n## 1. 自分の Github アカウントを登録する\n\n後続のシステムカスタマイズ操作を行うために、アカウントを登録してください。github.com ウェブサイトの右上にある `Sign up` ボタンをクリックし、案内に従って登録を完了してください。\n\n## 2. プライバシー変数 GITHUB_TOKEN 等の設定\n\n[GitHub ドキュメント](https://docs.github.com/ja/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)によると、各ワークフロージョブの開始時に、GitHub は自動的にユニークな `GITHUB_TOKEN` シークレットを作成し、ワークフローで使用します。ワークフロージョブ内で `${{ secrets.GITHUB_TOKEN }}` を使用して認証できます。\n\nActions で [Armbian Docker](../.github/workflows/build-armbian-arm64-docker-image.yml) イメージを作成して Docker Hub にプッシュする場合、`DOCKERHUB_USERNAME` と `DOCKERHUB_PASSWORD` の2つのプライバシー変数を設定する必要があります。自分のリポジトリページで、右上の `Settings` > `Secrets and variables` > `Actions` > `Repository secrets` > `New repository secret` ボタンをクリックし、以下の2つのプライバシー変数を追加してください：\n\n- 変数名 `DOCKERHUB_USERNAME`：値は Docker Hub のログインユーザー名\n- 変数名 `DOCKERHUB_PASSWORD`：値は Docker Hub のログインパスワード\n\n## 3. リポジトリをフォークしてワークフロー権限を設定する\n\nリポジトリ https://github.com/ophub/amlogic-s9xxx-armbian を開き、右上の Fork ボタンをクリックして、リポジトリのコードを自分のアカウントにコピーします。フォーク完了後、自分のアカウントの amlogic-s9xxx-armbian リポジトリにアクセスし、右上の `Settings` > `Actions` > `General` > `Workflow permissions` で `Read and write permissions` を選択して保存します。操作の流れは以下の通りです：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/167585338-841d3b05-8d98-4d73-ba72-475aad4a95a9.png width=\"300\" />\n</div>\n\n## 4. Armbian システムのカスタマイズファイルの説明\n\nシステムのコンパイルプロセスは [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) ファイルによって制御されます。workflows ディレクトリ内の他の .yml ファイルはそれぞれ異なる機能を実現するために使用されます。コンパイル時には Armbian 公式の最新コードを使用してリアルタイムにコンパイルされます。関連パラメータについては公式ドキュメントを参照してください。\n\n```yaml\n- name: Compile Armbian [ ${{ inputs.set_release }} ]\n  id: compile\n  if: ${{ steps.down.outputs.status }} == 'success' && !cancelled()\n  run: |\n    # Compile method and parameter description: https://docs.armbian.com/Developer-Guide_Build-Options\n    cd build/\n        ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=odroidn2 BRANCH=current BUILD_MINIMAL=no \\\n                      BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \\\n                      COMPRESS_OUTPUTIMAGE=\"sha\" SHARE_LOG=yes\n    echo \"status=success\" >> ${GITHUB_OUTPUT}\n```\n\n`ophub` を使用して Armbian をパッケージングする際、`armbian_files` パラメータにより、ophub の [common-files](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/armbian-files/common-files) ディレクトリにカスタムファイルを追加または上書きできます。ディレクトリ構造は Armbian のルートディレクトリと同じに保つ必要があり、ファイルがファームウェアに正しく上書きされるようにします（例：デフォルト設定ファイルは `etc/default/` サブディレクトリに配置する必要があります）。例は以下の通りです：\n\n```yaml\n- name: Rebuild Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img.gz\n    armbian_files: files\n    ...\n```\n\n## 5. システムのコンパイル\n\nシステムのコンパイルは、手動コンパイル、定期コンパイル、特定イベントによるトリガーコンパイルなど、複数の方法をサポートしています。\n\n### 5.1 手動コンパイル\n\nリポジトリのナビゲーションバーで Actions をクリックし、Build armbian > Run workflow > Run workflow の順にクリックするとコンパイルが開始されます。全プロセスには約3時間かかります。操作の流れは以下の通りです：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163203938-e7762b09-e6b8-4cf5-b1f1-9c67c1a29953.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204044-9c7a7429-47ee-4fce-b7dd-e217bebf6133.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204127-6b16b558-7e78-4c22-a28a-7b37b5a34fa3.png width=\"300\" />\n</div>\n\n### 5.2 定期コンパイル\n\n[.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) ファイル内で、Cron を使用して定期コンパイルを設定します。5つの異なる位置はそれぞれ 分 (0 - 59) / 時 (0 - 23) / 日 (1 - 31) / 月 (1 - 12) / 曜日 (0 - 6)（日曜日 - 土曜日）を表します。各位置の数値を変更して時刻を設定してください。システムはデフォルトで UTC 標準時を使用しますので、お住まいの国のタイムゾーンに合わせて換算してください。\n\n```yaml\nschedule:\n  - cron: '0 17 * * *'\n```\n\n### 5.3 デフォルトシステム設定のカスタマイズ\n\nデフォルトのシステム設定情報は [model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) ファイルに記録されています。`BOARD` 名は一意でなければなりません。\n\n`BUILD` 値が `yes` のデバイスはデフォルトで構築されるデバイスであり、対応するシステムを直接使用できます。デフォルト値が `no` のデバイスはデフォルトの構築に含まれておらず、使用する際は同じ `FAMILY` の構築済みシステムをダウンロードする必要があります。`USB` に書き込んだ後、パソコンで `USB の boot パーティション` を開き、`/boot/uEnv.txt` ファイル内の `FDT dtb 名` を変更することで、リスト内の他のデバイスに対応させることができます。\n\nローカルコンパイル時は `-b` パラメータで指定し、GitHub Actions でのコンパイル時は `armbian_board` パラメータで指定します。`-b all` は `BUILD` が `yes` の全デバイスを構築することを意味します。`BOARD` パラメータを指定する場合、`BUILD` 値が `yes` でも `no` でも構築可能です。例：`-b r68s_s905x3-tx3_s905l3a-cm311`\n\n### 5.4 論理ボリュームを使用して Github Actions のコンパイル領域を拡張する\n\nGitHub Actions のデフォルトコンパイル領域は 84G で、システムと必要なパッケージを除くと利用可能な領域は約 50G です。全ファームウェアのコンパイル時に容量不足が発生する場合があり、論理ボリュームを使用してコンパイル領域を約 110G に拡張できます。[.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) ファイルの方法を参照し、以下のコマンドで論理ボリュームを作成し、コンパイル時に論理ボリュームのパスを使用してください。\n\n```yaml\n- name: Create simulated physical disk\n  run: |\n    mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n    root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n    sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n    sudo truncate -s \"${root_size}\"G /root.img\n    sudo losetup /dev/loop6 /mnt/mnt.img\n    sudo losetup /dev/loop7 /root.img\n    sudo pvcreate /dev/loop6\n    sudo pvcreate /dev/loop7\n    sudo vgcreate github /dev/loop6 /dev/loop7\n    sudo lvcreate -n runner -l 100%FREE github\n    sudo mkfs.xfs /dev/github/runner\n    sudo mkdir -p /builder\n    sudo mount /dev/github/runner /builder\n    sudo chown -R runner.runner /builder\n    df -Th\n```\n\n### 5.5 Armbian Docker イメージの作成\n\nArmbian システムの [Docker](https://hub.docker.com/u/ophub) イメージの作成方法については、[armbian_docker](../compile-kernel/tools/script/docker) 作成スクリプトを参照してください。\n\n## 6. システムの保存\n\nシステムの保存設定も [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) ファイルで制御されます。コンパイル完了したシステムはスクリプトにより自動的に GitHub 公式の Releases にアップロードされます。\n\n```yaml\n- name: Upload Armbian image to Release\n  uses: ncipollo/release-action@main\n  if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()\n  with:\n    tag: Armbian_${{ env.ARMBIAN_RELEASE }}_${{ env.PACKAGED_OUTPUTDATE }}\n    artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n    allowUpdates: true\n    token: ${{ secrets.GITHUB_TOKEN }}\n    body: |\n      These are the Armbian OS image\n      * OS information\n      Default username: root\n      Default password: 1234\n      Install command: armbian-install\n      Update command: armbian-update\n```\n\n## 7. システムのダウンロード\n\nリポジトリのトップページ右下の Release セクションからアクセスし、自分のデバイスモデルに対応するシステムを選択してください。操作の流れは以下の通りです：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163204798-0d98524c-73df-4876-8912-fcae2845fbba.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204879-4898babf-fa00-4e63-89ea-235129e2ce1d.png width=\"300\" />\n</div>\n\n## 8. Armbian を EMMC にインストールする\n\nAmlogic、Rockchip、Allwinner のインストール方法はそれぞれ異なります。各デバイスは外部 microSD カード、eMMC、NVMe など異なるストレージメディアをサポートしており、以下ではデバイスタイプ別にインストール方法を説明します。まず [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) から対応デバイスの Armbian システムをダウンロードし、.img 形式に解凍して準備してから、デバイスタイプに応じて以下の該当セクションを参照してインストールしてください。\n\nインストール完了後、デバイスを`ルーター`に接続し、起動から約 `2 分`後、ルーターでデバイス名が Armbian の `IP` アドレスを確認し、`SSH` ツールで接続して管理設定を行えます。デフォルトユーザー名は `root`、デフォルトパスワードは `1234`、デフォルトポートは `22` です。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972715-addcd695-970a-43d6-8a34-24a9c4bc80a2.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972773-fc9e9ef9-69a7-4279-8329-6fad1cf2f5b9.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972818-b72e18cd-17d1-4f9f-a0fa-b6c22eef041d.png width=\"600\" />\n</div>\n\n### 8.1 Amlogic シリーズのインストール方法\n\nArmbian システムにログイン（デフォルトユーザー: root, デフォルトパスワード: 1234）→ コマンドを入力：\n\n```shell\narmbian-install\n```\n\n| オプションパラメータ  | デフォルト値   | 選択肢     | 説明                |\n| -------  | ------- | ------  | -----------------   |\n| -m       | no      | yes/no  | Mainline u-boot を使用 |\n| -a       | yes     | yes/no  | [ampart](https://github.com/7Ji/ampart) パーティションテーブル調整ツールを使用 |\n| -l       | no      | yes/no  | List. 全デバイスリストを表示 |\n\n例: `armbian-install -m yes -a no`\n\n### 8.2 Rockchip シリーズのインストール方法\n\n各デバイスのインストール方法は以下の通りです。\n\n#### 8.2.1 Radxa-Rock5B のインストール方法\n\nRadxa-Rock5B は microSD/eMMC/NVMe など複数のストレージメディアをサポートしており、インストール方法はメディアによって異なります。[rk3588_spl_loader_v1.08.111.bin と spi_image.img](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/rock5b) ファイルをダウンロードしておきます。[RKDevTool](https://github.com/ophub/kernel/releases/download/tools/Radxa_rock5b_RKDevTool_Release_v2.96__DriverAssitant_v5.1.1.tar.gz) ツールとドライバをダウンロードしておきます。[Rufus](https://rufus.ie/) または [balenaEtcher](https://www.balena.io/etcher/) 書き込みツールをダウンロードしておきます。\n\n##### 8.2.1.1 microSD へのシステムインストール\n\nRufus や balenaEtcher などのツールで Armbian システムイメージを microSD に書き込み、microSD をデバイスに挿入すれば使用できます。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972996-300f223b-f6f6-48af-86ca-bdc842e5017d.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202973216-85b1a21b-0763-4a36-8c57-84490e071fdd.png width=\"600\" />\n</div>\n\n##### 8.2.1.2 eMMC へのシステムインストール\n\nmicroSD カードを使用したインストール：Armbian システムイメージを microSD カードに書き込み、microSD カードをデバイスに挿入して起動し、`armbian.img` イメージファイルを microSD カードにアップロードし、`dd` コマンドで Armbian イメージを NVMe に書き込みます。コマンドは以下の通りです：\n\n```Shell\ndd if=armbian.img  of=/dev/mmcblk1  bs=1M status=progress\n```\n\n- USB-eMMC リーダーを使用したインストール：eMMC モジュールをパソコンに接続し、Rufus や balenaEtcher などのツールで Armbian システムイメージを eMMC に書き込み、eMMC をデバイスに挿入すれば使用できます。\n- Maskrom モードを使用したインストール：開発ボードの電源をオフにします。金色のボタンを押し続けます。USB-A to Type-C ケーブルを ROCK 5B の Type-C ポートに挿し、もう一方を PC に接続します。金色のボタンを離します。USB デバイスで MASKROM デバイスが検出されたことを確認します。リストの空白部分を右クリックし、`rock-5b-emmc.cfg` 設定ファイルを読み込みます（設定ファイルは RKDevTool と同じディレクトリにあります）。`rk3588_spl_loader_v1.08.111.bin` と `Armbian.img` を下図のように設定し、書き込みを選択します。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954901-c829d74d-c75a-4fd3-9bd0-aa3cdf2b77b4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954998-c08514e2-8760-4c0f-b5f7-0d30be635aa5.png width=\"600\" />\n</div>\n\n##### 8.2.1.3 NVMe へのシステムインストール\n\nROCK-5B メインボードには SPI フラッシュが搭載されており、ブートローダーを SPI フラッシュに書き込むことで、SoC の maskrom モードが直接サポートしていない起動メディア（SATA、USB3、NVMe など）からの起動が可能になります。NVMe での起動前に SPI ファイルを書き込む必要があります。方法は以下の通りです：\n\n開発ボードの電源をオフにし、MicroSD カード、eMMC モジュールなどの起動可能なデバイスを取り外します。金色（または一部のリビジョンでは銀色）のボタンを押し続け、USB-A to Type-C ケーブルを ROCK-5B の Type-C ポートに挿し、もう一方を PC に接続します。ボタンを離し、USB デバイスで MASKROM デバイスが検出されたか確認します。リストボックスで右クリックして設定を読み込み、エクスプローラーで設定ファイルを選択します（設定ファイルは RKDevTool と同じディレクトリにあります）。下図に従って `rk3588_spl_loader_v1.08.111.bin` と `spi_image.img` ファイルを選択し、書き込みをクリックします：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961420-8316c96c-2796-43ed-b5ed-2fa5bfa1ddff.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961447-49c0941a-e233-4b2a-b96b-b47636ce3cf2.png width=\"600\" />\n</div>\n\n- リーダーを使用したインストール：M.2 NVMe SSD を M.2 NVMe SSD-USB3.0 リーダーに挿入してホストに接続します。Rufus や balenaEtcher などのツールで Armbian システムイメージを NVMe に書き込み、NVMe をデバイスに挿入すれば使用できます。\n- microSD カードを使用したインストール：Armbian システムイメージを microSD カードに書き込み、microSD カードをデバイスに挿入して起動し、`armbian.img` イメージファイルを microSD カードにアップロードし、`dd` コマンドで Armbian イメージを NVMe に書き込みます。コマンドは以下の通りです：\n\n```Shell\ndd if=armbian.img  of=/dev/nvme0n1  bs=1M status=progress\n```\n\n#### 8.2.2 電犀牛 R66S のインストール方法\n\nRufus や balenaEtcher などのツールで Armbian システムイメージを microSD に書き込み、microSD をデバイスに挿入すれば使用できます。\n\n#### 8.2.3 電犀牛 R68S のインストール方法\n\n- [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) ツールとドライバをダウンロードし、解凍して DriverAssitant ドライバをインストールし、RKDevTool ツールを開いておきます。\n- R68s が電源オフの状態で、まず USB デュアルオスケーブルを挿し、Recovery キーを押しながら 12V 電源を接続し、2秒後に Recovery キーを離すと、フラッシュツールが`LOADER デバイスを発見`します。\n- RKDevTool ツールの操作画面の空白部分を右クリックし、項目を追加します。\n- アドレスは `0x00000000`、名前は `armbian`、パスの右側をクリックして `armbian.img` システムファイルを選択します。\n- 追加した armbian の行以外の`他の行の選択を解除`し、`実行`をクリックして書き込みます。\n- 補足説明：eMMC に他のシステムが書き込まれている場合は、まず高度な機能で消去してから、Armbian システムを書き込んでください。消去できない場合は、まず `MiniLoaderAll.bin` ブートファイルを再度書き込み、その後 `MASKROM` に入って Armbian システムを書き込んでください。MiniLoaderAll.bin ブートファイルの設定：アドレス `0xCCCCCCCC`、名前 `Loader`、パスは RKDevTool フラッシュツールの Image ディレクトリにある `MiniLoaderAll.bin` ファイルを選択します。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202970301-d798677b-e875-4971-ac8f-ee58b2a1e686.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970405-cb68cb78-cd0f-43ee-b807-5e594ab73099.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970488-5f18c574-c11f-486f-8fe8-002f3ba2f3f4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970577-87549acf-b98b-441f-bb31-e4fd6608108d.png width=\"600\" />\n</div>\n\n#### 8.2.4 貝殻クラウドのインストール方法\n\n方法は [milton](https://www.cnblogs.com/milton/p/15391525.html) のチュートリアルから転載しています。フラッシュするには Maskrom モードに入る必要があります。まずすべての接続を切断し、CLK と GND（TTL の GND、または隣の小さいボタンの GND のどちらでも可）の2つの接点をショートさせてから、USB を PC に接続すると MASKROM デバイスが検出されます。ショートポイントの位置は以下の通りです：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202977817-fb12d291-47e2-47e4-88c3-e21f9ae57922.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202977900-50b4770d-8444-42a0-8478-3234043455bd.png width=\"600\" />\n</div>\n\nRKDevTool フラッシュツールを開き、右クリックで項目を追加します。\n\n- アドレス `0xCCCCCCCC`、名前 `Boot`、パスは [こちら](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/beikeyun) から `rk3328_loader_v1.14.249.bin` を選択します。\n- アドレス `0x00000000`、名前 `system`、パスはフラッシュする `Armbian.img` システムを選択します。\n- `強制アドレス書き込み` にチェックを入れ、`実行` をクリックし、右側のダウンロードパネルに進捗が完了と表示されるまで待ちます。\n\n#### 8.2.5 我家クラウドのインストール方法\n\n方法は [cc747](https://post.smzdm.com/p/a4wkdo7l/) のチュートリアルから転載しています。フラッシュするには Maskrom モードに入る必要があります。デバイスが電源オフの状態であることを確認し、すべてのケーブルを抜きます。USB デュアルオスケーブルの一方を我家クラウドの USB2.0 ポートに、もう一方をパソコンに接続します。クリップを Reset 穴に挿し、押し続けます。電源ケーブルを接続し、数秒待ち、RKDevTool の下部に `LOADER デバイスを発見` と表示されたらクリップを離します。RKDevTool を `高度な機能` に切り替え、`Maskrom に入る` ボタンをクリックすると、`MASKROM デバイスを発見` と表示されます。右クリックで項目を追加します。\n\n- アドレス `0xCCCCCCCC`、名前 `Boot`、パスは [こちら](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/chainedbox) から `rk3328_loader_v1.14.249.bin` を選択します。\n- アドレス `0x00000000`、名前 `system`、パスはフラッシュする `Armbian.img` システムを選択します。\n- `強制アドレス書き込み` にチェックを入れ、`実行` をクリックし、右側のダウンロードパネルに進捗が完了と表示されるまで待ちます。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a6d2d8c0-35c5-44ba-be35-fd2e2758729b width=\"600\" /><br />\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/13aab016-1b93-4ff1-b1ef-c202bd357068 width=\"600\" />\n</div>\n\n#### 8.2.6 泰山派のインストール方法\n- [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) ツールとドライバをダウンロードし、解凍して DriverAssitant ドライバをインストールし、RKDevTool ツールを開きます。（注意：2.92ではなく2.86バージョンのツールを使用してください。2.92バージョンは書き込み時にクラッシュします）\n- 泰山派が電源オフの状態で Recovery キーを押しながら Type-C データケーブルを接続し、RKDevTool に `LOADER デバイスを発見` と表示されたら Recovery キーを離します。右クリックで項目を追加します。\n- アドレス `0x00000000`、名前 `system`、パスはフラッシュする `Armbian.img` システムを選択します。\n- 実行をクリックし、プログレスバーが完了するまで待ちます。\n\n\n### 8.3 Allwinner シリーズのインストール方法\n\nArmbian システムにログイン（デフォルトユーザー: root, デフォルトパスワード: 1234）→ コマンドを入力：\n\n```shell\narmbian-install\n```\n\n### 8.4 Docker 版 Armbian のインストール方法\n\nUbuntu/Debian/Armbian システムで Docker 版の Armbian イメージを使用できます。これらのイメージは [Docker Hub](https://hub.docker.com/r/ophub) にホストされており、直接ダウンロードして使用できます。\n\n4つの異なるカーネルバージョンの Armbian Docker イメージが提供されています：`armbian-trixie`、`armbian-bookworm`、`armbian-noble`、`armbian-resolute`。各バージョンとも `arm64` と `amd64` アーキテクチャを提供しており、必要に応じて選択できます。\n\narmbian-trixie は debian13 ベース、armbian-bookworm は debian12 ベース、armbian-noble は ubuntu24.04 ベース、armbian-resolute は ubuntu26.04 ベースです。\n\narm64 バージョンは Amlogic/Rockchip/Allwinner などのプラットフォームアーキテクチャのデバイスに適用され、amd64 バージョンは x86_64 アーキテクチャの PC やサーバーに適用されます。\n\n#### 8.4.1 Docker 実行環境のインストール\n\n```shell\ncurl -fsSL https://get.docker.com | sh\nsudo usermod -aG docker $USER\nsudo newgrp docker\n```\n\n#### 8.4.2 macvlan ネットワークの設定\n\n```shell\n# 既存の docker ネットワークに macvlan ネットワークが含まれているか確認\ndocker network ls\n\n# macvlan ネットワークがない場合は作成\n# サブネット、ゲートウェイ、ネットワークインターフェース名は実際のネットワークに合わせて変更してください\ndocker network create -d macvlan \\\n    --subnet=10.1.1.0/24 \\\n    --gateway=10.1.1.1 \\\n    -o parent=eth0 \\\n    macvlan\n```\n\n#### 8.4.3 Armbian Docker コンテナの実行\n\n`armbian-trixie:arm64` イメージを例に、Armbian コンテナの実行方法を説明します。\n\n```shell\n# バックグラウンドで Armbian コンテナを実行\n# コンテナ名、IPアドレス、イメージバージョンなどは実際の状況に合わせて変更してください\ndocker run -itd --name=armbian-trixie \\\n    --privileged \\\n    --network macvlan \\\n    --ip 10.1.1.15 \\\n    --hostname=armbian-trixie \\\n    -e TZ=Asia/Shanghai \\\n    --restart unless-stopped \\\n    ophub/armbian-trixie:arm64\n\n# Armbian コンテナのログを確認\ndocker logs -f armbian-trixie\n\n# Armbian コンテナに入る\ndocker exec -it armbian-trixie bash\n\n# Armbian コンテナから出る\nexit\n\n# Armbian コンテナを停止して削除\ndocker rm -f armbian-trixie\n```\n\n## 9. Armbian カーネルのコンパイル\n\nUbuntu、Debian、Armbian システムでのカーネルコンパイルをサポートしており、ローカルコンパイルと GitHub Actions クラウドコンパイルの両方に対応しています。詳細な方法については [カーネルコンパイル説明](../../compile-kernel/README.ja.md) を参照してください。\n\n### 9.1 カスタムカーネルパッチの追加方法\n\nカーネルパッチディレクトリ [tools/patch](../../compile-kernel/tools/patch) に共通カーネルパッチディレクトリ（`common-kernel-patches`）、または `カーネルソースリポジトリと同名` のディレクトリがある場合（例：[linux-5.15.y](https://github.com/unifreq/linux-5.15.y)）、`-p true` でカーネルパッチを自動適用できます。パッチディレクトリの命名規則は以下の通りです：\n\n```shell\n~/amlogic-s9xxx-armbian\n    └── compile-kernel\n        └── tools\n            └── patch\n                ├── common-kernel-patches  # 固定ディレクトリ名：各バージョン共通のカーネルパッチを格納\n                ├── linux-5.15.y           # カーネルソースリポジトリと同名：専用パッチを格納\n                ├── linux-6.1.y\n                ├── linux-5.10.y-rk35xx\n                └── more kernel directory...\n```\n\n- ローカルでカーネルをコンパイルする場合、対応するディレクトリを手動で作成し、カスタムカーネルパッチを追加できます。\n- GitHub Actions クラウドコンパイル時は、`kernel_patch` パラメータでリポジトリ内のカーネルパッチディレクトリを指定できます。例えば [kernel](https://github.com/ophub/kernel) リポジトリの [compile-beta-kernel.yml](https://github.com/ophub/kernel/blob/main/.github/workflows/compile-beta-kernel.yml) での使用方法：\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 5.15.1_6.1.1\n    kernel_auto: true\n    kernel_patch: kernel-patch/beta\n    auto_patch: true\n```\n\n`kernel_patch` パラメータでカスタムカーネルパッチを指定する場合、パッチディレクトリは上記の規則に従って命名してください。\n\n### 9.2 カーネルパッチの作成方法\n\n- [Armbian](https://github.com/armbian/build) や [OpenWrt](https://github.com/openwrt/openwrt) などのリポジトリから取得：例えば [armbian/patch/kernel](https://github.com/armbian/build/tree/main/patch/kernel/archive) や [openwrt/rockchip/patches-6.1](https://github.com/openwrt/openwrt/tree/main/target/linux/rockchip/patches-6.1)、[lede/rockchip/patches-5.15](https://github.com/coolsnowwolf/lede/tree/master/target/linux/rockchip/patches-5.15) など、メインラインカーネルに基づくリポジトリのパッチは通常そのまま使用できます。\n- github.com リポジトリのコミットから取得：対応する `commit` アドレスの末尾に `.patch` を追加するとパッチを生成できます。\n\nカスタムカーネルパッチを追加する前に、上流のカーネルソースリポジトリ [unifreq/linux-k.x.y](https://github.com/unifreq) と照合し、そのパッチがまだマージされていないことを確認して、コンフリクトを避けてください。テスト済みのカーネルパッチは、unifreq が管理するカーネルリポジトリシリーズへの提出をお勧めします。コミュニティのすべての貢献が、Armbian と OpenWrt システムをより安定して信頼できるものにします。\n\n### 9.3 カスタムドライバモジュールのコンパイル方法\n\nLinux メインラインカーネルには一部のドライバがまだ内蔵されていないため、自分でドライバモジュールをコンパイルできます。メインラインカーネルをサポートするドライバを選択してください。Android ドライバは通常メインラインカーネルと互換性がなく、コンパイルできません。例は以下の通りです：\n\n```shell\n# ステップ1：最新カーネルに更新\n# 初期の header ファイルが不完全なため、最新のカーネルに更新する必要があります。\n# 各カーネルバージョンの要件：5.10.222, 5.15.163, 6.1.100, 6.6.41 以上\narmbian-sync\narmbian-update -k 6.1\n\n\n# ステップ2：コンパイルツールのインストール\nmkdir -p /usr/local/toolchain\ncd /usr/local/toolchain\n# コンパイルツールのダウンロード\nwget https://github.com/ophub/kernel/releases/download/dev/arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# 解凍\ntar -Jxf arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# その他のコンパイル依存パッケージのインストール（オプション、エラーメッセージに応じて不足分を手動インストール可能）\narmbian-kernel -u\n\n\n# ステップ3：ドライバのダウンロードとコンパイル\n# ドライバソースコードのダウンロード\ncd ~/\ngit clone https://github.com/jwrdegoede/rtl8189ES_linux\ncd rtl8189ES_linux\n# コンパイル環境の設定\ngun_file=\"arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\"\ntoolchain_path=\"/usr/local/toolchain\"\ntoolchain_name=\"gcc\"\nexport CROSS_COMPILE=\"${toolchain_path}/${gun_file//.tar.xz/}/bin/aarch64-none-linux-gnu-\"\nexport CC=\"${CROSS_COMPILE}gcc\"\nexport LD=\"${CROSS_COMPILE}ld.bfd\"\nexport ARCH=\"arm64\"\nexport KSRC=/usr/lib/modules/$(uname -r)/build\n# ソースコードの実際のパスに基づいて M 変数を設定\nexport M=\"/root/rtl8189ES_linux\"\n# ドライバのコンパイル\nmake\n\n\n# ステップ4：ドライバのインストール\nsudo cp -f 8189es.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/\n# モジュール依存関係の更新\nsudo depmod -a\n# ドライバモジュールのロード\nsudo modprobe 8189es\n# ドライバがロードされたか確認\nlsmod | grep 8189es\n# 正常にドライバがロードされたことを確認できます\n8189es               1843200  0\ncfg80211              917504  2 8189es,brcmfmac\n```\n\n図は以下の通りです：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a89cbe6-df38-4862-8d11-9d977e0f4191\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a1d0bb9-44d4-4de5-9907-47e5f20747a7\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1bd2eff-4c57-4e91-a870-08b0f8b1fe16\">\n</div>\n\n## 10. Armbian カーネルの更新\n\nArmbian システムにログイン → コマンドを入力：\n\n```shell\n# root ユーザーで実行 (sudo -i)\n# パラメータを指定しない場合、最新バージョンに更新されます。\narmbian-update\n```\n\n| オプションパラメータ  | デフォルト値        | 選択肢           | 説明                              |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r       | ophub/kernel | `<owner>/<repo>` | github.com からカーネルをダウンロードするリポジトリを設定  |\n| -u       | 自動        | stable/flippy/beta/rk3588/rk35xx/h6 | 使用するカーネルの [tags サフィックス](https://github.com/ophub/kernel/releases) を設定 |\n| -k       | 最新版        | カーネルバージョン       | [カーネルバージョン](https://github.com/ophub/kernel/releases/tag/kernel_stable) を設定  |\n| -b       | yes          | yes/no        | カーネル更新時に現在使用中のカーネルを自動バックアップ    |\n| -d       | deb          | tar/deb       | 優先使用するカーネルパッケージ形式を設定。指定形式が存在しない場合、スクリプトは自動的に別の形式を試行します。カスタムドライバをコンパイルする場合は `deb` 形式を推奨。 |\n| -m       | no           | yes/no        | メインライン u-boot を使用                    |\n| -s       | なし           | なし/ディスク名称     | [SOS] eMMC/NVMe/sdX などのディスク内のシステムカーネルを復旧 |\n| -h       | なし           | なし             | 使用方法のヘルプを表示                       |\n\n例: `armbian-update -k 5.15 -u stable -d deb`\n\n`-k` パラメータでカーネルバージョン番号を指定する場合、正確なバージョン番号の指定（例：`armbian-update -k 5.15.50`）と、カーネルシリーズの指定（例：`armbian-update -k 5.15`）の両方が可能です。シリーズを指定した場合、そのシリーズの最新バージョンが自動的に使用されます。\n\nカーネル更新時には、現在使用中のカーネルが自動的に `/ddbr/backup` ディレクトリにバックアップされ、最新の3バージョンが保持されます。新しいカーネルが不安定な場合、いつでもバックアップバージョンに復元できます：\n```shell\n# バックアップしたカーネルディレクトリに移動（例：6.6.12）\ncd /ddbr/backup/6.6.12\n# カーネル更新コマンドを実行すると、現在のディレクトリ内のカーネルが自動インストールされます\narmbian-update\n```\n\n[SOS]：異常によりアップデートが不完全な状態となり、eMMC/NVMe/sdX からシステムが起動できない場合、USB などの別のディスクから任意のバージョンの Armbian システムを起動し、`armbian-update -s` コマンドを実行して USB 内のシステムカーネルを eMMC/NVMe/sdX に復旧させることで、システムレスキューを行えます。ディスクパラメータを指定しない場合、デフォルトで USB デバイスから eMMC/NVMe/sdX 内のカーネルを復旧します。デバイスに複数のディスクがある場合、ターゲットディスク名を正確に指定できます。例は以下の通りです：\n\n```shell\n# eMMC 内のカーネルを復旧\narmbian-update -s mmcblk1\n# NVMe 内のカーネルを復旧\narmbian-update -s nvme0n1\n# リムーバブルストレージデバイス内のカーネルを復旧\narmbian-update -s sda\n# ディスク名は mmcblk0/mmcblk1/nvme0n1/nvme1n1/sda/sdb/sdc などの省略形や、/dev/sda のような完全名も使用可能\narmbian-update -s /dev/sda\n# デバイスに eMMC/NVMe/sdX のうち1つの内蔵ストレージしかない場合、ディスク名パラメータを省略可能\narmbian-update -s\n```\n\nネットワークの問題で github.com にアクセスしてオンライン更新ができない場合、カーネルファイルを手動でダウンロードして Armbian システムの任意のディレクトリにアップロードできます。その後、そのディレクトリに移動し、`armbian-update` コマンドを実行するとローカルインストールが行えます。カレントディレクトリに完全なカーネルファイルセットが存在する場合、システムはローカルファイルを優先して更新に使用します。カーネルは `tar` と `deb` の2つの形式をサポートしており、それぞれ必要な4つのコアファイルは以下の通りです：\n\n- `tar` 形式の更新に必要な4ファイル：`header-xxx.tar.gz`、`boot-xxx.tar.gz`、`dtb-xxx.tar.gz`、`modules-xxx.tar.gz`\n- `deb` 形式の更新に必要な4ファイル：`linux-image-xxx.deb`、`linux-dtb-xxx.deb`、`linux-headers-xxx.deb`、`linux-libc-dev-xxx.deb`\n- 関係のないカーネルファイルを削除する必要はありません。同時に存在しても更新に影響はなく、システムは必要なファイルを正確に識別できます。デバイスがサポートするカーネル範囲内であれば、バージョンを自由に切り替えることができます（例：6.6.12 カーネルから 5.15.50 カーネルへの変更）。\n\n`-r`/`-u`/`-b`/`-d` などのパラメータで設定したカスタムオプションは、設定ファイル `/etc/ophub-release` の関連パラメータに固定化でき、毎回手動入力する必要がなくなります。対応する設定は以下の通りです：\n\n```shell\n# カスタムパラメータの値の設定\n-r  :  KERNEL_REPO='ophub/kernel'\n-u  :  KERNEL_TAGS='stable'\n-b  :  KERNEL_BACKUP='yes'\n-d  :  DOWNLOAD_TYPE='deb'\n```\n\n## 11. よく使うソフトウェアのインストール\n\nArmbian システムにログイン → コマンドを入力：\n\n```shell\narmbian-software\n```\n\n`armbian-software -u` コマンドでローカルのソフトウェアセンターリストを更新できます。ユーザーからの [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) でのフィードバックに基づき、よく使う [ソフトウェア](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) を段階的に統合し、ワンクリックでのインストール、更新、アンインストールをサポートしています。`docker イメージ`、`デスクトップソフトウェア`、`アプリケーションサービス` などが含まれます。詳しくは [説明](armbian_software.md) を参照してください。\n\nお住まいの国や地域に応じて、`armbian-apt` コマンドで適切なソフトウェアソースを選択し、ダウンロード速度を向上させてください。例えば、中国の清華大学ソースを選択する場合：\n\n```shell\narmbian-apt\n\n[ STEPS ] Welcome to the Armbian source change script.\n[ INFO ] Please select a [ bookworm ] mirror site.\n  ┌──────┬───────────────────┬────────────────────────────────┐\n  │  ID  │  Country/Region   │  Mirror Site                   │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   0  │  -                │  Restore default source        │\n  │   1  │  China            │  mirrors.tuna.tsinghua.edu.cn  │\n  │   2  │  China            │  mirrors.bfsu.edu.cn           │\n  │   3  │  China            │  mirrors.aliyun.com            │\n  │   4  │  Hongkong, China  │  mirrors.xtom.hk               │\n  │   5  │  Taiwan, China    │  opensource.nchc.org.tw        │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   6  │  United States    │  mirrors.ocf.berkeley.edu      │\n  │   7  │  United States    │  mirrors.xtom.com              │\n  │   8  │  United States    │  mirrors.mit.edu               │\n  │   9  │  Canada           │  mirror.csclub.uwaterloo.ca    │\n  │  10  │  Canada           │  muug.ca/mirror                │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  11  │  Finland          │  mirror.kumi.systems           │\n  │  12  │  Netherlands      │  mirrors.xtom.nl               │\n  │  13  │  Germany          │  mirrors.xtom.de               │\n  │  14  │  Russia           │  mirror.yandex.ru              │\n  │  15  │  India            │  in.mirror.coganng.com         │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  16  │  Estonia          │  mirrors.xtom.ee               │\n  │  17  │  Australia        │  mirrors.xtom.au               │\n  │  18  │  South Korea      │  mirror.yuki.net.uk            │\n  │  19  │  Singapore        │  mirror.sg.gs                  │\n  │  20  │  Japan            │  mirrors.xtom.jp               │\n  └──────┴───────────────────┴────────────────────────────────┘\n[ OPTIONS ] Please Input ID: 1\n[ INFO ] Your selected source ID is: [ 1 ]\n[ STEPS ] Start to change the source of the system: [ mirrors.tuna.tsinghua.edu.cn ]\n[ INFO ] The system release is: [ bookworm ]\n[ SUCCESS ] Change the source of the system successfully.\n```\n\n## 12. よくある質問\n\n以下は Armbian 使用時に遭遇する可能性のあるよくある質問をまとめたものです。\n\n### 12.1 各デバイスの dtb と u-boot の対応表\n\nサポートされるデバイスリストは、Armbian システムの設定ファイル [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) にあります。\n\n### 12.2 LED ディスプレイ制御の説明\n\n[説明](led_screen_display_control.md) を参照してください。\n\n### 12.3 元の Android TV システムの復元方法\n\n通常、`armbian-ddbr` を使用してデバイスの Android TV システムのバックアップと復元を行います。\n\nまた、ケーブルフラッシュ方式で Android システムを eMMC に書き込むこともできます。Android システムイメージは [Tools](https://github.com/ophub/kernel/releases/tag/tools) から検索できます。\n\n#### 12.3.1 armbian-ddbr を使用したバックアップと復元\n\nArmbian システムをインストールする前に、まずデバイスの元の Android TV システムをバックアップすることをお勧めします。後で必要な場合に復元できます。`TF/SD/USB` から Armbian システムを起動した後、`armbian-ddbr` コマンドを入力し、プロンプトに従って `b` を入力するとバックアップが実行されます。バックアップファイルは `/ddbr/BACKUP-arm-64-emmc.img.gz` に保存されます。大切に保管してください。復元が必要な場合は、バックアップファイルを `TF/SD/USB` デバイスの同じパスにアップロードし、`armbian-ddbr` コマンドを入力して、プロンプトに従って `r` を入力すると復元が実行されます。\n\n#### 12.3.2 Amlogic フラッシュツールを使用した復元\n\n- 通常、電源を再接続後に USB から起動できる場合は、再インストールするだけで済みます。何度か試してみてください。\n\n- ディスプレイを接続後に画面が真っ暗で USB から起動できない場合は、デバイスのショート初期化が必要です。まずデバイスを元の Android システムに復元してから、Armbian を再度フラッシュします。まず [amlogic_usb_burning_tool](https://github.com/ophub/kernel/releases/tag/tools) システム復旧ツールをダウンロードしてインストールします。[USB デュアルオスケーブル](https://user-images.githubusercontent.com/68696949/159267576-74ad69a5-b6fc-489d-b1a6-0f8f8ff28634.png) と [クリップ](https://user-images.githubusercontent.com/68696949/159267790-38cf4681-6827-4cb6-86b2-19c7f1943342.png) を準備します。\n\n- x96max+ を例にすると、メインボード上の [ショートポイント](https://user-images.githubusercontent.com/68696949/110590933-67785300-81b3-11eb-9860-986ef35dca7d.jpg) の位置を確認し、デバイスの [Android TV システムパッケージ](https://github.com/ophub/kernel/releases/tag/tools) をダウンロードします。その他の一般的なデバイスの Android TV システムと対応するショートポイントの図も [こちら](https://github.com/ophub/kernel/releases/tag/tools) からダウンロードして確認できます。\n\n```shell\n操作方法：\n\n1. フラッシュソフトウェア USB Burning Tool を開く：\n   [ ファイル → システムパッケージをインポート ]: X96Max_Plus2_20191213-1457_ATV9_davietPDA_v1.5.img\n   [ 選択 ]：flash を消去\n   [ 選択 ]：bootloader を消去\n   [ 開始 ] ボタンをクリック\n2. [ クリップ ] を使用してデバイスのメインボード上の [ 2つのショートポイントを短絡接続 ] し、\n   同時に [ USB デュアルオスケーブル ] で [ デバイス ] と [ パソコン ] を接続する。\n3. [ プログレスバーが動き始めた ] のを確認したら、クリップを外し、短絡を解除する。\n4. [ プログレスバーが 100% ] になったらフラッシュ完了。デバイスは Android TV システムに復元されています。\n   [ 停止 ] ボタンをクリックし、[ デバイス ] と [ パソコン ] の間の [ USB デュアルオスケーブル ] を抜く。\n5. 上記のいずれかのステップが失敗した場合は、成功するまで再試行してください。\n   プログレスバーが動かない場合は、電源を接続してみてください。通常は電源不要で、USB デュアルオスケーブルの給電のみでフラッシュ要件を満たせます。\n```\n\n工場出荷時設定へのリセットが完了すると、デバイスは Android TV システムに復元されています。後続の Armbian のインストール操作は初回インストールと同じで、元の手順に従って操作してください。\n\n### 12.4 デバイスを USB/TF/SD から起動する設定\n\n実際の状況に応じて、Armbian システムの初回インストールまたは再インストールの対応する方法を選択してください。\n\n#### 12.4.1 Armbian システムの初回インストール\n\n- システムを書き込んだ USB/TF/SD をデバイスに挿入します。\n- 開発者モードを有効にする：設定 → 本機について → バージョン番号（例：X96max plus...）を素早く5回タップし、システムに `開発者モードを有効にしました` と表示されるまで続けます。\n- USB デバッグモードを有効にする：システム → 詳細設定 → 開発者オプション（`USB デバッグを有効にする` を有効に設定）。`ADB` デバッグを有効にします。\n- ADB ツールをインストール：[adb](https://github.com/ophub/kernel/releases/tag/tools) をダウンロードして解凍し、`adb.exe`、`AdbWinApi.dll`、`AdbWinUsbApi.dll` の3つのファイルを `c://windows/` ディレクトリ内の `system32` と `syswow64` フォルダにコピーします。`cmd` コマンドパネルを開き、`adb --version` コマンドを実行し、出力があればインストール成功です。\n- `cmd` コマンドモードに入り、`adb connect 192.168.1.137` コマンドを入力します（IP はデバイスの実際の状況に合わせて変更し、ルーター管理画面で確認できます）。接続成功後 `connected to 192.168.1.137:5555` と表示されます。\n- `adb shell reboot update` コマンドを入力すると、デバイスは再起動して USB/TF/SD から起動します。ブラウザでシステムの IP アドレスにアクセスするか、SSH 接続でシステムに入ることができます。\n\n#### 12.4.2 Armbian システムの再インストール\n\n- 通常の場合、Armbian を書き込んだ USB を USB ポートに挿入するだけで直接起動できます。USB 起動は eMMC より優先されます。\n- 一部のデバイスで USB から起動できない場合は、eMMC 内の Armbian システム `/boot` ディレクトリにある `boot.scr` ファイルの名前を変更し（例：`boot.scr.bak`）、USB を挿入すると正常に起動できます。\n\n### 12.5 赤外線レシーバーの無効化\n\nシステムはデフォルトで赤外線レシーバーのサポートが有効になっています。デバイスをサーバーとして使用する場合、誤操作によるシャットダウンを防ぐため、IR カーネルモジュールを無効にすることをお勧めします。IR を完全に無効にする方法：以下の内容を追加\n\n```shell\nblacklist meson_ir\n```\n\n`/etc/modprobe.d/blacklist.conf` に追加して再起動してください。\n\n### 12.6 ブートファイルの選択\n\n- 現在判明しているデバイスの中で、`T95(s905x)` / `T95Z-Plus(s912)` / `BesTV-R3300L(s905l-b)` など少数のデバイスのみ `/bootfs/extlinux/extlinux.conf` ファイルの使用が必要で、システムにはデフォルトで追加されています。その他のデバイスで必要な場合は、システムを USB に書き込んだ後 `boot` パーティションを開き、システム付属の `/boot/extlinux/extlinux.conf.bak` ファイル名から `.bak` を削除すると使用できます。eMMC への書き込み時には、`armbian-install` が自動的にチェックし、`extlinux.conf` ファイルが存在する場合は自動的に作成します。\n\n- その他のデバイスは `/boot/uEnv.txt` のみで起動でき、`extlinux.conf.bak` ファイルを変更しないでください。\n\n### 12.7 ネットワーク設定\n\n#### 12.7.1 interfaces を使用したネットワーク設定\n\nネットワーク設定ファイル `/etc/network/interfaces` のデフォルト内容は以下の通りです：\n\n```shell\nsource /etc/network/interfaces.d/*\n# Network is managed by Network manager\nauto lo\niface lo inet loopback\n```\n\n##### 12.7.1.1 DHCP による動的 IP アドレスの割り当て\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\niface eth0 inet dhcp\n```\n\n##### 12.7.1.2 静的 IP アドレスの手動設定\n\nIP、ゲートウェイ、DNS は自分のネットワーク状況に合わせて変更してください。\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\nallow-hotplug eth0\niface eth0 inet static\nhwaddress ether 12:34:56:78:9A:DA\naddress 192.168.1.100\nnetmask 255.255.255.0\ngateway 192.168.1.1\ndns-nameservers 192.168.1.1\n```\n\n##### 12.7.1.3 Docker 内で OpenWrt を使用した相互通信ネットワークの構築\n\nMAC アドレスは必要に応じて変更してください。\n\n```shell\nsource /etc/network/interfaces.d/*\n\nallow-hotplug eth0\nno-auto-down eth0\nauto eth0\niface eth0 inet manual\n\nauto macvlan\niface macvlan inet dhcp\n        pre-up ip link add macvlan link eth0 type macvlan mode bridge\n        post-down ip link del macvlan link eth0 type macvlan mode bridge\n\nauto lo\niface lo inet loopback\n```\n\n#### 12.7.2 NetworkManager を使用したネットワーク管理\n\n##### 12.7.2.1 新しいネットワーク接続の作成\n\n新しいネットワーク接続の作成または変更前の準備作業\n\n###### 12.7.2.1.1 ネットワークインターフェース名の取得\n\nデバイスで利用可能なネットワークインターフェースを確認します。\n\n```shell\nnmcli device | grep -E \"^[e].*|^[w].*|^[D].*|^[T].*\" | awk '{printf \"%-19s%-19s\\n\",$1,$2}'\n```\n\nコマンド実行後の返却内容：`DEVICE` 列はネットワークインターフェース名、`TYPE` 列はネットワークインターフェースタイプを表示します。\n\n`eth0` = 1番目の有線ネットワークカード名、`eth1` = 2番目の有線ネットワークカード名、以降同様。無線ネットワークカードも同様です。\n\n```shell\nDEVICE             TYPE\neth0               ethernet\neth1               ethernet\neth2               ethernet\neth3               ethernet\nwlan0              wifi\nwlan1              wifi\n```\n\n###### 12.7.2.1.2 既存のネットワーク接続名の取得\n\nデバイスの既存のネットワーク接続（有効・無効を含む）を確認します。新しい接続を作成する際は、既存の接続と異なる名前を使用することをお勧めします。\n\n```shell\nnmcli connection show | grep -E \".*|^[N].*\" | awk '{printf \"%-19s%-19s\\n\", $1,$3}'\n```\n\nコマンド実行後の返却内容：`NAME` 列は既存のネットワーク接続名、`TYPE` 列はネットワークインターフェースタイプを表示します。\n\n`ethernet` = 有線ネットワークカード、`wifi` = 無線ネットワークカード、`bridge` = ネットワークブリッジ\n\n```shell\nNAME               TYPE\ncnc                ethernet\nlan                ethernet\nlte                ethernet\ntel                ethernet\ndocker0            bridge\ntitanium           wifi\ncpe                wifi\n```\n\n###### 12.7.2.1.3 新しい有線ネットワーク接続の作成\n\nネットワークインターフェース `eth0` に新しいネットワーク接続を作成し、即座に有効化（`動的 IP アドレス` - `IPv4 / IPv6`）。\n\n```shell\n# Set ENV\nMYCON=ether1                  # 新しいネットワーク接続名\nMYETH=eth0                    # ネットワークインターフェース名 = eth0 / eth1 / eht2 / eth3\nIPV6AGM=stable-privacy        # IPv6 アドレス状態モード = stable-privacy / eui64\n\n# Add ETH\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM\nnmcli connection up $MYCON\nip -c -br address\n```\n\nネットワークインターフェース `eth0` に新しいネットワーク接続を作成し、即座に有効化（`静的 IP アドレス` - `IPv4`）。\n\n```shell\n# Set ENV\nMYCON=ether1                  # ネットワーク接続名\nMYETH=eth0                    # ネットワークインターフェース名 = eth0 / eth1 / eht2 / eth3\nIP=192.168.67.167/24          # ホスト IP アドレス。24 はサブネットマスク（255.255.255.0 に対応）\nGW=192.168.67.1               # ゲートウェイ\nDNS=119.29.29.29,223.5.5.5    # DNS サーバーアドレス\n\n# Chg CON\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.1.4 新しい無線ネットワーク接続の作成\n\nネットワークインターフェース `wlan0` に新しいネットワーク接続を作成し、即座に有効化（`動的 IP アドレス` - `IPv4 / IPv6`）。\n\n```shell\n# Set ENV\nMYCON=ssid                    # 新しいネットワーク接続名。WiFi SSID を使用して接続名を指定することを推奨\nMYSSID=ssid                   # WiFi SSID（大文字小文字を区別）\nMYPSWD=passwd                 # WiFi パスワード\nMYWSKM=wpa-psk                # セキュリティ選択：WPA-WPA2 = wpa-psk または WPA3 = sae（無線ルーターまたは AP で暗号化方式を確認）\nMYWLAN=wlan0                  # ネットワークインターフェース名 = wlan0 / wlan1\nIPV6AGM=stable-privacy        # IPv6 アドレス状態モード = stable-privacy / eui64\n\n# Add WLAN\nnmcli connection add \\\ncon-name $MYCON \\\ntype wifi \\\nifname $MYWLAN \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.2 無線ネットワーク接続の WiFi SSID または PASSWD の変更\n\n無線ネットワーク接続 `ssid` の `WiFi SSID or PASSWD` を変更し、即座に有効化。\n\n```shell\n# Set ENV\nMYCON=ssid                    # 無線ネットワーク接続名\nMYSSID=ssid                   # WiFi SSID（大文字小文字を区別）\nMYPSWD=passwd                 # WiFi パスワード\nMYWSKM=wpa-psk                # セキュリティ選択：WPA-WPA2 = wpa-psk or WPA3 = sae\n\n# Add WLAN\nnmcli connection modify $MYCON \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.3 ネットワークアドレス割り当て方式の変更\n\n###### 12.7.2.3.1 静的 IP アドレス - IPv4\n\nネットワーク接続 `ether1` で IP アドレスの割り当て方式を `静的 IP アドレス` に変更し、即座に有効化。\n\n*有線接続 / 無線接続に適用\n\n```shell\n# Set ENV\nMYCON=ether1                  # ネットワーク接続名\nIP=192.168.67.167/24          # ホスト IP アドレス。24 はサブネットマスク（255.255.255.0 に対応）\nGW=192.168.67.1               # ゲートウェイ\nDNS=119.29.29.29,223.5.5.5    # DNS サーバーアドレス\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.3.2 DHCP による動的 IP アドレスの取得 - IPv4 / IPv6\n\nネットワーク接続 `ether1` で IP アドレスの割り当て方式を `DHCP による動的 IP アドレスの取得` に変更し、即座に有効化。\n\n*有線接続 / 無線接続に適用\n\n```shell\n# Set ENV\nMYCON=ether1                  # ネットワーク接続名\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method auto \\\nipv6.method auto\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.4 ネットワーク接続の MAC アドレスの変更\n\nネットワーク接続で `MAC アドレス` を変更して、LAN 内の MAC アドレスの競合問題を解決します。\n\n###### 12.7.2.4.1 方法1：`nmcli` コマンドで MAC アドレスを変更する\n\n```shell\n# nmcli connection show コマンドでネットワーク接続名を確認\nnmcli connection show\n# 返却結果にはネットワーク名が含まれます（例：'Wired connection 1'）\nNAME                UUID                                  TYPE      DEVICE\nWired connection 1  24d63dc7-c46f-3bf1-912f-1c33eb94338b  ethernet  eth0\nlo                  35ca24e5-bdc0-4658-8ac8-435ee22e07f3  loopback  lo\nWired connection 2  59660b21-b460-30e0-8cb3-89b886556955  ethernet  --\n\n# 変数を設定\nMYCON='Wired connection 1'    # ネットワーク接続名（ネットワークインターフェースタイプと一致させてください）\nMYTYPE='802-3-ethernet'       # ネットワークインターフェースタイプ = 有線ネットワークカード / 無線ネットワークカード\n                              #                              = 802-3-ethernet / 802-11-wireless\nMYMAC='12:34:56:78:9A:BC'     # 新しい MAC アドレスを設定\n\n# 変更を実行\nnmcli connection modify \"${MYCON}\" ${MYTYPE}.cloned-mac-address ${MYMAC}\nnmcli connection up \"${MYCON}\"\nip -c a show \"${MYCON}\"\n```\n\n* 一部のネットワークパラメータを新規作成または変更すると、ネットワーク接続が切断され、再接続される場合があります。\n* ソフトウェアとハードウェアの環境の違い（デバイス、システム、ネットワーク機器等）により、有効になるまでに `1〜15` 秒程度かかります。それ以上かかる場合は、ソフトウェアとハードウェアの環境を確認することをお勧めします。\n\n###### 12.7.2.4.2 方法2：設定ファイルで MAC アドレスを変更する\n\nMAC アドレスの上書き設定ファイルを追加します。\n\n```shell\nsudo mkdir -p /etc/systemd/network/\nsudo nano /etc/systemd/network/10-mac-override.link\n```\n\n以下の内容を追加します：\n\n```shell\n[Match]\n# MAC アドレスを変更するネットワークインターフェース名を設定\nOriginalName=eth0\n\n[Link]\n# 規則に準拠した MAC アドレスを設定\nMACAddress=02:55:66:77:88:99\n```\n\n再起動後に有効になります。\n\n##### 12.7.2.5 IPv6 を無効にする方法\n\n`nmcli` ユーティリティを使用してコマンドラインで `IPv6` プロトコルを無効にできます。参照元: [disable-ipv6](https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-networkmanager-to-disable-ipv6-for-a-specific-connection_configuring-and-managing-networking)。\n\nステップ1：`nmcli connection show` コマンドでネットワーク接続リストを確認します。返却結果は以下の通りです：\n\n```shell\nNAME                 UUID                                   TYPE       DEVICE\nWired connection 1   8a7e0151-9c66-4e6f-89ee-65bb2d64d366   ethernet   eth0\n...\n```\n\nステップ2：接続の ipv6.method パラメータを disabled に設定します：\n\n```shell\nnmcli connection modify \"Wired connection 1\" ipv6.method \"disabled\"\n```\n\nステップ3：ネットワークに再接続します：\n\n```shell\nnmcli connection up \"Wired connection 1\"\n```\n\nステップ4：ネットワーク接続状態を確認し、inet6 エントリが表示されなければ、そのデバイスで IPv6 が無効になっています：\n\n```shell\nip address show eth0\n```\n\nステップ5：`/proc/sys/net/ipv6/conf/eth0/disable_ipv6` ファイルに値 `1` が含まれているか確認します：\n\n```shell\n# cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6\n1\n```\n\n`/etc/sysctl.conf` ファイルを変更して IPv6 を無効にすることもできます：\n\n```shell\n# Disable IPv6 by default\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\n```\n\n#### 12.7.3 ワイヤレスの有効化方法\n\n一部のデバイスは無線ネットワークをサポートしています。有効化方法は以下の通りです：\n\n```shell\n# 管理ツールのインストール\nsudo apt-get install network-manager\n\n# ネットワークデバイスの確認\nsudo nmcli dev\n\n# ワイヤレスの有効化\nsudo nmcli r wifi on\n\n# ワイヤレスのスキャン\nsudo nmcli dev wifi\n\n# ワイヤレスへの接続\nsudo nmcli dev wifi connect \"wifi名\" password \"wifiパスワード\"\n\n# 保存済みのネットワーク接続リストを表示\nsudo nmcli connection show\n\n# 接続を切断\nsudo nmcli connection down \"wifi名\"\n\n# 接続を削除して自動接続を解除\nsudo nmcli connection delete \"wifi名\"\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230541872-565a655e-2781-4170-8898-0ae096725506.png\">\n</div>\n\n#### 12.7.4 Bluetooth の有効化方法\n\n一部のデバイスは Bluetooth をサポートしています。有効化方法は以下の通りです：\n\n```shell\n# Bluetooth サポートのインストール\narmbian-config >> Network >> BT: Install Bluetooth support\n\n# システムの再起動\nreboot\n```\n\nシステム再起動後、Bluetooth ドライバが正常にロードされているか確認します。デスクトップシステムではメニューから Bluetooth デバイスに接続でき、ターミナルコマンドでも操作可能です。\n\n```shell\ndmesg | grep Bluetooth\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230545883-755a137d-f574-4b32-a26b-bea9cfbf6384.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230544120-5a63dcd4-9716-40d2-ba59-c27f7b9937f8.png\">\n</div>\n\n```shell\n# Bluetooth デバイスの接続\narmbian-config >> Network >> BT: Discover and connect Bluetooth devices\n```\n\nターミナルでコマンドを使用してインストールすることもできます：\n```shell\n# Bluetooth サービスの実行状態を確認\nsudo systemctl status bluetooth\n\n# 起動していない場合は、まず Bluetooth サービスを有効化\nsudo systemctl enable bluetooth\nsudo systemctl start bluetooth\n\n# 近くの Bluetooth デバイスをスキャン\nbluetoothctl scan on\n\n# Bluetooth 発見を有効化\nbluetoothctl discoverable on\n\n# Bluetooth MAC アドレスでペアリング\nbluetoothctl pair 12:34:56:78:90:AB\n\n# ペアリング済みの Bluetooth デバイスを確認\nbluetoothctl paired-devices\n\n# Bluetooth デバイスに接続\nbluetoothctl connect 12:34:56:78:90:AB\n\n# デバイスを信頼し、以降の接続を簡単にする\nbluetoothctl trust 12:34:56:78:90:AB\n\n# Bluetooth デバイスを切断\nbluetoothctl disconnect 12:34:56:78:90:AB\n\n# Bluetooth ペアリングを解除\nbluetoothctl remove 12:34:56:78:90:AB\n\n# デバイスの接続をブロック\nbluetoothctl block 12:34:56:78:90:AB\n```\n\n### 12.8 起動時のタスク追加方法\n\nシステムにはカスタム起動タスクスクリプトが組み込まれており、パスは [/etc/custom_service/start_service.sh](../build-armbian/armbian-files/common-files/etc/custom_service/start_service.sh) です。個人のニーズに応じて、このスクリプトにカスタムタスクを追加できます。\n\n### 12.9 システム内のサービススクリプトの更新方法\n\n`armbian-sync` コマンドを使用して、ローカルシステム内のすべてのサービススクリプトをワンクリックで最新版に更新できます。\n\n`armbian-sync` の更新が失敗した場合、コマンドバージョンが古い可能性があります。以下の方法で手動更新できます：\n\n```shell\nwget https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/main/build-armbian/armbian-files/common-files/usr/sbin/armbian-sync -O /usr/sbin/armbian-sync\n\nchmod +x /usr/sbin/armbian-sync\n\narmbian-sync\n```\n\n### 12.10 eMMC 上の Android システムのパーティション情報の取得方法\n\nArmbian システムを eMMC に書き込む際、まずデバイスの Android システムのパーティションテーブルを確認し、安全な領域にデータが書き込まれることを確認して、元のパーティションテーブルを破壊してシステムが起動できなくなることを防ぐ必要があります。安全でない領域に書き込んだ場合、起動できなくなったり、以下のようなエラーが発生する可能性があります：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187075834-4ac40263-52ae-4538-a4b1-d6f0d5b9c856.png\">\n</div>\n\n#### 12.10.1 パーティション情報の取得\n\n2022.11 以降に本リポジトリからリリースされた Armbian を使用している場合、以下のコマンドをコピー＆ペーストして、完全なパーティション情報を含む URL を取得できます（デバイス自体のインターネット接続は不要です）。\n\n```shell\nampart /dev/mmcblk2 --mode webreport 2>/dev/null\n```\n\n*ampart の webreport モードは 2023.02.03 にリリースされた v1.2 で導入されたものです。上記のコマンドで出力がない場合は、URL の直接出力をサポートしていない旧バージョンの可能性があります。代わりに以下のコマンドを使用してください：*\n\n```shell\necho \"https://7ji.github.io/ampart-web-reporter/?dsnapshot=$(ampart /dev/mmcblk2 --mode dsnapshot 2>/dev/null | head -n 1)&esnapshot=$(ampart /dev/mmcblk2 --mode esnapshot 2>/dev/null | head -n 1)\"\n```\n\n生成される URL のフォーマットは以下のようになります：\n\n```shell\nhttps://7ji.github.io/ampart-web-reporter/?esnapshot=bootloader:0:4194304:0%20reserved:37748736:67108864:0%20cache:113246208:754974720:2%20env:876609536:8388608:0%20logo:893386752:33554432:1%20recovery:935329792:33554432:1%20rsv:977272832:8388608:1%20tee:994050048:8388608:1%20crypt:1010827264:33554432:1%20misc:1052770304:33554432:1%20instaboot:1094713344:536870912:1%20boot:1639972864:33554432:1%20system:1681915904:1073741824:1%20params:2764046336:67108864:2%20bootfiles:2839543808:754974720:2%20data:3602907136:4131389440:4&dsnapshot=logo::33554432:1%20recovery::33554432:1%20rsv::8388608:1%20tee::8388608:1%20crypt::33554432:1%20misc::33554432:1%20instaboot::536870912:1%20boot::33554432:1%20system::1073741824:1%20cache::536870912:2%20params::67108864:2%20data::-1:4\n```\n\nこの URL をブラウザで開くと、フォーマットが整った DTB パーティション情報と eMMC パーティション情報を確認できます：\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287642-e1b7be27-4d2c-4ac3-9fcc-15e06aebb97e.png\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287654-d1929e21-d2b3-4fb6-bcf0-c454c88e21b9.png\">\n</div>\n\n#### 12.10.2 パーティション情報の共有\n\n他の方にパーティション情報を共有する必要がある場合（本リポジトリへの新デバイスの報告やヘルプの依頼など）、スクリーンショットではなく URL を優先的に共有してください。URL が長すぎる場合は、無料の短縮 URL サービスを利用できます。\n\n- 一方で、ウェブページ上のパーティション情報はアクセスのたびに動的に生成され、パーティションの書き込み可能マークやテーブル形式などが随時更新される可能性があります。\n- 他方で、スクリーンショット内のパーティションパラメータは計算に使用するために便利にコピーできません。\n\nまた、パラメータを別途テーブルファイルに整理する必要はありません。ウェブページのテーブルレイアウトは、Excel や LibreOffice Calc に直接コピー＆ペーストでインポートできるように特別に設計されています。\n\n#### 12.10.3 パーティション情報の解読\n\nDTB テーブルには、Android DTB 内の各デバイス**システム**が期待するパーティションレイアウトが記録されており、通常、サイズが自動填充の `data` パーティションで終わります。したがって、同じシステム（必然的に同じモデルを含む）のデバイスの DTB パーティションレイアウトは必ず同じです。デバイス上の実際のパーティションレイアウトは eMMC の容量によって異なりますが、常に DTB パーティションレイアウトによって決定されます（つまり、DTB パーティションレイアウト + eMMC の正確なサイズがわかれば、eMMC のパーティション状況を必ず推定できます。*上記の DTB パーティション情報と eMMC パーティション情報は同じデバイスからのものではありません。お気づきでしたか？*）。\n\neMMC テーブルはデバイス上の実際の eMMC パーティションレイアウトです。各行は1つのストレージ領域を表し、その領域はパーティションまたはパーティション間のギャップの場合があります（Amlogic の設計決定により、各パーティション間に少なくとも 8M のギャップがあり、将来の使用を想定していましたが、S905X4 に至っても使用されておらず、スペースの無駄になっています）。パーティションに対応する行は黒い文字で、オフセットとマスク列に値があります。ギャップに対応する行は灰色の文字で、オフセットとマスク列に値がなく、パーティション名は `gap` です。\n\neMMC テーブルでは、各ストレージ領域の最後の列が書き込み可能性を示します。緑色で `yes` はその領域に書き込み可能、赤色で `no` はその領域に絶対に書き込み不可、黄色でマークがある場合は特定の前提条件下で書き込み可能、または一部のみ書き込み可能を意味します。\n\n上記の表を例にすると、`bootloader` パーティションに対応する `0+4M` (`0M~4M`) は絶対に書き込み不可、その後の `32M` のギャップ（`4M~36M`）は書き込み可能、`reserved` パーティションに対応する `36M+64M` (`36M~100M`) は絶対に書き込み不可、その後のギャップから `env` 前のギャップ（`100M~836M`）まで書き込み可能、`env` の 1M 以降（`837M から末尾まで`）は Android 起動ロゴが不要な場合はすべて書き込み可能です。したがって、eMMC 上のすべての書き込み可能範囲は：\n\n- 4M~36M\n- 100M~836M\n- 837M~末尾\n\nAndroid 起動ロゴが必要な場合、追加で `logo` パーティションに対応する 852M + 32M (`852M~884M`) に書き込みできず、eMMC 上のすべての書き込み可能範囲は：\n\n- 4M~36M\n- 100M~836M\n- 837M~852M\n- 884M~末尾\n\n#### 12.10.4 eMMC インストールへの使用\n\nデバイスが `armbian-install` の使用時に `-a` パラメータ（[ampart](https://github.com/7Ji/ampart) を使用して eMMC パーティションレイアウトを調整）が `yes`（デフォルト値）で失敗した場合、そのデバイスは最適なパーティションレイアウトを使用できません（つまり、DTB パーティション情報を `data` のみに調整し、そこから eMMC パーティション情報を生成し、残存するすべてのパーティションを前方に移動させ、117M 以降のスペースがすべて使用可能になります）。[armbian-install](../build-armbian/armbian-files/common-files/usr/sbin/armbian-install) 内の対応するパーティション情報を変更する必要があります。\n\nこのファイルでは、パーティションレイアウトを宣言する重要なパラメータが3つあります：`BLANK1`、`BOOT`、`BLANK2`。`BLANK1` は eMMC の先頭から数えて使用不可能なサイズ、`BOOT` は `BLANK1` の後にカーネルや DTB などのファイルを格納するパーティションサイズ（256M 以上を推奨）、`BLANK2` は `BOOT` の後の使用不可能なサイズを表します。その後ろのスペースはすべて `ROOT` パーティションの作成に使用され、システム内の `/boot` マウントポイント以外のデータを格納します。3つとも整数で、単位は MiB (1 MiB = 1024 KiB = 1024^2 Byte) です。\n\n上記の `logo` パーティションが不要な場合を例にすると、すべての利用可能なスペースを最大限活用するため、`4M~36M` の領域は小さすぎて `BOOT` として使用できないため、`BLANK1` に含めます。`100M~836M` の領域は `BOOT` として十分なので、736M すべてを `BOOT` に割り当てます。その後の `836M~837M` の使用不可領域を `BLANK2` に含め、対応するパラメータ設定は以下の通りです（`s905x3` を例として、他の SoC は対応するコードブロックを変更してください）：\n\n```shell\n# Set partition size (Unit: MiB)\nelif [[ \"${AMLOGIC_SOC}\" == \"s905x3\" ]]; then\n    BLANK1=\"100\"\n    BOOT=\"736\"\n    BLANK2=\"1\"\n```\n\n### 12.11 u-boot ファイルの作成方法\n\nu-boot はシステム起動を誘導する重要なファイルです。Amlogic、Allwinner、Rockchip デバイスではソースコードの取得とコンパイルプロセスに若干の違いがあります。\n\n#### 12.11.1 Amlogic デバイスの u-boot ファイルの作成方法\n\nAmlogic シリーズのデバイスメーカーの多くはオープンソースではないため、まずデバイスから u-boot 関連ファイルを抽出してからコンパイルする必要があります。以下の方法は [unifreq](https://github.com/unifreq) が共有した制作チュートリアルに基づいています。\n\n##### 12.11.1.1 bootloader と dtb ファイルの抽出方法\n\n抽出には HxD ソフトウェアが必要です。[公式ダウンロードリンク](https://mh-nexus.de/en/downloads.php?product=HxD20) または [バックアップダウンロードリンク](https://github.com/ophub/kernel/releases/download/tools/HxDSetup.2.5.0.0.zip) から取得してインストールしてください。\n\n`cmd` パネルで以下のコマンドを順に実行して、関連ファイルを抽出しローカルにダウンロードします。\n\n```shell\n# adb ツールでデバイスに接続\nadb connect 192.168.1.111\nadb shell\n\n# bootloader のエクスポートコマンド\ndd if=/dev/block/bootloader of=/data/local/bootloader.bin\n\n# dtb のエクスポートコマンド\ncat /dev/dtb >/data/local/mybox.dtb\n\n# gpio のエクスポートコマンド\ncat /sys/kernel/debug/gpio >/data/local/mybox_gpio.txt\n\n# bootloader、dtb、gpio ファイルをローカル PC の C ドライブ直下の mybox フォルダにダウンロード\nadb pull /data/local/bootloader.bin C:\\mybox\nadb pull /data/local/mybox.dtb C:\\mybox\nadb pull /data/local/mybox_gpio.txt C:\\mybox\n```\n\n##### 12.11.1.2 acs.bin ファイルの作成方法\n\nメインライン u-boot で最も重要なのは acs.bin ファイルで、メモリ初期化に使用されます。メーカー u-boot はシステム先頭の 4MB 領域にあります。先ほど取得した `bootloader.bin` から `acs.bin` ファイルを抽出します。\n\nHxD ソフトウェアを開き、先ほどエクスポートした `bootloader.bin` ファイルを開きます。`右クリック - 範囲を選択`、開始位置 `F200`、長さ `1000`、`十六進数` を選択します。\n\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056711-1b58ce71-2a7d-4e9b-a976-e5f278edaa53.png\">\n\n選択した結果をコピーし、新しいファイルを作成、挿入式で貼り付け、警告を無視し、acs.bin として保存します。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056725-0a0e60af-6a21-4a6b-a2d5-f3d46b438a6a.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056827-8419c738-3428-473e-9a95-ab7270170d98.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056852-9f62f16a-f7f1-4c34-a2c2-78358d198f9a.png\">\n</div>\n\nbootloader がロックされている場合、この領域のコードは文字化けして表示され、使用できません。正常な場合、この領域には多数の `0` が含まれ、`cfg` が数回連続して出現し、`ddr` 関連の文字が混在します。このようなコードは有効な使用可能データです。\n\n##### 12.11.1.3 u-boot ファイルのコンパイル方法\n\nu-boot の作成には https://github.com/unifreq/amlogic-boot-fip と https://github.com/unifreq/u-boot の2つのソースコードリポジトリが必要で、デバイスに必要な u-boot ファイルをコンパイルするために使用します。\n\namlogic-boot-fip ソースコードでは、各デバイスモデルで異なるのは acs.bin ファイルのみで、その他のファイルは共通です。\n\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187057209-c4716384-46ef-4922-9710-8da7ae6db1e4.png\">\n\n制作方法の詳細は https://github.com/unifreq/u-boot/tree/master/doc/board/amlogic の説明を参照し、対応するデバイスモデルを選択してコンパイルとテストを行ってください。\n\n[unifreq](https://github.com/unifreq) の方法で u-boot を作成するには、デバイスの acs.bin、dts、config ファイルが必要です。Android システムからエクスポートした dts は直接 Armbian 形式に変換できないため、対応する dts ファイルを自分で作成する必要があります。デバイスの具体的なハードウェアの違い（スイッチ、LED、電源制御、TF カード、SDIO WiFi モジュールなど）に応じて、カーネルソースリポジトリ内の類似の [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) ファイルを参考に修正してください。\n\nX96Max Plus の u-boot 作成を例に説明します：\n\n```shell\n~/make-uboot\n    ├── amlogic-boot-fip\n    │   ├── x96max-plus                                     # 自分でディレクトリを作成\n    │   │   ├── asc.bin                                     # 自分でソースファイルを作成\n    │   │   └── other-copy-files...                         # 他のディレクトリからファイルをコピー\n    │   │\n    │   ├── other-source-directories...\n    │   └── other-source-files...\n    │\n    └── u-boot\n        ├── configs\n        │   └── x96max-plus_defconfig                       # 自分でソースファイルを作成\n        ├── arch\n        │   └── arm\n        │       └── dts\n        │           ├── meson-sm1-x96-max-plus-u-boot.dtsi  # 自分でソースファイルを作成\n        │           ├── meson-sm1-x96-max-plus.dts          # 自分でソースファイルを作成\n        │           └── Makefile                            # 編集\n        ├── fip\n        │   ├── u-boot.bin                                  # 生成ファイル\n        │   └── u-boot.bin.sd.bin                           # 生成ファイル\n        ├── u-boot.bin                                      # 生成ファイル\n        │\n        ├── other-source-directories...\n        └── other-source-files...\n```\n\n- [amlogic-boot-fip](https://github.com/unifreq/amlogic-boot-fip) ソースコードをダウンロード。ルートディレクトリに [x96max-plus](https://github.com/unifreq/amlogic-boot-fip/tree/master/x96max-plus) ディレクトリを作成し、自作の `asc.bin` ファイル以外は他のディレクトリからコピーできます。\n- [u-boot](https://github.com/unifreq/u-boot) ソースコードをダウンロード。対応する [x96max-plus_defconfig](https://github.com/unifreq/u-boot/blob/master/configs/x96max-plus_defconfig) ファイルを作成して [configs](https://github.com/unifreq/u-boot/tree/master/configs) ディレクトリに配置。対応する [meson-sm1-x96-max-plus-u-boot.dtsi](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus-u-boot.dtsi) と [meson-sm1-x96-max-plus.dts](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus.dts) ファイルを作成して [arch/arm/dts](https://github.com/unifreq/u-boot/tree/master/arch/arm/dts) ディレクトリに配置し、このディレクトリ内の [Makefile](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/Makefile) ファイルを編集して `meson-sm1-x96-max-plus.dtb` ファイルのインデックスを追加します。\n- u-boot ソースコードのルートディレクトリに入り、ドキュメント https://github.com/unifreq/u-boot/blob/master/doc/board/amlogic/x96max-plus.rst の手順に従って操作します。\n\n最終的に2種類のファイルが生成されます：u-boot ルートディレクトリの `u-boot.bin` は `/boot` ディレクトリで使用する簡易版 u-boot（リポジトリの [overload](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) ディレクトリに対応）。`fip` ディレクトリの `u-boot.bin` と `u-boot.bin.sd.bin` は `/usr/lib/u-boot/` ディレクトリで使用する完全版 u-boot ファイル（リポジトリの [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) ディレクトリに対応）で、完全版の2つのファイルは 512 バイトの差があり、大きい方のファイルはヘッダーに 512 バイトの 0 が埋められています。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189039426-c127631f-77ca-4fcb-9fb6-4220045d712b.png\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189029320-e43a4cc9-b4b5-4de4-92fe-b17bd29020d0.png\">\n</div>\n\n💡ヒント：eMMC への書き込みテスト前に、まず 12.3 節のブリック復旧方法をお読みください。ショートポイントの位置を確認し、メーカー純正の .img 形式の Android システムファイルを準備し、ショートフラッシュの手順を成功テストしてから、書き込みテストを行ってください。\n\n#### 12.11.2 Rockchip デバイスの u-boot ファイルの作成方法\n\nRockchip デバイスの大部分のメーカーは u-boot ソースコードをオープンソース化しており、メーカーのソースコードリポジトリから取得してコンパイルできます。また、一部のオープンソース貢献者が便利な u-boot コンパイルスクリプトを共有しており、以下で実例を通じていくつかのコンパイル方法を紹介します。\n\n##### 12.11.2.1 Radxa の u-boot 作成スクリプトの使用方法\n\n[Rock5b(rk3588)](https://wiki.radxa.com/Rock5/guide/build-u-boot-on-5b) のコンパイルを例に説明します。\n\n```shell\n# 01. 依存関係のインストール\nsudo apt-get update\nsudo apt-get install -y git device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison\n\n# 02. ソースコードのクローン\nmkdir ~/rk3588-sdk && cd ~/rk3588-sdk\ngit clone -b stable-5.10-rock5 https://github.com/radxa/u-boot.git\ngit clone -b master https://github.com/radxa/rkbin.git\ngit clone -b debian https://github.com/radxa/build.git\n\n# ソースコードの説明：\n# ~/rk3588-sdk/build/：Radxa ヘルパースクリプトファイルと、U-Boot、Linux カーネル、ルートファイルシステムの構築に使用する設定ファイル。\n# ~/rk3588-sdk/rkbin/：ビルド済みの Rockchip バイナリ（第1ステージローダーと ATF（Arm Trustzone ファームウェア）を含む）。\n# ~/rk3588-sdk/u-boot/：OS（Linux や Android など）を起動するための第2ステージブートローダー。\n\n# 03. u-boot のコンパイル（For ROCK 5B）\ncd ~/rk3588-sdk\n./build/mk-uboot.sh rk3588-rock-5b\n\n# 04. ビルド成功後、~/rk3588-sdk/out/u-boot ディレクトリに配置されます\n~/rk3588-sdk/out/u-boot\n├── idbloader.img\n├── rk3588_spl_loader_v1.08.111.bin\n├── spi\n│   └── spi_image.img\n└── u-boot.itb\n```\n\n[radxa/build](https://github.com/radxa/build) ソースコードの `board_configs.sh` と `mk-uboot.sh` にオプションを追加することで、他のデバイスの u-boot ファイルをコンパイルできます。例えば [Beelink-IPC-R(rk3588)](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415#issuecomment-1508234307) デバイスのコンパイル方法。\n\n##### 12.11.2.2 cm9vdA の u-boot 作成スクリプトの使用方法\n\ncm9vdA のオープンソースプロジェクト [cm9vdA/build-linux](https://github.com/cm9vdA/build-linux) では、u-boot とカーネルのコンパイルスクリプトと使用方法が提供されています。以下は一部の Rockchip デバイスの u-boot コンパイルのプロセス記録を参考として抜粋したものです。\n\n- Lenovo-Leez-P710(rk3399) デバイスの u-boot コンパイル：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609#issuecomment-1681494735)\n- DLFR100(rk3399) デバイスの u-boot コンパイル：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522#issuecomment-1622919423)\n- ZYSJ(rk3399) デバイスの u-boot コンパイル：[Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380#issuecomment-1539325464)\n\n\n### 12.12 メモリサイズの誤認識\n\nメモリサイズが正しく認識されない場合（4G メモリが 1-2G として認識されるのは異常、3.7G として認識されるのは正常）、`/boot/UBOOT_OVERLOAD` ファイルを手動でコピーして試してみてください（注意：`コピー`であり`リネーム`ではありません。リネームするとインストールや更新操作時に起動できなくなります）：USB で使用する場合は `/boot/u-boot.ext` として保存、eMMC で使用する場合は `/boot/u-boot.emmc` として保存します。\n\nメモリ認識問題のトラブルシューティング以外では、u-boot ファイルを手動でコピーしないでください。誤った操作は起動不能やその他の問題を引き起こす可能性があります。\n\n### 12.13 dtb ファイルの逆コンパイル方法\n\n一部の新しいデバイスは現在のサポートリストに含まれていない場合（またはハードウェアの違いがある場合）があり、dtb ファイルを逆コンパイルして関連パラメータを調整し、適合を試みることができます。\n\n```shell\n# 依存関係のインストール\nsudo apt-get update\nsudo apt-get install -y device-tree-compiler\n\n# 1. 逆コンパイルコマンド（dtb ファイルから dts ソースコードを生成）\ndtc -I dtb -O dts -o xxx.dts xxx.dtb\n\n# 2. コンパイルコマンド（dts からコンパイルして dtb ファイルを生成）\ndtc -I dts -O dtb -o xxx.dtb xxx.dts\n\n# 3. データを保存して再起動\nsync && reboot\n\n# 4. [任意アクション] 必要に応じてテスト\n# 例えば 12.16 で紹介した問題の解決時に、再インストールしてテスト\narmbian-install\n```\n\n### 12.14 cmdline 設定の変更方法\n\nAmlogic デバイスは `/boot/uEnv.txt` ファイルで設定します。Rockchip と Allwinner デバイスは `/boot/armbianEnv.txt` ファイルで設定します（`extraargs` または `extraboardargs` パラメータに追加）。`/boot/extlinux/extlinux.conf` を使用するデバイスはそのファイルで設定します。変更のたびに再起動が必要です。\n\n- 例えば `Home Assistant Supervisor` は `docker cgroup v1` のみをサポートしていますが、現在の docker はデフォルトで v2 バージョンをインストールします。v1 に切り替える場合は、cmdline に `systemd.unified_cgroup_hierarchy=0` パラメータを追加し、再起動すると `docker cgroup v1` に切り替わります。\n\n- cmdline に `max_loop=128` 設定を追加することで、許可される loop マウント数を調整できます。\n\n- cmdline に `usbcore.usbfs_memory_mb=1024` 設定を追加することで、USBFS メモリバッファをデフォルトの `16 mb` からより大きなサイズに永続的に変更できます（`cat /sys/module/usbcore/parameters/usbfs_memory_mb`）。USB での大容量ファイル転送能力を向上させます。\n\n- cmdline に `usbcore.usb3_disable=1` 設定を追加することで、すべての USB 3.0 デバイスを無効にできます。\n\n- cmdline に `extraargs=video=HDMI-A-1:1920x1080@60` 設定を追加することで、ビデオ表示モードを 1080p に強制できます。\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/216220941-47db0183-7b26-4768-81cf-2ee73d59d23e.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a600dcad-d817-47eb-b529-4014019915b3\">\n</div>\n\n### 12.15 新しいサポートデバイスの追加方法\n\nデバイス用の Armbian システムを構築するには、`デバイス設定ファイル`、`システムファイル`、`u-boot ファイル`、`フロー制御ファイル` の4つの部分が必要です。具体的な追加方法は以下の通りです：\n\n#### 12.15.1 デバイス設定ファイルの追加\n\n設定ファイル [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) に、デバイスのテスト結果に基づいて対応する設定情報を追加します。`BUILD` 値が `yes` のデバイスはデフォルトで構築されるデバイスで、対応する `BOARD` 値は`一意でなければなりません`。これらのデバイスはデフォルト構築の Armbian システムを直接使用できます。\n\nデフォルト値が `no` のデバイスはデフォルトの構築に含まれておらず、使用する際は同じ `FAMILY` の Armbian システムをダウンロードする必要があります。`USB` に書き込んだ後、パソコンで `USB の boot パーティション` を開き、`/boot/uEnv.txt` ファイル内の `FDT dtb 名` を変更することで、リスト内の他のデバイスに対応させることができます。\n\n#### 12.15.2 システムファイルの追加\n\n共通ファイルは `build-armbian/armbian-files/common-files` ディレクトリに配置し、各プラットフォーム共通です。\n\nプラットフォームファイルはそれぞれ `build-armbian/armbian-files/platform-files/<platform>` ディレクトリに配置します。[Amlogic](../build-armbian/armbian-files/platform-files/amlogic)、[Rockchip](../build-armbian/armbian-files/platform-files/rockchip)、[Allwinner](../build-armbian/armbian-files/platform-files/allwinner) はそれぞれプラットフォームファイルを共有します。`bootfs` ディレクトリには /boot パーティションファイルを格納し、`rootfs` ディレクトリには Armbian システムファイルを格納します。\n\n個別のデバイスに特殊な設定ニーズがある場合、`build-armbian/armbian-files/different-files` ディレクトリに `BOARD` 名の独立ディレクトリを作成し、必要に応じて `bootfs` ディレクトリを作成して `/boot` パーティションファイルを追加するか、`rootfs` ディレクトリを作成してシステムファイルを追加します。ディレクトリ構造は Armbian システム内の実際のパスに準じ、新しいファイルの追加や共通ファイルおよびプラットフォームファイル内の同名ファイルの上書きに使用できます。\n\n#### 12.15.3 u-boot ファイルの追加\n\n`Amlogic` シリーズのデバイスは [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) ファイルと [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) ファイルを共有し、新しいファイルはそれぞれ対応するディレクトリに配置します。`bootloader` ファイルはシステム構築時に自動的に Armbian システムの `/usr/lib/u-boot` ディレクトリに追加され、`u-boot` ファイルは自動的に `/boot` ディレクトリに追加されます。\n\n`Rockchip` と `Allwinner` シリーズのデバイスは、各デバイスに `BOARD` 名の独立した [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot) ファイルディレクトリを追加し、対応するシリーズファイルをこのディレクトリに配置します。\n\nArmbian イメージの構築時に、これらの u-boot ファイルは [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) の設定に基づいて、rebuild スクリプトにより対応する Armbian イメージファイルに書き込まれます。\n\n標準の U-Boot ファイルが使用できるデバイスは、まず直接使用することをお勧めします。一部のデバイスは適切な U-Boot をコンパイルまたは取得できない場合がありますが、そのようなデバイスが Ubuntu などの Linux システムを正常に実行できる場合は、ブート関連の重要なパーティションを保持して Armbian または OpenWrt をインストールすることを試みることができます。通常、保持が必要な重要なパーティションには `bootloader`、`reserved`、`env` が含まれます。\n\nこれらのパーティションはバックアップした後、新しい Armbian または OpenWrt イメージを作成する際に対応する位置に書き戻すことができます。元のシステムのブートパーティションを含む作成済みイメージは、`dd` コマンドで eMMC に直接書き込むか、対応するシステムの内蔵ツールを使用してインストールできます。例えば Armbian の `armbian-install` コマンドや、OpenWrt の `晶晨宝盒` プラグインなどです。\n\n現在この方法を採用しているデバイスには [oes(a311d)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666)、[oes-plus(s922x)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029)、[oec-turbo(rk3566)](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736) があります。以下では `oes(a311d)` デバイスを例に具体的な操作手順を説明します。\n\n##### 12.15.3.1 パーティション情報レイアウトの確認\n\n```shell\nampart /dev/mmcblk2\n\n# 取得したパーティション情報は以下の通りです：\n# ===================================================================================\n# IO seek EPT: Seeking to 37748736\n# EPT report: 20 partitions in the table:\n# ===================================================================================\n# ID| name            |          offset|(   human)|            size|(   human)| masks\n# -----------------------------------------------------------------------------------\n#  0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0\n#     (GAP)                                                 2000000 (  32.00M)\n#  1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  2: cache                     6c00000 ( 108.00M)         20000000 ( 512.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n#  3: env                      27400000 ( 628.00M)           800000 (   8.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  ... other partitions ...\n# ===================================================================================\n```\n\n##### 12.15.3.2 重要なパーティションのバックアップ\n\n```shell\ndd if=/dev/mmcblk2 of=bootloader.bin bs=1M count=4 skip=0\ndd if=/dev/mmcblk2 of=reserved.bin bs=1M count=8 skip=36\ndd if=/dev/mmcblk2 of=env.bin bs=1M count=1 skip=628\n```\n\nバックアップファイルは [u-boot](https://github.com/ophub/u-boot) リポジトリの対応するディレクトリ [u-boot/amlogic/bootloader/a311d-oes](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader/a311d-oes) に配置します。\n\nreserved パーティションは 64MB ですが、8MB のみバックアップしていることに注意してください。理由は `oes(a311d)` デバイスでは `reserved` パーティションの最初の 8MB が重要なデータで、残りの 56MB は空白でバックアップ不要だからです。具体的な確認方法：\n\n```shell\n# まず、reserved パーティションの完全な 64MB サイズのファイルをバックアップ：\ndd if=/dev/mmcblk2 of=reserved_64M.bin bs=1M count=64 skip=36\n\n# 次に、バックアップした reserved_64M.bin ファイルの最初の 8MB を抽出：\ndd if=reserved_64M.bin of=reserved_first_8M.bin bs=1M count=8\n\n# 十六進数の内容を確認：\nhexdump -C reserved_first_8M.bin | less\n\n# 返却結果の最後の数行の内容を確認：\n0071ffd0  4c 5e a8 1f fc 5b 5b 98  ae ef b0 97 0c 3b e8 c2  |L^...[[......;..|\n0071ffe0  c8 e0 b2 74 3d 67 d5 3d  24 7b 63 b7 c7 73 f5 d8  |...t=g.=${c..s..|\n0071fff0  a1 b8 38 a7 57 d6 b4 b5  e8 1c ba c0 07 0f f5 79  |..8.W..........y|\n00720000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n00800000\n```\n\n出力結果を分析すると、非ゼロデータを含む最後の行のアドレスは `0071fff0` です。アドレス `00720000` 以降はすべて `00`（ゼロ）になっています。hexdump ツールは（`*`）を使用して繰り返し行を表示し、これは `00720000` から `00800000`（8MB の末尾）までがすべてゼロであることを意味します。有効データアドレス `0x00720000` を十進数に変換すると `7,471,104` バイト、つまり `7471104 / 1024 / 1024 = 7.125 MB` のサイズです。したがって切り上げて 8MB をバックアップすれば十分です。env パーティションも同様で、最初の 80KB のみが有効データで、残りは空白のため、1MB のみバックアップします。\n\n##### 12.15.3.3 特殊パーティション書き込みファイルの追加\n\n具体的な実装の詳細については、ファイル [/etc/armbian-board-release.conf](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/different-files/a311d-oes/rootfs/etc/armbian-board-release.conf) で定義されている `write_board_bootloader` 関数を参照してください。この関数はイメージの再構築（rebuild）プロセス中に呼び出されます。また、この設定ファイルは強力なデバイスカスタマイズセンターでもあります。`skip_mb=\"700\"` などのパラメータでイメージパーティションのレイアウトとサイズを精密に制御できるだけでなく、カスタムスクリプトを追加してカーネルやその他のシステムファイルの特殊処理を実現することもできます。特定デバイスに対するすべての高度なカスタマイズ操作はこのファイルに集中して統一管理され、設定が明確で効率的になります。\n\n#### 12.15.4 フロー制御ファイルの追加\n\n[yml ワークフロー制御ファイル](../.github/workflows/build-armbian-arm64-server-image.yml) の `armbian_board` に対応する `BOARD` オプションを追加し、GitHub Actions での使用をサポートさせます。\n\n### 12.16 eMMC への書き込み時の I/O エラーの解決方法\n\n一部のデバイスは USB/SD/TF から Armbian を正常に起動できますが、eMMC に書き込む際に I/O 書き込みエラーが発生します。例えば [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/989) のケースでは、以下のようなエラーが報告されています：\n\n```shell\n[  284.338449] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.341544] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.446972] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.450074] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.497746] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.500871] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n```\n\nこの場合、dtb の動作モード速度と周波数を調整してストレージの読み書きを安定させることができます。SDR モードでは周波数は速度の2倍、DDR モードでは周波数は速度と等しくなります。利用可能なモードは以下の通りです：\n\n```shell\nsd-uhs-sdr12\nsd-uhs-sdr25\nsd-uhs-sdr50\nsd-uhs-ddr50\nsd-uhs-sdr104\n\nmax-frequency = <208000000>;\n```\n\nカーネルソースコードの [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) ファイル内のコードスニペットを例に：\n\n```shell\n/* SD card */\n&sd_emmc_b {\n\tstatus = \"okay\";\n\n\tbus-width = <4>;\n\tcap-sd-highspeed;\n\tsd-uhs-sdr12;\n\tsd-uhs-sdr25;\n\tsd-uhs-sdr50;\n\tmax-frequency = <100000000>;\n};\n\n/* eMMC */\n&sd_emmc_c {\n\tstatus = \"okay\";\n\n\tbus-width = <8>;\n\tcap-mmc-highspeed;\n\tmax-frequency = <100000000>;\n};\n```\n\n通常、`&sd_emmc_c` の周波数を `max-frequency = <200000000>;` から `max-frequency = <100000000>;` に下げれば解決します。効果がない場合は `50000000` にさらに下げてテストし、同時に `&sd_emmc_b` の設定で `USB/SD/TF` を調整するか、`sd-uhs-sdr` で速度制限することもできます。dts ファイルを修正して [コンパイル](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel) してテストファイルを生成するか、`12.13 節` の方法で既存の dtb ファイルを逆コンパイルして修正できます。dtb ファイルの逆コンパイル時は十六進数値を使用します。十進数の `200000000` に対応する十六進数は `0xbebc200`、十進数の `100000000` に対応する十六進数は `0x5f5e100`、十進数の `50000000` に対応する十六進数は `0x2faf080`、十進数の `25000000` に対応する十六進数は `0x17d7840` です。\n\nソフトウェア面の最適化の他に、[ハードウェアアップグレード](https://github.com/ophub/amlogic-s9xxx-armbian/issues/998) や [手動改造](https://www.right.com.cn/forum/thread-901586-1-1.html) で解決することもできます。\n\n### 12.17 Bullseye バージョンで音が出ない問題の解決方法\n\n音の問題のエラーログ情報：\n\n```shell\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: dpcm_fe_dai_prepare() failed (-22)\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0\n```\n\n[Bullseye NO Sound](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1000) の方法を参照して設定してください。\n\n```shell\ncurl -fsSOL https://github.com/ophub/kernel/releases/download/tools/bullseye_g12_sound-khadas-utils-4-2-any.tar.gz\ntar -xzf bullseye_g12_sound-khadas-utils-4-2-any.tar.gz -C /\n\nsystemctl enable sound.service\nsystemctl restart sound.service\n```\n\nArmbian を再起動してテストします。音がまだ出ない場合、デバイスが旧版の conf に対応するオーディオ出力パスを使用している可能性があります。/usr/bin/g12_sound.sh の `L137-L142` の新しい設定をコメントアウトし（この設定は主に G12B/S922X に適用され、旧版の G12A/S905X2 および G12A ベースの SM1/S905X3 の多くは互換性がありません）、`L130-L134` の旧設定のコメントを解除する必要があります。\n\n### 12.18 boot.scr ファイルのコンパイル方法\n\nArmbian システムの `/boot` ディレクトリにある `boot.scr` はシステムブートファイルで、`boot.cmd` ソースファイルからコンパイルして生成されます。`boot.cmd` を修正した後、`mkimage` コマンドで再コンパイルすると新しい `boot.scr` が生成されます。\n\n通常、これら2つのファイルを修正する必要はありませんが、調整が必要な場合は以下の方法を参照してください。\n\n```shell\n# 依存関係のインストール\nsudo apt-get update\nsudo apt-get install -y u-boot-tools\n\n# boot.cmd ファイルの編集\ncd /boot\ncopy /boot/boot.cmd /boot/boot.cmd.bak\ncopy /boot/boot.scr /boot/boot.scr.bak\nnano boot.cmd\n\n# コンパイルコマンド\nmkimage -C none -A arm -T script -d boot.cmd boot.scr\n\n# 再起動してテスト\nsync\nreboot\n\n# 補足説明\n# Amlogic デバイスでは、USB で使用するのは /boot/boot.scr ファイルで、eMMC に書き込む際は /boot/boot-emmc.scr ファイルが使用されます。\n```\n\n### 12.19 リモートデスクトップの有効化とデフォルトポートの変更方法\n\nソフトウェアセンター `armbian-software` で `201` を選択してデスクトップをインストールします。インストール中にリモートデスクトップを有効にするか尋ねられるので、`y` と入力して有効にします。リモートデスクトップのデフォルトポートは `3389` で、必要に応じてカスタムポートを設定できます：\n\n```shell\nsudo nano /etc/xrdp/xrdp.ini\n# カスタムポートに変更（例：5000）\nport=5000\n```\n\n### 12.20 TCP 輻輳制御の最適化方法\n\n異なる性能のデバイスに対して、最適な体験を得るためにネットワークスタック設定を差別化することをお勧めします。デバイスの実際の状況に応じて、設定ファイル `/etc/sysctl.conf` を編集し、以下の2行を変更してください：\n- ギガビットデバイス（高性能/モダンアーキテクチャ）：`fq + bbr` の組み合わせを推奨し、スループットを最大化しパケットロスへの耐性を向上させます。\n- 100Mbps デバイス（低性能/レガシーアーキテクチャ）：`fq_codel + cubic` の組み合わせを推奨し、CPU 負荷を低減し低遅延の安定性を確保します。\n\n```shell\n# プラン A：ギガビットデバイス/高性能推奨 (Gigabit/High Performance)\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\n# プラン B：100Mbps デバイス/低性能推奨 (100M/Low Performance)\n# net.core.default_qdisc = fq_codel\n# net.ipv4.tcp_congestion_control = cubic\n```\n"
  },
  {
    "path": "documents/README.md",
    "content": "# Armbian Build and Usage Guide\n\n[View English description](README.md) | [查看中文说明](README.cn.md) | [日本語の説明を確認する](README.ja.md)\n\nGitHub Actions is a CI/CD service from Microsoft that provides high-performance virtual server environments for building, testing, packaging, and deploying projects. Public repositories can use it free of charge with no time limit, and each build can run for up to 6 hours — more than sufficient for compiling Armbian (typically completed within about 3 hours). This project is shared for educational and experience-exchange purposes. Please do not initiate any harmful network attacks or misuse GitHub Actions.\n\n# Table of Contents\n\n- [Armbian Build and Usage Guide](#armbian-build-and-usage-guide)\n- [Table of Contents](#table-of-contents)\n  - [1. Register your own Github account](#1-register-your-own-github-account)\n  - [2. Set up private variable GITHUB\\_TOKEN etc](#2-set-up-private-variable-github_token-etc)\n  - [3. Fork the repository and set Workflow permissions](#3-fork-the-repository-and-set-workflow-permissions)\n  - [4. Customization instructions for personalized Armbian system files](#4-customization-instructions-for-personalized-armbian-system-files)\n  - [5. Compile the system](#5-compile-the-system)\n    - [5.1 Manual Compilation](#51-manual-compilation)\n    - [5.2 Scheduled Compilation](#52-scheduled-compilation)\n    - [5.3 Customizing Default System Configuration](#53-customizing-default-system-configuration)\n    - [5.4 Expanding Github Actions Compilation Space Using Logical Volumes](#54-expanding-github-actions-compilation-space-using-logical-volumes)\n    - [5.5 Build Armbian Docker image](#55-build-armbian-docker-image)\n  - [6. Saving the System](#6-saving-the-system)\n  - [7. Downloading the System](#7-downloading-the-system)\n  - [8. Installing Armbian to EMMC](#8-installing-armbian-to-emmc)\n    - [8.1 Installation Method for Amlogic Series](#81-installation-method-for-amlogic-series)\n    - [8.2 Installation Method for Rockchip Series](#82-installation-method-for-rockchip-series)\n      - [8.2.1 Installation Method for Radxa-Rock5B](#821-installation-method-for-radxa-rock5b)\n        - [8.2.1.1 Install the System to MicroSD](#8211-install-the-system-to-microsd)\n        - [8.2.1.2 Install the System to eMMC](#8212-install-the-system-to-emmc)\n        - [8.2.1.3 Installation of the system on NVMe](#8213-installation-of-the-system-on-nvme)\n      - [8.2.2 Installation method for FastRhino R66S](#822-installation-method-for-fastrhino-r66s)\n      - [8.2.3 Installation method for FastRhino R68S](#823-installation-method-for-fastrhino-r68s)\n      - [8.2.4 Installation method for Beikeyun](#824-installation-method-for-beikeyun)\n      - [8.2.5 Installation method for Chainedbox-L1-Pro](#825-installation-method-for-chainedbox-l1-pro)\n      - [8.2.6 Installation method for lckfb-tspi](#826-installation-method-for-lckfb-tspi)\n    - [8.3 Allwinner Series Installation Method](#83-allwinner-series-installation-method)\n    - [8.4 Installation Method for the Docker Version of Armbian](#84-installation-method-for-the-docker-version-of-armbian)\n      - [8.4.1 Install Docker Runtime Environment](#841-install-docker-runtime-environment)\n      - [8.4.2 Configure macvlan Network](#842-configure-macvlan-network)\n      - [8.4.3 Run Armbian Docker Container](#843-run-armbian-docker-container)\n  - [9. Compiling Armbian Kernel](#9-compiling-armbian-kernel)\n    - [9.1 How to Add Custom Kernel Patches](#91-how-to-add-custom-kernel-patches)\n    - [9.2 How to Make Kernel Patches](#92-how-to-make-kernel-patches)\n    - [9.3 How to Customize Compilation of Driver Modules](#93-how-to-customize-compilation-of-driver-modules)\n  - [10. Updating Armbian Kernel](#10-updating-armbian-kernel)\n  - [11. Installing Common Software](#11-installing-common-software)\n  - [12. Frequently Asked Questions](#12-frequently-asked-questions)\n    - [12.1 dtb and u-boot Correspondence Table for Each Box](#121-dtb-and-u-boot-correspondence-table-for-each-box)\n    - [12.2 Instructions for LED Screen Display Control](#122-instructions-for-led-screen-display-control)\n    - [12.3 How to Restore the Original Android TV System](#123-how-to-restore-the-original-android-tv-system)\n      - [12.3.1 Backup and Restore Using Armbian-ddbr](#1231-backup-and-restore-using-armbian-ddbr)\n      - [12.3.2 Recovering using Amlogic Flashing Tool](#1232-recovering-using-amlogic-flashing-tool)\n    - [12.4 Setting the box to boot from USB/TF/SD](#124-setting-the-box-to-boot-from-usbtfsd)\n      - [12.4.1 Initial Installation of Armbian System](#1241-initial-installation-of-armbian-system)\n      - [12.4.2 Reinstallation of Armbian System](#1242-reinstallation-of-armbian-system)\n    - [12.5 Disable Infrared Receiver](#125-disable-infrared-receiver)\n    - [12.6 Boot file selection](#126-boot-file-selection)\n    - [12.7 Network Configuration](#127-network-configuration)\n      - [12.7.1 Network Configuration Using Interfaces](#1271-network-configuration-using-interfaces)\n        - [12.7.1.1 IP Address Assignment via DHCP](#12711-ip-address-assignment-via-dhcp)\n        - [12.7.1.2 Manual Setup of Static IP Address](#12712-manual-setup-of-static-ip-address)\n        - [12.7.1.3 Establish Interconnected Network Using OpenWrt in Docker](#12713-establish-interconnected-network-using-openwrt-in-docker)\n      - [12.7.2 Network Management Using NetworkManager](#1272-network-management-using-networkmanager)\n        - [12.7.2.1 Create a New Network Connection](#12721-create-a-new-network-connection)\n          - [12.7.2.1.1 Get Network Interface Name](#127211-get-network-interface-name)\n          - [12.7.2.1.2 Get Existing Network Connection Name](#127212-get-existing-network-connection-name)\n          - [12.7.2.1.3 Create a Wired Network Connection](#127213-create-a-wired-network-connection)\n          - [12.7.2.1.4 Creating a Wireless Network Connection](#127214-creating-a-wireless-network-connection)\n        - [12.7.2.2 Modify WiFi SSID or PASSWD in Wireless Network Connection](#12722-modify-wifi-ssid-or-passwd-in-wireless-network-connection)\n        - [12.7.2.3 Modify Network Address Allocation Method](#12723-modify-network-address-allocation-method)\n          - [12.7.2.3.1 Static IP address - IPv4](#127231-static-ip-address---ipv4)\n          - [12.7.2.3.2 DHCP Obtains Dynamic IP Address - IPv4 / IPv6](#127232-dhcp-obtains-dynamic-ip-address---ipv4--ipv6)\n        - [12.7.2.4 Modify Network Connection MAC Address](#12724-modify-network-connection-mac-address)\n          - [12.7.2.4.1 Method 1: Use the `nmcli` command to change the MAC address](#127241-method-1-use-the-nmcli-command-to-change-the-mac-address)\n          - [12.7.2.4.2 Method 2: Modify the MAC address via a configuration file](#127242-method-2-modify-the-mac-address-via-a-configuration-file)\n        - [12.7.2.5 How to Disable IPv6](#12725-how-to-disable-ipv6)\n      - [12.7.3 How to Enable Wireless](#1273-how-to-enable-wireless)\n      - [12.7.4 How to Enable Bluetooth](#1274-how-to-enable-bluetooth)\n    - [12.8 How to Add Startup Tasks](#128-how-to-add-startup-tasks)\n    - [12.9 How to Update Service Scripts in the System](#129-how-to-update-service-scripts-in-the-system)\n    - [12.10 How to Get Android System Partition Information on eMMC](#1210-how-to-get-android-system-partition-information-on-emmc)\n      - [12.10.1 Obtaining Partition Information](#12101-obtaining-partition-information)\n      - [12.10.2 Sharing Partition Information](#12102-sharing-partition-information)\n      - [12.10.3 Interpreting Partition Information](#12103-interpreting-partition-information)\n      - [12.10.4 For eMMC Installation](#12104-for-emmc-installation)\n    - [12.11 How to build the u-boot file](#1211-how-to-build-the-u-boot-file)\n      - [12.11.1 How to build the u-boot file for Amlogic devices](#12111-how-to-build-the-u-boot-file-for-amlogic-devices)\n        - [12.11.1.1 How to extract the bootloader and dtb files](#121111-how-to-extract-the-bootloader-and-dtb-files)\n        - [12.11.1.2 How to create the acs.bin file](#121112-how-to-create-the-acsbin-file)\n        - [12.11.1.3 How to build the u-boot file](#121113-how-to-build-the-u-boot-file)\n      - [12.11.2 How to build the u-boot file for Rockchip devices](#12112-how-to-build-the-u-boot-file-for-rockchip-devices)\n        - [12.11.2.1 How to use Radxa's u-boot building script](#121121-how-to-use-radxas-u-boot-building-script)\n        - [12.11.2.2 How to use cm9vdA's u-boot building script](#121122-how-to-use-cm9vdas-u-boot-building-script)\n    - [12.12 Error in Memory Size Recognition](#1212-error-in-memory-size-recognition)\n    - [12.13 How to Decompile dtb Files](#1213-how-to-decompile-dtb-files)\n    - [12.14 How to Modify cmdline Settings](#1214-how-to-modify-cmdline-settings)\n    - [12.15 How to Add New Supported Devices](#1215-how-to-add-new-supported-devices)\n      - [12.15.1 Add Device Configuration File](#12151-add-device-configuration-file)\n      - [12.15.2 Add System Files](#12152-add-system-files)\n      - [12.15.3 Add u-boot Files](#12153-add-u-boot-files)\n        - [12.15.3.1 Check the Partition Layout](#121531-check-the-partition-layout)\n        - [12.15.3.2 Back Up Key Partitions](#121532-back-up-key-partitions)\n        - [12.15.3.3 Add a Special Partition Writing File](#121533-add-a-special-partition-writing-file)\n      - [12.15.4 Add Process Control Files](#12154-add-process-control-files)\n    - [12.16 How to Resolve the Issue of I/O Errors While Writing to eMMC](#1216-how-to-resolve-the-issue-of-io-errors-while-writing-to-emmc)\n    - [12.17 How to Solve the Issue of No Sound in the Bullseye Version](#1217-how-to-solve-the-issue-of-no-sound-in-the-bullseye-version)\n    - [12.18 How to build the boot.scr file](#1218-how-to-build-the-bootscr-file)\n    - [12.19 How to Enable Remote Desktop and Modify the Default Port](#1219-how-to-enable-remote-desktop-and-modify-the-default-port)\n    - [12.20 TCP Congestion Control Optimization Guide](#1220-tcp-congestion-control-optimization-guide)\n\n## 1. Register your own Github account\n\nRegister an account to proceed with system customization. Click the `Sign up` button in the upper right corner of github.com and follow the prompts to complete registration.\n\n## 2. Set up private variable GITHUB_TOKEN etc\n\nAccording to the [GitHub Docs](https://docs.github.com/en/actions/security-guides/automatic-token-authentication), GitHub automatically creates a unique `GITHUB_TOKEN` secret at the start of every workflow job for use within the workflow. The `{{ secrets.GITHUB_TOKEN }}` can be used for authentication within the workflow job.\n\nWhen building an [Armbian Docker](../.github/workflows/build-armbian-arm64-docker-image.yml) image in Actions and pushing it to Docker Hub, you need to set two secrets: `DOCKERHUB_USERNAME` and `DOCKERHUB_PASSWORD`. On your repository's page, click Settings in the top right corner, then navigate to `Settings` > `Secrets and variables` > `Actions` > `Repository secrets` > `New repository secret`, add the following two secrets:\n\n- Secret name `DOCKERHUB_USERNAME`: The value is your username for logging into Docker Hub.\n- Secret name `DOCKERHUB_PASSWORD`: The value is your password for logging into Docker Hub.\n\n## 3. Fork the repository and set Workflow permissions\n\nFork the repository by opening https://github.com/ophub/amlogic-s9xxx-armbian and clicking the Fork button in the upper right to copy the repository to your account. Once the fork is complete, navigate to your copy. Then go to `Settings` > `Actions` > `General` > `Workflow permissions` in the left navigation bar and save. The illustration is as follows:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/167585338-841d3b05-8d98-4d73-ba72-475aad4a95a9.png width=\"300\" />\n</div>\n\n## 4. Customization instructions for personalized Armbian system files\n\nThe system compilation process is controlled in the [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) file. Additional .yml files in the workflows directory handle other functions. The system is compiled using Armbian's current official source code. Refer to the official documentation for parameter details.\n\n```yaml\n- name: Compile Armbian [ ${{ inputs.set_release }} ]\n  id: compile\n  if: ${{ steps.down.outputs.status }} == 'success' && !cancelled()\n  run: |\n    # Compile method and parameter description: https://docs.armbian.com/Developer-Guide_Build-Options\n    cd build/\n        ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=odroidn2 BRANCH=current BUILD_MINIMAL=no \\\n                      BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \\\n                      COMPRESS_OUTPUTIMAGE=\"sha\" SHARE_LOG=yes\n    echo \"status=success\" >> ${GITHUB_OUTPUT}\n```\n\nWhen building Armbian with `ophub`, the `armbian_files` parameter allows you to add or overwrite custom files in the [common-files](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/armbian-files/common-files) directory. The directory structure must strictly mirror the Armbian root filesystem to ensure files are correctly overlaid into the firmware (e.g., default configuration files should be placed under the `etc/default/` subdirectory). Example configuration:\n\n```yaml\n- name: Rebuild Armbian\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: armbian\n    armbian_path: build/output/images/*.img.gz\n    armbian_files: files\n    ...\n```\n\n## 5. Compile the system\n\nThe system can be compiled manually, on a schedule, or triggered by specific events. The following sections cover each method.\n\n### 5.1 Manual Compilation\n\nIn your repository's navigation bar, click the Actions button, then select Build armbian > Run workflow > Run workflow to start compilation. The process takes approximately 3 hours and is complete once all steps finish. The illustration is as follows:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163203938-e7762b09-e6b8-4cf5-b1f1-9c67c1a29953.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204044-9c7a7429-47ee-4fce-b7dd-e217bebf6133.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204127-6b16b558-7e78-4c22-a28a-7b37b5a34fa3.png width=\"300\" />\n</div>\n\n### 5.2 Scheduled Compilation\n\nIn the [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) file, use Cron to configure scheduled compilation. The five fields represent minutes (0–59) / hours (0–23) / day of month (1–31) / month (1–12) / day of week (0–6, Sunday–Saturday). Modify values as needed. The system uses UTC by default; convert to your local time zone accordingly.\n\n```yaml\nschedule:\n  - cron: '0 17 * * *'\n```\n\n### 5.3 Customizing Default System Configuration\n\nThe default system configuration information is recorded in the [model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) file, in which the `BOARD` name must be unique.\n\nDevices with `BUILD` set to `yes` are included in the default build and can be used directly. Devices set to `no` are not packaged by default. To use an unpackaged device, download the Armbian system with the same `FAMILY`, write it to `USB`, then open the USB boot partition on your computer and modify the `FDT dtb name` in `/boot/uEnv.txt` to match your device.\n\nFor local compilation, use the `-b` parameter; for GitHub Actions, use the `armbian_board` parameter. `-b all` packages all devices with `BUILD` set to `yes`. Specifying a `BOARD` explicitly will package it regardless of its `BUILD` value. For example: `-b r68s_s905x3-tx3_s905l3a-cm311`.\n\n### 5.4 Expanding Github Actions Compilation Space Using Logical Volumes\n\nGitHub Actions provides 84GB of compile space by default, with approximately 50GB available after accounting for the system and required packages. When compiling all firmware, this may be insufficient. Use logical volumes to expand the compile space to approximately 110GB. Refer to the [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) file and use the commands below to create a logical volume. Then use the logical volume path during compilation.\n\n```yaml\n- name: Create simulated physical disk\n  run: |\n    mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 1)\n    root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\\..*//') - 4)\n    sudo truncate -s \"${mnt_size}\"G /mnt/mnt.img\n    sudo truncate -s \"${root_size}\"G /root.img\n    sudo losetup /dev/loop6 /mnt/mnt.img\n    sudo losetup /dev/loop7 /root.img\n    sudo pvcreate /dev/loop6\n    sudo pvcreate /dev/loop7\n    sudo vgcreate github /dev/loop6 /dev/loop7\n    sudo lvcreate -n runner -l 100%FREE github\n    sudo mkfs.xfs /dev/github/runner\n    sudo mkdir -p /builder\n    sudo mount /dev/github/runner /builder\n    sudo chown -R runner.runner /builder\n    df -Th\n```\n\n### 5.5 Build Armbian Docker image\n\nTo create a [Docker](https://hub.docker.com/u/ophub) image of the Armbian system, refer to the [armbian_docker](../compile-kernel/tools/script/docker) build script.\n\n## 6. Saving the System\n\nSystem storage is also configured in the [.github/workflows/build-armbian-arm64-server-image.yml](../.github/workflows/build-armbian-arm64-server-image.yml) file. The compiled system is automatically uploaded to GitHub Releases via script.\n\n```yaml\n- name: Upload Armbian image to Release\n  uses: ncipollo/release-action@main\n  if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()\n  with:\n    tag: Armbian_${{ env.ARMBIAN_RELEASE }}_${{ env.PACKAGED_OUTPUTDATE }}\n    artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*\n    allowUpdates: true\n    token: ${{ secrets.GITHUB_TOKEN }}\n    body: |\n      These are the Armbian OS image\n      * OS information\n      Default username: root\n      Default password: 1234\n      Install command: armbian-install\n      Update command: armbian-update\n```\n\n## 7. Downloading the System\n\nNavigate to the Releases section on the repository homepage and select the system image matching your device model. The illustration is as follows:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/163204798-0d98524c-73df-4876-8912-fcae2845fbba.png width=\"300\" />\n<img src=https://user-images.githubusercontent.com/68696949/163204879-4898babf-fa00-4e63-89ea-235129e2ce1d.png width=\"300\" />\n</div>\n\n## 8. Installing Armbian to EMMC\n\nInstallation methods vary across Amlogic, Rockchip, and Allwinner platforms. Devices differ in storage options — some use external microSD cards, some have eMMC, and some support NVMe or other media. Each platform's installation method is described separately below. First, download the appropriate Armbian system image for your device from [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) and decompress it to .img format. Depending on your device, follow the corresponding installation method.\n\nAfter installation, connect the device to your `router` and allow `2 minutes` for it to boot. Then find the device's `IP` address (listed as Armbian) in your router's admin panel and connect via `SSH`. The default username is `root`, the default password is `1234`, and the default port is `22`.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972715-addcd695-970a-43d6-8a34-24a9c4bc80a2.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972773-fc9e9ef9-69a7-4279-8329-6fad1cf2f5b9.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202972818-b72e18cd-17d1-4f9f-a0fa-b6c22eef041d.png width=\"600\" />\n</div>\n\n### 8.1 Installation Method for Amlogic Series\n\nLog in to the Armbian system (default user: root, default password: 1234) → Enter the command:\n\n```shell\narmbian-install\n```\n\n| Optional Parameter | Default Value | Options | Description                          |\n| ------------------ | ------------- | ------- | ------------------------------------ |\n| -m                 | no            | yes/no  | Use Mainline u-boot                  |\n| -a                 | yes           | yes/no  | Use [ampart](https://github.com/7Ji/ampart) partition table adjustment tool |\n| -l                 | no            | yes/no  | List. Display the entire device list |\n\nExample: `armbian-install -m yes -a no`\n\n### 8.2 Installation Method for Rockchip Series\n\nInstallation methods differ by device and are described individually below.\n\n#### 8.2.1 Installation Method for Radxa-Rock5B\n\nRadxa-Rock5B supports multiple storage media (microSD/eMMC/NVMe), each with a different installation method. Download the [rk3588_spl_loader_v1.08.111.bin and spi_image.img](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/rock5b) files. Download the [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/Radxa_rock5b_RKDevTool_Release_v2.96__DriverAssitant_v5.1.1.tar.gz) tool and driver. Download [Rufus](https://rufus.ie/) or [balenaEtcher](https://www.balena.io/etcher/) for writing disk images.\n\n##### 8.2.1.1 Install the System to MicroSD\n\nUse Rufus, balenaEtcher, or a similar tool to write the Armbian system image to a microSD card, then insert it into the device.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202972996-300f223b-f6f6-48af-86ca-bdc842e5017d.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202973216-85b1a21b-0763-4a36-8c57-84490e071fdd.png width=\"600\" />\n</div>\n\n##### 8.2.1.2 Install the System to eMMC\n\n- Install via microSD card: Write the Armbian system image to a microSD card and boot the device from it. Upload the `armbian.img` file to the microSD card, then use `dd` to write it to eMMC:\n\n```Shell\ndd if=armbian.img  of=/dev/mmcblk1  bs=1M status=progress\n```\n\n- Install via USB-to-eMMC card reader: Connect the eMMC module to your computer, use Rufus or balenaEtcher to write the Armbian system image to eMMC, then insert the eMMC module into the device.\n- Install via Maskrom mode: Power off the development board. Hold the gold button, then connect a USB-A to Type-C cable between the ROCK 5B Type-C port and your PC. Release the gold button. Verify that a MASKROM device is detected. Right-click in the blank area of the list and load the `rock-5b-emmc.cfg` configuration file (the configuration file and RKDevTool are in the same directory). Set `rk3588_spl_loader_v1.08.111.bin` and `Armbian.img` as shown below and begin writing.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954901-c829d74d-c75a-4fd3-9bd0-aa3cdf2b77b4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954998-c08514e2-8760-4c0f-b5f7-0d30be635aa5.png width=\"600\" />\n</div>\n\n##### 8.2.1.3 Installation of the system on NVMe\n\nThe ROCK-5B has an SPI flash memory on its motherboard. Installing the bootloader on this SPI flash memory can support other boot media (such as SATA, USB3, or NVMe) that are not directly supported by the SoC maskrom mode. To use NVMe, you must first write the SPI file. The method is as follows:\n\nPower off the development board and remove all bootable devices (MicroSD cards, eMMC modules, etc.). Press and hold the golden button, then connect a USB-A to Type-C cable between the ROCK-5B and your PC. Release the golden button. Verify that a MASKROM device is detected. Right-click in the list to load the configuration file from the resource folder (the configuration file and RKDevTool are in the same directory), select `rk3588_spl_loader_v1.08.111.bin` and `spi_image.img` files according to the figure below, and click write:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202954823-3d3b1509-eedc-4192-91eb-017269c7f896.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961420-8316c96c-2796-43ed-b5ed-2fa5bfa1ddff.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202954956-6646b7cf-6354-4dc8-b076-c3323cb89a43.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202961447-49c0941a-e233-4b2a-b96b-b47636ce3cf2.png width=\"600\" />\n</div>\n\n- Install via card reader: Insert the M.2 NVMe SSD into an M.2 NVMe-to-USB 3.0 card reader and connect it to your computer. Use Rufus or balenaEtcher to write the Armbian system image to the NVMe drive, then install it in the device.\n- Install via microSD card: Write the Armbian system image to a microSD card and boot the device from it. Upload the `armbian.img` file to the microSD card, then use `dd` to write it to NVMe:\n\n```Shell\ndd if=armbian.img  of=/dev/nvme0n1  bs=1M status=progress\n```\n\n#### 8.2.2 Installation method for FastRhino R66S\n\nUse Rufus or balenaEtcher to write the Armbian system image to a microSD card, then insert it into the device.\n\n#### 8.2.3 Installation method for FastRhino R68S\n\n- Download the [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) tool and driver. Unzip, install the DriverAssistant driver, and open RKDevTool.\n- With R68s powered off, connect the USB male-to-male cable, press and hold the Recovery key, then plug in the 12V power supply. Release the Recovery key after two seconds — the flashing tool should `discover a LOADER device`.\n- Right-click in the blank area of the RKDevTool interface to add an item.\n- Set address to `0x00000000`, name to `armbian`, and path to the `armbian.img` system file.\n- Select the armbian entry, `deselect all other entries`, and click `execute` to write.\n- Note: If another system exists on eMMC, erase it first via Advanced Features before writing Armbian. If erasure fails, reflash the `MiniLoaderAll.bin` bootloader first, then enter `MASKROM` mode to write Armbian. MiniLoaderAll.bin settings: address `0xCCCCCCCC`, name `Loader`, path to the `MiniLoaderAll.bin` file in the Image directory of RKDevTool.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202970301-d798677b-e875-4971-ac8f-ee58b2a1e686.png width=\"200\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970405-cb68cb78-cd0f-43ee-b807-5e594ab73099.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970488-5f18c574-c11f-486f-8fe8-002f3ba2f3f4.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202970577-87549acf-b98b-441f-bb31-e4fd6608108d.png width=\"600\" />\n</div>\n\n#### 8.2.4 Installation method for Beikeyun\n\nThis method is based on [milton](https://www.cnblogs.com/milton/p/15391525.html)'s tutorial. Flashing requires entering Maskrom mode. Disconnect all connections, short the CLK and GND contacts (using the TTL GND or the GND near the small button), then connect via USB to your PC. A MASKROM device should be detected. The short-circuit point location is shown below:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://user-images.githubusercontent.com/68696949/202977817-fb12d291-47e2-47e4-88c3-e21f9ae57922.png width=\"600\" /><br />\n<img src=https://user-images.githubusercontent.com/68696949/202977900-50b4770d-8444-42a0-8478-3234043455bd.png width=\"600\" />\n</div>\n\nOpen RKDevTool and right-click to add an item.\n\n- Address `0xCCCCCCCC`, name `Boot`, path [select](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/beikeyun) `rk3328_loader_v1.14.249.bin`.\n- Address `0x00000000`, name `system`, path select the `Armbian.img` system to be flashed.\n- Check the \"Force Write by Address\" option, click \"Execute,\" and wait for the progress to complete on the right-hand download panel.\n\n#### 8.2.5 Installation method for Chainedbox-L1-Pro\n\nThis method is based on [cc747](https://post.smzdm.com/p/a4wkdo7l/)'s tutorial. Power off the Chainedbox-L1-Pro and unplug all cables. Connect a USB male-to-male cable between the USB 2.0 port on the Chainedbox-L1-Pro and your computer. Insert a paperclip into the Reset hole and hold it down, then plug in the power cord. Wait until `discovered a LOADER device` appears at the bottom of RKDevTool, then release the paperclip. Switch to `Advanced Features` and click `Enter Maskrom` until `Found a MASKROM device` appears. Right-click to add an item.\n\n- Address `0xCCCCCCCC`, name `Boot`, path [select](https://github.com/ophub/u-boot/tree/main/u-boot/rockchip/chainedbox) `rk3328_loader_v1.14.249.bin`.\n- Address `0x00000000`, name `system`, path select the `Armbian.img` system to be flashed.\n- Check the \"Force Write by Address\" option, click \"Execute,\" and wait for the progress to complete on the right-hand download panel.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a6d2d8c0-35c5-44ba-be35-fd2e2758729b width=\"600\" /><br />\n<img src=https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/13aab016-1b93-4ff1-b1ef-c202bd357068 width=\"600\" />\n</div>\n\n#### 8.2.6 Installation method for lckfb-tspi\n- Download the [RKDevTool](https://github.com/ophub/kernel/releases/download/tools/FastRhino_r68s_RKDevTool_Release_v2.86___DriverAssitant_v5.1.1.tar.gz) tool and driver. Unzip, install the DriverAssistant driver, and open RKDevTool. (Note: use version 2.86 instead of 2.92, as version 2.92 crashes during flashing.)\n- With the tspi powered off, press and hold the Recovery key, then insert the Type-C data cable. Release the Recovery key after RKDevTool displays `A LOADER device was found`. Right-click to add an item.\n- Address `0x00000000`, name `system`, path select the `Armbian.img` system to be flashed.\n- Click Execute and wait for the progress to complete.\n\n\n### 8.3 Allwinner Series Installation Method\n\nLog in to the Armbian system (default user: root, default password: 1234) → Enter the command:\n\n```shell\narmbian-install\n```\n\n### 8.4 Installation Method for the Docker Version of Armbian\n\nYou can use Docker versions of Armbian images on Ubuntu/Debian/Armbian systems. These images are hosted on [Docker Hub](https://hub.docker.com/r/ophub) and can be downloaded directly for use.\n\nFour Armbian Docker images with different base versions are provided: `armbian-trixie`, `armbian-bookworm`, `armbian-noble`, and `armbian-resolute`. Each version has both `arm64` and `amd64` builds, allowing you to choose the appropriate version based on your needs.\n\nAmong them, armbian-trixie is based on Debian 13, armbian-bookworm is based on Debian 12, armbian-noble is based on Ubuntu 24.04, and armbian-resolute is based on Ubuntu 26.04.\n\nThe arm64 version is suitable for devices with platform architectures such as Amlogic/Rockchip/Allwinner, while the amd64 version is suitable for computers and servers with x86_64 architecture.\n\n#### 8.4.1 Install Docker Runtime Environment\n\n```shell\ncurl -fsSL https://get.docker.com | sh\nsudo usermod -aG docker $USER\nsudo newgrp docker\n```\n\n#### 8.4.2 Configure macvlan Network\n\n```shell\n# Check if existing docker networks include a macvlan network\ndocker network ls\n\n# If there is no macvlan network, create one\n# Modify the subnet, gateway, and interface name according to your actual network\ndocker network create -d macvlan \\\n    --subnet=10.1.1.0/24 \\\n    --gateway=10.1.1.1 \\\n    -o parent=eth0 \\\n    macvlan\n```\n\n#### 8.4.3 Run Armbian Docker Container\n\nHere, the `armbian-trixie:arm64` image is used as an example to demonstrate how to run an Armbian container.\n\n```shell\n# Run the Armbian container in detached mode\n# Modify the container name, IP address, image version, etc., according to your actual situation\ndocker run -itd --name=armbian-trixie \\\n    --privileged \\\n    --network macvlan \\\n    --ip 10.1.1.15 \\\n    --hostname=armbian-trixie \\\n    -e TZ=Asia/Shanghai \\\n    --restart unless-stopped \\\n    ophub/armbian-trixie:arm64\n\n# View Armbian container logs\ndocker logs -f armbian-trixie\n\n# Enter the Armbian container\ndocker exec -it armbian-trixie bash\n\n# Exit the Armbian container\nexit\n\n# Stop and remove the Armbian container\ndocker rm -f armbian-trixie\n```\n\n## 9. Compiling Armbian Kernel\n\nKernel compilation is supported on Ubuntu, Debian, and Armbian systems, both locally and via GitHub Actions. For details, refer to the [Kernel Compilation Instructions](../../compile-kernel).\n\n### 9.1 How to Add Custom Kernel Patches\n\nWhen the kernel patch directory [tools/patch](../../compile-kernel/tools/patch) contains a common patch directory (`common-kernel-patches`) or a directory matching the kernel source repository name (for example, [linux-5.15.y](https://github.com/unifreq/linux-5.15.y)), use `-p true` to automatically apply kernel patches. The directory naming convention is as follows:\n\n```shell\n~/amlogic-s9xxx-armbian\n    └── compile-kernel\n        └── tools\n            └── patch\n                ├── common-kernel-patches  # Fixed directory name: stores common kernel patches for all versions\n                ├── linux-5.15.y           # Named after the kernel source library: stores dedicated patches\n                ├── linux-6.1.y\n                ├── linux-5.10.y-rk35xx\n                └── more kernel directory...\n```\n\n- For local kernel compilation, manually create the corresponding directory and add your custom kernel patches.\n- For GitHub Actions cloud compilation, use the `kernel_patch` parameter to specify the kernel patch directory in your repository. For example, see the usage in [compile-beta-kernel.yml](https://github.com/ophub/kernel/blob/main/.github/workflows/compile-beta-kernel.yml) in the [kernel](https://github.com/ophub/kernel) repository:\n\n```yaml\n- name: Compile the kernel\n  uses: ophub/amlogic-s9xxx-armbian@main\n  with:\n    build_target: kernel\n    kernel_version: 5.15.1_6.1.1\n    kernel_auto: true\n    kernel_patch: kernel-patch/beta\n    auto_patch: true\n```\n\nWhen specifying a custom kernel patch via `kernel_patch`, follow the naming convention described above.\n\n### 9.2 How to Make Kernel Patches\n\n- Obtained from repositories such as [Armbian](https://github.com/armbian/build) and [OpenWrt](https://github.com/openwrt/openwrt): for example, [armbian/patch/kernel](https://github.com/armbian/build/tree/main/patch/kernel/archive) and [openwrt/rockchip/patches-6.1](https://github.com/openwrt/openwrt/tree/main/target/linux/rockchip/patches-6.1), [lede/rockchip/patches-5.15](https://github.com/coolsnowwolf/lede/tree/master/target/linux/rockchip/patches-5.15) etc. Patches from these mainline kernel repositories can generally be used directly.\n- Obtained from GitHub commit URLs: Appending `.patch` to a commit URL generates the corresponding patch file.\n\nBefore adding a custom kernel patch, compare it against the upstream kernel source repository [unifreq/linux-k.x.y](https://github.com/unifreq) to verify it has not already been applied and to avoid conflicts. Tested kernel patches are encouraged to be submitted to the kernel repositories maintained by unifreq. Your contributions help make Armbian and OpenWrt more stable and functional for everyone.\n\n\n### 9.3 How to Customize Compilation of Driver Modules\n\nSome drivers are not yet included in the mainline Linux kernel but can be compiled as custom modules. Only drivers compatible with the mainline kernel can be compiled; Android-specific drivers are generally unsupported. For example:\n\n```shell\n# Step 1: Update to the latest kernel\n# Due to incomplete header files in earlier versions, it is necessary to update to the latest kernel version.\n# The requirement for each kernel version is not lower than 5.10.222, 5.15.163, 6.1.100, 6.6.41.\narmbian-sync\narmbian-update -k 6.1\n\n\n# Step 2: Install compilation tools\nmkdir -p /usr/local/toolchain\ncd /usr/local/toolchain\n# Download the compilation tools\nwget https://github.com/ophub/kernel/releases/download/dev/arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# Extract\ntar -Jxf arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\n# Install additional compilation dependencies (optional; you can manually install missing components based on errors).\narmbian-kernel -u\n\n\n# Step 3: Download and compile the driver\n# Download driver source code\ncd ~/\ngit clone https://github.com/jwrdegoede/rtl8189ES_linux\ncd rtl8189ES_linux\n# Set up the compilation environment\ngun_file=\"arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-linux-gnu.tar.xz\"\ntoolchain_path=\"/usr/local/toolchain\"\ntoolchain_name=\"gcc\"\nexport CROSS_COMPILE=\"${toolchain_path}/${gun_file//.tar.xz/}/bin/aarch64-none-linux-gnu-\"\nexport CC=\"${CROSS_COMPILE}gcc\"\nexport LD=\"${CROSS_COMPILE}ld.bfd\"\nexport ARCH=\"arm64\"\nexport KSRC=/usr/lib/modules/$(uname -r)/build\n# Set the M variable according to the actual path of the source code\nexport M=\"/root/rtl8189ES_linux\"\n# Compile the driver\nmake\n\n\n# Step 4: Install the driver\nsudo cp -f 8189es.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/\n# Update module dependencies\nsudo depmod -a\n# Load the driver module\nsudo modprobe 8189es\n# Check if the driver is successfully loaded\nlsmod | grep 8189es\n# You should see the driver successfully loaded\n8189es               1843200  0\ncfg80211              917504  2 8189es,brcmfmac\n```\n\nThe illustration is as follows:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a89cbe6-df38-4862-8d11-9d977e0f4191\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1a1d0bb9-44d4-4de5-9907-47e5f20747a7\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1bd2eff-4c57-4e91-a870-08b0f8b1fe16\">\n</div>\n\n## 10. Updating Armbian Kernel\n\nLog in to the Armbian system → Enter the command:\n\n```shell\n# Run as root user (sudo -i)\n# If no parameter is specified, it will be updated to the latest version.\narmbian-update\n```\n\n| Optional Parameters | Default Value | Options | Description |\n| -------- | ------------ | ------------- | -------------------------------- |\n| -r | ophub/kernel | `<owner>/<repo>` | Set the repository to download the kernel from github.com |\n| -u | Automatic | stable/flippy/beta/rk3588/rk35xx/h6 | Set the suffix of the used kernel's [tags](https://github.com/ophub/kernel/releases) |\n| -k | Latest Version | Kernel Version | Set the [Kernel Version](https://github.com/ophub/kernel/releases/tag/kernel_stable) |\n| -b | yes | yes/no | Automatically backup the kernel currently in use when updating the kernel |\n| -d | deb | tar/deb | Set the preferred kernel package format. If unavailable, the script will automatically try the alternative. `deb` is recommended for compiling custom drivers. |\n| -m | no | yes/no | Use the mainline u-boot |\n| -s | None | None/DiskName | [SOS] Restore the system kernel in eMMC/NVMe/sdX and other disks |\n| -h | None | None | View the usage help |\n\nExample: `armbian-update -k 5.15 -u stable -d deb`\n\nThe `-k` parameter accepts either an exact version number (e.g., `armbian-update -k 5.15.50`) or a version series (e.g., `armbian-update -k 5.15`), which automatically selects the latest version in that series.\n\nDuring kernel updates, the current kernel is automatically backed up to `/ddbr/backup`, retaining the three most recent versions. If a newly installed kernel is unstable, restore a backed-up kernel at any time:\n```shell\n# Enter the backup kernel directory, such as 6.6.12\ncd /ddbr/backup/6.6.12\n# Execute the kernel update command, which will automatically install the kernel in the current directory\narmbian-update\n```\n\n[SOS]: If an incomplete update or other issue prevents the system from booting from eMMC/NVMe/sdX, boot Armbian from another disk (e.g., USB) with any kernel version, then run `armbian-update -s` to restore the kernel to eMMC/NVMe/sdX. Without a disk parameter, the kernel is restored from the USB device to eMMC/NVMe/sdX by default. For systems with multiple disks, specify the target disk name explicitly. Examples:\n\n```shell\n# Restore the kernel in eMMC\narmbian-update -s mmcblk1\n# Restore the kernel in NVMe\narmbian-update -s nvme0n1\n# Restore the kernel in a removable storage device\narmbian-update -s sda\n# Disk names can be abbreviated as mmcblk1/nvme0n1/sda, etc., or use the complete name such as /dev/sda\narmbian-update -s /dev/sda\n# When the device has only one built-in storage (eMMC/NVMe/sdX), the disk name parameter can be omitted\narmbian-update -s\n```\n\nIf network issues prevent downloading from github.com, manually download the kernel files, upload them to any directory on your Armbian system, navigate to that directory, and run `armbian-update` for local installation. The system automatically prioritizes local kernel files when a complete set is detected in the current directory. The kernel is available in `tar` and `deb` formats. Each requires 4 files:\n\n- The 4 required files for `tar` format updates are: `header-xxx.tar.gz`, `boot-xxx.tar.gz`, `dtb-xxx.tar.gz`, and `modules-xxx.tar.gz`.\n- The 4 required files for `deb` format updates are: `linux-image-xxx.deb`, `linux-dtb-xxx.deb`, `linux-headers-xxx.deb`, and `linux-libc-dev-xxx.deb`.\n- Additional kernel files are optional and do not affect the update process, as the system accurately identifies the required files. Any supported kernel version can be installed, e.g., switching from 6.6.12 to 5.15.50.\n\nCustom options set via `-r`/`-u`/`-b`/`-d` can be saved permanently in `/etc/ophub-release` to avoid re-entering them each time. The corresponding settings are:\n\n```shell\n# Assign values to custom parameters\n-r  :  KERNEL_REPO='ophub/kernel'\n-u  :  KERNEL_TAGS='stable'\n-b  :  KERNEL_BACKUP='yes'\n-d  :  DOWNLOAD_TYPE='deb'\n```\n\n## 11. Installing Common Software\n\nLog in to the Armbian system → Enter the command:\n\n```shell\narmbian-software\n```\n\nUse `armbian-software -u` to update the local software center list. Based on community feedback in [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues), commonly used [software](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) is gradually integrated with one-click installation, update, and uninstallation support. This includes `docker images`, `desktop software`, `application services`, etc. See more [instructions](armbian_software.md).\n\nUse `armbian-apt` to select an appropriate software mirror for your region, improving download speeds. For example, select the `mirrors.tuna.tsinghua.edu.cn` source in China:\n\n\n```shell\narmbian-apt\n\n[ STEPS ] Welcome to the Armbian source change script.\n[ INFO ] Please select a [ bookworm ] mirror site.\n  ┌──────┬───────────────────┬────────────────────────────────┐\n  │  ID  │  Country/Region   │  Mirror Site                   │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   0  │  -                │  Restore default source        │\n  │   1  │  China            │  mirrors.tuna.tsinghua.edu.cn  │\n  │   2  │  China            │  mirrors.bfsu.edu.cn           │\n  │   3  │  China            │  mirrors.aliyun.com            │\n  │   4  │  Hongkong, China  │  mirrors.xtom.hk               │\n  │   5  │  Taiwan, China    │  opensource.nchc.org.tw        │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │   6  │  United States    │  mirrors.ocf.berkeley.edu      │\n  │   7  │  United States    │  mirrors.xtom.com              │\n  │   8  │  United States    │  mirrors.mit.edu               │\n  │   9  │  Canada           │  mirror.csclub.uwaterloo.ca    │\n  │  10  │  Canada           │  muug.ca/mirror                │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  11  │  Finland          │  mirror.kumi.systems           │\n  │  12  │  Netherlands      │  mirrors.xtom.nl               │\n  │  13  │  Germany          │  mirrors.xtom.de               │\n  │  14  │  Russia           │  mirror.yandex.ru              │\n  │  15  │  India            │  in.mirror.coganng.com         │\n  ├──────┼───────────────────┼────────────────────────────────┤\n  │  16  │  Estonia          │  mirrors.xtom.ee               │\n  │  17  │  Australia        │  mirrors.xtom.au               │\n  │  18  │  South Korea      │  mirror.yuki.net.uk            │\n  │  19  │  Singapore        │  mirror.sg.gs                  │\n  │  20  │  Japan            │  mirrors.xtom.jp               │\n  └──────┴───────────────────┴────────────────────────────────┘\n[ OPTIONS ] Please Input ID: 1\n[ INFO ] Your selected source ID is: [ 1 ]\n[ STEPS ] Start to change the source of the system: [ mirrors.tuna.tsinghua.edu.cn ]\n[ INFO ] The system release is: [ bookworm ]\n[ SUCCESS ] Change the source of the system successfully.\n```\n\n## 12. Frequently Asked Questions\n\nThis section covers common issues encountered when using Armbian.\n\n### 12.1 dtb and u-boot Correspondence Table for Each Box\n\nThe supported TV box list is located in the [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf) configuration file in the `Armbian` system.\n\n### 12.2 Instructions for LED Screen Display Control\n\nPlease refer to the [instructions](led_screen_display_control.md).\n\n### 12.3 How to Restore the Original Android TV System\n\nBack up and restore the Android TV system using `armbian-ddbr`.\n\nAlternatively, flash the Android system to eMMC via USB cable. Android system images are available in [Tools](https://github.com/ophub/kernel/releases/tag/tools).\n\n#### 12.3.1 Backup and Restore Using Armbian-ddbr\n\nBefore installing Armbian on a new device, back up the original Android TV system in case restoration is needed later. Boot Armbian from `TF/SD/USB`, run `armbian-ddbr`, and enter `b` when prompted to create a backup. The backup is saved to `/ddbr/BACKUP-arm-64-emmc.img.gz` — download and keep it in a safe location. To restore, upload the backup file to the same path on the `TF/SD/USB` device, run `armbian-ddbr`, and enter `r` when prompted.\n\n\n#### 12.3.2 Recovering using Amlogic Flashing Tool\n\n- If the device can still boot from USB after reinserting the power supply, simply reinstall. Retry multiple times if necessary.\n\n- If the screen remains black and the device cannot boot from USB, a short-circuit recovery is required. First restore the original Android system, then reinstall Armbian. Download and install the [amlogic_usb_burning_tool](https://github.com/ophub/kernel/releases/tag/tools) recovery tool. Prepare a [USB male-to-male cable](https://user-images.githubusercontent.com/68696949/159267576-74ad69a5-b6fc-489d-b1a6-0f8f8ff28634.png) and a [paperclip](https://user-images.githubusercontent.com/68696949/159267790-38cf4681-6827-4cb6-86b2-19c7f1943342.png).\n\n- Using x96max+ as an example, locate the [short-circuit point](https://user-images.githubusercontent.com/68696949/110590933-67785300-81b3-11eb-9860-986ef35dca7d.jpg) on the motherboard and download the [Android TV system package](https://github.com/ophub/kernel/releases/tag/tools). Android TV system images and short-circuit point diagrams for other common devices are also [available here](https://github.com/ophub/kernel/releases/tag/tools).\n\n```shell\nOperating method:\n\n1. Open USB Burning Tool:\n   [ File → Import image ]: X96Max_Plus2_20191213-1457_ATV9_davietPDA_v1.5.img\n   [ Select ]：Erase Flash\n   [ Select ]：Erase bootloader\n   Click on the [ Start ] button\n2. Use the [ paperclip ] to short-circuit the [ two short-circuit points ] on the box's motherboard,\n   and at the same time use the [ USB double male data cable ] to connect the [ box ] with the [ computer ].\n3. When you see the [ progress bar starts moving ], remove the paperclip, no longer short-circuit.\n4. When you see [ progress bar at 100% ], the flashing is complete, the box has been restored to the Android TV system.\n   Click on the [ Stop ] button, unplug the [ USB double male data cable ] between the [ box ] and [ computer ].\n5. If any of the above steps fail, try again until successful.\n   If the progress bar does not move, you can try plugging in the power supply. Normally, you don't need power support for flashing, only the power supply from the USB double male can meet the requirements.\n```\n\nOnce factory settings are restored, follow the same steps as the initial Armbian installation.\n\n### 12.4 Setting the box to boot from USB/TF/SD\n\nDepending on your situation, use either the initial installation or reinstallation method.\n\n#### 12.4.1 Initial Installation of Armbian System\n\n- Insert the USB/TF/SD with the installed system into the box.\n- Enable developer mode: Settings → About device → Version number (e.g., X96max plus...), tap the version number 5 times rapidly until `You are now a developer` appears.\n- Enable USB debugging: System → Advanced options → Developer options → enable `USB debugging` and `ADB` debugging.\n- Install ADB: Download [adb](https://github.com/ophub/kernel/releases/tag/tools) and extract it. Copy `adb.exe`, `AdbWinApi.dll`, and `AdbWinUsbApi.dll` to `c:\\windows\\system32` and `c:\\windows\\syswow64`. Verify the installation by running `adb --version` in a command prompt.\n- Open a command prompt and run `adb connect 192.168.1.137` (replace with your device's IP, found in your router's admin panel). A successful connection displays `connected to 192.168.1.137:5555`.\n- Run `adb shell reboot update` — the device will reboot from the inserted USB/TF/SD. Access the system via its IP address in a browser or through SSH.\n\n#### 12.4.2 Reinstallation of Armbian System\n\n- In normal situations, simply insert the USB drive with Armbian and boot from it. USB takes boot priority over eMMC.\n- If the device does not boot from USB, rename the `boot.scr` file in the eMMC's `/boot` directory (e.g., to `boot.scr.bak`), then insert the USB drive and boot again.\n\n### 12.5 Disable Infrared Receiver\n\nInfrared receiver support is enabled by default. If using the device as a server, disable the IR kernel module to prevent accidental shutdowns. To disable IR completely, add the following line:\n\n```shell\nblacklist meson_ir\n```\n\nto `/etc/modprobe.d/blacklist.conf` and restart.\n\n### 12.6 Boot file selection\n\n- Among known devices, only `T95(s905x)` / `T95Z-Plus(s912)` / `BesTV-R3300L(s905l-b)` and a few others require the `/bootfs/extlinux/extlinux.conf` file, which is included by default in the system. If other devices require it, write the system to USB, open the `boot` partition, and rename `/boot/extlinux/extlinux.conf.bak` by removing the `.bak` extension. When installing to eMMC, `armbian-install` automatically detects and creates the `extlinux.conf` file if needed.\n\n- All other devices boot using `/boot/uEnv.txt` only — do not modify the `extlinux.conf.bak` file.\n\n### 12.7 Network Configuration\n\n#### 12.7.1 Network Configuration Using Interfaces \n\nThe default content of the network configuration file `/etc/network/interfaces` is as follows:\n\n```shell\nsource /etc/network/interfaces.d/*\n# Network is managed by Network manager\nauto lo\niface lo inet loopback\n```\n\n##### 12.7.1.1 IP Address Assignment via DHCP\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\niface eth0 inet dhcp\n```\n\n##### 12.7.1.2 Manual Setup of Static IP Address\n\nAdjust the IP, gateway, and DNS values to match your network configuration.\n\n```shell\nsource /etc/network/interfaces.d/*\n\nauto eth0\nallow-hotplug eth0\niface eth0 inet static\nhwaddress ether 12:34:56:78:9A:DA\naddress 192.168.1.100\nnetmask 255.255.255.0\ngateway 192.168.1.1\ndns-nameservers 192.168.1.1\n```\n\n##### 12.7.1.3 Establish Interconnected Network Using OpenWrt in Docker \n\nModify the MAC address as needed.\n\n```shell\nsource /etc/network/interfaces.d/*\n\nallow-hotplug eth0\nno-auto-down eth0\nauto eth0\niface eth0 inet manual\n\nauto macvlan\niface macvlan inet dhcp\n        pre-up ip link add macvlan link eth0 type macvlan mode bridge\n        post-down ip link del macvlan link eth0 type macvlan mode bridge\n\nauto lo\niface lo inet loopback\n```\n\n#### 12.7.2 Network Management Using NetworkManager\n\n##### 12.7.2.1 Create a New Network Connection\n\nPrerequisites for creating or modifying a network connection.\n\n###### 12.7.2.1.1 Get Network Interface Name\n\nCheck available network interfaces.\n\n```shell\nnmcli device | grep -E \"^[e].*|^[w].*|^[D].*|^[T].*\" | awk '{printf \"%-19s%-19s\\n\",$1,$2}'\n```\n\nThe `DEVICE` column displays the network interface name, and the `TYPE` column displays the network interface type.\n\n`eth0` is the first Ethernet interface, `eth1` is the second, and so on. Wireless interfaces follow the same convention.\n\n```shell\nDEVICE             TYPE\neth0               ethernet\neth1               ethernet\neth2               ethernet\neth3               ethernet\nwlan0              wifi\nwlan1              wifi\n```\n\n###### 12.7.2.1.2 Get Existing Network Connection Name\n\nList existing network connections on the device, both active and inactive. Avoid reusing existing connection names when creating new ones.\n\n```shell\nnmcli connection show | grep -E \".*|^[N].*\" | awk '{printf \"%-19s%-19s\\n\", $1,$3}'\n```\n\nThe `NAME` column displays the name of the existing network connection, and the `TYPE` column displays the network interface type.\n\n`ethernet` = wired, `wifi` = wireless, `bridge` = bridge\n\n```shell\nNAME               TYPE\ncnc                ethernet\nlan                ethernet\nlte                ethernet\ntel                ethernet\ndocker0            bridge\ntitanium           wifi\ncpe                wifi\n```\n\n###### 12.7.2.1.3 Create a Wired Network Connection\n\nCreate a new network connection on interface `eth0` with immediate activation (`Dynamic IP Address` - `IPv4 / IPv6`).\n\n```shell\n# Set ENV\nMYCON=ether1                  # New network connection name\nMYETH=eth0                    # Network interface name = eth0 / eth1 / eht2 / eth3\nIPV6AGM=stable-privacy        # IPv6 address status mode = stable-privacy / eui64\n\n# Add ETH\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM\nnmcli connection up $MYCON\nip -c -br address\n```\n\nCreate a new network connection on interface `eth0` with immediate activation (`Static IP Address` - `IPv4`).\n\n```shell\n# Set ENV\nMYCON=ether1                  # Network connection name\nMYETH=eth0                    # Network interface name = eth0 / eth1 / eht2 / eth3\nIP=192.168.67.167/24          # HOST IP address, where 24 is the subnet mask corresponding to 255.255.255.0\nGW=192.168.67.1               # Gateway\nDNS=119.29.29.29,223.5.5.5    # DNS server address\n\n# Chg CON\nnmcli connection add \\\ncon-name $MYCON \\\ntype ethernet \\\nifname $MYETH \\\nautoconnect yes \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.1.4 Creating a Wireless Network Connection\n\nCreate a network connection on the `wlan0` interface with immediate activation (`Dynamic IP address` - `IPv4 / IPv6`).\n\n```shell\n# Set ENV\nMYCON=ssid                    # Name of the new network connection, it is recommended to use WiFi SSID to specify the connection name\nMYSSID=ssid                   # WiFi SSID, case sensitive\nMYPSWD=passwd                 # WiFi password\nMYWSKM=wpa-psk                # Security selection WPA-WPA2 = wpa-psk or WPA3 = sae (see which encryption method is in the wireless router or AP)\nMYWLAN=wlan0                  # Network interface name = wlan0 / wlan1\nIPV6AGM=stable-privacy        # IPv6 address status mode = stable-privacy / eui64\n\n# Add WLAN\nnmcli connection add \\\ncon-name $MYCON \\\ntype wifi \\\nifname $MYWLAN \\\nautoconnect yes \\\nipv6.addr-gen-mode $IPV6AGM \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.2 Modify WiFi SSID or PASSWD in Wireless Network Connection\n\nUpdate the `WiFi SSID or password` in the wireless network connection `ssid` with immediate activation.\n\n```shell\n# Set ENV\nMYCON=ssid                    # Wireless network connection name\nMYSSID=ssid                   # WiFi SSID, case sensitive\nMYPSWD=passwd                 # WiFi password\nMYWSKM=wpa-psk                # Security selection WPA-WPA2 = wpa-psk or WPA3 = sae\n\n# Add WLAN\nnmcli connection modify $MYCON \\\nwifi.ssid $MYSSID \\\nwifi-sec.key-mgmt $MYWSKM \\\nwifi-sec.psk $MYPSWD\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.3 Modify Network Address Allocation Method\n\n###### 12.7.2.3.1 Static IP address - IPv4\n\nChange the IP allocation method to `Static IP address` for network connection `ether1` with immediate activation.\n\n*Applicable to both wired and wireless connections\n\n```shell\n# Set ENV\nMYCON=ether1                  # Network connection name\nIP=192.168.67.167/24          # HOST IP address, where 24 is the subnet mask corresponding to 255.255.255.0\nGW=192.168.67.1               # Gateway\nDNS=119.29.29.29,223.5.5.5    # DNS server address\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method manual \\\nipv4.addresses $IP \\\nipv4.gateway $GW \\\nipv4.dns $DNS\nnmcli connection up $MYCON\nip -c -br address\n```\n\n###### 12.7.2.3.2 DHCP Obtains Dynamic IP Address - IPv4 / IPv6\n\nChange the IP allocation method to `DHCP` for network connection `ether1` with immediate activation.\n\n*Applicable to both wired and wireless connections\n\n```shell\n# Set ENV\nMYCON=ether1                  # Network connection name\n\n# Chg CON\nnmcli connection modify $MYCON \\\nipv4.method auto \\\nipv6.method auto\nnmcli connection up $MYCON\nip -c -br address\n```\n\n##### 12.7.2.4 Modify Network Connection MAC Address\n\nChange the MAC address on a network connection to resolve MAC address conflicts.\n\n###### 12.7.2.4.1 Method 1: Use the `nmcli` command to change the MAC address\n\n```shell\n# Use the `nmcli connection show` command to view the network interface name\nnmcli connection show\n# The returned result contains the network interface name, such as 'Wired connection 1'\nNAME                UUID                                  TYPE      DEVICE\nWired connection 1  24d63dc7-c46f-3bf1-912f-1c33eb94338b  ethernet  eth0\nlo                  35ca24e5-bdc0-4658-8ac8-435ee22e07f3  loopback  lo\nWired connection 2  59660b21-b460-30e0-8cb3-89b886556955  ethernet  --\n\n# Set ENV\nMYCON='Wired connection 1'    # Network connection name, note to match the network interface type\nMYTYPE='802-3-ethernet'       # Network interface type = Wired network card / Wireless network card\n                              #                        = 802-3-ethernet     / 802-11-wireless\nMYMAC='12:34:56:78:9A:BC'     # Set new MAC address\n\n# Chg CON\nnmcli connection modify \"${MYCON}\" ${MYTYPE}.cloned-mac-address ${MYMAC}\nnmcli connection up \"${MYCON}\"\nip -c a show \"${MYCON}\"\n```\n\n* Modifying certain network parameters may temporarily disconnect and reconnect the network.\n* Depending on the hardware and software environment, changes take `1–15` seconds to apply. If changes do not take effect within this period, check your hardware and software configuration.\n\n###### 12.7.2.4.2 Method 2: Modify the MAC address via a configuration file\n\nCreate a MAC address override configuration file.\n\n```shell\nsudo mkdir -p /etc/systemd/network/\nsudo nano /etc/systemd/network/10-mac-override.link\n```\n\nAdd the following content:\n\n```shell\n[Match]\n# Specify the network interface name whose MAC address needs to be changed\nOriginalName=eth0\n\n[Link]\n# Set a valid MAC address\nMACAddress=02:55:66:77:88:99\n```\n\nChanges take effect after reboot.\n\n##### 12.7.2.5 How to Disable IPv6\n\nUse `nmcli` to disable `IPv6` from the command line. Please refer to [disable-ipv6](https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-networkmanager-to-disable-ipv6-for-a-specific-connection_configuring-and-managing-networking) for the source.\n\nStep 1: View the network connection list:\n\n```shell\nNAME                 UUID                                   TYPE       DEVICE\nWired connection 1   8a7e0151-9c66-4e6f-89ee-65bb2d64d366   ethernet   eth0\n...\n```\n\nStep 2: Set the connection's ipv6.method parameter to disabled:\n\n```shell\nnmcli connection modify \"Wired connection 1\" ipv6.method \"disabled\"\n```\n\nStep 3: Reconnect to the network:\n\n```shell\nnmcli connection up \"Wired connection 1\"\n```\n\nStep 4: Verify the connection status. If no inet6 entry appears, IPv6 is disabled:\n\n```shell\nip address show eth0\n```\n\nStep 5: Confirm that `/proc/sys/net/ipv6/conf/eth0/disable_ipv6` contains `1`:\n\n```shell\n# cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6\n1\n```\n\nAlternatively, disable IPv6 system-wide by adding the following to `/etc/sysctl.conf`:\n\n```shell\n# Disable IPv6 by default\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\n```\n\n#### 12.7.3 How to Enable Wireless\n\nSome devices support wireless networking. Enable it as follows:\n\n```shell\n# Install management tool\nsudo apt-get install network-manager\n\n# Check network devices\nsudo nmcli dev\n\n# Enable wireless\nsudo nmcli r wifi on\n\n# Scan wireless\nsudo nmcli dev wifi\n\n# Connect to wireless\nsudo nmcli dev wifi connect \"wifi name\" password \"wifi password\"\n\n# Display the saved network connection list\nsudo nmcli connection show\n\n# Disconnect\nsudo nmcli connection down \"wifi name\"\n\n# Forget the connection and cancel automatic connection\nsudo nmcli connection delete \"wifi name\"\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230541872-565a655e-2781-4170-8898-0ae096725506.png\">\n</div>\n\n#### 12.7.4 How to Enable Bluetooth\n\nSome devices support Bluetooth. Enable it as follows:\n\n```shell\n# Install Bluetooth support\narmbian-config >> Network >> BT: Install Bluetooth support\n\n# Reboot the system\nreboot\n```\n\nAfter rebooting, verify the Bluetooth driver is functioning. Desktop environments can connect Bluetooth devices via the menu. Terminal-based configuration is also available.\n\n```shell\ndmesg | grep Bluetooth\n```\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230545883-755a137d-f574-4b32-a26b-bea9cfbf6384.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/230544120-5a63dcd4-9716-40d2-ba59-c27f7b9937f8.png\">\n</div>\n\n```shell\n# Connect Bluetooth device\narmbian-config >> Network >> BT: Discover and connect Bluetooth devices\n```\n\nBluetooth can also be managed via terminal commands:\n\n```shell\n# Check the Bluetooth service running status\nsudo systemctl status bluetooth\n\n# If not started, start the Bluetooth service first\nsudo systemctl enable bluetooth\nsudo systemctl start bluetooth\n\n# Scan nearby Bluetooth devices\nbluetoothctl scan on\n\n# Enable Bluetooth discovery\nbluetoothctl discoverable on\n\n# Pair the Bluetooth MAC address\nbluetoothctl pair 12:34:56:78:90:AB\n\n# Check the paired Bluetooth devices\nblluetoothctl paired-devices\n\n# Connect to the Bluetooth device\nbluetoothctl connect 12:34:56:78:90:AB\n\n# Trust the device for easy connection next time\nbluetoothctl trust 12:34:56:78:90:AB\n\n# Disconnect the Bluetooth device\nbluetoothctl disconnect 12:34:56:78:90:AB\n\n# Unpair the Bluetooth device\nbluetoothctl remove 12:34:56:78:90:AB\n\n# Block the connected device\nbluetoothctl block 12:34:56:78:90:AB\n```\n\n### 12.8 How to Add Startup Tasks\n\nA startup task script is included in the system. In Armbian, the path is [/etc/custom_service/start_service.sh](../build-armbian/armbian-files/common-files/etc/custom_service/start_service.sh). Add your custom startup tasks to this script as needed.\n\n### 12.9 How to Update Service Scripts in the System\n\nRun `armbian-sync` to update all local service scripts to the latest version.\n\nIf `armbian-sync` fails, the installed version may be outdated. Update it manually:\n\n```shell\nwget https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/main/build-armbian/armbian-files/common-files/usr/sbin/armbian-sync -O /usr/sbin/armbian-sync\n\nchmod +x /usr/sbin/armbian-sync\n\narmbian-sync\n```\n\n### 12.10 How to Get Android System Partition Information on eMMC\n\nBefore writing Armbian to eMMC, confirm the device's Android partition table to ensure data is written to safe areas. Damaging the partition table may prevent the system from booting. Writing to unsafe areas can cause boot failures or errors like the one shown below:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187075834-4ac40263-52ae-4538-a4b1-d6f0d5b9c856.png\">\n</div>\n\n#### 12.10.1 Obtaining Partition Information\n\nFor Armbian versions released from this repository after November 2022, run the following command to generate a URL containing complete partition information (no internet connection required on the device):\n\n```shell\nampart /dev/mmcblk2 --mode webreport 2>/dev/null\n```\n\n*The webreport mode was introduced in ampart v1.2 (released 2023.02.03). If the above command produces no output, your version may be older. Use this alternative command instead:*\n\n```shell\necho \"https://7ji.github.io/ampart-web-reporter/?dsnapshot=$(ampart /dev/mmcblk2 --mode dsnapshot 2>/dev/null | head -n 1)&esnapshot=$(ampart /dev/mmcblk2 --mode esnapshot 2>/dev/null | head -n 1)\"\n```\n\nThe generated URL will look similar to this:\n\n```shell\nhttps://7ji.github.io/ampart-web-reporter/?esnapshot=bootloader:0:4194304:0%20reserved:37748736:67108864:0%20cache:113246208:754974720:2%20env:876609536:8388608:0%20logo:893386752:33554432:1%20recovery:935329792:33554432:1%20rsv:977272832:8388608:1%20tee:994050048:8388608:1%20crypt:1010827264:33554432:1%20misc:1052770304:33554432:1%20instaboot:1094713344:536870912:1%20boot:1639972864:33554432:1%20system:1681915904:1073741824:1%20params:2764046336:67108864:2%20bootfiles:2839543808:754974720:2%20data:3602907136:4131389440:4&dsnapshot=logo::33554432:1%20recovery::33554432:1%20rsv::8388608:1%20tee::8388608:1%20crypt::33554432:1%20misc::33554432:1%20instaboot::536870912:1%20boot::33554432:1%20system::1073741824:1%20cache::536870912:2%20params::67108864:2%20data::-1:4\n```\n\nOpen this URL in a browser to view the DTB and eMMC partition information:\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287642-e1b7be27-4d2c-4ac3-9fcc-15e06aebb97e.png\">\n<img width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/24390674/216287654-d1929e21-d2b3-4fb6-bcf0-c454c88e21b9.png\">\n</div>\n\n#### 12.10.2 Sharing Partition Information\n\nWhen sharing partition information (e.g., reporting a new device or seeking help), share the URL rather than a screenshot. Use a URL shortener if the link is too long.\n\n- The partition information on the webpage is dynamically generated on each visit, so annotations and table formatting may be updated over time.\n- Additionally, partition parameters cannot be easily copied from screenshots for analysis.\n\nThe webpage's table layout is designed for easy copy-paste into Excel or LibreOffice Calc, eliminating the need to manually organize parameters.\n\n#### 12.10.3 Interpreting Partition Information\n\nThe DTB table records the desired partition layout defined in the Android DTB. This layout typically ends with a `data` partition that fills the remaining space, so devices with the same system (and model) share identical DTB layouts. The actual partition layout may vary due to different eMMC capacities, but is always derived from the DTB partition layout (i.e., given the DTB layout and exact eMMC size, the eMMC partition layout can be determined. *Did you notice that the DTB and eMMC partition examples above come from different devices?*).\n\nThe eMMC table shows the actual partition layout on the device. Each row represents a storage area — either a partition or an inter-partition gap (Amlogic reserves at least 8MB between partitions, originally intended for other purposes but unused even in the latest S905X4, effectively wasting space). Partition rows appear in black with offset and mask values. Gap rows appear in grey with no offset or mask values and are labeled `gap`.\n\nThe last column indicates write safety: green/`yes` = writable, red/`no` = non-writable, yellow with a label = conditionally or partially writable.\n\nUsing the above table as an example, the `0+4M` (`0M~4M`) area of the `bootloader` partition is non-writable, the `32M` gap (`4M~36M`) after it is writable, the `36M+64M` (`36M~100M`) `reserved` partition is non-writable, and the gap from there to the gap before `env` (`100M~836M`) is fully writable. From 1M after `env` (`837M to the end`), the area is writable if the Android boot logo is not needed. The writable ranges on eMMC are:\n\n- 4M~36M\n- 100M~836M\n- 837M~end\n\nIf the Android boot logo is needed, the 852M + 32M (`852M~884M`) `logo` partition is additionally non-writable, reducing the writable ranges to:\n\n- 4M~36M\n- 100M~836M\n- 837M~852M\n- 884M~end\n\n\n#### 12.10.4 For eMMC Installation\n\nIf your device fails when using `armbian-install` and the `-a` parameter (use [ampart](https://github.com/7Ji/ampart) to adjust the eMMC partition layout) is `yes` (default value), then your box cannot use the optimal layout (that is, adjust the DTB partition information to only have `data`, then generate eMMC partition information from this, and then move all remaining partitions forward. In this way, the space from 117M onwards can be used). You need to modify the corresponding partition information in [armbian-install](../build-armbian/armbian-files/common-files/usr/sbin/armbian-install).\n\nIn this file, the key parameters for declaring the partition layout are three: `BLANK1`, `BOOT`, `BLANK2`. Among them, `BLANK1` represents the unusable size starting from the beginning of eMMC; `BOOT` represents the size of the partition created after `BLANK1` for storing the kernel, DTB, etc., preferably not less than 256M, `BLANK2` represents the unusable size after `BOOT`. The space after this will be used to create the `ROOT` partition to store all the data outside the `/boot` mount point in the system. All three should be integers, and the unit is MiB (1 MiB = 1024 KiB = 1024^2 Byte)\n\nIn the case discussed in the previous paragraph where the `logo` partition is not needed, we naturally hope to use all the usable space, but the area of `4M~36M` is too small to be used as `BOOT`, so it can only be counted in the unusable `BLANK1`. The area of `100M~836M` is more than enough to be used as `BOOT`, so this 736M can be allocated to `BOOT` entirely. After this, there is an unusable area of `836M~837M`, which is given to `BLANK2`, so the parameters to be used should be as follows (only `s905x3` is used as an example in the following text, if your SoC is other, you need to modify other corresponding code blocks):\n\n```shell\n# Set partition size (Unit: MiB)\nelif [[ \"${AMLOGIC_SOC}\" == \"s905x3\" ]]; then\n    BLANK1=\"100\"\n    BOOT=\"736\"\n    BLANK2=\"1\"\n```\n\n### 12.11 How to build the u-boot file\n\nThe u-boot file is a crucial component for system startup. The process of obtaining source code and the compilation workflow varies slightly across Amlogic, Allwinner, and Rockchip platforms.\n\n#### 12.11.1 How to build the u-boot file for Amlogic devices\n\nSince most Amlogic device manufacturers keep their source code closed, u-boot related files must be extracted from the device before compilation. The method presented here is derived from the tutorial shared by [unifreq](https://github.com/unifreq).\n\n##### 12.11.1.1 How to extract the bootloader and dtb files\n\nExtraction requires the HxD software. Download it from the [official site](https://mh-nexus.de/en/downloads.php?product=HxD20) or the [backup link](https://github.com/ophub/kernel/releases/download/tools/HxDSetup.2.5.0.0.zip).\n\nRun the following commands in the `cmd` panel to extract the relevant files and download them to your local computer.\n\n```shell\n# Use adb tool to enter the box\nadb connect 192.168.1.111\nadb shell\n\n# Export bootloader command\ndd if=/dev/block/bootloader of=/data/local/bootloader.bin\n\n# Export dtb command\ncat /dev/dtb >/data/local/mybox.dtb\n\n# Export gpio command\ncat /sys/kernel/debug/gpio >/data/local/mybox_gpio.txt\n\n# Download the bootloader, dtb, and gpio files to the root directory of the C drive on your local computer in the mybox folder\nadb pull /data/local/bootloader.bin C:\\mybox\nadb pull /data/local/mybox.dtb C:\\mybox\nadb pull /data/local/mybox_gpio.txt C:\\mybox\n```\n\n##### 12.11.1.2 How to create the acs.bin file\n\nThe most important part of the mainline u-boot is the acs.bin, which initializes memory. The original factory u-boot is located at the beginning of the system at the 4MB position. Use the `bootloader.bin` file obtained earlier to extract the `acs.bin` file.\n\nOpen the HxD software, open the exported `bootloader.bin` file, `Right click - Select range`, start position `F200`, length `1000`, select `hexadecimal`.\n\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056711-1b58ce71-2a7d-4e9b-a976-e5f278edaa53.png\">\n\nCopy the selected result, then create a new file, paste in insert mode, ignore the warning, and save it as the acs.bin file.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056725-0a0e60af-6a21-4a6b-a2d5-f3d46b438a6a.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056827-8419c738-3428-473e-9a95-ab7270170d98.png\">\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187056852-9f62f16a-f7f1-4c34-a2c2-78358d198f9a.png\">\n</div>\n\nIf the bootloader is locked, the code in this area is garbled and useless. Normally, there should be many `0`s as in the picture above, `cfg` will appear several times in succession, and `ddr` related words will appear in the middle. This normal code can be used.\n\n##### 12.11.1.3 How to build the u-boot file\n\nBuilding u-boot requires the source repositories https://github.com/unifreq/amlogic-boot-fip and https://github.com/unifreq/u-boot to compile two u-boot files for your device.\n\nWithin the amlogic-boot-fip source code, the only file that varies by device model is acs.bin, all other files are universal.\n\n<img width=\"600\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/187057209-c4716384-46ef-4922-9710-8da7ae6db1e4.png\">\n\nFor build instructions, see the device-specific documentation at https://github.com/unifreq/u-boot/tree/master/doc/board/amlogic.\n\nBuilding u-boot using [unifreq](https://github.com/unifreq)'s method requires the device's acs.bin, dts, and config files. The dts exported from the Android system cannot be directly converted to Armbian format, so a corresponding dts file must be written manually. Based on your device's specific hardware differences (switches, LEDs, power control, TF card, SDIO wifi module, etc.), modify and create a [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) file from similar ones in the kernel source repository.\n\nFor example, building u-boot for X96Max Plus:\n\n```shell\n~/make-uboot\n    ├── amlogic-boot-fip\n    │   ├── x96max-plus                                     # Create directory yourself\n    │   │   ├── asc.bin                                     # Self-made source file\n    │   │   └── other-copy-files...                         # Copy files from other directories\n    │   │\n    │   ├── other-source-directories...\n    │   └── other-source-files...\n    │\n    └── u-boot\n        ├── configs\n        │   └── x96max-plus_defconfig                       # Self-made source file\n        ├── arch\n        │   └── arm\n        │       └── dts\n        │           ├── meson-sm1-x96-max-plus-u-boot.dtsi  # Self-made source file\n        │           ├── meson-sm1-x96-max-plus.dts          # Self-made source file\n        │           └── Makefile                            # Edit\n        ├── fip\n        │   ├── u-boot.bin                                  # Generated file\n        │   └── u-boot.bin.sd.bin                           # Generated file\n        ├── u-boot.bin                                      # Generated file\n        │\n        ├── other-source-directories...\n        └── other-source-files...\n```\n\n- Download the [amlogic-boot-fip](https://github.com/unifreq/amlogic-boot-fip) source code. In the root directory, create a [x96max-plus](https://github.com/unifreq/amlogic-boot-fip/tree/master/x96max-plus) directory. Other than the `asc.bin` file that you created, all other files can be copied from other directories.\n- Download the [u-boot](https://github.com/unifreq/u-boot) source code. Create a corresponding [x96max-plus_defconfig](https://github.com/unifreq/u-boot/blob/master/configs/x96max-plus_defconfig) file and put it into the [configs](https://github.com/unifreq/u-boot/tree/master/configs) directory. Create the corresponding [meson-sm1-x96-max-plus-u-boot.dtsi](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus-u-boot.dtsi) and [meson-sm1-x96-max-plus.dts](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/meson-sm1-x96-max-plus.dts) files and put them in the [arch/arm/dts](https://github.com/unifreq/u-boot/tree/master/arch/arm/dts) directory, then edit the [Makefile](https://github.com/unifreq/u-boot/blob/master/arch/arm/dts/Makefile) in this directory to add the `meson-sm1-x96-max-plus.dtb` file index.\n- In the root directory of the u-boot source code, follow the steps in the document https://github.com/unifreq/u-boot/blob/master/doc/board/amlogic/x96max-plus.rst.\n\nTwo types of files are generated: the `u-boot.bin` in the u-boot root directory is an incomplete u-boot for the `/boot` directory (corresponds to the [overload](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) directory); the `u-boot.bin` and `u-boot.bin.sd.bin` in the `fip` directory are complete u-boot files for `/usr/lib/u-boot/` (corresponds to the [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) directory). The two complete versions differ by 512 bytes — the larger one has 512 bytes of zeros prepended.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189039426-c127631f-77ca-4fcb-9fb6-4220045d712b.png\">\n<img width=\"400\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/189029320-e43a4cc9-b4b5-4de4-92fe-b17bd29020d0.png\">\n</div>\n\n💡 Tip: Before writing to eMMC for testing, review section 12.3 for recovery methods. Ensure you know the short-circuit point location, have the original .img format Android system file, and have verified the short-circuit flashing process. Master all recovery methods before proceeding.\n\n\n#### 12.11.2 How to build the u-boot file for Rockchip devices\n\nSince most Rockchip device manufacturers have open-sourced their u-boot code, the relevant source code can be obtained directly from their repositories. Additionally, some open-source contributors have shared user-friendly u-boot compilation scripts. Below are several examples illustrating different compilation methods.\n\n##### 12.11.2.1 How to use Radxa's u-boot building script\n\nTaking compiling [Rock5b(rk3588)](https://wiki.radxa.com/Rock5/guide/build-u-boot-on-5b) as an example.\n\n```shell\n# 01.Install the necessary build dependencies\nsudo apt-get update\nsudo apt-get install -y git device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison\n\n# 02.Set up your workspace and get the source code from the Radxa Git repositories\nmkdir ~/rk3588-sdk && cd ~/rk3588-sdk\ngit clone -b stable-5.10-rock5 https://github.com/radxa/u-boot.git\ngit clone -b master https://github.com/radxa/rkbin.git\ngit clone -b debian https://github.com/radxa/build.git\n\n# Explanation of the source code:\n# ~/rk3588-sdk/build/: Radxa helper script files and configuration files for building U-Boot, Linux kernel and rootfs.\n# ~/rk3588-sdk/rkbin/: Pre-built Rockchip binaries, including first stage loader and ATF (Arm Trustzone Firmware)\n# ~/rk3588-sdk/u-boot/: Second stage bootloader used to start the OS (e.g. Linux or Android)\n\n# 03.Build u-boot （For ROCK 5B）\ncd ~/rk3588-sdk\n./build/mk-uboot.sh rk3588-rock-5b\n\n# 04.After a successful build, the ~/rk3588-sdk/out/u-boot directory will be populated\n~/rk3588-sdk/out/u-boot\n├── idbloader.img\n├── rk3588_spl_loader_v1.08.111.bin\n├── spi\n│   └── spi_image.img\n└── u-boot.itb\n```\n\nBy adding more options in `board_configs.sh` and `mk-uboot.sh` within the [radxa/build](https://github.com/radxa/build) source code, u-boot files for other devices can also be compiled. For example, see the instructions for compiling the [Beelink-IPC-R(rk3588)](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415#issuecomment-1508234307) device.\n\n\n##### 12.11.2.2 How to use cm9vdA's u-boot building script\n\ncm9vdA provides scripts and instructions for compiling u-boot and the kernel in his open-source project [cm9vdA/build-linux](https://github.com/cm9vdA/build-linux). The following are documented compilation processes for various Rockchip devices:\n\n- Build u-boot for Lenovo-Leez-P710 (rk3399) device: [Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609#issuecomment-1681494735)\n- Build u-boot for DLFR100 (rk3399) device: [Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522#issuecomment-1622919423)\n- Build u-boot for ZYSJ (rk3399) device: [Link](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380#issuecomment-1539325464)\n\n\n### 12.12 Error in Memory Size Recognition\n\nIf the memory size is recognized incorrectly (4GB recognized as 1–2GB is abnormal; 3.7GB is normal), try manually copying a `/boot/UBOOT_OVERLOAD` file (note: \"copy\", not \"rename\" — renaming will prevent the system from booting after installation and updates). When used from `USB`, save it as `/boot/u-boot.ext`; when used from `eMMC`, save it as `/boot/u-boot.emmc`.\n\nDo not manually copy the u-boot file for any other purpose. Incorrect u-boot files will cause boot failures and various other issues.\n\n### 12.13 How to Decompile dtb Files\n\nSome new devices are not currently supported (or have hardware variants). Try adjusting related parameters by decompiling the dtb file.\n\n```shell\n# Install dependencies\nsudo apt-get update\nsudo apt-get install -y device-tree-compiler\n\n# 1. Decompilation command (generate dts source code using dtb file)\ndtc -I dtb -O dts -o xxx.dts xxx.dtb\n\n# 2. Compilation command (generate dtb file using dts)\ndtc -I dts -O dtb -o xxx.dtb xxx.dts\n\n# 3. Save data and reboot\nsync && reboot\n\n# 4. [Optional action] Perform testing based on requirements\n# e.g., reinstall for testing when addressing the issue mentioned in 12.16\narmbian-install\n```\n\n### 12.14 How to Modify cmdline Settings\n\nIn Amlogic devices, add/modify/delete settings in `/boot/uEnv.txt`. In Rockchip and Allwinner devices, configure in `/boot/armbianEnv.txt` (via the `extraargs` or `extraboardargs` parameters). Devices using `/boot/extlinux/extlinux.conf` configure in that file. A reboot is required after each change.\n\n- For instance, `Home Assistant Supervisor` only supports `docker cgroup v1`, while the default Docker installation uses v2. To switch to v1, add `systemd.unified_cgroup_hierarchy=0` to cmdline and reboot.\n\n- Adding `max_loop=128` to cmdline adjusts the maximum number of loop mounts.\n\n- Adding `usbcore.usbfs_memory_mb=1024` to cmdline increases the USBFS memory buffer from the default `16 mb` (`cat /sys/module/usbcore/parameters/usbfs_memory_mb`), improving large USB file transfers.\n\n- Adding `usbcore.usb3_disable=1` to cmdline disables all USB 3.0 devices.\n\n- Adding `extraargs=video=HDMI-A-1:1920x1080@60` to cmdline forces the display to 1080p.\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://user-images.githubusercontent.com/68696949/216220941-47db0183-7b26-4768-81cf-2ee73d59d23e.png\">\n</div>\n\n<div style=\"width:100%;margin-top:40px;margin:5px;\">\n<img width=\"700\" alt=\"image\" src=\"https://github.com/ophub/amlogic-s9xxx-armbian/assets/68696949/a600dcad-d817-47eb-b529-4014019915b3\">\n</div>\n\n### 12.15 How to Add New Supported Devices\n\nBuilding an Armbian system for a device requires a `device configuration file`, `system files`, `u-boot files`, and `process control files`. The methods for adding each are described below:\n\n#### 12.15.1 Add Device Configuration File\n\nIn the configuration file [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf), add device configuration based on its test support status. Devices with `BUILD` set to `yes` are built by default; the corresponding `BOARD` value `must be unique`. These devices can use the default Armbian system directly.\n\nDevices set to `no` are not packaged by default. To use them, download the Armbian system with the same `FAMILY`, write it to `USB`, open the USB boot partition on your computer, and modify the `FDT dtb name` in `/boot/uEnv.txt` to match your device.\n\n#### 12.15.2 Add System Files\n\nCommon files are placed in `build-armbian/armbian-files/common-files`, shared across all platforms.\n\nPlatform-specific files are placed in `build-armbian/armbian-files/platform-files/<platform>`: [Amlogic](../build-armbian/armbian-files/platform-files/amlogic), [Rockchip](../build-armbian/armbian-files/platform-files/rockchip), and [Allwinner](../build-armbian/armbian-files/platform-files/allwinner). The `bootfs` directory contains /boot partition files, and the `rootfs` directory contains Armbian system files.\n\nFor devices with special configuration requirements, add an independent directory named after the `BOARD` in `build-armbian/armbian-files/different-files`. Create `bootfs` and `rootfs` subdirectories as needed to add files under the system's `/boot` partition or other system paths. All folder names correspond to actual paths in the Armbian system. These files can add new files or override files from common and platform directories.\n\n#### 12.15.3 Add u-boot Files\n\n`Amlogic` series devices, share [bootloader](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader) files and [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/overload) files. If there are new files, put them in the corresponding directory. The `bootloader` files will automatically be added to the Armbian system's `/usr/lib/u-boot` directory during system construction, and `u-boot` files will be automatically added to the `/boot` directory.\n\n`Rockchip` and `Allwinner` series devices, add an independent [u-boot](https://github.com/ophub/u-boot/tree/main/u-boot) file directory named after `BOARD` for each device, and the corresponding series files are placed in this directory.\n\nDuring the Armbian image construction, these u-boot files will be written into the corresponding Armbian image files by the rebuild script according to the configuration in [/etc/model_database.conf](../build-armbian/armbian-files/common-files/etc/model_database.conf).\n\nFor devices that can use standard U-Boot files, using them directly is strongly recommended. However, some devices may lack a suitable U-Boot. If such a device can already run other Linux systems like Ubuntu, you can try preserving key boot-related partitions to install Armbian or OpenWrt. The critical partitions that typically need preservation include `bootloader`, `reserved`, and `env`.\n\nThese partitions can be backed up and written back to their corresponding locations when creating a new Armbian or OpenWrt image. The resulting image, containing the original system's boot partitions, can be written to eMMC directly via the `dd` command or through the built-in installation tools (e.g., Armbian's `armbian-install` or OpenWrt's `Amlogic Service` plugin).\n\nCurrently, devices using this method include [oes(a311d)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2666), [oes-plus(s922x)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3029), and [oec-turbo(rk3566)](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736). The following uses the `oes(a311d)` device as an example to detail the procedure.\n\n##### 12.15.3.1 Check the Partition Layout\n\n```shell\nampart /dev/mmcblk2\n\n# The partition information obtained is as follows:\n# ===================================================================================\n# IO seek EPT: Seeking to 37748736\n# EPT report: 20 partitions in the table:\n# ===================================================================================\n# ID| name            |          offset|(   human)|            size|(   human)| masks\n# -----------------------------------------------------------------------------------\n#  0: bootloader                      0 (   0.00B)           400000 (   4.00M)      0\n#     (GAP)                                                 2000000 (  32.00M)\n#  1: reserved                  2400000 (  36.00M)          4000000 (  64.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  2: cache                     6c00000 ( 108.00M)         20000000 ( 512.00M)      2\n#     (GAP)                                                  800000 (   8.00M)\n#  3: env                      27400000 ( 628.00M)           800000 (   8.00M)      0\n#     (GAP)                                                  800000 (   8.00M)\n#  ... other partitions ...\n# ===================================================================================\n```\n\n##### 12.15.3.2 Back Up Key Partitions\n\n```shell\ndd if=/dev/mmcblk2 of=bootloader.bin bs=1M count=4 skip=0\ndd if=/dev/mmcblk2 of=reserved.bin bs=1M count=8 skip=36\ndd if=/dev/mmcblk2 of=env.bin bs=1M count=1 skip=628\n```\nPlace the backed-up files in the corresponding directory of the [u-boot](https://github.com/ophub/u-boot) repository: [u-boot/amlogic/bootloader/a311d-oes](https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader/a311d-oes).\n\nYou might have noticed that the reserved partition is 64MB in size, yet only 8MB was backed up. On the oes(a311d) device, only the first 8MB contains critical data; the remaining 56MB is empty. Here is how to verify this:\n\n```shell\n# First, back up the complete 64MB file of the reserved partition:\ndd if=/dev/mmcblk2 of=reserved_64M.bin bs=1M count=64 skip=36\n\n# Then, extract the first 8MB from the backed-up file reserved_64M.bin:\ndd if=reserved_64M.bin of=reserved_first_8M.bin bs=1M count=8\n\n# Next, check the hexadecimal contents:\nhexdump -C reserved_first_8M.bin | less\n\n# Now, examine the last few lines of the output:\n0071ffd0  4c 5e a8 1f fc 5b 5b 98  ae ef b0 97 0c 3b e8 c2  |L^...[[......;..|\n0071ffe0  c8 e0 b2 74 3d 67 d5 3d  24 7b 63 b7 c7 73 f5 d8  |...t=g.=${c..s..|\n0071fff0  a1 b8 38 a7 57 d6 b4 b5  e8 1c ba c0 07 0f f5 79  |..8.W..........y|\n00720000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n*\n00800000\n```\n\nAnalyzing the output, the address of the last line containing non-zero data is `0071fff0`. Starting from address `00720000`, all content is `00` (zero). The hexdump utility uses an asterisk (`*`) to indicate repeated lines, meaning everything from `00720000` to the end of the file at `00800000` (the 8MB mark) is zero. Converting `0x00720000` to decimal gives 7,471,104 bytes (7.125 MB). Therefore, rounding up to 8MB for the backup is sufficient. Similarly, only the first 80KB of the env partition contains valid data, so 1MB is adequate.\n\n##### 12.15.3.3 Add a Special Partition Writing File\n\nFor implementation details, refer to the `write_board_bootloader` function in [/etc/armbian-board-release.conf](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/different-files/a311d-oes/rootfs/etc/armbian-board-release.conf). This function is called during the image rebuild process. This configuration file also serves as a powerful device customization hub — it allows precise control over image partition layout and size via parameters like `skip_mb=\"700\"`, and supports custom scripts for kernel or system file operations. All advanced, device-specific customizations are centrally managed in this file.\n\n#### 12.15.4 Add Process Control Files\n\nAdd the corresponding `BOARD` option to `armbian_board` in the [yml workflow control file](../.github/workflows/build-armbian-arm64-server-image.yml), which supports use in `Actions` on github.com.\n\n### 12.16 How to Resolve the Issue of I/O Errors While Writing to eMMC\n\nSome devices can boot Armbian normally from USB/SD/TF but report I/O write errors when writing to eMMC, such as the case in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/989):\n\n```shell\n[  284.338449] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.341544] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.446972] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.450074] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n[  284.497746] I/O error, dev mmcblk2, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2\n[  284.500871] Buffer I/O error on dev mmcblk2, logical block 0, lost async page write\n```\n\nIn such cases, adjust the working mode speed and frequency of the dtb to stabilize storage read/write support. In SDR mode, the frequency is twice the speed; in DDR mode, the frequency equals the speed. For example:\n\n```shell\nsd-uhs-sdr12\nsd-uhs-sdr25\nsd-uhs-sdr50\nsd-uhs-ddr50\nsd-uhs-sdr104\n\nmax-frequency = <208000000>;\n```\n\nTake the code snippet in the [dts](https://github.com/unifreq/linux-5.15.y/tree/main/arch/arm64/boot/dts/amlogic) file of the kernel source code as an example:\n\n```shell\n/* SD card */\n&sd_emmc_b {\n\tstatus = \"okay\";\n\n\tbus-width = <4>;\n\tcap-sd-highspeed;\n\tsd-uhs-sdr12;\n\tsd-uhs-sdr25;\n\tsd-uhs-sdr50;\n\tmax-frequency = <100000000>;\n};\n\n/* eMMC */\n&sd_emmc_c {\n\tstatus = \"okay\";\n\n\tbus-width = <8>;\n\tcap-mmc-highspeed;\n\tmax-frequency = <100000000>;\n};\n```\n\nGenerally, reducing the frequency of `&sd_emmc_c` from `max-frequency = <200000000>;` to `max-frequency = <100000000>;` resolves the issue. If not, try `50000000`. Adjust `&sd_emmc_b` for `USB/SD/TF` settings, and use `sd-uhs-sdr` to limit speed. Modify the dts file and [compile](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel) to get a test file, or use the decompilation method in `Section 12.13` to modify an existing dtb file. When modifying decompiled dtb files, use hexadecimal values: decimal `200000000` = hex `0xbebc200`, `100000000` = `0x5f5e100`, `50000000` = `0x2faf080`, `25000000` = `0x17d7840`.\n\nIn addition to software-layer solutions, this issue can also be resolved through [hardware upgrades](https://github.com/ophub/amlogic-s9xxx-armbian/issues/998) or [physical modifications](https://www.right.com.cn/forum/thread-901586-1-1.html).\n\n### 12.17 How to Solve the Issue of No Sound in the Bullseye Version\n\nError log information for the sound issue:\n\n```shell\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: dpcm_fe_dai_prepare() failed (-22)\nMar 29 15:47:18 armbian-ct2000 kernel:  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0\n```\n\nPlease refer to the method in [Bullseye NO Sound](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1000) for settings.\n\n```shell\ncurl -fsSOL https://github.com/ophub/kernel/releases/download/tools/bullseye_g12_sound-khadas-utils-4-2-any.tar.gz\ntar -xzf bullseye_g12_sound-khadas-utils-4-2-any.tar.gz -C /\n\nsystemctl enable sound.service\nsystemctl restart sound.service\n```\n\nRestart Armbian for testing. If the sound still doesn't work, your device may be using an older audio output configuration. Comment out the new configuration at `L137-L142` in /usr/bin/g12_sound.sh (primarily for G12B / S922X; the older G12A/S905X2 and most SM1/S905X3 based on G12A cannot use it), and uncomment the old configuration at `L130-L134`.\n\n### 12.18 How to build the boot.scr file\n\nIn the Armbian system, the `boot.scr` file in `/boot` is the compiled boot script. `boot.scr` is generated from the `boot.cmd` source file. Modify `boot.cmd` to make changes, then compile it into `boot.scr` using the mkimage command.\n\nNormally, these files do not need modification. If adjustments are necessary, follow the steps below.\n\n```shell\n# Install dependencies\nsudo apt-get update\nsudo apt-get install -y u-boot-tools\n\n# Edit the boot.cmd file\ncd /boot\ncopy /boot/boot.cmd /boot/boot.cmd.bak\ncopy /boot/boot.scr /boot/boot.scr.bak\nnano boot.cmd\n\n# Compile the boot.scr file\nmkimage -C none -A arm -T script -d boot.cmd boot.scr\n\n# Restart to test\nsync\nreboot\n\n# Additional Explanation\n# For Amlogic devices, the file used in USB is /boot/boot.scr, while the file used for writing to eMMC is /boot/boot-emmc.scr.\n```\n\n### 12.19 How to Enable Remote Desktop and Modify the Default Port\n\nIn the software center `armbian-software`, selecting `201` installs a desktop environment. During installation, you will be prompted to enable remote desktop — enter `y` to enable. The default remote desktop port is `3389`. To use a custom port:\n\n```shell\nsudo nano /etc/xrdp/xrdp.ini\n# Change to a custom port, for example 5000\nport=5000\n```\n\n### 12.20 TCP Congestion Control Optimization Guide\n\nDifferent network stack configurations are recommended based on device performance to ensure the best user experience. Please configure your device according to its hardware capabilities by editing `/etc/sysctl.conf` and modifying (or adding) the following lines:\n\n- Gigabit Devices (High Performance/Modern Arch): The `fq + bbr` combination is recommended to maximize throughput and improve packet loss resilience.\n- 100Mbps Devices (Low Performance/Legacy Arch): The `fq_codel + cubic` combination is suggested to minimize CPU load and maintain low-latency stability.\n\n```shell\n# Option A: Recommended for Gigabit/High Performance Devices\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\n# Option B: Recommended for 100Mbps/Low Performance Devices\n# net.core.default_qdisc = fq_codel\n# net.ipv4.tcp_congestion_control = cubic\n```\n"
  },
  {
    "path": "documents/armbian_software.md",
    "content": "# Armbian Software Center\n\n[View English description](#armbian-software-center) | [查看中文说明](#armbian-软件中心) | [日本語の説明を確認する](#armbian-ソフトウェアセンター)\n\nBased on user feedback and requests in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues), commonly used [software](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) has been gradually integrated to provide one-click install/update/uninstall operations. This includes `Docker images`, `desktop software`, `application services`, and more.\n\n## Software Introduction\n\n| ID | SoftwareName           | Home | DockerHub:Port | Software introduction                             |\n| --- | --------------------- | --------------------- | ---- | ------------------------------------------------- |\n| 101 | Docker                | [Home](https://www.docker.com/) | [Docker](https://docs.docker.com/engine/install/) | Docker is an open platform for developing, shipping, and running applications. |\n| 102 | Portainer             | [Home](https://www.portainer.io/) | [Docker](https://hub.docker.com/r/portainer/portainer-ce) :9443 | The most popular container management platform in the world. |\n| 103 | Yacht                 | [Home](https://yacht.sh/) | [Docker](https://hub.docker.com/r/selfhostedpro/yacht) :8001 | A container management UI with a focus on templates and 1-click deployments. |\n| 104 | Transmission          | [Home](https://transmissionbt.com/) | [Docker](https://github.com/linuxserver/docker-transmission) :9091 | Transmission is a cross-platform BitTorrent client. |\n| 105 | qBittorrent           | [Home](https://www.qbittorrent.org/) | [Docker](https://hub.docker.com/r/linuxserver/qbittorrent) :8080 | qBittorrent is a BitTorrent client. |\n| 106 | NextCloud             | [Home](https://nextcloud.com/) | [Docker](https://hub.docker.com/r/arm64v8/nextcloud) :8088 | Nextcloud offers an on-premise Universal File Access and sync platform with powerful collaboration capabilities and desktop, mobile and web interfaces. |\n| 107 | Jellyfin              | [Home](https://jellyfin.org/) | [Docker](https://hub.docker.com/r/linuxserver/jellyfin) :8096 | Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. |\n| 108 | HomeAssistant         | [Home](https://www.home-assistant.io/) | [Docker](https://hub.docker.com/r/linuxserver/homeassistant) :8123 | Home Assistant integrates with over a thousand different devices and services, Has powerful automation features. |\n| 109 | Kodbox                | [Home](https://kodcloud.com/) | [Docker](https://hub.docker.com/r/kodcloud/kodbox) :8081 | Private cloud online document management solution. |\n| 110 | CouchPotato           | [Home](https://couchpota.to/) | [Docker](https://hub.docker.com/r/linuxserver/couchpotato) :5050 | Couchpotato is an automatic NZB and torrent downloader, Automatically find movies you want to watch. |\n| 111 | Sonarr                | [Home](https://sonarr.tv/) | [Docker](https://hub.docker.com/r/linuxserver/sonarr) :8989 | Sonarr is a PVR for Usenet and BitTorrent users. |\n| 112 | Radarr                | [Home](https://radarr.video/) | [Docker](https://hub.docker.com/r/linuxserver/radarr) :7878 | Radarr is a movie collection manager for Usenet and BitTorrent users. |\n| 113 | Syncthing             | [Home](https://syncthing.net/) | [Docker](https://hub.docker.com/r/linuxserver/syncthing) :8384 | Syncthing is a continuous file synchronization program. |\n| 114 | FileBrowser           | [Home](https://filebrowser.org/) | [Docker](https://hub.docker.com/r/filebrowser/filebrowser) :8002 | File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. |\n| 115 | Heimdall              | [Home](https://heimdall.site/) | [Docker](https://hub.docker.com/r/linuxserver/heimdall) :8003 | Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way. |\n| 116 | Node-RED              | [Home](https://nodered.org/) | [Docker](https://nodered.org/docs/getting-started/docker) :1880 | Node-RED is a programming tool. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. |\n| 117 | Mosquitto             | [Home](https://www.mosquitto.org/) | [Docker](https://hub.docker.com/r/arm64v8/eclipse-mosquitto) :1883 | The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. Eclipse Mosquitto is an open source implementation of a server for versions 5, 3.1.1, and 3.1 of the MQTT protocol. |\n| 118 | OpenWrt               | [Home](https://www.openwrt.org/) | [Docker](https://hub.docker.com/r/ophub/openwrt-armv8) :80 | The OpenWrt Project is a Linux operating system targeting embedded devices, it has more than 3000+ standardized application packages and a very rich third-party plug-in support. |\n| 119 | Netdata               | [Home](https://learn.netdata.cloud/) | [Docker](https://hub.docker.com/r/netdata/netdata) :19999 | Netdata is distributed, real-time, performance and health monitoring for systems and applications. |\n| 120 | XunLei                | [Home](https://github.com/cnk3x/xunlei) | [Docker](https://hub.docker.com/r/cnk3x/xunlei) :2345 | The Thunder remote download service program extracted from the Thunder Synology suite. |\n| 121 | Docker-Headless       | [Home](https://github.com/infrastlabs/docker-headless) | [Docker](https://hub.docker.com/r/infrastlabs/docker-headless) :10081 | Remote Desktop with Audio/Locale/IBus Support. Multi Desktop (Gnome, Plasma, Mate, Xfce, Cinnamon) |\n| 122 | Navidrome             | [Home](https://www.navidrome.org/) | [Docker](https://hub.docker.com/r/deluan/navidrome) :4533  | Navidrome is a self-hosted, open source music server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. |\n| 123 | Openlist                 | [Home](https://www.oplist.org/) | [Docker](https://hub.docker.com/r/openlistteam/openlist) :5244  | A file list program that supports multiple storage, powered by Gin and Solidjs. |\n| 124 | QingLong              | [Home](https://github.com/whyour/qinglong) | [Docker](https://hub.docker.com/r/whyour/qinglong) :5700  | A timed task management panel that supports typescript, javaScript, python3, and shell. |\n| 125 | ChatGPT-Next-Web      | [Home](https://github.com/Yidadaa/ChatGPT-Next-Web) | [Docker](https://hub.docker.com/r/yidadaa/chatgpt-next-web) :3000  | A well-designed cross-platform ChatGPT UI (Web / PWA / Linux / Win / MacOS). |\n| 126 | N8N                   | [Home](https://n8n.io/) | [Docker](https://hub.docker.com/r/n8nio/n8n) :5678  | n8n is a workflow automation platform that gives technical teams the flexibility of code with the speed of no-code. With 400+ integrations, native AI capabilities, and a fair-code license, n8n lets you build powerful automations while maintaining full control over your data and deployments. |\n| 201 | Desktop:GNOME         | [Home](https://www.gnome.org/) | -    | GNOME provides a focused desktop working environment that helps you get things done. `Desktop` can be connected to a monitor for use, or they can be used with [remote desktop](https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients) software. |\n| 202 | Firefox               | [Home](https://www.mozilla.org/) | -    | An excellent web browser. |\n| 203 | VLC                   | [Home](https://www.videolan.org/) | -    | VLC is a free, open source, cross-platform multimedia player and framework that can play most multimedia files. |\n| 204 | MPV                   | [Home](https://mpv.io/) | -    | A free, open source, and cross-platform media player. |\n| 205 | GIMP                  | [Home](https://www.gimp.org/) | -    | GIMP is a cross-platform image editor. |\n| 206 | Krita                 | [Home](https://krita.org/) | -    | Krita is a professional FREE and open source painting program. |\n| 207 | LibreOffice           | [Home](https://www.libreoffice.org/) | -    | LibreOffice is a free and powerful office suite, Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity. |\n| 208 | Shotcut               | [Home](https://shotcut.org/) | -    | Shotcut is a free, open source, cross-platform video editor. |\n| 209 | Kdenlive              | [Home](https://kdenlive.org/) | -    | Kdenlive is Free and Open Source Video Editor. |\n| 210 | Thunderbird           | [Home](https://www.thunderbird.net/) | -    | Thunderbird makes email better for you, bringing together speed, privacy and the latest technologies. |\n| 211 | Evolution             | [Home](https://github.com/GNOME/evolution) | -    | Evolution is a personal information management application that provides integrated mail, calendaring and address book functionality. |\n| 212 | Gwenview              | [Home](https://apps.kde.org/gwenview/) | -    | Gwenview is a fast and easy to use image viewer by KDE, ideal for browsing and displaying a collection of images. |\n| 213 | Eog                   | [Home](https://gitlab.gnome.org/GNOME/eog) | -    | Eye of GNOME(eog) is a image viewer program.  It is meant to be a fast and functional image viewer. |\n| 214 | VisualStudioCode      | [Home](https://code.visualstudio.com/) | -    | Visual Studio Code is a lightweight but powerful source code editor. |\n| 215 | Gedit                 | [Home](https://github.com/GNOME/gedit) | -    | Gedit is a full-featured text editor for the GNOME desktop environment. You can use it to prepare simple notes and documents, or you can use some of its advanced features, making it your own software development environment. |\n| 216 | Flameshot             | [Home](https://flameshot.org/) | -    | Powerful, yet simple to use open-source screenshot software. |\n| 301 | Frps                  | [Home](https://gofrp.org/) | -    | A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. |\n| 302 | Frpc                  | [Home](https://gofrp.org/) | -    | Frp is a high-performance reverse proxy application focusing on intranet penetration, supporting TCP, UDP, HTTP, HTTPS and other protocols. |\n| 303 | NPS                   | [Home](https://ehang-io.github.io/nps) | -    | NPS is a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal. |\n| 304 | NPC                   | [Home](https://ehang-io.github.io/nps) | -    | NPCs are clients of NPS. |\n| 305 | Plex                  | [Home](https://www.plex.tv/) | -    | From personal media on your own server, to free and on-demand Movies & Shows, live TV, podcasts, and web shows, to streaming music, you can enjoy it all in one app, on any device. |\n| 306 | Emby-Server           | [Home](https://emby.media/) | -    | Sync your personal media to the cloud for easy backup, archiving, and converting. Store your content in multiple resolutions to enable direct streaming from any device. |\n| 307 | KVM                   | [Home](https://virt-manager.org/) | -    | KVM (for Kernel-Based Virtual Machines) is a complete virtualization solution for Linux with virtualization extensions. The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers). KVM virtual machine can install [OpenWrt](https://github.com/unifreq/openwrt_packit), Debian, Ubuntu, OpenSUSE, ArchLinux, Centos, Gentoo, KyLin, UOS, etc. |\n| 308 | PVE                   | [Home](https://github.com/pimox/pimox7) | https://IP:8006 | Proxmox Virtual Environment is an open source server virtualization management solution based on QEMU/KVM and LXC. You can manage virtual machines, containers, highly available clusters, storage and networks with an integrated, easy-to-use web interface or via CLI. |\n| 309 | CasaOS                | [Home](https://github.com/IceWhaleTech/CasaOS) | http://IP | CasaOS is a simple, easy-to-use, elegant open-source Personal Cloud system. |\n| 310 | ArozOS                | [Home](https://github.com/tobychui/arozos) | http://IP:8080 | ArozOS is a web-based desktop operating system suitable for low-power platforms. It features file/disk management, network statistics, a web server, and more. |\n\n## Software Center Usage Guide\n\nLog in to the Armbian system and enter the command:\n\n```shell\narmbian-software\n```\n\nA list of integrated software with shortcut management options will appear, for example:\n\n```shell\nroot@armbian:~# armbian-software\n[ STEPS ] Start selecting software [ Current system: debian/bullseye ]...\n----------------------------------------------------------\nID    NAME                STATE           MANAGE\n----------------------------------------------------------\n102   Portainer           installed       update/remove\n202   Firefox             installed       update/remove\n302   Frpc                not-installed   install\n...\n----------------------------------------------------------\n[ OPTIONS ] Please Input Software ID:\n```\n\n- `Uninstalled software`: Status shows `not-installed`. Enter the software `ID` to install.\n- `Installed software`: Status shows `installed`. Enter the software `ID` and follow the prompts to `update` or `remove`.\n\n## Software Center Development Guide\n\nThe software center scripts and commands are stored in the [/usr/share/ophub/armbian-software](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software) directory. Use `armbian-software -u` to sync and download this directory to the local system, updating the software center list. Files prefixed with numbers are `one-click installation scripts` for the corresponding software. [software-command.sh](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh) is the `unified command file` for installing/updating/removing software. [software-list.conf](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) is the software list configuration file, described as follows:\n\n```yaml\n# 1.ID     2.Software Name     3.AuthMethod@Package      4.Execute Selection     5.Supported Release\n102        :Portainer          :docker@portainer         :command-docker.sh      :all\n202        :Firefox            :dpkg@firefox             :command-desktop.sh     :all\n302        :Frpc               :which@frpc               :302-frpc.sh            :all\n308        :PVE                :dpkg@pve-manager         :command-service.sh     :bullseye@bookworm\n...\n```\n\n- `ID`: The software's `unique serial number`.\n- `Software Name`: The `software name` (must be fewer than 40 characters).\n- `AuthMethod@Package`: The `verification method` for checking installation status and the corresponding `software package`, separated by `@`.\n  - For Docker container images, use the `docker` method. Example: `docker@portainer` checks whether the `portainer` image is installed.\n  - For packages installed via `apt`, use the `dpkg` method. Example: `dpkg@firefox` checks whether the `firefox` package is installed.\n  - When executable files exist in system command directories (bin, sbin), use `which` to check for the binary. Example: `which@frpc` verifies the `frpc` service installation.\n  - When no executable files exist in system command directories, use `find` to check for a specific path. Example: `find@/root/arozos` checks whether the `ArozOS` system is installed.\n- `Execute Selection`: Specifies whether the software uses a `unified command file` or an `independent script` for management.\n  - For `simple` operations, commands are grouped by software category in `command-docker.sh / command-desktop.sh / command-service.sh` files, named by software serial number. For example, `portainer` (ID `102`) has its operations in `software_203()`.\n  - For `complex` operations with lengthy instructions, independent script files are used. For example, the `frpc` installation script is named `302-frpc.sh`, prefixed with its serial number.\n- `Supported Release`: Specifies the supported Armbian `system version codenames`. Use `all` to indicate support for all versions. For partial support, list the version codenames separated by `@`.\n\nContributions of additional software are welcome. Feel free to submit requests in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues).\n\n\n\n# Armbian 软件中心\n\n根据用户在 [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中的反馈需求，已逐步整合常用[软件](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf)，实现一键安装/更新/卸载等快捷操作。包括 `Docker 镜像`、`桌面软件`、`应用服务` 等。\n\n## 软件介绍\n\n| ID | 软件名称               | Home | DockerHub:Port | 软件介绍                                            |\n| --- | --------------------- | --------------------- | ---- | ------------------------------------------------- |\n| 101 | Docker                | [Home](https://www.docker.com/) | [Docker](https://docs.docker.com/engine/install/) | Docker 是一个用于开发、发布和运行应用程序的开放平台。 |\n| 102 | Portainer             | [Home](https://www.portainer.io/) | [Docker](https://hub.docker.com/r/portainer/portainer-ce) :9443 | 全球最受欢迎的容器管理平台。 |\n| 103 | Yacht                 | [Home](https://yacht.sh/) | [Docker](https://hub.docker.com/r/selfhostedpro/yacht) :8001 | 容器管理 UI，侧重于模板和一键式部署。 |\n| 104 | Transmission          | [Home](https://transmissionbt.com/) | [Docker](https://github.com/linuxserver/docker-transmission) :9091 | Transmission 是一个跨平台的 BitTorrent 客户端。 |\n| 105 | qBittorrent           | [Home](https://www.qbittorrent.org/) | [Docker](https://hub.docker.com/r/linuxserver/qbittorrent) :8080 | qBittorrent 是一个 BitTorrent 客户端。  |\n| 106 | NextCloud             | [Home](https://nextcloud.com/) | [Docker](https://hub.docker.com/r/arm64v8/nextcloud) :8088 | Nextcloud 提供了一个本地通用文件访问和同步平台，具有强大的协作功能以及桌面，移动和 Web 界面。 |\n| 107 | Jellyfin              | [Home](https://jellyfin.org/) | [Docker](https://hub.docker.com/r/linuxserver/jellyfin) :8096 | Jellyfin 是一个自由软件媒体系统，让你控制管理和流媒体你的媒体。 |\n| 108 | HomeAssistant         | [Home](https://www.home-assistant.io/) | [Docker](https://hub.docker.com/r/linuxserver/homeassistant) :8123 | Home Assistant 集成了一千多种不同的设备和服务，具有强大的自动化功能。 |\n| 109 | Kodbox                | [Home](https://kodcloud.com/) | [Docker](https://hub.docker.com/r/kodcloud/kodbox) :8081 | 私有云在线文档管理解决方案。 |\n| 110 | CouchPotato           | [Home](https://couchpota.to/) | [Docker](https://hub.docker.com/r/linuxserver/couchpotato) :5050 | Couchpotato 是一个自动 NZB 和 torrent 下载器，自动查找要观看的电影。 |\n| 111 | Sonarr                | [Home](https://sonarr.tv/) | [Docker](https://hub.docker.com/r/linuxserver/sonarr) :8989 | Sonarr 是 Usenet 和 BitTorrent 用户的个人视频录像机。 |\n| 112 | Radarr                | [Home](https://radarr.video/) | [Docker](https://hub.docker.com/r/linuxserver/radarr) :7878 | Radarr 是 Usenet 和 BitTorrent 用户的电影收藏管理器。 |\n| 113 | Syncthing             | [Home](https://syncthing.net/) | [Docker](https://hub.docker.com/r/linuxserver/syncthing) :8384 | Syncthing 是一个连续的文件同步程序。 |\n| 114 | FileBrowser           | [Home](https://filebrowser.org/) | [Docker](https://hub.docker.com/r/filebrowser/filebrowser) :8002 | File Browser 在指定目录中提供文件管理界面，可用于上传，删除，预览，重命名和编辑文件。 |\n| 115 | Heimdall              | [Home](https://heimdall.site/) | [Docker](https://hub.docker.com/r/linuxserver/heimdall) :8003 | Heimdall 是一种以简单的方式组织所有这些链接到您最常用的网站和 Web 应用程序的方法。 |\n| 116 | Node-RED              | [Home](https://nodered.org/) | [Docker](https://nodered.org/docs/getting-started/docker) :1880 | Node-RED 是一种编程工具。它提供了一个基于浏览器的编辑器，使得使用调色板中的各种节点轻松地将流连接在一起，只需单击一下即可部署运行。 |\n| 117 | Mosquitto             | [Home](https://www.mosquitto.org/) | [Docker](https://hub.docker.com/r/arm64v8/eclipse-mosquitto) :1883 | MQTT 协议提供了一种使用发布/订阅模型执行消息传递的轻量级方法。Eclipse Mosquitto 是 MQTT 协议版本 5、3.1.1 和 3.1 的服务器的开源实现。 |\n| 118 | OpenWrt               | [Home](https://www.openwrt.org/) | [Docker](https://hub.docker.com/r/ophub/openwrt-armv8) :80 | OpenWrt 项目是一个针对嵌入式设备的 Linux 操作系统，它拥有超过 3000+ 个标准化应用软件包和非常丰富的第三方插件支持。 |\n| 119 | Netdata               | [Home](https://learn.netdata.cloud/) | [Docker](https://hub.docker.com/r/netdata/netdata) :19999 | Netdata 是针对系统和应用程序的分布式实时性能和运行状况监控。 |\n| 120 | XunLei                | [Home](https://github.com/cnk3x/xunlei) | [Docker](https://hub.docker.com/r/cnk3x/xunlei) :2345 | 从迅雷群晖套件中提取出来的迅雷远程下载服务程序。 |\n| 121 | Docker-Headless       | [Home](https://github.com/infrastlabs/docker-headless) | [Docker](https://hub.docker.com/r/infrastlabs/docker-headless) :10081 | 具有音频/区域设置/IBus 支持的远程桌面。 支持多桌面（Gnome、Plasma、Mate、Xfce、Cinnamon） |\n| 122 | Navidrome             | [Home](https://www.navidrome.org/) | [Docker](https://hub.docker.com/r/deluan/navidrome) :4533  | Navidrome 是一个自托管的开源音乐服务器和流媒体。 它使您可以自由地从任何浏览器或移动设备收听音乐收藏。 |\n| 123 | Openlist                 | [Home](https://www.oplist.org/) | [Docker](https://hub.docker.com/r/openlistteam/openlist) :5244  | 一个支持多种存储的文件列表程序，使用 Gin 和 Solidjs。 |\n| 124 | QingLong              | [Home](https://github.com/whyour/qinglong) | [Docker](https://hub.docker.com/r/whyour/qinglong) :5700  | 支持 python3、javaScript、shell、typescript 的定时任务管理面板。 |\n| 125 | ChatGPT-Next-Web      | [Home](https://github.com/Yidadaa/ChatGPT-Next-Web) | [Docker](https://hub.docker.com/r/yidadaa/chatgpt-next-web) :3000  | 一键免费部署你的跨平台私人 ChatGPT 应用。 |\n| 126 | N8N                   | [Home](https://n8n.io/) | [Docker](https://hub.docker.com/r/n8nio/n8n) :5678  | n8n 是一个工作流自动化平台，为技术团队提供了无代码的高效开发速度。它内置了超过 400 种集成、原生的 AI 能力，并采用公平代码许可，让你在构建强大自动化流程的同时，仍然能完全掌控自己的数据和部署。 |\n| 201 | Desktop:GNOME         | [Home](https://www.gnome.org/) | -    | GNOME 提供了一个专注的桌面工作环境，可帮助您完成工作。`桌面`可以连接显示器使用，也可以使用[远程桌面](https://learn.microsoft.com/zh-cn/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients)软件连接使用。 |\n| 202 | Firefox               | [Home](https://www.mozilla.org/) | -    | 一款优秀的网页浏览器。 |\n| 203 | VLC                   | [Home](https://www.videolan.org/) | -    | VLC 是一款自由、开源的跨平台多媒体播放器及框架，可播放大多数多媒体文件。 |\n| 204 | MPV                   | [Home](https://mpv.io/) | -    | 一个免费的、开源的、跨平台的媒体播放器。 |\n| 205 | GIMP                  | [Home](https://www.gimp.org/) | -    | GIMP 是一个跨平台的图像编辑器。 |\n| 206 | Krita                 | [Home](https://krita.org/) | -    | Krita 是一个专业的免费和开源绘画程序。 |\n| 207 | LibreOffice           | [Home](https://www.libreoffice.org/) | -    | LibreOffice 是一个免费且功能强大的办公套件，其简洁的界面和功能丰富的工具可帮助您释放创造力并提高生产力。 |\n| 208 | Shotcut               | [Home](https://shotcut.org/) | -    | Shotcut 是一个免费的，开源的，跨平台的视频编辑器。 |\n| 209 | Kdenlive              | [Home](https://kdenlive.org/) | -    | Kdenlive 是一个免费和开源视频编辑器。 |\n| 210 | Thunderbird           | [Home](https://www.thunderbird.net/) | -    | Thunderbird 将速度、隐私和最新技术结合在一起，让您更好地利用电子邮件。 |\n| 211 | Evolution             | [Home](https://github.com/GNOME/evolution) | -    | Evolution 是一个个人信息管理应用程序，提供集成的邮件、日历和地址簿功能。 |\n| 212 | Gwenview              | [Home](https://apps.kde.org/gwenview/) | -    | Gwenview 是 KDE 出品的一款轻便易用的图像查看器，是浏览、显示多张图像时的理想工具。 |\n| 213 | Eog                   | [Home](https://gitlab.gnome.org/GNOME/eog) | -    | Eye of GNOME（eog）一个图像查看器程序。它旨在成为一个快速且功能强大的图像查看器。 |\n| 214 | VisualStudioCode      | [Home](https://code.visualstudio.com/) | -    | Visual Studio Code 是一个轻量级但功能强大的源代码编辑器。 |\n| 215 | Gedit                 | [Home](https://github.com/GNOME/gedit) | -    | Gedit 是一个用于 GNOME 桌面环境的全功能文本编辑器。您可以使用它来准备简单的笔记和文档，也可以使用它的一些高级功能，使其成为您自己的软件开发环境。 |\n| 216 | Flameshot             | [Home](https://flameshot.org/) | -    | 功能强大，但易于使用的开源屏幕截图软件。 |\n| 301 | Frps                  | [Home](https://gofrp.org/) | -    | Frp 是一种快速反向代理，可帮助您将 NAT 或防火墙后面的本地服务器暴露给互联网。 |\n| 302 | Frpc                  | [Home](https://gofrp.org/) | -    | Frp 是一个专注于内网穿透的高性能的反向代理应用，支持 TCP、UDP、HTTP、HTTPS 等多种协议。 |\n| 303 | NPS                   | [Home](https://ehang-io.github.io/nps) | -    | NPS 服务端。一款轻量级、高性能、功能强大的内网渗透代理服务器，具有强大的 Web 管理终端。 |\n| 304 | NPC                   | [Home](https://ehang-io.github.io/nps) | -    | NPC 是 NPS 的客户端。 |\n| 305 | Plex                  | [Home](https://www.plex.tv/) | -    | 从您自己服务器上的个人媒体，到免费和点播的电影和节目，直播电视，播客和网络节目，再到流媒体音乐，您可以在任何设备上的一个应用程序中享受所有这些内容。 |\n| 306 | Emby-Server           | [Home](https://emby.media/) | -    | 将您的个人媒体同步到云，以便轻松备份、存档和转换。以多种分辨率存储您的内容，以便从任何设备直接流式传输。 |\n| 307 | KVM                   | [Home](https://virt-manager.org/) | -    | KVM（用于基于内核的虚拟机）是包含虚拟化扩展适用于 Linux 的完整虚拟化解决方案。virt-manager 应用程序是一个桌面用户界面，用于通过 libvirt 管理虚拟机。它主要针对 KVM VM，但也管理 Xen 和 LXC（Linux 容器）。KVM 虚拟机可以安装 [OpenWrt](https://github.com/unifreq/openwrt_packit)、Debian、Ubuntu、OpenSUSE、ArchLinux、Centos、Gentoo、KyLin、UOS 等等。 |\n| 308 | PVE                   | [Home](https://github.com/pimox/pimox7) | https://IP:8006 | Proxmox 虚拟环境是一个基于 QEMU/KVM 和 LXC 的开源服务器虚拟化管理解决方案。您可以使用集成的、易于使用的 web 界面或通过 CLI 管理虚拟机、容器、高可用集群、存储和网络。 |\n| 309 | CasaOS                | [Home](https://github.com/IceWhaleTech/CasaOS) | http://IP | CasaOS 是一个简单、易于使用、优雅的开源个人云系统。 |\n| 310 | ArozOS                | [Home](https://github.com/tobychui/arozos) | http://IP:8080 | ArozOS 是一个适用于低功耗平台的 Web 桌面操作系统。有文件/磁盘管理，网络统计，WEB服务器等功能。 |\n\n## 软件中心使用说明\n\n登录 Armbian 系统后输入以下命令：\n\n```shell\narmbian-software\n```\n\n将显示当前已整合的软件快捷管理列表，例如：\n\n```shell\nroot@armbian:~# armbian-software\n[ STEPS ] Start selecting software [ Current system: debian/bullseye ]...\n----------------------------------------------------------\nID    NAME                STATE           MANAGE\n----------------------------------------------------------\n102   Portainer           installed       update/remove\n202   Firefox             installed       update/remove\n302   Frpc                not-installed   install\n...\n----------------------------------------------------------\n[ OPTIONS ] Please Input Software ID:\n```\n\n- `未安装的软件`：状态显示为 `not-installed`，输入软件对应的 `ID` 即可安装。\n- `已安装的软件`：状态显示为 `installed`，输入软件对应的 `ID`，根据提示选择更新或删除。\n\n## 软件中心开发说明\n\n软件中心的脚本和命令集中存放在 [/usr/share/ophub/armbian-software](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software) 目录下。使用 `armbian-software -u` 命令可同步下载此目录至本地，更新本地软件中心列表。其中以数字开头的文件是对应软件的`一键安装脚本`。[software-command.sh](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh) 是用于安装/更新/删除操作的`统一指令文件`。[software-list.conf](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) 是软件列表配置文件，说明如下：\n\n```yaml\n# 1.ID     2.Software Name     3.AuthMethod@Package      4.Execute Selection     5.Supported Release\n102        :Portainer          :docker@portainer         :command-docker.sh      :all\n202        :Firefox            :dpkg@firefox             :command-desktop.sh     :all\n302        :Frpc               :which@frpc               :302-frpc.sh            :all\n308        :PVE                :dpkg@pve-manager         :command-service.sh     :bullseye@bookworm\n...\n```\n\n- `ID`: 软件的`唯一序号`。\n- `Software Name`：`软件名称`（名称长度需小于 40 个字符）。\n- `AuthMethod@Package`：软件安装状态的`检查方法`与对应的`软件包`，以 `@` 符号分隔。\n  - 通过 `docker` 容器安装的镜像，采用 `docker` 方式检查。例如：检查 `portainer` 镜像是否安装，使用 `docker@portainer`。\n  - 通过 `apt` 方式安装的软件包，采用 `dpkg` 方式检查。例如：检查 `firefox` 是否安装，使用 `dpkg@firefox`。\n  - 在系统命令目录 (bin, sbin) 存在可执行文件时，采用 `which` 方式检查。例如：检查 `frpc` 服务是否安装，使用 `which@frpc`。\n  - 在系统命令目录无可执行文件时，采用 `find` 方式检查指定路径是否存在。例如：检查 `arozos` 系统是否安装，使用 `find@/root/arozos`。\n- `Execute Selection`：设置软件使用`统一指令文件`或`独立脚本`进行管理。\n  - 对于操作命令`较为精简`的软件，按分类集中写在 `command-docker.sh / command-desktop.sh / command-service.sh` 文件中，以软件序号命名。例如 `portainer`（序号 `102`）的操作写在 `software_203()` 中。\n  - 对于操作`较为复杂、指令内容较长`的软件，采用独立脚本文件管理。例如 `frpc` 的安装脚本以序号开头，命名为 `302-frpc.sh`。\n- `Supported Release`：设置支持的 Armbian `系统版本代号`。全部版本都支持时使用 `all` 表示。仅支持部分版本时，填写版本代号，多个代号之间使用 `@` 符号连接。\n\n欢迎大家补充更多软件。欢迎在 [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中提交支持需求。\n\n\n\n# Armbian ソフトウェアセンター\n\nユーザーからの [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) でのフィードバックやリクエストに基づき、よく使われる[ソフトウェア](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf)を順次統合し、ワンクリックでのインストール/更新/アンインストールなどの操作を実現しています。`Docker イメージ`、`デスクトップソフトウェア`、`アプリケーションサービス`などが含まれます。\n\n## ソフトウェア紹介\n\n| ID | ソフトウェア名          | Home | DockerHub:Port | ソフトウェア紹介                                     |\n| --- | --------------------- | --------------------- | ---- | ------------------------------------------------- |\n| 101 | Docker                | [Home](https://www.docker.com/) | [Docker](https://docs.docker.com/engine/install/) | Docker はアプリケーションの開発、配布、実行のためのオープンプラットフォームです。 |\n| 102 | Portainer             | [Home](https://www.portainer.io/) | [Docker](https://hub.docker.com/r/portainer/portainer-ce) :9443 | 世界で最も人気のあるコンテナ管理プラットフォームです。 |\n| 103 | Yacht                 | [Home](https://yacht.sh/) | [Docker](https://hub.docker.com/r/selfhostedpro/yacht) :8001 | テンプレートとワンクリックデプロイに重点を置いたコンテナ管理 UI です。 |\n| 104 | Transmission          | [Home](https://transmissionbt.com/) | [Docker](https://github.com/linuxserver/docker-transmission) :9091 | Transmission はクロスプラットフォームの BitTorrent クライアントです。 |\n| 105 | qBittorrent           | [Home](https://www.qbittorrent.org/) | [Docker](https://hub.docker.com/r/linuxserver/qbittorrent) :8080 | qBittorrent は BitTorrent クライアントです。 |\n| 106 | NextCloud             | [Home](https://nextcloud.com/) | [Docker](https://hub.docker.com/r/arm64v8/nextcloud) :8088 | Nextcloud はオンプレミスのユニバーサルファイルアクセスと同期プラットフォームを提供し、強力なコラボレーション機能とデスクトップ、モバイル、Web インターフェースを備えています。 |\n| 107 | Jellyfin              | [Home](https://jellyfin.org/) | [Docker](https://hub.docker.com/r/linuxserver/jellyfin) :8096 | Jellyfin はフリーソフトウェアのメディアシステムで、メディアの管理とストリーミングを制御できます。 |\n| 108 | HomeAssistant         | [Home](https://www.home-assistant.io/) | [Docker](https://hub.docker.com/r/linuxserver/homeassistant) :8123 | Home Assistant は1000以上の異なるデバイスやサービスと統合し、強力な自動化機能を備えています。 |\n| 109 | Kodbox                | [Home](https://kodcloud.com/) | [Docker](https://hub.docker.com/r/kodcloud/kodbox) :8081 | プライベートクラウドのオンラインドキュメント管理ソリューションです。 |\n| 110 | CouchPotato           | [Home](https://couchpota.to/) | [Docker](https://hub.docker.com/r/linuxserver/couchpotato) :5050 | CouchPotato は自動 NZB および torrent ダウンローダーで、観たい映画を自動的に検索します。 |\n| 111 | Sonarr                | [Home](https://sonarr.tv/) | [Docker](https://hub.docker.com/r/linuxserver/sonarr) :8989 | Sonarr は Usenet および BitTorrent ユーザー向けの個人用ビデオレコーダーです。 |\n| 112 | Radarr                | [Home](https://radarr.video/) | [Docker](https://hub.docker.com/r/linuxserver/radarr) :7878 | Radarr は Usenet および BitTorrent ユーザー向けの映画コレクションマネージャーです。 |\n| 113 | Syncthing             | [Home](https://syncthing.net/) | [Docker](https://hub.docker.com/r/linuxserver/syncthing) :8384 | Syncthing は継続的なファイル同期プログラムです。 |\n| 114 | FileBrowser           | [Home](https://filebrowser.org/) | [Docker](https://hub.docker.com/r/filebrowser/filebrowser) :8002 | File Browser は指定ディレクトリ内でファイル管理インターフェースを提供し、ファイルのアップロード、削除、プレビュー、リネーム、編集が可能です。 |\n| 115 | Heimdall              | [Home](https://heimdall.site/) | [Docker](https://hub.docker.com/r/linuxserver/heimdall) :8003 | Heimdall は、よく使うウェブサイトやウェブアプリケーションへのリンクをシンプルに整理する方法です。 |\n| 116 | Node-RED              | [Home](https://nodered.org/) | [Docker](https://nodered.org/docs/getting-started/docker) :1880 | Node-RED はプログラミングツールです。ブラウザベースのエディターを提供し、パレット内の多様なノードを使ってフローを簡単に連結し、ワンクリックでデプロイ・実行できます。 |\n| 117 | Mosquitto             | [Home](https://www.mosquitto.org/) | [Docker](https://hub.docker.com/r/arm64v8/eclipse-mosquitto) :1883 | MQTT プロトコルはパブリッシュ/サブスクライブモデルによる軽量なメッセージングを提供します。Eclipse Mosquitto は MQTT プロトコルバージョン 5、3.1.1、3.1 のサーバーのオープンソース実装です。 |\n| 118 | OpenWrt               | [Home](https://www.openwrt.org/) | [Docker](https://hub.docker.com/r/ophub/openwrt-armv8) :80 | OpenWrt プロジェクトは組み込みデバイス向けの Linux オペレーティングシステムで、3000以上の標準化アプリケーションパッケージと非常に豊富なサードパーティプラグインをサポートしています。 |\n| 119 | Netdata               | [Home](https://learn.netdata.cloud/) | [Docker](https://hub.docker.com/r/netdata/netdata) :19999 | Netdata はシステムとアプリケーションのための分散型リアルタイムパフォーマンス・ヘルスモニタリングツールです。 |\n| 120 | XunLei                | [Home](https://github.com/cnk3x/xunlei) | [Docker](https://hub.docker.com/r/cnk3x/xunlei) :2345 | 迅雷 Synology スイートから抽出されたリモートダウンロードサービスプログラムです。 |\n| 121 | Docker-Headless       | [Home](https://github.com/infrastlabs/docker-headless) | [Docker](https://hub.docker.com/r/infrastlabs/docker-headless) :10081 | オーディオ/ロケール/IBus サポート付きのリモートデスクトップ。マルチデスクトップ（Gnome、Plasma、Mate、Xfce、Cinnamon）対応。 |\n| 122 | Navidrome             | [Home](https://www.navidrome.org/) | [Docker](https://hub.docker.com/r/deluan/navidrome) :4533  | Navidrome はセルフホスト型のオープンソース音楽サーバーおよびストリーマーです。任意のブラウザやモバイルデバイスから音楽コレクションを自由に楽しめます。 |\n| 123 | Openlist                 | [Home](https://www.oplist.org/) | [Docker](https://hub.docker.com/r/openlistteam/openlist) :5244  | 複数のストレージに対応するファイルリストプログラムで、Gin と Solidjs を使用しています。 |\n| 124 | QingLong              | [Home](https://github.com/whyour/qinglong) | [Docker](https://hub.docker.com/r/whyour/qinglong) :5700  | python3、javaScript、shell、typescript をサポートするスケジュールタスク管理パネルです。 |\n| 125 | ChatGPT-Next-Web      | [Home](https://github.com/Yidadaa/ChatGPT-Next-Web) | [Docker](https://hub.docker.com/r/yidadaa/chatgpt-next-web) :3000  | ワンクリックで無料デプロイできるクロスプラットフォーム対応のプライベート ChatGPT アプリケーションです。 |\n| 126 | N8N                   | [Home](https://n8n.io/) | [Docker](https://hub.docker.com/r/n8nio/n8n) :5678  | n8n はワークフロー自動化プラットフォームで、技術チームにノーコードの高効率な開発速度を提供します。400以上の統合、ネイティブ AI 機能を内蔵し、フェアコードライセンスを採用。強力な自動化フローを構築しながら、データとデプロイメントを完全に制御できます。 |\n| 201 | Desktop:GNOME         | [Home](https://www.gnome.org/) | -    | GNOME は集中型のデスクトップ作業環境を提供し、作業の完了を支援します。`デスクトップ`はモニターに接続して使用でき、[リモートデスクトップ](https://learn.microsoft.com/ja-jp/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients)ソフトウェアを使用して接続することもできます。 |\n| 202 | Firefox               | [Home](https://www.mozilla.org/) | -    | 優れたウェブブラウザです。 |\n| 203 | VLC                   | [Home](https://www.videolan.org/) | -    | VLC は無料でオープンソースのクロスプラットフォームマルチメディアプレーヤー兼フレームワークで、ほとんどのマルチメディアファイルを再生できます。 |\n| 204 | MPV                   | [Home](https://mpv.io/) | -    | 無料でオープンソースのクロスプラットフォーム対応メディアプレーヤーです。 |\n| 205 | GIMP                  | [Home](https://www.gimp.org/) | -    | GIMP はクロスプラットフォームの画像エディターです。 |\n| 206 | Krita                 | [Home](https://krita.org/) | -    | Krita はプロフェッショナルな無料オープンソースのペインティングプログラムです。 |\n| 207 | LibreOffice           | [Home](https://www.libreoffice.org/) | -    | LibreOffice は無料で強力なオフィススイートです。洗練されたインターフェースと豊富な機能で、創造性を発揮し生産性を向上させます。 |\n| 208 | Shotcut               | [Home](https://shotcut.org/) | -    | Shotcut は無料でオープンソースのクロスプラットフォーム動画エディターです。 |\n| 209 | Kdenlive              | [Home](https://kdenlive.org/) | -    | Kdenlive は無料でオープンソースの動画エディターです。 |\n| 210 | Thunderbird           | [Home](https://www.thunderbird.net/) | -    | Thunderbird は速度、プライバシー、最新技術を組み合わせて、より良いメール体験を提供します。 |\n| 211 | Evolution             | [Home](https://github.com/GNOME/evolution) | -    | Evolution は統合されたメール、カレンダー、アドレス帳機能を提供する個人情報管理アプリケーションです。 |\n| 212 | Gwenview              | [Home](https://apps.kde.org/gwenview/) | -    | Gwenview は KDE 製の軽量で使いやすい画像ビューアーで、画像コレクションの閲覧・表示に最適です。 |\n| 213 | Eog                   | [Home](https://gitlab.gnome.org/GNOME/eog) | -    | Eye of GNOME（eog）は画像ビューアープログラムです。高速かつ機能的な画像ビューアーを目指しています。 |\n| 214 | VisualStudioCode      | [Home](https://code.visualstudio.com/) | -    | Visual Studio Code は軽量ながら強力なソースコードエディターです。 |\n| 215 | Gedit                 | [Home](https://github.com/GNOME/gedit) | -    | Gedit は GNOME デスクトップ環境向けのフル機能テキストエディターです。簡単なメモやドキュメントの作成に使用でき、高度な機能を活用して独自のソフトウェア開発環境としても使用できます。 |\n| 216 | Flameshot             | [Home](https://flameshot.org/) | -    | 強力でありながら使いやすいオープンソースのスクリーンショットソフトウェアです。 |\n| 301 | Frps                  | [Home](https://gofrp.org/) | -    | Frp は高速なリバースプロキシで、NAT やファイアウォールの背後にあるローカルサーバーをインターネットに公開できます。 |\n| 302 | Frpc                  | [Home](https://gofrp.org/) | -    | Frp はイントラネットペネトレーションに特化した高性能リバースプロキシアプリケーションで、TCP、UDP、HTTP、HTTPS などのプロトコルをサポートしています。 |\n| 303 | NPS                   | [Home](https://ehang-io.github.io/nps) | -    | NPS サーバー側。軽量で高性能、強力なイントラネットペネトレーションプロキシサーバーで、強力な Web 管理端末を備えています。 |\n| 304 | NPC                   | [Home](https://ehang-io.github.io/nps) | -    | NPC は NPS のクライアントです。 |\n| 305 | Plex                  | [Home](https://www.plex.tv/) | -    | 自分のサーバー上の個人メディアから、無料やオンデマンドの映画・番組、ライブ TV、ポッドキャスト、ウェブ番組、ストリーミング音楽まで、あらゆるデバイスの1つのアプリですべて楽しめます。 |\n| 306 | Emby-Server           | [Home](https://emby.media/) | -    | 個人メディアをクラウドに同期して、簡単にバックアップ、アーカイブ、変換できます。コンテンツを複数の解像度で保存し、あらゆるデバイスからの直接ストリーミングを実現します。 |\n| 307 | KVM                   | [Home](https://virt-manager.org/) | -    | KVM（カーネルベースの仮想マシン）は、仮想化拡張機能を含む Linux 向けの完全な仮想化ソリューションです。virt-manager は libvirt を介して仮想マシンを管理するデスクトップユーザーインターフェースです。主に KVM VM を対象としていますが、Xen と LXC（Linux コンテナ）も管理できます。KVM 仮想マシンには [OpenWrt](https://github.com/unifreq/openwrt_packit)、Debian、Ubuntu、OpenSUSE、ArchLinux、Centos、Gentoo、KyLin、UOS などをインストールできます。 |\n| 308 | PVE                   | [Home](https://github.com/pimox/pimox7) | https://IP:8006 | Proxmox 仮想環境は QEMU/KVM と LXC に基づくオープンソースのサーバー仮想化管理ソリューションです。統合されたウェブインターフェースまたは CLI で仮想マシン、コンテナ、高可用性クラスター、ストレージ、ネットワークを管理できます。 |\n| 309 | CasaOS                | [Home](https://github.com/IceWhaleTech/CasaOS) | http://IP | CasaOS はシンプルで使いやすく、エレガントなオープンソースのパーソナルクラウドシステムです。 |\n| 310 | ArozOS                | [Home](https://github.com/tobychui/arozos) | http://IP:8080 | ArozOS は低消費電力プラットフォームに適した Web ベースのデスクトップオペレーティングシステムです。ファイル/ディスク管理、ネットワーク統計、Web サーバーなどの機能を備えています。 |\n\n## ソフトウェアセンター使用方法\n\nArmbian システムにログインし、以下のコマンドを入力します：\n\n```shell\narmbian-software\n```\n\n統合済みソフトウェアのショートカット管理リストが表示されます。例：\n\n```shell\nroot@armbian:~# armbian-software\n[ STEPS ] Start selecting software [ Current system: debian/bullseye ]...\n----------------------------------------------------------\nID    NAME                STATE           MANAGE\n----------------------------------------------------------\n102   Portainer           installed       update/remove\n202   Firefox             installed       update/remove\n302   Frpc                not-installed   install\n...\n----------------------------------------------------------\n[ OPTIONS ] Please Input Software ID:\n```\n\n- `未インストールのソフトウェア`：ステータスが `not-installed` と表示されます。ソフトウェアの `ID` を入力するとインストールされます。\n- `インストール済みのソフトウェア`：ステータスが `installed` と表示されます。ソフトウェアの `ID` を入力し、プロンプトに従って更新または削除を選択します。\n\n## ソフトウェアセンター開発ガイド\n\nソフトウェアセンターのスクリプトとコマンドは [/usr/share/ophub/armbian-software](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software) ディレクトリに集中して保存されています。`armbian-software -u` コマンドでこのディレクトリをローカルに同期ダウンロードし、ソフトウェアセンターリストを更新できます。数字で始まるファイルは対応するソフトウェアの`ワンクリックインストールスクリプト`です。[software-command.sh](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh) はインストール/更新/削除操作のための`統一コマンドファイル`です。[software-list.conf](../build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) はソフトウェアリスト設定ファイルで、説明は以下の通りです：\n\n```yaml\n# 1.ID     2.Software Name     3.AuthMethod@Package      4.Execute Selection     5.Supported Release\n102        :Portainer          :docker@portainer         :command-docker.sh      :all\n202        :Firefox            :dpkg@firefox             :command-desktop.sh     :all\n302        :Frpc               :which@frpc               :302-frpc.sh            :all\n308        :PVE                :dpkg@pve-manager         :command-service.sh     :bullseye@bookworm\n...\n```\n\n- `ID`：ソフトウェアの`一意のシリアル番号`。\n- `Software Name`：`ソフトウェア名`（名前の長さは40文字未満である必要があります）。\n- `AuthMethod@Package`：ソフトウェアのインストール状態の`検査方法`と対応する`ソフトウェアパッケージ`で、`@` 記号で区切ります。\n  - `docker` コンテナ経由でインストールされたイメージは `docker` 方式で検査します。例：`portainer` イメージがインストールされているか確認する場合、`docker@portainer` を使用します。\n  - `apt` 経由でインストールされたパッケージは `dpkg` 方式で検査します。例：`firefox` がインストールされているか確認する場合、`dpkg@firefox` を使用します。\n  - システムのコマンドディレクトリ (bin, sbin) に実行ファイルが存在する場合、`which` 方式で検査します。例：`frpc` サービスがインストールされているか確認する場合、`which@frpc` を使用します。\n  - システムのコマンドディレクトリに実行ファイルがない場合、`find` 方式で指定パスの存在を検査します。例：`arozos` システムがインストールされているか確認する場合、`find@/root/arozos` を使用します。\n- `Execute Selection`：ソフトウェアが`統一コマンドファイル`または`独立スクリプト`で管理されるかを設定します。\n  - `比較的シンプルな`操作のソフトウェアは、カテゴリ別に `command-docker.sh / command-desktop.sh / command-service.sh` ファイルに集約し、ソフトウェアシリアル番号で命名します。例えば `portainer`（シリアル番号 `102`）の操作は `software_203()` に記述されています。\n  - `比較的複雑で、コマンド内容が長い`ソフトウェアは、独立したスクリプトファイルで管理します。例えば `frpc` のインストールスクリプトはシリアル番号を先頭に付けて `302-frpc.sh` と命名します。\n- `Supported Release`：サポートされる Armbian `システムバージョンコードネーム`を設定します。すべてのバージョンをサポートする場合は `all` を使用します。一部のバージョンのみサポートする場合は、バージョンコードネームを記入し、複数のコードネームは `@` 記号で連結します。\n\nより多くのソフトウェアの追加を歓迎します。[Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) でサポートリクエストを提出してください。\n\n"
  },
  {
    "path": "documents/led_screen_display_control.md",
    "content": "# LED Screen Display Control Instructions\n\n[View English description](#led-screen-display-control-instructions) | [查看中文说明](#led-屏显示控制说明) | [日本語の説明を確認する](#led-スクリーン表示制御の説明)\n\n- The configuration files are located in the [/usr/share/openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) directory of the `Armbian/OpenWrt` system. The `Armbian` command file is at [/usr/sbin/armbian-openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd), and the `OpenWrt` command file is at [/usr/sbin/openwrt-openvfd](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd). If these files are not present in your system, upload them manually and assign execution permissions: `chmod +x /usr/share/openvfd/vfdservice /usr/sbin/*-openvfd`.\n\n- Update the system kernel to the latest version. For the `Armbian` system, use the `armbian-sync` command. For the `OpenWrt` system, navigate to `System Menu` → `Amlogic Service` → `Online Download Update`.\n\n- The following devices have been tested: `x96max.conf`, `x96maxplus.conf`, `h96max-x3.conf`, `hk1-x3.conf`, `hk1box.conf`, `tx3.conf`, `x96air.conf`, and `x88pro-x3.conf`. Configurations for other devices can be adapted from [arthur-liberman/vfd-configurations](https://github.com/arthur-liberman/vfd-configurations) and [LibreELEC/linux_openvfd](https://github.com/LibreELEC/linux_openvfd/tree/master/conf). Note: the second field value in configuration entries from these sources must be decremented by `1`. For example:\n\n```yaml\nvfd_gpio_clk='0,69,0'\nvfd_gpio_dat='0,70,0'\n```\nModify to:\n\n```yaml\nvfd_gpio_clk='0,68,0'\nvfd_gpio_dat='0,69,0'\n```\n\n- Taking the configuration of [x96maxplus](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf) as an example: If the order of the displayed time text is incorrect, you can adjust the order of numbers in `vfd_chars='4,0,1,2,3'` to `vfd_chars='1,2,3,4,0'` for testing. If the time is displayed upside down, you can adjust the `first value 0x02` in `vfd_display_type='0x02,0x00,0x01,0x00'` to `0x01` for testing. The content displayed can be adjusted according to the specific situation of your device in `functions='usb apps setup sd hdmi cvbs'`.\n\n- Rename the configuration file to `diy.conf` and upload it to the `/usr/share/openvfd/conf` directory, then enter the command `armbian-openvfd 99` for testing.\n\n- The command `armbian-openvfd 0` disables the LED display and clears associated system processes. Before testing each new configuration, always run this disable command first, then execute `armbian-openvfd 99` to test the modified configuration.\n\n- Some devices may display a boot message before Linux starts (e.g., showing `BOOT`). To clear this message, first run `armbian-openvfd 0` to stop existing services, then run `armbian-openvfd <boxid>` to take control of the LED display. To disable the display entirely, run `armbian-openvfd 0` again.\n\n- Once the display is working correctly, add it to the boot startup tasks. Replace `15` in the following commands with your device's `BoxID`:\n\n```yaml\n# Execute the following command in the terminal to enable the openvfd service\nsed -i 's|^#*openvfd_enable=.*|openvfd_enable=\"yes\"|g' /etc/custom_service/start_service.sh\nsed -i 's|^#*openvfd_boxid=.*|openvfd_boxid=\"15\"|g' /etc/custom_service/start_service.sh\n# Some devices require restarting the OpenVFD service to clear 'BOOT' and related messages\nsed -i 's|^#*openvfd_restart=.*|openvfd_restart=\"yes\"|g' /etc/custom_service/start_service.sh\n```\n\n- Everyone is welcome to test and share their device configuration files (diy.conf) to benefit the community.\n\n|  BoxName   | `BoxID` |  Armbian Command      |   OpenWrt Command       |  Function   |\n| ---------- | ------- | --------------------- | ----------------------- | ----------- |\n| x96max     |  11     |  armbian-openvfd 11   |   openwrt-openvfd 11    | Enable LED  |\n| x96maxplus |  12     |  armbian-openvfd 12   |   openwrt-openvfd 12    | Enable LED  |\n| x96air     |  13     |  armbian-openvfd 13   |   openwrt-openvfd 13    | Enable LED  |\n| h96max-x3  |  14     |  armbian-openvfd 14   |   openwrt-openvfd 14    | Enable LED  |\n| hk1-x3     |  15     |  armbian-openvfd 15   |   openwrt-openvfd 15    | Enable LED  |\n| hk1box     |  16     |  armbian-openvfd 16   |   openwrt-openvfd 16    | Enable LED  |\n| tx3        |  17     |  armbian-openvfd 17   |   openwrt-openvfd 17    | Enable LED  |\n| tx3-mini   |  18     |  armbian-openvfd 18   |   openwrt-openvfd 18    | Enable LED  |\n| t95        |  19     |  armbian-openvfd 19   |   openwrt-openvfd 19    | Enable LED  |\n| t95z-plus  |  20     |  armbian-openvfd 20   |   openwrt-openvfd 20    | Enable LED  |\n| tx9-pro    |  21     |  armbian-openvfd 21   |   openwrt-openvfd 21    | Enable LED  |\n| x92        |  22     |  armbian-openvfd 22   |   openwrt-openvfd 22    | Enable LED  |\n| whale      |  23     |  armbian-openvfd 23   |   openwrt-openvfd 23    | Enable LED  |\n| x88pro-x3  |  24     |  armbian-openvfd 24   |   openwrt-openvfd 24    | Enable LED  |\n| diy        |  99     |  armbian-openvfd 99   |   openwrt-openvfd 99    | Enable LED  |\n| -          |  0      |  armbian-openvfd 0    |   openwrt-openvfd 0     | Disable LED |\n| -          |  -u     |  armbian-openvfd -u   |   openwrt-openvfd -u    | Update Conf |\n\n# LED 屏显示控制说明\n\n- 配置文件位于 `Armbian/OpenWrt` 系统的 [/usr/share/openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) 目录下。`Armbian` 系统的命令文件位于 [/usr/sbin/armbian-openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd)，`OpenWrt` 系统的命令文件位于 [/usr/sbin/openwrt-openvfd](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd)。若当前系统中缺少这些文件，可手动上传并赋予执行权限：`chmod +x /usr/share/openvfd/vfdservice /usr/sbin/*-openvfd`。\n\n- 将系统内核升级至最新版本。`Armbian` 系统使用 `armbian-sync` 命令升级；`OpenWrt` 系统通过 `系统菜单` → `晶晨宝盒` → `在线下载更新` 进行升级。\n\n- 目前已测试的设备配置包括 `x96max.conf`、`x96maxplus.conf`、`h96max-x3.conf`、`hk1-x3.conf`、`hk1box.conf`、`tx3.conf`、`x96air.conf` 和 `x88pro-x3.conf` 等。其他设备的配置可参考 [arthur-liberman/vfd-configurations](https://github.com/arthur-liberman/vfd-configurations) 和 [LibreELEC/linux_openvfd](https://github.com/LibreELEC/linux_openvfd/tree/master/conf) 进行修改。注意：需将这两个网站配置文件中对应字段的第二个值减 `1` 后使用，例如：\n\n```yaml\nvfd_gpio_clk='0,69,0'\nvfd_gpio_dat='0,70,0'\n```\n修改为：\n\n```yaml\nvfd_gpio_clk='0,68,0'\nvfd_gpio_dat='0,69,0'\n```\n\n- 以 [x96maxplus](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf) 的配置为例：如果显示的时间文字顺序不正确，可以调整 `vfd_chars='4,0,1,2,3'` 的数字顺序为 `vfd_chars='1,2,3,4,0'` 等进行测试。如果时间是翻转显示，可以调整 `vfd_display_type='0x02,0x00,0x01,0x00'` 中的 `第一个值 0x02` 为 `0x01` 等进行测试。显示的内容可根据自己的设备支持的具体情况调整 `functions='usb apps setup sd hdmi cvbs'` 中的值。\n\n- 将配置文件命名为 `diy.conf` 并上传至 `/usr/share/openvfd/conf` 目录下，输入命令 `armbian-openvfd 99` 进行测试。\n\n- 通过命令 `armbian-openvfd 0` 可禁用 LED 显示并清除相关系统进程。每次测试新配置前，请先执行此禁用命令，再执行 `armbian-openvfd 99` 进行配置测试。\n\n- 部分设备可能在 Linux 启动前显示开机信息（例如显示 `BOOT`）。要清除此信息，请先执行 `armbian-openvfd 0` 停止现有服务，然后执行 `armbian-openvfd <boxid>` 接管 LED 显示。若要禁用显示屏，再次执行 `armbian-openvfd 0` 即可。\n\n- 屏幕显示正常后，可将其添加到开机自启动任务。将以下命令中的 `15` 替换为你的设备编号：\n\n```yaml\n# 在终端执行以下命令启用 openvfd 服务\nsed -i 's|^#*openvfd_enable=.*|openvfd_enable=\"yes\"|g' /etc/custom_service/start_service.sh\nsed -i 's|^#*openvfd_boxid=.*|openvfd_boxid=\"15\"|g' /etc/custom_service/start_service.sh\n# 有些设备需要重启 OpenVFD 服务以清除 'BOOT' 等相关信息\nsed -i 's|^#*openvfd_restart=.*|openvfd_restart=\"yes\"|g' /etc/custom_service/start_service.sh\n```\n\n- 欢迎大家测试后分享自己设备的配置文件（diy.conf），让更多人受益。\n\n|  盒子名称   | `盒子编号` |  Armbian 使用命令      |   OpenWrt 使用命令       |   功能   |\n| ---------- | -------- | --------------------- | ----------------------- | ------- |\n| x96max     |  11      |  armbian-openvfd 11   |   openwrt-openvfd 11    | 启用 LED |\n| x96maxplus |  12      |  armbian-openvfd 12   |   openwrt-openvfd 12    | 启用 LED |\n| x96air     |  13      |  armbian-openvfd 13   |   openwrt-openvfd 13    | 启用 LED |\n| h96max-x3  |  14      |  armbian-openvfd 14   |   openwrt-openvfd 14    | 启用 LED |\n| hk1-x3     |  15      |  armbian-openvfd 15   |   openwrt-openvfd 15    | 启用 LED |\n| hk1box     |  16      |  armbian-openvfd 16   |   openwrt-openvfd 16    | 启用 LED |\n| tx3        |  17      |  armbian-openvfd 17   |   openwrt-openvfd 17    | 启用 LED |\n| tx3-mini   |  18      |  armbian-openvfd 18   |   openwrt-openvfd 18    | 启用 LED |\n| t95        |  19      |  armbian-openvfd 19   |   openwrt-openvfd 19    | 启用 LED |\n| t95z-plus  |  20      |  armbian-openvfd 20   |   openwrt-openvfd 20    | 启用 LED |\n| tx9-pro    |  21      |  armbian-openvfd 21   |   openwrt-openvfd 21    | 启用 LED |\n| x92        |  22      |  armbian-openvfd 22   |   openwrt-openvfd 22    | 启用 LED |\n| whale      |  23      |  armbian-openvfd 23   |   openwrt-openvfd 23    | 启用 LED |\n| x88pro-x3  |  24      |  armbian-openvfd 24   |   openwrt-openvfd 24    | 启用 LED |\n| diy        |  99      |  armbian-openvfd 99   |   openwrt-openvfd 99    | 启用 LED |\n| -          |  0       |  armbian-openvfd 0    |   openwrt-openvfd 0     | 禁用 LED |\n| -          |  -u      |  armbian-openvfd -u   |   openwrt-openvfd -u    | 更新配置  |\n\n\n\n# LED スクリーン表示制御の説明\n\n- 設定ファイルは `Armbian/OpenWrt` システムの [/usr/share/openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) ディレクトリにあります。`Armbian` システムのコマンドファイルは [/usr/sbin/armbian-openvfd](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd) に、`OpenWrt` システムのコマンドファイルは [/usr/sbin/openwrt-openvfd](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd) にあります。現在のシステムにこれらのファイルがない場合は、手動でアップロードして実行権限を付与してください：`chmod +x /usr/share/openvfd/vfdservice /usr/sbin/*-openvfd`。\n\n- システムカーネルを最新バージョンにアップグレードしてください。`Armbian` システムは `armbian-sync` コマンドでアップグレードします。`OpenWrt` システムは `システムメニュー` → `晶晨宝盒` → `オンラインダウンロード更新` からアップグレードします。\n\n- 現在テスト済みのデバイス設定には `x96max.conf`、`x96maxplus.conf`、`h96max-x3.conf`、`hk1-x3.conf`、`hk1box.conf`、`tx3.conf`、`x96air.conf`、`x88pro-x3.conf` などがあります。その他のデバイスの設定は [arthur-liberman/vfd-configurations](https://github.com/arthur-liberman/vfd-configurations) と [LibreELEC/linux_openvfd](https://github.com/LibreELEC/linux_openvfd/tree/master/conf) を参考に修正できます。注意：これら2つのサイトの設定ファイルの対応フィールドの2番目の値を `1` 減らしてから使用する必要があります。例：\n\n```yaml\nvfd_gpio_clk='0,69,0'\nvfd_gpio_dat='0,70,0'\n```\n以下に修正：\n\n```yaml\nvfd_gpio_clk='0,68,0'\nvfd_gpio_dat='0,69,0'\n```\n\n- [x96maxplus](../build-armbian/armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf) の設定を例に説明します：表示される時刻テキストの順序が正しくない場合、`vfd_chars='4,0,1,2,3'` の数字の順序を `vfd_chars='1,2,3,4,0'` などに調整してテストできます。時刻が反転表示される場合、`vfd_display_type='0x02,0x00,0x01,0x00'` の `最初の値 0x02` を `0x01` などに調整してテストできます。表示内容はデバイスでサポートされている具体的な状況に応じて `functions='usb apps setup sd hdmi cvbs'` の値を調整できます。\n\n- 設定ファイルを `diy.conf` にリネームして `/usr/share/openvfd/conf` ディレクトリにアップロードし、コマンド `armbian-openvfd 99` を入力してテストします。\n\n- コマンド `armbian-openvfd 0` で LED 表示を無効にし、関連するシステムプロセスをクリアできます。新しい設定をテストする前に、まずこの無効化コマンドを実行し、その後 `armbian-openvfd 99` を実行して設定をテストしてください。\n\n- 一部のデバイスは Linux 起動前に起動メッセージを表示する場合があります（例：`BOOT` と表示）。このメッセージをクリアするには、まず `armbian-openvfd 0` を実行して既存のサービスを停止し、次に `armbian-openvfd <boxid>` を実行して LED 表示を制御します。表示を完全に無効にするには、再度 `armbian-openvfd 0` を実行してください。\n\n- スクリーン表示が正常に動作した後、起動時の自動開始タスクに追加できます。以下のコマンドの `15` をお使いのデバイスの番号に置き換えてください：\n\n```yaml\n# ターミナルで以下のコマンドを実行して openvfd サービスを有効にする\nsed -i 's|^#*openvfd_enable=.*|openvfd_enable=\"yes\"|g' /etc/custom_service/start_service.sh\nsed -i 's|^#*openvfd_boxid=.*|openvfd_boxid=\"15\"|g' /etc/custom_service/start_service.sh\n# 一部のデバイスでは 'BOOT' などの関連メッセージをクリアするために OpenVFD サービスの再起動が必要です\nsed -i 's|^#*openvfd_restart=.*|openvfd_restart=\"yes\"|g' /etc/custom_service/start_service.sh\n```\n\n- テスト後にご自身のデバイスの設定ファイル（diy.conf）を共有していただくことを歓迎します。より多くの方の参考になります。\n\n|  デバイス名  | `デバイス番号` |  Armbian コマンド       |   OpenWrt コマンド        |   機能    |\n| ---------- | ----------- | --------------------- | ----------------------- | -------- |\n| x96max     |  11         |  armbian-openvfd 11   |   openwrt-openvfd 11    | LED 有効  |\n| x96maxplus |  12         |  armbian-openvfd 12   |   openwrt-openvfd 12    | LED 有効  |\n| x96air     |  13         |  armbian-openvfd 13   |   openwrt-openvfd 13    | LED 有効  |\n| h96max-x3  |  14         |  armbian-openvfd 14   |   openwrt-openvfd 14    | LED 有効  |\n| hk1-x3     |  15         |  armbian-openvfd 15   |   openwrt-openvfd 15    | LED 有効  |\n| hk1box     |  16         |  armbian-openvfd 16   |   openwrt-openvfd 16    | LED 有効  |\n| tx3        |  17         |  armbian-openvfd 17   |   openwrt-openvfd 17    | LED 有効  |\n| tx3-mini   |  18         |  armbian-openvfd 18   |   openwrt-openvfd 18    | LED 有効  |\n| t95        |  19         |  armbian-openvfd 19   |   openwrt-openvfd 19    | LED 有効  |\n| t95z-plus  |  20         |  armbian-openvfd 20   |   openwrt-openvfd 20    | LED 有効  |\n| tx9-pro    |  21         |  armbian-openvfd 21   |   openwrt-openvfd 21    | LED 有効  |\n| x92        |  22         |  armbian-openvfd 22   |   openwrt-openvfd 22    | LED 有効  |\n| whale      |  23         |  armbian-openvfd 23   |   openwrt-openvfd 23    | LED 有効  |\n| x88pro-x3  |  24         |  armbian-openvfd 24   |   openwrt-openvfd 24    | LED 有効  |\n| diy        |  99         |  armbian-openvfd 99   |   openwrt-openvfd 99    | LED 有効  |\n| -          |  0          |  armbian-openvfd 0    |   openwrt-openvfd 0     | LED 無効  |\n| -          |  -u         |  armbian-openvfd -u   |   openwrt-openvfd -u    | 設定更新  |\n"
  },
  {
    "path": "rebuild",
    "content": "#!/bin/bash\n#================================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Run on x86_64 Ubuntu-22.04 to rebuild Armbian images.\n# Copyright (C) 2021~ https://www.armbian.com\n# Copyright (C) 2021~ https://github.com/unifreq\n# Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTORS.md\n# Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: sudo ./rebuild\n# Command optional parameters please refer to the source code repository\n#\n#======================================== Functions list ========================================\n#\n# error_msg          : Output error message and exit\n# process_msg        : Output process step message\n# mount_try          : Mount the image file with retry\n# get_textoffset     : Get kernel TEXT_OFFSET\n#\n# init_var           : Initialize all variables\n# check_data         : Validate the configuration data\n# find_armbian       : Find Armbian file (build/output/images/*.img)\n# git_pull_dir       : Download files from a git repository\n# download_depends   : Download the dependency files\n# query_kernel       : Query the latest kernel version\n# check_kernel       : Verify kernel file integrity via sha256sum\n# download_kernel    : Download the kernel files\n#\n# confirm_version    : Confirm version and board configuration\n# extract_armbian    : Extract Armbian image files\n# make_image         : Create a new Armbian image\n# copy_files         : Copy the Armbian files to the image\n# replace_kernel     : Replace kernel files in the image\n# refactor_bootfs    : Refactor bootfs partition files\n# refactor_rootfs    : Refactor rootfs partition files\n# clean_tmp          : Clear temporary files\n#\n# loop_rebuild       : Loop to rebuild Armbian for all boards\n#\n#================================ Set make environment variables ================================\n#\n# Related file storage path\ncurrent_path=\"${PWD}\"\narmbian_outputpath=\"${current_path}/build/output/images\"\narmbian_rebuild_file=\"${armbian_outputpath}/*-trunk_*.img\"\nbuild_path=\"${current_path}/build-armbian\"\nkernel_path=\"${build_path}/kernel\"\nuboot_path=\"${build_path}/u-boot\"\ncommon_files=\"${build_path}/armbian-files/common-files\"\nplatform_files=\"${build_path}/armbian-files/platform-files\"\ndifferent_files=\"${build_path}/armbian-files/different-files\"\nmodel_conf=\"${common_files}/etc/model_database.conf\"\nfirmware_path=\"${common_files}/usr/lib/firmware\"\ntmp_dir=\"${current_path}/build/tmp_dir\"\ntmp_outpath=\"${tmp_dir}/tmp_out\"\ntmp_armbian=\"${tmp_dir}/tmp_armbian\"\ntmp_build=\"${tmp_dir}/tmp_build\"\ntmp_aml_image=\"${tmp_dir}/tmp_aml_image\"\n\n# System operation environment\narch_info=\"$(uname -m)\"\nhost_release=\"$(cat /etc/os-release | grep '^VERSION_CODENAME=.*' | cut -d'=' -f2)\"\n# Get armbian ${VERSION_CODENAME}: such as [ resolute ]\nos_release_file=\"etc/os-release\"\n# Set banner's ${BOARD_NAME}: such as [ s905x3 ]\narmbian_release_file=\"etc/armbian-release\"\n# Add personalized settings for special devices, such as [ s922x-oes-plus ]\nboard_release_file=\"etc/armbian-board-release.conf\"\n# Add custom armbian information\nophub_release_file=\"etc/ophub-release\"\n\n# U-BOOT files download repository\nuboot_repo=\"https://github.com/ophub/u-boot\"\n# Firmware files download repository\nfirmware_repo=\"https://github.com/ophub/firmware\"\n\n# Set the kernel download repository from github.com\nkernel_repo=\"https://github.com/ophub/kernel\"\n# Set the tags(kernel_xxx) of the default kernel that can be replaced via the [ -u ] parameter\ndefault_tags=\"stable\"\nkernel_usage=\"\"\n# Set the list of kernels used by default(Selectable version)\nstable_kernel=(\"6.12.y\" \"6.18.y\")\nflippy_kernel=(${stable_kernel[@]})\nbeta_kernel=(${stable_kernel[@]})\nrk3588_kernel=(\"6.1.y\")\nrk35xx_kernel=(\"6.1.y\")\nh6_kernel=(\"6.6.y\")\nspecific_6xy=(\"6.1.y\" \"6.6.y\" \"6.12.y\" \"6.18.y\")\nspecific_5xy=(\"5.10.y\" \"5.15.y\")\n# Set to automatically use the latest kernel\nauto_kernel=\"true\"\n# Initialize the kernel array\ndeclare -A tags_list\n\n# Initialize the build device\nbuild_board=\"all\"\n# Set Armbian size (Unit: MiB, boot_mb >= 256, root_mb >= 2048)\nboot_mb=\"512\"\nroot_mb=\"3000\"\n# Set ROOTFS partition file system type, options: [ ext4 / btrfs ]\nrootfs_type=\"ext4\"\n# Set Armbian OS type (server / desktop)\nos_type=\"server\"\n# Set Armbian builder signature\nbuilder_name=\"\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nNOTE=\"[\\033[93m NOTE \\033[0m]\"\nWARNING=\"[\\033[93m WARNING \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#================================================================================================\n\nerror_msg() {\n    echo -e \" [💔] ${1}\"\n    exit 1\n}\n\nprocess_msg() {\n    echo -e \" [🌿] ${1}\"\n}\n\nmount_try() {\n    # Check mount parameters\n    m_type=\"${1}\"\n    m_dev=\"${2}\"\n    m_target=\"${3}\"\n    [[ -n \"${m_type}\" && -n \"${m_dev}\" && -n \"${m_target}\" ]] || {\n        error_msg \"Mount parameter is missing: [ ${m_type}, ${m_dev}, ${m_target} ]\"\n    }\n\n    t=\"1\"\n    max_try=\"10\"\n    while [[ \"${t}\" -le \"${max_try}\" ]]; do\n        # Mount according to the image partition format\n        if [[ \"${m_type}\" == \"btrfs\" ]]; then\n            mount -t ${m_type} -o discard,compress=zstd:6 ${m_dev} ${m_target} 2>/dev/null\n        else\n            mount -t ${m_type} -o discard ${m_dev} ${m_target} 2>/dev/null\n        fi\n\n        # Mount failed and continue trying\n        if [[ \"${?}\" -eq 0 ]]; then\n            break\n        else\n            sync && sleep 3\n            umount -f ${m_target} 2>/dev/null\n            ((t++))\n        fi\n    done\n    [[ \"${t}\" -gt \"${max_try}\" ]] && error_msg \"[ ${t} ] attempts to mount failed.\"\n}\n\nget_textoffset() {\n    vmlinuz_name=\"${1}\"\n    need_overload=\"yes\"\n    # With TEXT_OFFSET patch is [ 0108 ], without TEXT_OFFSET patch is [ 0000 ] and need to ues [ UBOOT_OVERLOAD ] file.\n    [[ \"$(hexdump -n 15 -x \"${vmlinuz_name}\" 2>/dev/null | head -n 1 | awk '{print $7}')\" == \"0108\" ]] && need_overload=\"no\"\n}\n\ninit_var() {\n    echo -e \"${STEPS} Initializing variables...\"\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"b:r:u:k:a:t:s:n:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -b | --Board)\n            if [[ -n \"${2}\" ]]; then\n                build_board=\"${2// /}\"\n                shift 2\n            else\n                error_msg \"Invalid -b parameter [ ${2} ]!\"\n            fi\n            ;;\n        -r | --kernelRepository)\n            if [[ -n \"${2}\" ]]; then\n                kernel_repo=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -r parameter [ ${2} ]!\"\n            fi\n            ;;\n        -u | --kernelUsage)\n            if [[ -n \"${2}\" ]]; then\n                kernel_usage=\"${2//kernel_/}\"\n                shift 2\n            else\n                error_msg \"Invalid -u parameter [ ${2} ]!\"\n            fi\n            ;;\n        -k | --Kernel)\n            if [[ -n \"${2}\" ]]; then\n                oldIFS=\"${IFS}\"\n                IFS=\"_\"\n                stable_kernel=(${2})\n                flippy_kernel=(${2})\n                beta_kernel=(${2})\n                specific_kernel=(${2})\n                IFS=\"${oldIFS}\"\n                shift 2\n            else\n                error_msg \"Invalid -k parameter [ ${2} ]!\"\n            fi\n            ;;\n        -a | --Autokernel)\n            if [[ -n \"${2}\" ]]; then\n                auto_kernel=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -a parameter [ ${2} ]!\"\n            fi\n            ;;\n        -t | --rootfsType)\n            if [[ -n \"${2}\" ]]; then\n                rootfs_type=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -t parameter [ ${2} ]!\"\n            fi\n            ;;\n        -s | --Size)\n            if [[ -n \"${2}\" ]]; then\n                img_mb=\"${2}\"\n                shift 2\n            else\n                error_msg \"Invalid -s parameter [ ${2} ]!\"\n            fi\n            ;;\n        -n | --BuilderName)\n            if [[ -n \"${2}\" ]]; then\n                builder_name=\"${2// /}\"\n                shift 2\n            else\n                error_msg \"Invalid -n parameter [ ${2} ]!\"\n            fi\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n\n    # Set the image size, such as [ -s 512/2560 ] or [ -s 2560 ]\n    [[ -n \"${img_mb}\" ]] && {\n        if [[ \"${img_mb}\" =~ / ]]; then\n            boot_mb=\"${img_mb%%/*}\"\n            root_mb=\"${img_mb##*/}\"\n        else\n            root_mb=\"${img_mb}\"\n        fi\n    }\n}\n\ncheck_data() {\n    # Columns of ${model_conf}:\n    # 1.ID  2.MODEL  3.SOC  4.FDTFILE  5.UBOOT_OVERLOAD  6.MAINLINE_UBOOT  7.BOOTLOADER_IMG  8.DESCRIPTION\n    # 9.KERNEL_TAGS  10.PLATFORM  11.FAMILY  12.BOOT_CONF  13.CONTRIBUTORS  14.BOARD  15.BUILD\n    [[ -f \"${model_conf}\" ]] || error_msg \"Missing model config file: [ ${model_conf} ]\"\n\n    # Get a list of build devices\n    if [[ \"${build_board}\" =~ ^(all|first50|range50_100|range100_150|last20)$ ]]; then\n        board_list=\":(yes)\"\n        build_armbian=($(\n            cat ${model_conf} |\n                sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' |\n                grep -E \"^[^#].*:yes$\" | awk -F':' '{print $14}' |\n                sort -u | xargs\n        ))\n    else\n        board_list=\":($(echo ${build_board} | sed -e 's/_/\\|/g')):(yes|no)\"\n        build_armbian=($(echo ${build_board} | sed -e 's/_/ /g'))\n    fi\n    [[ \"${#build_armbian[@]}\" -eq 0 ]] && error_msg \"The [ BOARD ] is missing, stop building.\"\n\n    # Select the first 50 boards\n    [[ \"${build_board}\" == \"first50\" ]] && {\n        build_armbian=(\"${build_armbian[@]:0:50}\")\n        board_list=\":($(echo ${build_armbian[@]} | sed -e 's/ /\\|/g')):(yes|no)\"\n    }\n    # Select the boards from 51st to 100th\n    [[ \"${build_board}\" == \"range50_100\" ]] && {\n        build_armbian=(\"${build_armbian[@]:50:50}\")\n        board_list=\":($(echo ${build_armbian[@]} | sed -e 's/ /\\|/g')):(yes|no)\"\n    }\n    # Select the boards from 101st to 150th\n    [[ \"${build_board}\" == \"range100_150\" ]] && {\n        build_armbian=(\"${build_armbian[@]:100:50}\")\n        board_list=\":($(echo ${build_armbian[@]} | sed -e 's/ /\\|/g')):(yes|no)\"\n    }\n    # Select the last 20 boards\n    [[ \"${build_board}\" == \"last20\" ]] && {\n        build_armbian=(\"${build_armbian[@]: -20}\")\n        board_list=\":($(echo ${build_armbian[@]} | sed -e 's/ /\\|/g')):(yes|no)\"\n    }\n\n    # Get the kernel array\n    kernel_from=($(\n        cat ${model_conf} |\n            sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' |\n            grep -E \"^[^#].*${board_list}$\" | awk -F':' '{print $9}' |\n            sort -u | xargs\n    ))\n    [[ \"${#kernel_from[@]}\" -eq 0 ]] && error_msg \"Missing [ KERNEL_TAGS ] settings, stop building.\"\n    # Replace custom kernel tags\n    [[ -n \"${kernel_usage}\" ]] && {\n        for ((i = 0; i < ${#kernel_from[@]}; i++)); do\n            if [[ ${kernel_from[${i}]} == \"${default_tags}/\"* ]]; then\n                kernel_from[${i}]=\"${kernel_from[${i}]//${default_tags}/${kernel_usage}}\"\n            fi\n        done\n    }\n\n    # Convert the kernel_from to the kernel array\n    for item in \"${kernel_from[@]}\"; do\n        # Split the key and value\n        IFS='/' read -r key value <<<\"${item}\"\n\n        # Check if the value is \"all\".\n        if [[ \"${value}\" == \"all\" ]]; then\n            # If the value is \"all\", assign the value of ${key}_kernel. such as [ stable_kernel, rk3588_kernel, etc. ]\n            eval \"value=\\\"\\${${key}_kernel[@]}\\\"\"\n        elif [[ \"${value}\" =~ ^[1-9]+ ]]; then\n            if [[ \"${value}\" == \"5.x.y\" ]]; then\n                value=\"${specific_5xy[@]}\"\n            elif [[ \"${value}\" == \"6.x.y\" ]]; then\n                value=\"${specific_6xy[@]}\"\n            else\n                IFS='_' read -ra value <<<\"${value}\"\n                value=\"${value[@]}\"\n            fi\n        fi\n\n        # If auto_kernel is false, use the value from -k parameter\n        if [[ ! \"${auto_kernel}\" =~ ^(true|yes)$ ]]; then\n            if [[ \"${#specific_kernel[@]}\" -eq 0 ]]; then\n                error_msg \"Plase use the -k parameter to specify the kernel version.\"\n            else\n                value=\"${specific_kernel[@]}\"\n            fi\n        fi\n\n        # Merge the same key values\n        if [[ -n \"${tags_list[${key}]}\" ]]; then\n            tags_list[${key}]+=\" ${value}\"\n        else\n            tags_list[${key}]=\"${value}\"\n        fi\n    done\n\n    # Convert the tags_list array to the kernel array (remove duplicates)\n    for key in \"${!tags_list[@]}\"; do\n        # Convert the space-separated string to an array and remove duplicates\n        read -ra unique_values <<<\"$(echo \"${tags_list[${key}]}\" | tr ' ' '\\n' | sort -u | tr '\\n' ' ')\"\n        # Assign the unique values back to the tags_list\n        tags_list[${key}]=\"${unique_values[@]}\"\n    done\n\n    # Check the kernel tags list\n    [[ \"${#tags_list[@]}\" -eq 0 ]] && error_msg \"The [ tags_list ] is missing, stop building.\"\n    echo -e \"${INFO} The kernel tags list: [ ${!tags_list[@]} ]\"\n\n    # Convert kernel repository address to api format\n    [[ \"${kernel_repo}\" =~ ^https: ]] && kernel_repo=\"$(echo ${kernel_repo} | awk -F'/' '{print $4\"/\"$5}')\"\n    kernel_api=\"https://github.com/${kernel_repo}\"\n}\n\nfind_armbian() {\n    cd ${current_path}\n    echo -e \"${STEPS} Searching for Armbian file...\"\n\n    # Get armbian release and version\n    armbian_rebuild_name=\"$(ls ${armbian_rebuild_file} 2>/dev/null | head -n 1 | awk -F \"/\" '{print $NF}')\"\n    [[ -n \"${armbian_rebuild_name}\" ]] || error_msg \"The armbian original file does not exist: [ ${armbian_rebuild_file} ]\"\n\n    # Find armbian version info: such as [ 22.02.0 ]\n    armbian_rebuild_version=\"$(echo ${armbian_rebuild_name} | grep -oE '[2-9][0-9]\\.[0-9]{1,2}\\.[0-9]{1,2}' | head -n 1)\"\n    [[ -n \"${armbian_rebuild_version}\" ]] || {\n        armbian_rebuild_version=\"22.02.02\"\n        echo -e \"${WARNING} Missing armbian version info!\"\n    }\n\n    echo -e \"${INFO} Armbian rebuild file: [ ${armbian_rebuild_name} ], Version: [ ${armbian_rebuild_version} ]\"\n}\n\ngit_pull_dir() {\n    cd ${current_path}\n\n    # Check git_pull_dir parameters\n    git_repo=\"${1}\"\n    git_branch=\"${2}\"\n    git_dir=\"${3}\"\n    git_path=\"${4}\"\n    [[ -n \"${git_repo}\" && -n \"${git_branch}\" && -n \"${git_dir}\" && -n \"${git_path}\" ]] || {\n        error_msg \"git_pull_dir parameter is missing: [ ${git_repo}, ${git_branch}, ${git_dir}, ${git_path} ]\"\n    }\n\n    # Clone the repository to the temporary directory. If it fails, wait 1 minute and try again, try 10 times.\n    git_tmp_path=\"$(mktemp -d)\"\n    for i in {1..10}; do\n        git clone --quiet --single-branch --depth=1 --branch=${git_branch} ${git_repo} ${git_tmp_path}\n        [[ \"${?}\" -eq 0 ]] && break || sleep 60\n    done\n    [[ \"${?}\" -eq 0 ]] || error_msg \"Failed to clone the [ ${git_repo} ] repository.\"\n\n    # Copy the files to the storage directory\n    mkdir -p ${git_path}\n    cp -af --no-preserve=ownership ${git_tmp_path}/${git_dir}/. ${git_path}\n    [[ \"${?}\" -eq 0 ]] || error_msg \"Failed to move the [ ${git_dir} ] files to the [ ${git_path} ] directory.\"\n\n    # Delete temporary files\n    rm -rf ${git_tmp_path} 2>/dev/null\n}\n\ndownload_depends() {\n    echo -e \"${STEPS} Downloading dependency files...\"\n\n    # Download Armbian u-boot files\n    uboot_num=\"$(find \"${uboot_path}/rockchip\" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l)\"\n    [[ -n \"${uboot_num}\" && \"${uboot_num}\" -le \"5\" ]] && {\n        git_pull_dir ${uboot_repo} main u-boot ${uboot_path}\n        [[ \"${?}\" -eq 0 ]] && echo -e \"${INFO} u-boot download completed.\" || error_msg \"u-boot download failed.\"\n    } || echo -e \"${INFO} u-boot files exist, skip downloading.\"\n\n    # Download Armbian firmware files\n    firmware_num=\"$(find \"${firmware_path}\" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l)\"\n    [[ -n \"${firmware_num}\" && \"${firmware_num}\" -le \"5\" ]] && {\n        git_pull_dir ${firmware_repo} main firmware ${firmware_path}\n        [[ \"${?}\" -eq 0 ]] && echo -e \"${INFO} firmware download completed.\" || error_msg \"firmware download failed.\"\n    } || echo -e \"${INFO} firmware files exist, skip downloading.\"\n}\n\nquery_kernel() {\n    echo -e \"${STEPS} Querying the latest kernel version...\"\n\n    # Check the version on the kernel repository\n    x=\"1\"\n    for key in \"${!tags_list[@]}\"; do\n        {\n            # Query the name of the latest kernel version\n            tmp_arr_kernels=()\n            down_kernel_list=(${tags_list[${key}]})\n            i=1\n            for kernel_var in \"${down_kernel_list[@]}\"; do\n                echo -e \"${INFO} (${x}.${i}) Auto query the latest kernel version for [ ${key} - ${kernel_var} ]\"\n\n                # Identify the kernel <VERSION> and <PATCHLEVEL>, such as [ 6.1 ]\n                kernel_verpatch=\"$(echo ${kernel_var} | awk -F '.' '{print $1\".\"$2}')\"\n\n                # Query the latest kernel version\n                latest_version=\"$(\n                    curl -fsSL \\\n                        ${kernel_api}/releases/expanded_assets/kernel_${key} |\n                        grep -oP \"${kernel_verpatch}\\.[0-9]+(?=\\.tar\\.gz)\" |\n                        sort -urV | head -n 1\n                )\"\n\n                if [[ \"${?}\" -eq 0 && -n \"${latest_version}\" ]]; then\n                    tmp_arr_kernels[${i}]=\"${latest_version}\"\n                else\n                    tmp_arr_kernels[${i}]=\"${kernel_var}\"\n                fi\n\n                echo -e \"${INFO} (${x}.${i}) [ ${key} - ${tmp_arr_kernels[$i]} ] is latest kernel. \\n\"\n\n                ((i++))\n            done\n\n            # Assign the latest kernel version to the array\n            tags_list[${key}]=\"${tmp_arr_kernels[@]}\"\n\n            ((x++))\n        }\n    done\n}\n\ncheck_kernel() {\n    [[ -n \"${1}\" ]] && check_path=\"${1}\" || error_msg \"Invalid kernel path to check.\"\n    check_files=($(cat \"${check_path}/sha256sums\" | awk '{print $2}'))\n    for cf in \"${check_files[@]}\"; do\n        {\n            # Check if file exists\n            [[ -s \"${check_path}/${cf}\" ]] || error_msg \"The [ ${cf} ] file is missing.\"\n            # Check if the file sha256sum is correct\n            tmp_sha256sum=\"$(sha256sum \"${check_path}/${cf}\" | awk '{print $1}')\"\n            tmp_checkcode=\"$(cat ${check_path}/sha256sums | grep ${cf} | awk '{print $1}')\"\n            [[ \"${tmp_sha256sum}\" == \"${tmp_checkcode}\" ]] || error_msg \"[ ${cf} ]: sha256sum verification failed.\"\n        }\n    done\n    echo -e \"${INFO} All [ ${#check_files[@]} ] kernel files are sha256sum checked to be complete.\\n\"\n}\n\ndownload_kernel() {\n    cd ${current_path}\n    echo -e \"${STEPS} Downloading kernel files...\"\n\n    x=\"1\"\n    for key in \"${!tags_list[@]}\"; do\n        {\n            down_kernel_list=(${tags_list[${key}]})\n            # Download the kernel to the storage directory\n            i=\"1\"\n            for kernel_var in \"${down_kernel_list[@]}\"; do\n                if [[ ! -d \"${kernel_path}/${key}/${kernel_var}\" ]]; then\n                    kernel_down_from=\"https://github.com/${kernel_repo}/releases/download/kernel_${key}/${kernel_var}.tar.gz\"\n                    echo -e \"${INFO} (${x}.${i}) [ ${key} - ${kernel_var} ] Kernel download from [ ${kernel_down_from} ]\"\n\n                    # Download the kernel files. If the download fails, try again 10 times.\n                    [[ -d \"${kernel_path}/${key}\" ]] || mkdir -p ${kernel_path}/${key}\n                    for t in {1..10}; do\n                        curl -fsSL \"${kernel_down_from}\" -o \"${kernel_path}/${key}/${kernel_var}.tar.gz\"\n                        [[ \"${?}\" -eq 0 ]] && break || sleep 60\n                    done\n                    [[ \"${?}\" -eq 0 ]] || error_msg \"Failed to download the kernel files from the server.\"\n\n                    # Decompress the kernel files\n                    tar -mxzf \"${kernel_path}/${key}/${kernel_var}.tar.gz\" -C \"${kernel_path}/${key}\"\n                    [[ \"${?}\" -eq 0 ]] || error_msg \"[ ${kernel_var} ] kernel decompression failed.\"\n                else\n                    echo -e \"${INFO} (${x}.${i}) [ ${key} - ${kernel_var} ] Kernel is in the local directory.\"\n                fi\n\n                # If the kernel contains the sha256sums file, check the files integrity\n                [[ -f \"${kernel_path}/${key}/${kernel_var}/sha256sums\" ]] && check_kernel \"${kernel_path}/${key}/${kernel_var}\"\n\n                ((i++))\n            done\n\n            # Delete downloaded kernel temporary files\n            rm -f ${kernel_path}/${key}/*.tar.gz\n            sync\n\n            ((x++))\n        }\n    done\n}\n\nconfirm_version() {\n    cd ${current_path}\n\n    # Columns of ${model_conf}:\n    # 1.ID  2.MODEL  3.SOC  4.FDTFILE  5.UBOOT_OVERLOAD  6.MAINLINE_UBOOT  7.BOOTLOADER_IMG  8.DESCRIPTION\n    # 9.KERNEL_TAGS  10.PLATFORM  11.FAMILY  12.BOOT_CONF  13.CONTRIBUTORS  14.BOARD  15.BUILD\n    # Column 5, called <UBOOT_OVERLOAD> in Amlogic, <TRUST_IMG> in Rockchip, Not used in Allwinner.\n\n    # Find [ the first ] configuration information with [ the same BOARD name ] and [ BUILD as yes ] in the ${model_conf} file.\n    board_conf=\"$(\n        cat ${model_conf} |\n            sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' |\n            grep -E \"^[^#].*:${board}:(yes|no)$\" |\n            head -n 1\n    )\"\n    [[ -n \"${board_conf}\" ]] || error_msg \"[ ${board} ] config is missing!\"\n\n    # Get device settings options\n    MODEL_ID=\"$(echo ${board_conf} | awk -F':' '{print $1}')\"\n    MODEL_NAME=\"$(echo ${board_conf} | awk -F':' '{print $2}')\"\n    SOC=\"$(echo ${board_conf} | awk -F':' '{print $3}')\"\n    FDTFILE=\"$(echo ${board_conf} | awk -F':' '{print $4}')\"\n    UBOOT_OVERLOAD=\"$(echo ${board_conf} | awk -F':' '{print $5}')\"\n    TRUST_IMG=\"${UBOOT_OVERLOAD}\"\n    MAINLINE_UBOOT=\"$(echo ${board_conf} | awk -F':' '{print $6}')\"\n    BOOTLOADER_IMG=\"$(echo ${board_conf} | awk -F':' '{print $7}')\"\n    KERNEL_TAGS=\"$(echo ${board_conf} | awk -F':' '{print $9}')\"\n    PLATFORM=\"$(echo ${board_conf} | awk -F':' '{print $10}')\"\n    FAMILY=\"$(echo ${board_conf} | awk -F':' '{print $11}')\"\n    BOOT_CONF=\"$(echo ${board_conf} | awk -F':' '{print $12}')\"\n    CONTRIBUTORS=\"$(echo ${board_conf} | awk -F':' '{print $13}')\"\n\n    # Check whether the key parameters are correct\n    [[ -n \"${PLATFORM}\" ]] || error_msg \"Invalid PLATFORM parameter: [ ${PLATFORM} ]\"\n    # Set supported platform name\n    support_platform=(\"amlogic\" \"rockchip\" \"allwinner\")\n    [[ -n \"$(echo \"${support_platform[@]}\" | grep -w \"${PLATFORM}\")\" ]] || error_msg \"[ ${PLATFORM} ] not supported.\"\n\n    # Add u-boot files record information\n    [[ -n \"${MAINLINE_UBOOT}\" ]] && RECORD_MAINLINE_UBOOT=\"/usr/lib/u-boot/${MAINLINE_UBOOT}\" || RECORD_MAINLINE_UBOOT=\"\"\n    [[ -n \"${BOOTLOADER_IMG}\" ]] && RECORD_BOOTLOADER_IMG=\"/usr/lib/u-boot/${BOOTLOADER_IMG}\" || RECORD_BOOTLOADER_IMG=\"\"\n    [[ -n \"${TRUST_IMG}\" ]] && RECORD_TRUST_IMG=\"/usr/lib/u-boot/${TRUST_IMG}\" || RECORD_TRUST_IMG=\"\"\n\n    # Get the kernel tags and version\n    conf_kernel_tags=\"${KERNEL_TAGS%%/*}\"\n    conf_kernel_list=\"${KERNEL_TAGS##*/}\"\n    # Replace the default kernel tags with the custom kernel tags\n    [[ -n \"${kernel_usage}\" && \"${conf_kernel_tags}\" == \"${default_tags}\" ]] && conf_kernel_tags=\"${kernel_usage}\"\n    # Check the kernel tags and version\n    [[ -z \"${conf_kernel_tags}\" ]] && error_msg \"The [ ${KERNEL_TAGS} ] is missing tags part.\"\n    [[ -z \"${conf_kernel_list}\" ]] && error_msg \"The [ ${KERNEL_TAGS} ] is missing list part.\"\n\n    # Find the kernel list defined in the model database\n    model_kernel=()\n    if [[ \"${conf_kernel_list}\" == \"all\" ]]; then\n        eval \"model_kernel=(\\\"\\${${conf_kernel_tags}_kernel[@]}\\\")\"\n        model_kernel=($(echo \"${model_kernel[@]}\" | xargs -n1 | sed -E 's/^([0-9]+\\.[0-9]+)(\\.[a-z0-9]+)?$/\\1.[0-9]+/'))\n    else\n        # Convert the string into an array, using \"_\" as the delimiter\n        IFS='_' read -ra conf_kernel_list <<<\"${conf_kernel_list}\"\n        model_kernel=($(echo \"${conf_kernel_list[@]}\" | xargs -n1 | sed -E 's/^([0-9]+\\.[0-9]+)(\\.[a-z0-9]+)?$/\\1.[0-9]+/'))\n    fi\n    # Check the kernel list\n    [[ \"${#model_kernel[@]}\" -eq 0 ]] && error_msg \"The kernel list is empty for [ ${board} ]\"\n\n    # Find the kernel version that matches the custom version\n    build_kernel=()\n    latest_kernel=(${tags_list[${conf_kernel_tags}]})\n    for ck in \"${model_kernel[@]}\"; do\n        for lk in \"${latest_kernel[@]}\"; do\n            [[ \"${lk}\" =~ ^${ck}$ ]] && build_kernel+=(\"${lk}\")\n        done\n    done\n    # Check the kernel version\n    [[ \"${#build_kernel[@]}\" -eq 0 ]] && error_msg \"The kernel list is invalid for [ ${board} ]\"\n}\n\nextract_armbian() {\n    process_msg \"(1/7) Extract armbian files.\"\n    cd ${current_path}\n\n    rm -rf ${tmp_dir}\n    mkdir -p ${tmp_outpath} ${tmp_armbian} ${tmp_build} ${tmp_aml_image}\n\n    armbian_image_file=\"${tmp_aml_image}/armbian_${board}_${kernel}.img\"\n    rm -f ${armbian_image_file}\n    cp -f \"${armbian_outputpath}/${armbian_rebuild_name}\" \"${armbian_image_file}\"\n\n    loop_old=\"$(losetup -P -f --show \"${armbian_image_file}\")\"\n    [[ -n \"${loop_old}\" ]] || error_msg \"losetup ${armbian_image_file} failed.\"\n\n    # Mount rootfs partition\n    [[ -b \"${loop_old}p2\" ]] && mount_dev=\"${loop_old}p2\" || mount_dev=\"${loop_old}p1\"\n    mount_try ext4 ${mount_dev} ${tmp_armbian}\n\n    cd ${tmp_armbian}\n\n    # Find ID in ${os_release_file}: such as [ubuntu/debian]\n    release_codeid=\"$(cat ${os_release_file} | grep -oE \"^ID=.*\" | cut -d\"=\" -f2)\"\n    [[ -z \"${release_codeid}\" ]] && error_msg \"The [ ${os_release_file}: ID ] is invalid.\"\n    # Find VERSION_CODENAME in ${os_release_file}: such as [resolute]\n    release_codename=\"$(cat ${os_release_file} | grep -oE \"^VERSION_CODENAME=.*\" | cut -d\"=\" -f2)\"\n    [[ -z \"${release_codename}\" ]] && error_msg \"The [ ${os_release_file}: VERSION_CODENAME ] is invalid.\"\n\n    # Delete all files of /boot partition and replace it later\n    rm -rf boot/*\n    # Delete the kernel files and replace it later\n    rm -rf usr/lib/modules/*\n    # Delete the symbolic link files and relink it later\n    rm -rf bin lib sbin var/lock var/run\n    # Delete unused and duplicate scripts\n    rm -f root/install* root/fstab.template\n    rm -f usr/bin/armbian-install usr/sbin/armbian-install\n    rm -f usr/sbin/ddbr usr/bin/ddbr\n}\n\nmake_image() {\n    process_msg \"(2/7) Make new armbian image.\"\n    cd ${current_path}\n\n    # Set Armbian image file parameters\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && {\n        skip_mb=\"4\"\n        partition_table_type=\"msdos\"\n        bootfs_type=\"fat32\"\n    }\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && {\n        skip_mb=\"16\"\n        partition_table_type=\"gpt\"\n        bootfs_type=\"ext4\"\n    }\n    [[ \"${PLATFORM}\" == \"allwinner\" ]] && {\n        skip_mb=\"16\"\n        partition_table_type=\"msdos\"\n        bootfs_type=\"fat32\"\n    }\n\n    # Special procedures for flashing specific boards\n    # Reset default parameters\n    write_board_file=\"no\"\n    adjust_kernel_files=\"no\"\n    # Check the personalization settings of this board\n    board_release=\"${different_files}/${board}/rootfs/${board_release_file}\"\n    [[ -f \"${board_release}\" ]] && source ${board_release}\n\n    # echo -e \"${INFO} The [ ${board} ] Armbian image partition status: [ skip:${skip_mb} / boot:${boot_mb} / rootfs:${root_mb} ] MiB.\"\n\n    # Set Armian file name\n    armbian_filename=\"Armbian_${armbian_rebuild_version}_${PLATFORM}_${board}_${release_codename}_${kernel}_${os_type}_$(date +\"%Y.%m.%d\").img\"\n    build_image_file=\"${tmp_outpath}/${armbian_filename}\"\n    rm -f ${build_image_file}\n\n    IMG_SIZE=\"$((skip_mb + boot_mb + root_mb))\"\n    truncate -s ${IMG_SIZE}M ${build_image_file} >/dev/null 2>&1\n\n    parted -s ${build_image_file} mklabel ${partition_table_type} 2>/dev/null\n    parted -s ${build_image_file} mkpart primary ${bootfs_type} $((skip_mb))MiB $((skip_mb + boot_mb - 1))MiB 2>/dev/null\n    parted -s ${build_image_file} mkpart primary ${rootfs_type} $((skip_mb + boot_mb))MiB 100% 2>/dev/null\n\n    loop_new=\"$(losetup -P -f --show \"${build_image_file}\")\"\n    [[ -n \"${loop_new}\" ]] || error_msg \"losetup ${build_image_file} failed.\"\n\n    # Confirm BOOT_UUID\n    BOOT_UUID=\"$(cat /proc/sys/kernel/random/uuid)\"\n    [[ -z \"${BOOT_UUID}\" ]] && BOOT_UUID=\"$(uuidgen)\"\n    [[ -z \"${BOOT_UUID}\" ]] && error_msg \"The uuidgen is invalid, cannot continue.\"\n    # Confirm ROOTFS_UUID\n    ROOTFS_UUID=\"$(cat /proc/sys/kernel/random/uuid)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && ROOTFS_UUID=\"$(uuidgen)\"\n    [[ -z \"${ROOTFS_UUID}\" ]] && error_msg \"The uuidgen is invalid, cannot continue.\"\n\n    # Format bootfs partition\n    if [[ \"${bootfs_type}\" == \"fat32\" ]]; then\n        mkfs.vfat -F 32 -n \"BOOT\" ${loop_new}p1 >/dev/null 2>&1\n    else\n        mkfs.ext4 -F -q -U ${BOOT_UUID} -L \"BOOT\" -b 4k -m 0 ${loop_new}p1 >/dev/null 2>&1\n    fi\n\n    # Format rootfs partition\n    if [[ \"${rootfs_type}\" == \"btrfs\" ]]; then\n        mkfs.btrfs -f -U ${ROOTFS_UUID} -L \"ROOTFS\" -m single ${loop_new}p2 >/dev/null 2>&1\n    else\n        mkfs.ext4 -F -q -U ${ROOTFS_UUID} -L \"ROOTFS\" -b 4k -m 0 ${loop_new}p2 >/dev/null 2>&1\n    fi\n\n    # Write the specific bootloader for [ Amlogic ] boxes\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && {\n        bootloader_path=\"${uboot_path}/${PLATFORM}/bootloader\"\n        if [[ -n \"${MAINLINE_UBOOT}\" && -f \"${bootloader_path}/${MAINLINE_UBOOT}\" ]]; then\n            dd if=\"${bootloader_path}/${MAINLINE_UBOOT}\" of=\"${loop_new}\" conv=fsync bs=1 count=444 2>/dev/null\n            dd if=\"${bootloader_path}/${MAINLINE_UBOOT}\" of=\"${loop_new}\" conv=fsync bs=512 skip=1 seek=1 2>/dev/null\n            #echo -e \"${INFO} 01. For [ ${board} ] write bootloader: ${MAINLINE_UBOOT}\"\n        elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync bs=1 count=444 2>/dev/null\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync bs=512 skip=1 seek=1 2>/dev/null\n            #echo -e \"${INFO} 02. For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}\"\n        fi\n    }\n\n    # Write the specific bootloader for [ Rockchip ] boxes\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && {\n        bootloader_path=\"${uboot_path}/${PLATFORM}/${board}\"\n        if [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]] &&\n            [[ -n \"${MAINLINE_UBOOT}\" && -f \"${bootloader_path}/${MAINLINE_UBOOT}\" ]] &&\n            [[ -n \"${TRUST_IMG}\" && -f \"${bootloader_path}/${TRUST_IMG}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=64 2>/dev/null\n            dd if=\"${bootloader_path}/${MAINLINE_UBOOT}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=16384 2>/dev/null\n            dd if=\"${bootloader_path}/${TRUST_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=24576 2>/dev/null\n            #echo -e \"${INFO} 01. For [ ${board} ] write bootloader: ${TRUST_IMG}\"\n        elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]] &&\n            [[ -n \"${MAINLINE_UBOOT}\" && -f \"${bootloader_path}/${MAINLINE_UBOOT}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=64 2>/dev/null\n            dd if=\"${bootloader_path}/${MAINLINE_UBOOT}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=16384 2>/dev/null\n            #echo -e \"${INFO} 02. For [ ${board} ] write bootloader: ${MAINLINE_UBOOT}\"\n        elif [[ \"${BOOTLOADER_IMG}\" == \"u-boot-rockchip.bin\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 seek=64 2>/dev/null\n            #echo -e \"${INFO} 03. For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}\"\n        elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=512 skip=64 seek=64 2>/dev/null\n            #echo -e \"${INFO} 04. For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}\"\n        fi\n    }\n\n    # Write the specific bootloader for [ Allwinner ] boxes\n    [[ \"${PLATFORM}\" == \"allwinner\" ]] && {\n        bootloader_path=\"${uboot_path}/${PLATFORM}/${board}\"\n        if [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]] &&\n            [[ -n \"${MAINLINE_UBOOT}\" && -f \"${bootloader_path}/${MAINLINE_UBOOT}\" ]]; then\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=8k seek=1 2>/dev/null\n            dd if=\"${bootloader_path}/${MAINLINE_UBOOT}\" of=\"${loop_new}\" conv=fsync,notrunc bs=8k seek=5 2>/dev/null\n            #echo -e \"${INFO} 01. For [ ${board} ] write bootloader: ${MAINLINE_UBOOT}\"\n        elif [[ -n \"${BOOTLOADER_IMG}\" && -f \"${bootloader_path}/${BOOTLOADER_IMG}\" ]]; then\n            dd if=/dev/zero of=\"${loop_new}\" bs=1k count=1023 seek=1 status=noxfer 2>/dev/null\n            dd if=\"${bootloader_path}/${BOOTLOADER_IMG}\" of=\"${loop_new}\" conv=fsync,notrunc bs=8k seek=1 2>/dev/null\n            #echo -e \"${INFO} 02. For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}\"\n        fi\n    }\n\n    # Special procedures for flashing specific boards\n    [[ \"${write_board_file}\" == \"yes\" ]] && write_board_bootloader\n}\n\ncopy_files() {\n    process_msg \"(3/7) Copy the Armbian files.\"\n    cd ${current_path}\n\n    # Create a dual-partition general directory\n    tag_bootfs=\"${tmp_build}/bootfs\"\n    tag_rootfs=\"${tmp_build}/rootfs\"\n    mkdir -p ${tag_bootfs} ${tag_rootfs}\n    chown root:root ${tag_bootfs} ${tag_rootfs}\n\n    # Mount bootfs\n    if [[ \"${bootfs_type}\" == \"fat32\" ]]; then\n        mount_try vfat ${loop_new}p1 ${tag_bootfs}\n    else\n        mount_try ext4 ${loop_new}p1 ${tag_bootfs}\n    fi\n\n    # Mount rootfs\n    if [[ \"${rootfs_type}\" == \"btrfs\" ]]; then\n        mount_try btrfs ${loop_new}p2 ${tag_rootfs}\n    else\n        mount_try ext4 ${loop_new}p2 ${tag_rootfs}\n    fi\n\n    # Copy the full Armbian image\n    cp -af ${tmp_armbian}/. ${tag_rootfs}\n\n    # Copy the common files\n    [[ -d \"${common_files}\" ]] && cp -af --no-preserve=ownership ${common_files}/. ${tag_rootfs}\n\n    # Copy the platform files\n    platform_bootfs=\"${platform_files}/${PLATFORM}/bootfs\"\n    platform_rootfs=\"${platform_files}/${PLATFORM}/rootfs\"\n    [[ -d \"${platform_bootfs}\" ]] && cp -rf ${platform_bootfs}/. ${tag_bootfs}\n    [[ -d \"${platform_rootfs}\" ]] && cp -af --no-preserve=ownership ${platform_rootfs}/. ${tag_rootfs}\n\n    # Copy the different files\n    different_bootfs=\"${different_files}/${board}/bootfs\"\n    different_rootfs=\"${different_files}/${board}/rootfs\"\n    [[ -d \"${different_bootfs}\" ]] && cp -rf ${different_bootfs}/. ${tag_bootfs}\n    [[ -d \"${different_rootfs}\" ]] && cp -af --no-preserve=ownership ${different_rootfs}/. ${tag_rootfs}\n\n    # Copy the bootloader files\n    [[ -d \"${tag_rootfs}/usr/lib/u-boot\" ]] || mkdir -p ${tag_rootfs}/usr/lib/u-boot\n    rm -rf ${tag_rootfs}/usr/lib/u-boot/*\n    [[ -d \"${bootloader_path}\" ]] && cp -af --no-preserve=ownership ${bootloader_path}/. ${tag_rootfs}/usr/lib/u-boot\n\n    # Copy the overload files\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && cp -rf ${uboot_path}/${PLATFORM}/overload/. ${tag_bootfs}\n\n    # Remove the .git directories\n    rm -rf $(find ${tmp_build} -type d -name '.git')\n}\n\nreplace_kernel() {\n    process_msg \"(4/7) Replace kernel files.\"\n    cd ${current_path}\n\n    # Determine custom kernel filename\n    kernel_boot=\"$(ls ${kernel_path}/${conf_kernel_tags}/${kernel}/boot-${kernel}*.tar.gz 2>/dev/null | head -n 1)\"\n    # Extract kernel name: boot-6.12.69-ophub.tar.gz -> 6.12.69-ophub\n    kernel_name=\"${kernel_boot##*/}\" && kernel_name=\"${kernel_name:5:-7}\"\n    [[ -n \"${kernel_name}\" ]] || error_msg \"Missing kernel files for [ ${kernel} ]\"\n    # Extract kernel signature: 6.12.69-ophub -> ophub\n    kernel_signature=\"${kernel_name#*-}\"\n    [[ -n \"${kernel_signature}\" ]] || error_msg \"Missing kernel signature: [ ${kernel_name} ]\"\n    # Determine the kernel dtb, modules and header files based on the kernel name\n    kernel_dtb=\"${kernel_path}/${conf_kernel_tags}/${kernel}/dtb-${PLATFORM}-${kernel_name}.tar.gz\"\n    kernel_modules=\"${kernel_path}/${conf_kernel_tags}/${kernel}/modules-${kernel_name}.tar.gz\"\n    kernel_header=\"${kernel_path}/${conf_kernel_tags}/${kernel}/header-${kernel_name}.tar.gz\"\n    [[ -s \"${kernel_boot}\" && -s \"${kernel_dtb}\" && -s \"${kernel_modules}\" && -s \"${kernel_header}\" ]] || error_msg \"The 4 kernel missing.\"\n\n    # 01. For /boot five files\n    tar -mxzf ${kernel_boot} -C ${tag_bootfs}\n    [[ \"${PLATFORM}\" == \"allwinner\" ]] && (cd ${tag_bootfs} && cp -f uInitrd-${kernel_name} uInitrd && cp -f vmlinuz-${kernel_name} Image)\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && (cd ${tag_bootfs} && cp -f uInitrd-${kernel_name} uInitrd && cp -f vmlinuz-${kernel_name} zImage)\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && (cd ${tag_bootfs} && ln -sf uInitrd-${kernel_name} uInitrd && ln -sf vmlinuz-${kernel_name} Image)\n    [[ \"$(ls ${tag_bootfs}/*${kernel_name} -l 2>/dev/null | grep \"^-\" | wc -l)\" -ge \"2\" ]] || error_msg \"The /boot files is missing.\"\n    [[ \"${PLATFORM}\" == \"amlogic\" ]] && get_textoffset \"${tag_bootfs}/zImage\"\n\n    # 02. For /boot/dtb/${PLATFORM}/*\n    [[ -d \"${tag_bootfs}/dtb/${PLATFORM}\" ]] || mkdir -p ${tag_bootfs}/dtb/${PLATFORM}\n    tar -mxzf ${kernel_dtb} -C ${tag_bootfs}/dtb/${PLATFORM}\n    [[ \"${PLATFORM}\" == \"rockchip\" ]] && ln -sf dtb ${tag_bootfs}/dtb-${kernel_name}\n    [[ \"$(ls ${tag_bootfs}/dtb/${PLATFORM} -l 2>/dev/null | grep \"^-\" | wc -l)\" -ge \"2\" ]] || error_msg \"/boot/dtb/${PLATFORM} files is missing.\"\n\n    # 03. For /usr/src/linux-headers-${kernel_name}\n    header_path=\"linux-headers-${kernel_name}\"\n    rm -rf ${tag_rootfs}/usr/src/linux-headers-* 2>/dev/null && mkdir -p \"${tag_rootfs}/usr/src/${header_path}\"\n    tar -mxzf ${kernel_header} -C ${tag_rootfs}/usr/src/${header_path}\n    [[ -d \"${tag_rootfs}/usr/src/${header_path}/include\" ]] || error_msg \"/usr/src/${header_path}/include folder is missing.\"\n\n    # 04. For /usr/lib/modules/${kernel_name}\n    tar -mxzf ${kernel_modules} -C ${tag_rootfs}/usr/lib/modules\n    (cd ${tag_rootfs}/usr/lib/modules/${kernel_name}/ && rm -f build source 2>/dev/null && ln -sf /usr/src/${header_path} build)\n    [[ \"$(ls ${tag_rootfs}/usr/lib/modules/${kernel_name} -l 2>/dev/null | grep \"^d\" | wc -l)\" -eq \"1\" ]] || error_msg \"/usr/lib/modules kernel folder is missing.\"\n\n    # Special procedures for flashing specific boards\n    [[ \"${adjust_kernel_files}\" == \"yes\" ]] && adjust_kernel_files_cmd\n}\n\nrefactor_bootfs() {\n    process_msg \"(5/7) Refactor bootfs files.\"\n    cd ${tag_bootfs}\n\n    # Process Amlogic series boot partition files\n    [[ \"${PLATFORM}\" == \"amlogic\" && \"${need_overload}\" == \"yes\" ]] && {\n        if [[ -n \"${UBOOT_OVERLOAD}\" && -f \"${UBOOT_OVERLOAD}\" ]]; then\n            cp -f ${UBOOT_OVERLOAD} u-boot.ext\n            chmod +x u-boot.ext\n        elif [[ -z \"${UBOOT_OVERLOAD}\" || ! -f \"${UBOOT_OVERLOAD}\" ]]; then\n            error_msg \"${board} Board does not support using ${kernel} kernel, missing u-boot.\"\n        fi\n    }\n\n    # Set configuration file mount parameters\n    if [[ \"${rootfs_type}\" == \"btrfs\" ]]; then\n        # For uEnv.txt\n        uenv_rootdev=\"UUID=${ROOTFS_UUID} rootflags=compress=zstd:6 rw rootwait rootfstype=btrfs\"\n        # For armbianEnv.txt\n        armbianenv_rootdev=\"UUID=${ROOTFS_UUID}\"\n        armbianenv_rootflags=\"compress=zstd:6\"\n    else\n        # For uEnv.txt\n        uenv_rootdev=\"UUID=${ROOTFS_UUID} rootflags=data=writeback rw rootwait rootfstype=ext4\"\n        # For armbianEnv.txt\n        armbianenv_rootdev=\"UUID=${ROOTFS_UUID}\"\n        armbianenv_rootflags=\"rw,errors=remount-ro\"\n    fi\n\n    # Edit the uEnv.txt\n    uenv_conf_file=\"uEnv.txt\"\n    [[ -f \"${uenv_conf_file}\" ]] && {\n        sed -i \"s|LABEL=ROOTFS|${uenv_rootdev}|g\" ${uenv_conf_file}\n        sed -i \"s|meson.*.dtb|${FDTFILE}|g\" ${uenv_conf_file}\n        sed -i \"s|sun.*.dtb|${FDTFILE}|g\" ${uenv_conf_file}\n        sed -i \"s|rk.*.dtb|${FDTFILE}|g\" ${uenv_conf_file}\n    }\n\n    # Add an alternate file (/boot/extlinux/extlinux.conf)\n    boot_extlinux_file=\"extlinux/extlinux.conf.bak\"\n    rename_extlinux_file=\"extlinux/extlinux.conf\"\n    [[ -f \"${boot_extlinux_file}\" ]] && {\n        sed -i \"s|LABEL=ROOTFS|${uenv_rootdev}|g\" ${boot_extlinux_file}\n        sed -i \"s|meson.*.dtb|${FDTFILE}|g\" ${boot_extlinux_file}\n        sed -i \"s|sun.*.dtb|${FDTFILE}|g\" ${boot_extlinux_file}\n        sed -i \"s|rk.*.dtb|${FDTFILE}|g\" ${boot_extlinux_file}\n        # If needed, such as t95z(s905x), rename delete .bak\n        [[ \"${BOOT_CONF}\" == \"extlinux.conf\" ]] && mv -f ${boot_extlinux_file} ${rename_extlinux_file}\n    }\n\n    # Edit the armbianEnv.txt\n    armbianenv_conf_file=\"armbianEnv.txt\"\n    [[ -f \"${armbianenv_conf_file}\" ]] && {\n        sed -i \"s|\\(fdtfile=.*\\/\\)[^/]*$|\\1${FDTFILE}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootfstype=.*|rootfstype=${rootfs_type}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootdev=.*|rootdev=${armbianenv_rootdev}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^rootflags=.*|rootflags=${armbianenv_rootflags}|g\" ${armbianenv_conf_file}\n        sed -i \"s|^overlay_prefix=.*|overlay_prefix=${FAMILY}|g\" ${armbianenv_conf_file}\n    }\n\n    # Check device configuration files\n    [[ -f \"${uenv_conf_file}\" || -f \"${rename_extlinux_file}\" || -f \"${armbianenv_conf_file}\" ]] || error_msg \"Missing [ /boot/*Env.txt ]\"\n}\n\nrefactor_rootfs() {\n    process_msg \"(6/7) Refactor rootfs files.\"\n    cd ${tag_rootfs}\n\n    # Remove the scripts contained in [ armbian-bsp-cli-odroidn2 ] that will cause the system to fail to start\n    # [ dpkg -c armbian-bsp-cli-odroidn2_23.02.2_arm64.deb ] : https://paste.armbian.com/aloxuvokol\n    # Move usr/share/armbian to armbian.bak. [ dpkg -S boot.cmd ] : [ armbian-bsp-cli-odroidn2: /usr/share/armbian/boot.cmd ]\n    [[ -d \"usr/share/armbian\" ]] && mv -f usr/share/armbian usr/share/armbian.bak\n    # Move usr/lib/nand-sata-install to bak-nand-sata-install [ Useless bootloader and u-boot ]\n    [[ -d \"usr/lib/nand-sata-install\" ]] && mv -f usr/lib/nand-sata-install usr/lib/bak-nand-sata-install\n    # Remove invalid install file\n    [[ \"${PLATFORM}\" == \"rockchip\" && -f \"usr/sbin/armbian-install\" ]] && rm -f usr/sbin/armbian-install\n\n    # Disable update_initramfs\n    initramfs_conf=\"etc/initramfs-tools/update-initramfs.conf\"\n    [[ -f \"${initramfs_conf}\" ]] && {\n        [[ -n \"$(cat ${initramfs_conf} | grep -oE \"^update_initramfs=\")\" ]] || error_msg \"Missing [ update_initramfs ]\"\n        sed -i \"s|^update_initramfs=.*|update_initramfs=no|g\" ${initramfs_conf}\n    }\n\n    # Delete related files\n    rm -f etc/apt/sources.list.save\n    rm -f var/lib/dpkg/info/linux-image*\n    rm -rf usr/share/doc/linux-image-*\n    rm -rf usr/lib/linux-image-*\n    # Remove motd-news related services\n    rm -f usr/lib/systemd/system/motd-news.timer\n    rm -f usr/lib/systemd/system/motd-news.service\n    rm -f var/lib/systemd/deb-systemd-helper-enabled/timers.target.wants/motd-news.timer\n    rm -f var/lib/systemd/deb-systemd-helper-enabled/motd-news.timer.dsh-also\n    rm -f etc/systemd/system/timers.target.wants/motd-news.timer\n    rm -f etc/update-motd.d/50-motd-news\n\n    # Rebuild symbolic link files (ln -sf ${target} ${symbolic_link_file})\n    ln -sf usr/bin bin\n    ln -sf usr/lib lib\n    ln -sf usr/sbin sbin\n    ln -sf /run/lock var/lock\n    ln -sf /run var/run\n    ln -sf /usr/share/zoneinfo/Asia/Shanghai etc/localtime\n    ln -sf armbian-ddbr usr/sbin/ddbr\n\n    # Fix common releases permissions\n    [[ -d \"var/tmp\" ]] && chmod 777 var/tmp\n    [[ -d \"var/cache/man\" ]] && chown man:root var/cache/man -R\n    [[ -d \"var/cache/man\" ]] && chmod g+s var/cache/man -R\n    [[ -f \"etc/sudoers\" ]] && chown root:root etc/sudoers\n    [[ -f \"etc/sudoers\" ]] && chmod 440 etc/sudoers\n    [[ -f \"usr/bin/sudo\" ]] && chown root:root usr/bin/sudo\n    [[ -f \"usr/bin/sudo\" ]] && chmod 4755 usr/bin/sudo\n    # Fix focal permissions\n    [[ -f \"usr/lib/sudo/sudoers.so\" ]] && chown 0 usr/lib/sudo/sudoers.so\n    [[ -f \"usr/lib/sudo/sudoers.so\" ]] && chmod 644 usr/lib/sudo/sudoers.so\n    [[ -f \"usr/lib/policykit-1/polkit-agent-helper-1\" ]] && chmod 4755 usr/lib/policykit-1/polkit-agent-helper-1\n    # Fix jammy permissions\n    [[ -f \"usr/libexec/sudo/sudoers.so\" ]] && chown 0 usr/libexec/sudo/sudoers.so\n    [[ -f \"usr/libexec/sudo/sudoers.so\" ]] && chmod 644 usr/libexec/sudo/sudoers.so\n    [[ -f \"usr/libexec/polkit-agent-helper-1\" ]] && chmod 4755 usr/libexec/polkit-agent-helper-1\n\n    # Edit the etc/fstab\n    [[ -f \"etc/fstab\" ]] || error_msg \"The etc/fstab File does not exist.\"\n    # Set different types of mount parameters\n    if [[ \"${rootfs_type}\" == \"btrfs\" ]]; then\n        fstab_string=\"defaults,noatime,compress=zstd:6\"\n    else\n        fstab_string=\"defaults,noatime,nodiratime,commit=600,errors=remount-ro\"\n    fi\n    # Update mount settings\n    sed -i \"s|^LABEL=ROOTFS.*|UUID=${ROOTFS_UUID}  /      ${rootfs_type}  ${fstab_string}  0 1|g\" etc/fstab\n    [[ \"${bootfs_type}\" == \"ext4\" ]] && {\n        sed -i \"s|^LABEL=BOOT.*|UUID=${BOOT_UUID}  /boot  ext4  defaults  0 2|g\" etc/fstab\n    }\n\n    # Update release information\n    [[ -f \"${armbian_release_file}\" ]] && {\n        # Shorten release version number\n        sed -i \"s|^VERSION=.*|VERSION=\\\"${armbian_rebuild_version}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^REVISION=.*|REVISION=\\\"${armbian_rebuild_version}\\\"|g\" ${armbian_release_file}\n        # Custom banner name\n        sed -i \"s|^BOARD=.*|BOARD=\\\"${board}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^BOARD_NAME=.*|BOARD_NAME=\\\"${board}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^BOARDFAMILY=.*|BOARDFAMILY=\\\"${FAMILY}\\\"|g\" ${armbian_release_file}\n        # Use custom type to remove [ No end-user support ] prompt in [ /etc/update-motd.d/10-armbian-header ]\n        sed -i \"s|^BOOT_SOC=.*|BOOT_SOC=\\\"${SOC}\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^IMAGE_TYPE=.*|IMAGE_TYPE=rebuild|g\" ${armbian_release_file}\n        sed -i \"s|^BOARD_TYPE=.*|BOARD_TYPE=diy|g\" ${armbian_release_file}\n        sed -i \"s|^VENDOR=.*|VENDOR=\\\"Armbian OS\\\"|g\" ${armbian_release_file}\n        # Disable the update of the boot script\n        sed -i \"s|^FORCE_BOOTSCRIPT_UPDATE=.*|FORCE_BOOTSCRIPT_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n        sed -i \"s|^BOOTSCRIPT_FORCE_UPDATE=.*|FORCE_BOOTSCRIPT_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n        # Disable the update of the u-boot\n        sed -i \"s|^FORCE_UBOOT_UPDATE=.*|FORCE_UBOOT_UPDATE=\\\"no\\\"|g\" ${armbian_release_file}\n    }\n\n    # Add custom startup script\n    custom_startup_script=\"etc/custom_service/start_service.sh\"\n    [[ -x \"${custom_startup_script}\" && -f \"etc/rc.local\" ]] && {\n        sed -i '/^exit 0/i\\bash /etc/custom_service/start_service.sh &' etc/rc.local\n    }\n\n    # Enable ssh service\n    ssh_config=\"etc/ssh/sshd_config\"\n    [[ -f \"${ssh_config}\" ]] && {\n        sed -i \"s|^#*Port .*|Port 22|g\" ${ssh_config}\n        sed -i \"s|^#*PermitRootLogin .*|PermitRootLogin yes|g\" ${ssh_config}\n        sed -i \"s|^#*PasswordAuthentication .*|PasswordAuthentication yes|g\" ${ssh_config}\n    }\n\n    # Adjust the default timeout for service start/stop\n    system_conf=\"etc/systemd/system.conf\"\n    [[ -f \"${system_conf}\" ]] && {\n        sed -i \"s|^#*DefaultTimeoutStartSec.*|DefaultTimeoutStartSec=10s|g\" ${system_conf}\n        sed -i \"s|^#*DefaultTimeoutStopSec.*|DefaultTimeoutStopSec=10s|g\" ${system_conf}\n    }\n\n    # Add custom sysctl configuration file\n    [[ -d \"etc/sysctl.d\" && -f \"etc/sysctl.conf\" ]] && {\n        ln -sf ../sysctl.conf etc/sysctl.d/99-sysctl.conf\n    }\n\n    # Disable tips of the day for [ /etc/update-motd.d/35-armbian-tips ]\n    motd_tips=\"etc/default/armbian-motd\"\n    [[ -f \"${motd_tips}\" ]] && sed -i 's|^MOTD_DISABLE=.*|MOTD_DISABLE=\"tips\"|g' ${motd_tips}\n    quotes_cron=\"etc/cron.daily/armbian-quotes\"\n    [[ -f \"${quotes_cron}\" ]] && sed -i \"s|^curl |#curl |g\" ${quotes_cron}\n\n    # Add custom disabled alias extension load modules\n    custom_blacklist=\"etc/modprobe.d/blacklist.conf\"\n    [[ -f \"${custom_blacklist}\" ]] || echo -e \"# This file lists the disabled alias extension load modules.\" >${custom_blacklist}\n    [[ \"${FDTFILE}\" == \"meson-sm1-skyworth-lb2004-a4091.dtb\" ]] && {\n        echo -e \"\\n# For Tencent Aurora 3Pro (s905x3-b) box.\" >>${custom_blacklist}\n        echo -e \"blacklist btmtksdio\" >>${custom_blacklist}\n    }\n\n    # Make the .bashrc take effect, Default shell settings file: /etc/default/useradd\n    echo '[[ \"${SHELL}\" == *bash && -f \"${HOME}/.bashrc\" ]] && . ${HOME}/.bashrc' >>etc/profile\n\n    # Renaming/disabling related files\n    mv -f etc/udev/rules.d/hdmi.rules etc/udev/rules.d/hdmi.rules.bak 2>/dev/null\n\n    # Disable motd scripts\n    [[ -d \"etc/update-motd.d\" ]] && {\n        chmod -x etc/update-motd.d/*\n        chmod +x etc/update-motd.d/{10-*,20-*,30-*}\n    }\n\n    # Disable IP information display\n    ip_info_file=\"etc/update-motd.d/20-ip-info\"\n    [[ -f \"${ip_info_file}\" ]] && {\n        sed -i '/^get_wan.*_address/s/{.*/{ true; }/' ${ip_info_file}\n        sed -i '/if.*ipv6s.*||.*wan6/,/fi/s/^/#/' ${ip_info_file}\n    }\n\n    # Explicitly disable resizing for Amlogic device [ /usr/lib/armbian/armbian-resize-filesystem ], use armbian-tf settings\n    echo \"yes\" >root/.no_rootfs_resize\n\n    # Reduce network latency [ A start job is running for raise network interfaces (5 mins 1 sec) ]\n    network_service=\"usr/lib/systemd/system/networking.service\"\n    [[ -f \"${network_service}\" ]] && sed -i \"s|^#*TimeoutStartSec=.*|TimeoutStartSec=10sec|g\" ${network_service}\n\n    # Add tasks that need to be executed on initial startup\n    armbian_firstrun=\"usr/lib/armbian/armbian-firstrun\"\n    [[ -f \"${armbian_firstrun}\" ]] && sed -i '/\\/etc\\/armbian-release/i\\[[ -x \"/usr/sbin/armbian-fix\" ]] && . /usr/sbin/armbian-fix' ${armbian_firstrun}\n\n    # Improve systemd startup speed, avoid timeout waiting\n    armbian_firstlogin=\"usr/lib/armbian/armbian-firstlogin\"\n    [[ -f \"${armbian_firstlogin}\" ]] && sed -i \"s#.*systemctl is-system-running.*#\ttimeout 120s systemctl is-system-running --wait > /dev/null 2>\\&1 || true#g\" \"${armbian_firstlogin}\"\n\n    # Fix abnormal CPU temperature\n    temp_file=\"usr/lib/armbian/armbian-allwinner-battery\"\n    [[ -f \"${temp_file}\" ]] && {\n        insert_line=\"$(cat ${temp_file} | grep -n 'CPU_TEMP_OFFSET' | awk -F':' '{print $1}')\"\n        [[ -n \"${insert_line}\" ]] && {\n            sed -i \"${insert_line}i\\        [[ \\\"\\$(echo \\${board_temp} | awk -F'.' '{print \\$1}' | wc -c)\\\" -gt \\\"3\\\" ]] && board_temp=\\${board_temp:0:2}\" ${temp_file}\n        }\n    }\n\n    # Get random macaddr\n    mac_hexchars=\"0123456789ABCDEF\"\n    mac_end=$(for i in {1..6}; do echo -n ${mac_hexchars:$((${RANDOM} % 16)):1}; done | sed -e 's/\\(..\\)/:\\1/g')\n    random_macaddr=\"9E:61${mac_end}\"\n\n    # Optimize wifi/bluetooth module\n    [[ -d \"usr/lib/firmware/brcm\" ]] && (\n        cd usr/lib/firmware/brcm/ && rm -f ../*.hcd\n\n        # gtking/gtking pro is bcm4356 wifi/bluetooth, wifi5 module AP6356S\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:00/\" \"brcmfmac4356-sdio.txt\" >\"brcmfmac4356-sdio.azw,gtking.txt\"\n        # gtking/gtking pro is bcm4356 wifi/bluetooth, wifi6 module AP6275S\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:01/\" \"brcmfmac4375-sdio.txt\" >\"brcmfmac4375-sdio.azw,gtking.txt\"\n        # MXQ Pro+ is AP6330(bcm4330) wifi/bluetooth\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:02/\" \"brcmfmac4330-sdio.txt\" >\"brcmfmac4330-sdio.crocon,mxq-pro-plus.txt\"\n        # HK1 Box & H96 Max X3 is bcm54339 wifi/bluetooth\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:03/\" \"brcmfmac4339-sdio.ZP.txt\" >\"brcmfmac4339-sdio.amlogic,sm1.txt\"\n        # new ugoos x3 is brm43456\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:04/\" \"brcmfmac43456-sdio.txt\" >\"brcmfmac43456-sdio.amlogic,sm1.txt\"\n        # x96max plus v5.1 (ip1001m phy) adopts am7256 (brcm4354)\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:05/\" \"brcmfmac4354-sdio.txt\" >\"brcmfmac4354-sdio.amlogic,sm1.txt\"\n        # panther x2 AP6212A\n        sed -e \"s/macaddr=.*/macaddr=${random_macaddr}:06/\" \"brcmfmac43430-sdio.txt\" >\"brcmfmac43430-sdio.panther,x2.txt\"\n        # ct2000 s922x is brm4359\n        sed -i \"s/macaddr=.*/macaddr=${random_macaddr}:07/\" \"brcmfmac4359-sdio.ali,ct2000.txt\"\n    )\n\n    # Add custom Armbian information\n    echo \"PLATFORM='${PLATFORM}'\" >>${ophub_release_file}\n    echo \"VERSION_CODEID='${release_codeid}'\" >>${ophub_release_file}\n    echo \"VERSION_CODENAME='${release_codename}'\" >>${ophub_release_file}\n    echo \"MODEL_ID='${MODEL_ID}'\" >>${ophub_release_file}\n    echo \"MODEL_NAME='${MODEL_NAME}'\" >>${ophub_release_file}\n    echo \"SOC='${SOC}'\" >>${ophub_release_file}\n    echo \"FDTFILE='${FDTFILE}'\" >>${ophub_release_file}\n    echo \"FAMILY='${FAMILY}'\" >>${ophub_release_file}\n    echo \"BOARD='${board}'\" >>${ophub_release_file}\n    echo \"KERNEL_REPO='${kernel_repo}'\" >>${ophub_release_file}\n    echo \"KERNEL_TAGS='${conf_kernel_tags}'\" >>${ophub_release_file}\n    echo \"KERNEL_VERSION='${kernel}'\" >>${ophub_release_file}\n    echo \"KERNEL_SIGNATURE='${kernel_signature}'\" >>${ophub_release_file}\n    echo \"DOWNLOAD_TYPE='deb'\" >>${ophub_release_file}\n    echo \"KERNEL_BACKUP='yes'\" >>${ophub_release_file}\n    echo \"BOOT_CONF='${BOOT_CONF}'\" >>${ophub_release_file}\n    echo \"ROOTFS_TYPE='${rootfs_type}'\" >>${ophub_release_file}\n    echo \"DISK_TYPE='usb'\" >>${ophub_release_file}\n    echo \"AMPART_STATUS='no'\" >>${ophub_release_file}\n    echo \"MLUBOOT_STATUS='no'\" >>${ophub_release_file}\n    echo \"MAINLINE_UBOOT='${RECORD_MAINLINE_UBOOT}'\" >>${ophub_release_file}\n    echo \"BOOTLOADER_IMG='${RECORD_BOOTLOADER_IMG}'\" >>${ophub_release_file}\n    if [[ \"${PLATFORM}\" == \"rockchip\" ]]; then\n        echo \"TRUST_IMG='${RECORD_TRUST_IMG}'\" >>${ophub_release_file}\n    elif [[ \"${PLATFORM}\" == \"amlogic\" ]]; then\n        echo \"UBOOT_OVERLOAD='${UBOOT_OVERLOAD}'\" >>${ophub_release_file}\n    fi\n    echo \"BUILD_REPOSITORY='github.com/armbian/build'\" >>${ophub_release_file}\n    echo \"REBUILD_REPOSITORY='github.com/ophub/amlogic-s9xxx-armbian'\" >>${ophub_release_file}\n    echo \"CONTRIBUTORS='${CONTRIBUTORS}'\" >>${ophub_release_file}\n    echo \"BUILDER_NAME='${builder_name}'\" >>${ophub_release_file}\n    echo \"PACKAGED_DATE='$(date +%Y-%m-%d)'\" >>${ophub_release_file}\n\n    sync && sleep 3\n}\n\nclean_tmp() {\n    process_msg \"(7/7) Clear temporary files.\"\n    cd ${current_path}\n\n    umount -f ${tmp_armbian} 2>/dev/null\n    losetup -d ${loop_old} 2>/dev/null\n\n    fstrim ${tag_bootfs} 2>/dev/null\n    fstrim ${tag_rootfs} 2>/dev/null\n    umount -f ${tag_bootfs} 2>/dev/null\n    umount -f ${tag_rootfs} 2>/dev/null\n    losetup -d ${loop_new} 2>/dev/null\n\n    cd ${tmp_outpath}\n    # Compress Armbian image file\n    pigz -qf ${armbian_filename} || gzip -qf ${armbian_filename}\n    # Move Armbian files to the output directory\n    mv -f ${armbian_filename}* -t ${armbian_outputpath}\n\n    cd ${current_path}\n    rm -rf ${tmp_dir} && sync\n}\n\nloop_rebuild() {\n    cd ${current_path}\n    echo -e \"${STEPS} Building Armbian images...\"\n\n    j=\"1\"\n    for b in \"${build_armbian[@]}\"; do\n        {\n            # Set specific configuration for building Armbian system\n            board=\"${b}\"\n            confirm_version\n\n            i=\"1\"\n            for k in \"${build_kernel[@]}\"; do\n                {\n                    # Set the kernel version\n                    kernel=\"${k}\"\n\n                    # Check disk space size\n                    echo -ne \"(${j}.${i}) Building Armbian [\\033[92m ${board} - ${conf_kernel_tags}/${kernel} \\033[0m]. \"\n                    now_remaining_space=\"$(df -Tk ${armbian_outputpath} | tail -n1 | awk '{print $5}' | echo $(($(xargs) / 1024 / 1024)))\"\n                    if [[ \"${now_remaining_space}\" -le \"6\" ]]; then\n                        echo -e \"${WARNING} Remaining space is less than 6 GiB. Skipping this build.\"\n                        break\n                    else\n                        echo \"Remaining space: ${now_remaining_space} GiB.\"\n                    fi\n\n                    # Execute the following functions in sequence\n                    extract_armbian\n                    make_image\n                    copy_files\n                    replace_kernel\n                    refactor_bootfs\n                    refactor_rootfs\n                    clean_tmp\n\n                    echo -e \"(${j}.${i}) Armbian built successfully. \\n\"\n                    ((i++))\n                }\n            done\n\n            ((j++))\n        }\n    done\n}\n\n# Show welcome message\necho -e \"${STEPS} Welcome to the Armbian Rebuild Tool!\"\necho -e \"${INFO} Server running on Ubuntu: [ Release: ${host_release} / Host: ${arch_info} ] \\n\"\n# Check script permission\n[[ \"$(id -u)\" == 0 ]] || error_msg \"Please run this script as root: [ sudo ./${0} ]\"\n\n# Initialize variables\ninit_var \"${@}\"\ncheck_data\n# Find rebuild files\nfind_armbian\n# Download the dependency files\ndownload_depends\n# Query the latest kernel version\n[[ \"${auto_kernel}\" =~ ^(true|yes)$ ]] && query_kernel\n# Download the kernel files\ndownload_kernel\n\n# Show rebuild settings\necho -e \"${INFO} [ ${#build_armbian[@]} ] lists of Armbian board: [ $(echo ${build_armbian[@]} | xargs) ]\"\necho -e \"${INFO} ROOTFS type: [ ${rootfs_type} ]\"\necho -e \"${INFO} Kernel Repo: [ ${kernel_repo} ], Kernel Usage: [ ${kernel_usage} ] \\n\"\n# Show server start information\necho -e \"${INFO} Server space usage before starting to compile: \\n$(df -hT ${armbian_outputpath}) \\n\"\n\n# Loop to rebuild armbian\nloop_rebuild\n\n# Show server end information\necho -e \"${STEPS} Server space usage after compilation: \\n$(df -hT ${armbian_outputpath}) \\n\"\necho -e \"${SUCCESS} All processes completed successfully.\"\n"
  },
  {
    "path": "recompile",
    "content": "#!/bin/bash\n#==============================================================================================\n#\n# This file is licensed under the terms of the GNU General Public\n# License version 2. This program is licensed \"as is\" without any\n# warranty of any kind, whether express or implied.\n#\n# This file is a part of the Rebuild Armbian\n# https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Description: Compile the kernel using an Armbian Docker container\n# Copyright (C) 2021~ https://www.kernel.org\n# Copyright (C) 2021~ https://github.com/unifreq\n# Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian\n#\n# Command: sudo ./recompile\n# Command optional parameters please refer to the source code repository\n#\n#======================================= Functions list =======================================\n#\n# error_msg                : Output error message and exit\n#\n# init_var                 : Initialize all variables\n# install_docker_engine    : Install Docker engine if not present\n# launch_docker_container  : Launch the Armbian Docker container\n# configure_and_compile    : Configure the Docker environment and compile the kernel\n#\n#=============================== Set make environment variables ===============================\n#\n# Set config and patch paths\ncurrent_path=\"${PWD}\"\nconfig_path=\"${current_path}/compile-kernel/tools/config\"\nkernel_patch_path=\"${current_path}/compile-kernel/tools/patch\"\n\n# Set Docker host mount directory and image\ndocker_hostpath=\"${PWD}\"\ndocker_image=\"ophub/armbian-trixie:arm64\"\ndocker_container=\"armbian-ophub\"\ndocker_script=\"/usr/sbin/armbian-kernel\"\n\n# Get host architecture and release info\narch_info=\"$(uname -m)\"\nhost_id=\"$(cat /etc/os-release 2>/dev/null | grep '^ID=.*' | cut -d'=' -f2)\"\nhost_release=\"$(cat /etc/os-release 2>/dev/null | grep '^VERSION_CODENAME=.*' | cut -d'=' -f2)\"\n\n# Set font color\nSTEPS=\"[\\033[95m STEPS \\033[0m]\"\nINFO=\"[\\033[94m INFO \\033[0m]\"\nSUCCESS=\"[\\033[92m SUCCESS \\033[0m]\"\nWARNING=\"[\\033[93m WARNING \\033[0m]\"\nERROR=\"[\\033[91m ERROR \\033[0m]\"\n#\n#==============================================================================================\n\nerror_msg() {\n    echo -e \"${ERROR} ${1}\"\n    exit 1\n}\n\ninit_var() {\n    echo -e \"${STEPS} Initializing variables...\"\n\n    # If it is followed by [ : ], it means that the option requires a parameter value\n    local options=\"k:a:n:m:p:r:t:c:d:s:z:l:f:h:i:\"\n    parsed_args=$(getopt -o \"${options}\" -- \"${@}\")\n    [[ ${?} -ne 0 ]] && error_msg \"Parameter parsing failed.\"\n    eval set -- \"${parsed_args}\"\n\n    while true; do\n        case \"${1}\" in\n        -h | --DockerHostpath)\n            docker_hostpath=\"${2}\"\n            shift 2\n            ;;\n        -i | --DockerImage)\n            docker_image=\"${2}\"\n            shift 2\n            ;;\n        # Ignore parameters used by the Armbian Docker container\n        -k | -a | -n | -m | -p | -r | -t | -c | -d | -s | -z | -l | -f)\n            shift 2\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            [[ -n \"${1}\" ]] && error_msg \"Invalid option [ ${1} ]!\"\n            break\n            ;;\n        esac\n    done\n}\n\ninstall_docker_engine() {\n    echo -e \"${STEPS} Installing Docker engine...\"\n\n    curl -fsSL https://get.docker.com | sh\n    usermod -aG docker ${USER}\n    newgrp docker\n}\n\nlaunch_docker_container() {\n    echo -e \"${STEPS} Launching the Armbian Docker container...\"\n\n    # Check if the Armbian Docker container is running\n    if [[ \"$(docker ps -q -f name=${docker_container})\" ]]; then\n        echo -e \"${INFO} The docker container [ ${docker_container} ] is running.\"\n    else\n        # Remove the stopped Armbian Docker container\n        [[ \"$(docker ps -aq -f status=exited -f name=${docker_container})\" ]] && {\n            echo -e \"${INFO} Removing the stopped Docker container [ ${docker_container} ]...\"\n            docker rm -f ${docker_container} >/dev/null 2>&1\n        }\n\n        # Enable QEMU emulation for multi-architecture builds\n        echo -e \"${INFO} Enable QEMU emulation for multi-architecture builds...\"\n        docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 2>/dev/null || true\n\n        # Set Docker mount paths\n        echo -e \"${INFO} Setting up Docker host mount paths...\"\n        compile_path=\"${docker_hostpath}/compile-kernel\"\n        ccache_path=\"${docker_hostpath}/ccache\"\n        [[ -d \"${compile_path}\" ]] || mkdir -p ${compile_path}\n        [[ -d \"${ccache_path}\" ]] || mkdir -p ${ccache_path}\n\n        # Pull the Armbian Docker image\n        echo -e \"${INFO} Pulling the Docker image: [ ${docker_image} ]...\"\n        docker run -d --privileged \\\n            --name ${docker_container} \\\n            -v ${compile_path}:/opt/kernel/compile-kernel \\\n            -v ${ccache_path}:/root/.ccache \\\n            -v /etc/localtime:/etc/localtime:ro \\\n            -v /etc/timezone:/etc/timezone:ro \\\n            -e CCACHE_DIR=/root/.ccache \\\n            --restart=always \\\n            ${docker_image}\n    fi\n}\n\nconfigure_and_compile() {\n    echo -e \"${STEPS} Configuring the Docker environment and compiling the kernel...\"\n\n    echo -e \"${INFO} Synchronizing server time.\"\n    ntpdate ntp.ubuntu.com 0.pool.ntp.org || true\n\n    echo -e \"${INFO} Restarting Docker container...\"\n    docker restart ${docker_container} >/dev/null && sleep 5\n\n    echo -e \"${INFO} Syncing scripts in Docker container...\"\n    docker exec -i \"${docker_container}\" bash \"${docker_script}\" -u\n\n    echo -e \"${INFO} Injecting custom configs into Docker container...\"\n    [[ -d \"${config_path}\" ]] && docker cp ${config_path}/. \"${docker_container}\":/opt/kernel/compile-kernel/tools/config/\n    docker exec -i \"${docker_container}\" ls -Alh /opt/kernel/compile-kernel/tools/config/ || true\n\n    echo -e \"${INFO} Injecting custom patches into Docker container...\"\n    [[ -d \"${kernel_patch_path}\" ]] && docker cp ${kernel_patch_path}/. \"${docker_container}\":/opt/kernel/compile-kernel/tools/patch/\n    docker exec -i \"${docker_container}\" ls -Alh /opt/kernel/compile-kernel/tools/patch/ || true\n\n    echo -e \"${INFO} Compiling the kernel inside the Docker container...\"\n    docker exec -i \"${docker_container}\" bash \"${docker_script}\" \"${@}\"\n}\n\n# Show welcome message\necho -e \"${STEPS} Welcome to the Kernel Compilation Tool!\"\necho -e \"${INFO} The host environment [ ${host_id}: ${host_release} / ${arch_info} ]\"\n# Check script permission\n[[ \"$(id -u)\" == \"0\" ]] || error_msg \"Please run this script as root: [ sudo ./${0} ]\"\n\n# Initialize variables\ninit_var \"${@}\"\n# Install Docker engine if it is not installed\n[[ -x \"$(command -v docker)\" ]] || install_docker_engine\n# Launch the Armbian Docker container\nlaunch_docker_container\n# Configure the Docker environment and compile the kernel\nconfigure_and_compile \"${@}\"\n\n# Show server end information\necho -e \"${STEPS} Host space usage after compilation: \\n$(df -hT ${docker_hostpath}) \\n\"\necho -e \"${SUCCESS} All processes completed successfully.\"\n"
  }
]