Compare commits

...

4 Commits

Author SHA1 Message Date
hzy
6faaa1504f Add Readme 2024-07-24 23:31:43 +08:00
hzy
0625e8ac88 Use GHA to build 2024-07-24 23:31:43 +08:00
hzy
5c222bf0b3 Drop origin CI and README 2024-07-24 23:31:43 +08:00
hzy
d8011a7e99 ipq50xx: Add CMCC RAX3000Q support 2024-07-24 23:31:43 +08:00
28 changed files with 923 additions and 707 deletions

1
.github/FUNDING.yml vendored
View File

@ -1 +0,0 @@
custom: [ 'https://openwrt.org/donate' ]

View File

@ -1,84 +0,0 @@
name: Bug report
description: Create a bug report to help us improve
labels:
- bug
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of the bug.
validations:
required: true
- type: input
id: version
attributes:
label: OpenWrt version
description: |
The OpenWrt release or commit hash where this bug occurs (use command below).
```. /etc/openwrt_release && echo $DISTRIB_REVISION```
validations:
required: true
- type: input
id: target
attributes:
label: OpenWrt target/subtarget
description: |
The OpenWrt target and subtarget where this bug is observed (use command below).
```. /etc/openwrt_release && echo $DISTRIB_TARGET```
validations:
required: true
- type: input
id: device
attributes:
label: Device
description: |
The device exhibiting this bug (if unsure, use command below).
```cat /tmp/sysinfo/model```
validations:
required: true
- type: dropdown
id: image_kind
attributes:
label: Image kind
options:
- Official downloaded image
- Self-built image
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: Steps to reproduce the reported behaviour.
- type: textarea
id: behaviour
attributes:
label: Actual behaviour
description: A clear and concise description of what actually happens.
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: A clear and concise description of what you expected to happen.
- type: textarea
id: additional
attributes:
label: Additional info
description: Add any additional info you think might be helfpul.
- type: textarea
id: diffconfig
attributes:
label: Diffconfig
description: |
In case of a self-built image, please attach diffconfig.
```./scripts/diffconfig.sh```
render: text
- type: checkboxes
id: terms
attributes:
label: Terms
description: By submitting this issue, you agree to the terms below.
options:
- label: I am reporting an issue for OpenWrt, not an unsupported fork.
required: true

View File

@ -1,12 +0,0 @@
---
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://forum.openwrt.org/c/feature-requests
about: The OpenWrt project relies on volunteers. While we appreciate feature requests, we might lack the manpower to handle them. Ideally, you get familiar with the codebase and attempt to contribute the feature yourself. We recommend to post in the forum, as this is the most likely place to receive feedback on feature requests.
- name: OpenWrt community
url: https://openwrt.org/contact
about: Consider reaching out to our community to get help. OpenWrt is a complex software project with many pitfalls; there is a good chance someone can help you solve your issue in no time.
- name: OpenWrt documentation
url: https://openwrt.org/docs/start
about: The OpenWrt documentation contains a lot of valuable information.

138
.github/labeler.yml vendored
View File

@ -1,138 +0,0 @@
# target/*
"target/airoha":
- "target/linux/airoha/**"
"target/apm821xx":
- "target/linux/apm821xx/**"
"target/archs38":
- "target/linux/archs38/**"
"target/armsr":
- "target/linux/armsr/**"
"target/at91":
- "target/linux/at91/**"
- "package/boot/at91bootstrap/**"
- "package/boot/uboot-at91/**"
"target/ath25":
- "target/linux/ath25/**"
"target/ath79":
- "target/linux/ath79/**"
"target/bcm27xx":
- "target/linux/bcm27xx/**"
- "package/kernel/bcm27xx-gpu-fw/**"
"target/bcm47xx":
- "target/linux/bcm47xx/**"
"target/bcm4908":
- "target/linux/bcm4908/**"
- "package/boot/uboot-bcm4908/**"
"target/bcm53xx":
- "target/linux/bcm53xx/**"
"target/bcm63xx":
- "target/linux/bcm63xx/**"
- "package/kernel/bcm63xx-cfe/**"
- "package/boot/arm-trusted-firmware-bcm63xx/**"
"target/bmips":
- "target/linux/bmips/**"
"target/gemini":
- "target/linux/gemini/**"
"target/imx":
- "target/linux/imx/**"
- "package/boot/imx-bootlets/**"
- "package/boot/uboot-imx/**"
"target/ipq40xx":
- "target/linux/ipq40xx/**"
"target/ipq806x":
- "target/linux/ipq806x/**"
"target/ipq807x":
- "target/linux/ipq807x/**"
"target/kirkwood":
- "target/linux/kirkwood/**"
- "package/boot/uboot-kirkwood/**"
"target/lantiq":
- "target/linux/lantiq/**"
- "package/kernel/lantiq/**"
- "package/firmware/lantiq/**"
- "package/boot/uboot-lantiq/**"
"target/layerscape":
- "target/linux/layerscape/**"
- "package/firmware/layerscape/**"
- "package/boot/tfa-layerscape/**"
- "package/boot/uboot-layerscape/**"
- "package/network/utils/layerscape/**"
"target/malta":
- "target/linux/malta/**"
"target/mediatek":
- "target/linux/mediatek/**"
- "package/boot/arm-trusted-firmware-mediatek/**"
- "package/boot/uboot-mediatek/**"
"target/mpc85xx":
- "target/linux/mpc85xx/**"
"target/mvebu":
- "target/linux/mvebu/**"
- "package/boot/arm-trusted-firmware-mvebu/**"
- "package/boot/uboot-mvebu/**"
"target/mxs":
- "target/linux/mxs/**"
- "package/boot/uboot-mxs/**"
"target/octeon":
- "target/linux/octeon/**"
"target/octeontx":
- "target/linux/octeontx/**"
"target/omap":
- "target/linux/omap/**"
- "package/boot/uboot-omap/**"
"target/oxnas":
- "target/linux/oxnas/**"
- "package/boot/uboot-oxnas/**"
"target/pistachio":
- "target/linux/pistachio/**"
"target/qoriq":
- "target/linux/qoriq/**"
"target/ramips":
- "target/linux/ramips/**"
"target/realtek":
- "target/linux/realtek/**"
"target/rockchip":
- "target/linux/rockchip/**"
- "package/boot/arm-trusted-firmware-rockchip/**"
- "package/boot/uboot-rockchip/**"
"target/sifiveu":
- "target/linux/sifiveu/**"
- "package/boot/uboot-sifiveu/**"
- "package/boot/opensbi/**"
"target/sunxi":
- "target/linux/sunxi/**"
- "package/boot/arm-trusted-firmware-sunxi/**"
- "package/boot/uboot-sunxi/**"
"target/tegra":
- "target/linux/tegra/**"
- "package/boot/uboot-tegra/**"
"target/uml":
- "target/linux/uml/**"
"target/x86":
- "target/linux/x86/**"
"target/zynq":
- "target/linux/zynq/**"
- "package/boot/uboot-zynq/**"
# target/imagebuilder
"target/imagebuilder":
- "target/imagebuilder/**"
# kernel
"kernel":
- "target/linux/generic/**"
- "target/linux/**/config-*"
- "target/linux/**/patches-*"
- "target/linux/**/files/**"
- "package/kernel/linux/**"
# core packages
"core packages":
- "package/**"
# build/scripts/tools
"build/scripts/tools":
- "include/**"
- "scripts/**"
- "tools/**"
# toolchain
"toolchain":
- "toolchain/**"
# GitHub/CI
"GitHub/CI":
- ".github/**"

View File

@ -1,8 +0,0 @@
Thanks for your contribution to OpenWrt!
To help keep the codebase consistent and readable,
and to help people review your contribution,
we ask you to follow the rules you find in the wiki at this link
https://openwrt.org/submitting-patches
Please remove this message before posting the pull request.

200
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,200 @@
name: CI
on:
workflow_dispatch:
push:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential clang flex g++ gawk gcc-multilib gettext \
git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev
- name: Checkout
uses: actions/checkout@v3
- name: Hook the openwrt_core URL for opkg
run: |
OWNER="${GITHUB_REPOSITORY%%/*}"
REPO="${GITHUB_REPOSITORY#*/}"
TIME="$(curl "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | jq -r .created_at)"
echo "ci-$(date -d "${TIME}" -u +'%Y%m%d-%H%M%S')-${GITHUB_SHA:0:8}" >version
sed -i "s|%U/targets/%S/packages|https://${OWNER}.github.io/${REPO}/${GITHUB_REF_NAME}/%R|" include/feeds.mk
- name: Update and install feeds
run: |
./scripts/feeds update -a
./scripts/feeds install -a
- name: Configure
run: |
cat <<EOF | sed -E 's/^ //' >.config
CONFIG_TARGET_ipq50xx=y
CONFIG_TARGET_ipq50xx_arm=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_IB=y
# CONFIG_IB_STANDALONE is not set
CONFIG_SDK=y
CONFIG_MAKE_TOOLCHAIN=y
CONFIG_ALL_NONSHARED=y
CONFIG_REPRODUCIBLE_DEBUG_INFO=y
CONFIG_PACKAGE_luci=y
EOF
make defconfig
- name: Download
run: |
make -j16 download
- name: Build tools
run: |
make -j$(nproc) tools/install
- name: Build toolchain
run: |
make -j$(nproc) toolchain/install
- name: Build all
run: |
make -j$(nproc) IGNORE_ERRORS=1
- name: Upload bin to artifacts
uses: actions/upload-artifact@v3
with:
name: bin-ipq50xx-arm
path: bin/targets/ipq50xx/arm/*
- name: Upload dl to artifacts
uses: actions/upload-artifact@v3
with:
name: dl
path: dl/*
gh-pages:
needs: [ build ]
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
path: 'gh-pages'
ref: 'gh-pages'
fetch-depth: 0
- name: Configure the git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Drop old versions
run: |
cd gh-pages
readarray -t old_version < <(git log --format='%h' -- "${GITHUB_REF_NAME}" | tail -n +10)
GIT_SEQUENCE_EDITOR="sed -i '1 i break'" git rebase --interactive --committer-date-is-author-date --root
for commit in "${old_version[@]}"; do
sed -i "/${commit}/d" .git/rebase-merge/git-rebase-todo
done
git rebase --continue
- name: Download bin from artifacts
uses: actions/download-artifact@v3
with:
name: bin-ipq50xx-arm
path: bin/
- name: Copy contents
run: |
version="$(cat "bin/version.buildinfo")"
mkdir -p "gh-pages/${GITHUB_REF_NAME}/${version}/"
cp -avr bin/packages/* "gh-pages/${GITHUB_REF_NAME}/${version}/"
- name: Commit
run: |
cd gh-pages
git add .
git commit -m "Add: ${GITHUB_REF_NAME}: $(cat ../bin/version.buildinfo)"
- name: Publish
run: |
cd gh-pages
git push -f origin gh-pages
release:
needs: [ build ]
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download dl from artifacts
uses: actions/download-artifact@v3
with:
name: dl
path: dl/
- name: Download bin from artifacts
uses: actions/download-artifact@v3
with:
name: bin-ipq50xx-arm
path: bin/targets/ipq50xx/arm/
- name: Tar
run: |
tar cvf dl.tar -C dl/ .
tar cvf bin-ipq50xx.tar -C bin/targets/ipq50xx/arm/ .
- name: Generate release informations
run: |
TIME="$(curl "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | jq -r .created_at)"
TAG="ci-${GITHUB_REF_NAME}-$(date -d "${TIME}" -u +'%Y%m%d-%H%M%S-%Z')"
echo "TAG=$TAG" >>$GITHUB_ENV
cat <<EOF | sed -E 's/^ //' >Release.md
CI ${GITHUB_REF_NAME} $(date -d "${TIME}" -u +'%Y-%m-%d %H:%M:%S %Z(%:z)')
# ${GITHUB_REF_NAME}
Build time: \`$(date -d "${TIME}" -u +'%Y-%m-%d %H:%M:%S %Z(%:z)')\`
Release version: ${TAG}
## Sources
$(cat bin/targets/ipq50xx/arm/feeds.buildinfo | awk -F'[ ^]' '{printf "%s: `%s`\n", $2, $4}')
## SHA256
$(cat bin/targets/ipq50xx/arm/sha256sums | awk '{printf "%s: `%s`\n", $2, $1}' | sed -E 's/^\*//')
EOF
echo "NAME=$(head --line=1 Release.md)" >>$GITHUB_ENV
tail --line=+2 Release.md >Body.md
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.TAG }}
target_commitish: ${{ github.sha }}
name: ${{ env.NAME }}
body_path: Body.md
files: |
bin/targets/ipq50xx/arm/sha256sums
bin/targets/ipq50xx/arm/*.*
*.tar

View File

@ -1,19 +0,0 @@
name: Coverity scan build
on:
schedule:
- cron: '30 2 * * 6'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
coverity_build:
name: Coverity x86/64 build
secrets:
coverity_api_token: ${{ secrets.COVERITY_API_TOKEN }}
permissions:
contents: read
packages: read
actions: write
uses: openwrt/actions-shared-workflows/.github/workflows/coverity.yml@main

View File

@ -1,73 +0,0 @@
name: Test Formalities
on:
pull_request:
permissions:
contents: read
jobs:
build:
name: Test Formalities
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Determine branch name
run: |
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Test formalities
run: |
source .github/workflows/scripts/ci_helpers.sh
RET=0
for commit in $(git rev-list HEAD ^origin/$BRANCH); do
info "=== Checking commit '$commit'"
if git show --format='%P' -s $commit | grep -qF ' '; then
err "Pull request should not include merge commits"
RET=1
fi
author="$(git show -s --format=%aN $commit)"
if echo $author | grep -q '\S\+\s\+\S\+'; then
success "Author name ($author) seems ok"
else
err "Author name ($author) need to be your real name 'firstname lastname'"
RET=1
fi
subject="$(git show -s --format=%s $commit)"
if echo "$subject" | grep -q -e '^[0-9A-Za-z,+/_\.-]\+: ' -e '^Revert '; then
success "Commit subject line seems ok ($subject)"
else
err "Commit subject line MUST start with '<area>: ' ($subject)"
RET=1
fi
body="$(git show -s --format=%b $commit)"
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)"
if echo "$body" | grep -qF "$sob"; then
success "Signed-off-by match author"
else
err "Signed-off-by is missing or doesn't match author (should be '$sob')"
RET=1
fi
if echo "$body" | grep -v "Signed-off-by:"; then
success "A commit message exists"
else
err "Missing commit message. Please describe your changes"
RET=1
fi
done
exit $RET

View File

@ -1,24 +0,0 @@
name: Create GitHub release
permissions:
contents: write
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true

View File

@ -1,42 +0,0 @@
name: Build Kernel
on:
pull_request:
paths:
- '.github/workflows/check-kernel-patches.yml'
- '.github/workflows/build.yml'
- '.github/workflows/kernel.yml'
- 'include/kernel*'
- 'package/kernel/**'
- 'target/linux/**'
push:
paths:
- '.github/workflows/check-kernel-patches.yml'
- '.github/workflows/build.yml'
- '.github/workflows/kernel.yml'
- 'include/kernel*'
- 'package/kernel/**'
- 'target/linux/**'
branches-ignore:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-kernels:
name: Build all affected Kernels
permissions:
contents: read
packages: read
actions: write
secrets:
ccache_s3_endpoint: ${{ secrets.CCACHE_S3_ENDPOINT }}
ccache_s3_bucket: ${{ secrets.CCACHE_S3_BUCKET }}
ccache_s3_access_key: ${{ secrets.CCACHE_S3_ACCESS_KEY }}
ccache_s3_secret_key: ${{ secrets.CCACHE_S3_SECRET_KEY }}
uses: openwrt/actions-shared-workflows/.github/workflows/kernel.yml@main

View File

@ -1,16 +0,0 @@
# ci:kernel:x86:64 is going to trigger CI kernel check jobs for x86/64 target
name: Build kernel and check patches for target specified in labels
on:
pull_request:
types:
- labeled
jobs:
build-kernels-label:
name: Build all affected Kernels from defined label
permissions:
contents: read
packages: read
actions: write
uses: openwrt/actions-shared-workflows/.github/workflows/label-kernel.yml@main

View File

@ -1,16 +0,0 @@
# ci:target:x86:64 is going to trigger CI target check jobs for x86/64 target
name: Build check target specified in labels
on:
pull_request:
types:
- labeled
jobs:
build-target-label:
name: Build target from defined label
permissions:
contents: read
packages: read
actions: write
uses: openwrt/actions-shared-workflows/.github/workflows/label-target.yml@main

View File

@ -1,33 +0,0 @@
name: 'Pull Request Labeler'
on:
- pull_request_target
permissions:
contents: read
jobs:
labeler:
permissions:
contents: read # to determine modified files (actions/labeler)
pull-requests: write # to add labels to PRs (actions/labeler)
name: Pull Request Labeler
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Check Branch
id: check-branch
run: |
if echo "${{ github.base_ref }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
fi
- uses: buildsville/add-remove-label@v2.0.0
if: ${{ steps.check-branch.outputs.release-tag }}
with:
token: ${{secrets.GITHUB_TOKEN}}
labels: ${{ steps.check-branch.outputs.release-tag }}
type: add

View File

@ -1,42 +0,0 @@
name: Build all core packages
on:
pull_request:
paths:
- '.github/workflows/packages.yml'
- 'config/**'
- 'include/**'
- 'package/**'
- 'target/linux/generic/**'
- 'toolchain/**'
push:
paths:
- '.github/workflows/packages.yml'
- 'config/**'
- 'include/**'
- 'package/**'
- 'target/linux/generic/**'
- 'toolchain/**'
branches-ignore:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-packages:
name: Build all core packages for selected target
permissions:
contents: read
packages: read
actions: write
secrets:
ccache_s3_endpoint: ${{ secrets.CCACHE_S3_ENDPOINT }}
ccache_s3_bucket: ${{ secrets.CCACHE_S3_BUCKET }}
ccache_s3_access_key: ${{ secrets.CCACHE_S3_ACCESS_KEY }}
ccache_s3_secret_key: ${{ secrets.CCACHE_S3_SECRET_KEY }}
uses: openwrt/actions-shared-workflows/.github/workflows/packages.yml@main

View File

@ -1,28 +0,0 @@
name: Build and Push prebuilt tools container
on:
push:
paths:
- 'include/version.mk'
- 'include/cmake.mk'
- 'tools/**'
- '.github/workflows/push-containers.yml'
- 'toolchain/**'
branches-ignore:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-push-containers:
name: Build and Push all prebuilt containers
permissions:
contents: read
packages: write
actions: write
uses: openwrt/actions-shared-workflows/.github/workflows/push-containers.yml@main

View File

@ -1,26 +0,0 @@
#!/bin/sh
color_out() {
printf "\e[0;$1m%s\e[0;0m\n" "$2"
}
success() {
color_out 32 "$1"
}
info() {
color_out 36 "$1"
}
err() {
color_out 31 "$1"
}
warn() {
color_out 33 "$1"
}
err_die() {
err "$1"
exit 1
}

View File

@ -1,15 +0,0 @@
#!/bin/bash
original_exit_code="${ret:-1}"
log_dir_path="${1:-logs}"
context="${2:-10}"
show_make_build_errors() {
grep -slr 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_dir_path" | while IFS= read -r log_file; do
printf "====== Make errors from %s ======\n" "$log_file";
grep -r -C"$context" 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_file" ;
done
}
show_make_build_errors
exit "$original_exit_code"

View File

@ -1,29 +0,0 @@
name: Build Toolchains
on:
pull_request:
paths:
- '.github/workflows/toolchain.yml'
- 'toolchain/**'
push:
paths:
- '.github/workflows/toolchain.yml'
- 'toolchain/**'
branches-ignore:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-toolchains:
name: Build Toolchains for each target
permissions:
contents: read
packages: read
actions: write
uses: openwrt/actions-shared-workflows/.github/workflows/toolchain.yml@main

View File

@ -1,27 +0,0 @@
name: Build host tools
on:
pull_request:
paths:
- 'include/**'
- 'tools/**'
- '.github/workflows/tools.yml'
push:
paths:
- 'include/**'
- 'tools/**'
- '.github/workflows/tools.yml'
branches-ignore:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-tools:
name: Build host tools for linux and macos based systems
uses: openwrt/actions-shared-workflows/.github/workflows/tools.yml@main

228
README.md
View File

@ -1,108 +1,188 @@
![OpenWrt logo](include/logo.png)
# openwrt-redmi-ax3000
OpenWrt Project is a Linux operating system targeting embedded devices. Instead
of trying to create a single, static firmware, OpenWrt provides a fully
writable filesystem with package management. This frees you from the
application selection and configuration provided by the vendor and allows you
to customize the device through the use of packages to suit any application.
For developers, OpenWrt is the framework to build an application without having
to build a complete firmware around it; for users this means the ability for
full customization, to use the device in ways never envisioned.
`Openwrt` for `Redmi AX3000` / `Xiaomi CR880x` / `Xiaomi CR881x`
Sunshine!
**!!! NOTE: This is the main development branch which using mainline `Linux LTS 5.15` !!!**
## Download
If you need more stable versions, please checkout the following branches which using QSDK kernel
- [`ipq50xx-qsdk-kernel-5.4-openwrt-21.02-qsdk-11.5.05.841.1029`](https://github.com/hzyitc/openwrt-redmi-ax3000/tree/ipq50xx-qsdk-kernel-5.4-openwrt-21.02-qsdk-11.5.05.841.1029)
- [`ipq50xx-qsdk-kernel-4.4-openwrt-21.02-qsdk-11.4.0.5.7418`](https://github.com/hzyitc/openwrt-redmi-ax3000/tree/ipq50xx-qsdk-kernel-4.4-openwrt-21.02-qsdk-11.4.0.5.7418)
Built firmware images are available for many architectures and come with a
package selection to be used as WiFi home router. To quickly find a factory
image usable to migrate from a vendor stock firmware to OpenWrt, try the
*Firmware Selector*.
| Device | Boot | Switch | CPU Ethernet | NSS NAT | 2.4G WiFi | 5G WiFi |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: |
| Xiaomi CR880x <br /> (M79 version) | ✔️ | ✔️ | ✔️ | ❌ | ⚠️ Without `NSS Offload` | See Note¹ <br /> ⚠️ Without `NSS Offload` |
| Redmi AX3000 <br /> Xiaomi CR880x <br /> (M81 version) | ✔️ | ✔️ | ✔️ | ❌ | ⚠️ Without `NSS Offload` | See Note¹ <br /> ⚠️ Without `NSS Offload` |
| Xiaomi CR881x | ✔️ | ✔️ | ✔️ | ❌ | ⚠️ Without `NSS Offload` | See Note¹ <br /> ⚠️ Without `NSS Offload` |
| CMCC RAX3000Q | ⚠️ No test ⚠️ |
>
> NOTE¹: For 160MHz, `Country Code`, `Width` and `Channel` need to be set correctly. And wait 1 minute for radar detection, then the WiFi will be appeareed.
>
> ```
> uci -q batch <<-EOF
> wireless.radio1.country='CN'
> wireless.radio1.htmode='HE160'
> wireless.radio1.channel='64'
> EOF
> ```
* [OpenWrt Firmware Selector](https://firmware-selector.openwrt.org/)
## How to build
If your device is supported, please follow the **Info** link to see install
instructions or consult the support resources listed below.
OS: `Ubuntu 20.04 (focal)`
##
```bash
# Install dependencies
sudo apt update
sudo apt install build-essential clang flex g++ gawk gcc-multilib gettext \
git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev
An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
# Clone this repo
git clone https://github.com/hzyitc/openwrt-redmi-ax3000
cd openwrt-redmi-ax3000
* [OpenWrt Wiki Download](https://openwrt.org/downloads)
# Update and install feeds
./scripts/feeds update -a
./scripts/feeds install -a
## Development
# Configure
make menuconfig
To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case
sensitive filesystem required). Cygwin is unsupported because of the lack of a
case sensitive file system.
# Download
make -j16 download
### Requirements
You need the following tools to compile OpenWrt, the package names vary between
distributions. A complete list with distribution specific packages is found in
the [Build System Setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem)
documentation.
```
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.6+ rsync subversion unzip which
# Build
make -j$(nproc)
```
### Quickstart
## How to install
1. Run `./scripts/feeds update -a` to obtain all the latest package definitions
defined in feeds.conf / feeds.conf.default
### Get `UART` access
2. Run `./scripts/feeds install -a` to install symlinks for all obtained
packages into package/feeds/
> Input from `UART` will be allowed after a successful `TFTP recovery`.
3. Run `make menuconfig` to select your preferred configuration for the
toolchain, target system & firmware packages.
1. Connect `UART` and `LAN`.
4. Run `make` to build your firmware. This will download all sources, build the
cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen
applications for your target system.
2. Download the vendor firmware:
### Related Repositories
Offical website: https://www.miwifi.com/miwifi_download.html
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called `opkg`. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
| Device | URL |
| :-: | :-: |
| Redmi AX3000 | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/ra81/miwifi_ra81_firmware_1dd69c_1.0.33.bin |
| Xiaomi CR8806 | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/cr8806/miwifi_cr8806_firmware_fe70b_6.2.14.bin |
| Xiaomi CR8808 | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/cr8808/miwifi_cr8808_firmware_9d216_6.2.11.bin |
| Xiaomi CR8809 | https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/cr8809/miwifi_cr8809_firmware_b814a_6.2.102.bin |
* [LuCI Web Interface](https://github.com/openwrt/luci): Modern and modular
interface to control the device via a web browser.
3. Use [`MIWIFIRepairTool`](https://bigota.miwifi.com/xiaoqiang/tools/MIWIFIRepairTool.x86.zip) to recover the device's firmware.
* [OpenWrt Packages](https://github.com/openwrt/packages): Community repository
of ported packages.
Offical tutorial: https://www.xiaomi.cn/post/19134127
* [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically
focused on (mesh) routing.
> This tool simply does `TFTP recovery`. You can use other `DHCP` and `TFTP` server as well.
>
> Here are some useful links:
>
>> https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-redmi-router-ax6s-xiaomi-router-ax3200/111085/513
>>
>> https://github.com/mikeeq/xiaomi_ax3200_openwrt#uart-flash
>>
>> https://openwrt.org/inbox/toh/xiaomi/xiaomi_ax3600#tftp_recovery
* [OpenWrt Video](https://github.com/openwrt/video): Packages specifically
focused on display servers and clients (Xorg and Wayland).
4. Hold the `reset` button and reboot the router until the `system` LED blink.
## Support Information
5. Wait until the firmware being flashed.
For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices)
6. Unplug then plug back in the power.
### Documentation
7. Send any key stroke to `UART` to interrupt the `U-boot`.
* [Quick Start Guide](https://openwrt.org/docs/guide-quick-start/start)
* [User Guide](https://openwrt.org/docs/guide-user/start)
* [Developer Documentation](https://openwrt.org/docs/guide-developer/start)
* [Technical Reference](https://openwrt.org/docs/techref/start)
8. Run the following command inside `U-boot`:
### Support Community
```shell
setenv boot_wait on
setenv uart_en 1
saveenv
```
* [Forum](https://forum.openwrt.org): For usage, projects, discussions and hardware advise.
* [Support Chat](https://webchat.oftc.net/#openwrt): Channel `#openwrt` on **oftc.net**.
Now we have enabled `UART`.
### Developer Community
### Flash Openwrt
* [Bug Reports](https://bugs.openwrt.org): Report bugs in OpenWrt
* [Dev Mailing List](https://lists.openwrt.org/mailman/listinfo/openwrt-devel): Send patches
* [Dev Chat](https://webchat.oftc.net/#openwrt-devel): Channel `#openwrt-devel` on **oftc.net**.
#### a. Use `U-boot` to flash
## License
Download [`openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi`](https://github.com/hzyitc/openwrt-redmi-ax3000/releases/latest/download/openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi) and put it into TFTP root.
OpenWrt is licensed under GPL-2.0
Then run the following command inside `U-boot`:
```shell
# This router ip
setenv ipaddr 192.168.1.2
# TFTP server ip
setenv serverip 192.168.1.1
# Download the firmware to the RAM
tftpboot openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi
# Flash it as system 2
flash rootfs_1
setenv flag_try_sys2_failed 0
setenv flag_boot_rootfs 1
setenv flag_last_success 1
saveenv
# Flash it as system 1
# flash rootfs
# setenv flag_try_sys1_failed 0
# setenv flag_boot_rootfs 0
# setenv flag_last_success 0
# saveenv
# Reboot
reset
```
#### b. Use `miwifi` (the vendor firmware) to flash
```bash
cd /tmp
wget https://github.com/hzyitc/openwrt-redmi-ax3000/releases/latest/download/openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi
# Check your partition table
# cat /proc/mtd
[[ "$(grep '"rootfs"' /proc/mtd | cut -d':' -f1)" == "mtd18" ]] || exit
[[ "$(grep '"rootfs_1"' /proc/mtd | cut -d':' -f1)" == "mtd19" ]] || exit
# Detect the current system slot and flash into the other one
# cat /proc/cmdline
mtd="$(grep -oE 'ubi.mtd=[a-zA-Z0-9\-\_]*' /proc/cmdline | cut -d'=' -f2)"
if [[ "$mtd" == "rootfs" ]]; then
# Flash it as system 2
ubiformat /dev/mtd19 -f openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi
nvram set flag_try_sys2_failed=0
nvram set flag_boot_rootfs=1
nvram set flag_last_success=1
nvram commit
elif [[ "$mtd" == "rootfs_1" ]]; then
# Flash it as system 1
ubiformat /dev/mtd18 -f openwrt-ipq50xx-arm-redmi_ax3000-squashfs-nand-factory.ubi
nvram set flag_try_sys1_failed=0
nvram set flag_boot_rootfs=0
nvram set flag_last_success=0
nvram commit
fi
# Reboot
reboot
```
## Related links
[`openwrt/openwrt`](https://github.com/openwrt/openwrt) - Openwrt official repository
[`qsdk`](https://git.codelinaro.org/clo/qsdk) - QSDK official repository
[`quic/qca-sdk-nss-fw`](https://github.com/quic/qca-sdk-nss-fw) - NSS firmware
[`quic/upstream-wifi-fw`](https://github.com/quic/upstream-wifi-fw) - WiFi firmware
[`qca/qca-swiss-army-knife`](https://github.com/qca/qca-swiss-army-knife) - BDF tools
[`Telecominfraproject/wlan-ap`](https://github.com/Telecominfraproject/wlan-ap) - another Openwrt which support `ipq50xx`

View File

@ -9,6 +9,7 @@ touch /etc/config/ubootenv
board=$(board_name)
case "$board" in
cmcc,rax3000q|\
redmi,ax3000|\
xiaomi,cr881x)
ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x10000" "0x20000"

View File

@ -29,6 +29,7 @@ endef
ALLWIFIBOARDS:= \
buffalo_wxr-5950ax12 \
cmcc_rax3000q \
compex_wpq873 \
dynalink_dl-wrx36 \
edgecore_eap102 \
@ -124,6 +125,7 @@ endef
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
$(eval $(call generate-ipq-wifi-package,cmcc_rax3000q,CMCC RAX3000Q))
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))

View File

@ -18,6 +18,12 @@ ipq50xx_setup_interfaces()
"0:lan:1" "1:lan:2" "2:lan:3" \
"3:wan"
;;
cmcc,rax3000q)
ucidef_add_switch "switch1" \
"6u@eth1" "3u@eth0" \
"2:lan:1" "4:lan:2" "5:lan:3" \
"1:wan"
;;
esac
}

View File

@ -9,6 +9,7 @@ board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ5018/hw1.0/caldata.bin")
case "$board" in
cmcc,rax3000q|\
redmi,ax3000|\
xiaomi,cr881x)
caldata_extract "0:ART" 0x1000 0x20000
@ -17,6 +18,7 @@ case "$FIRMWARE" in
;;
"ath11k/qcn6122/hw1.0/caldata_1.bin")
case "$board" in
cmcc,rax3000q|\
redmi,ax3000|\
xiaomi,cr881x)
caldata_extract "0:ART" 0x26800 0x20000

View File

@ -0,0 +1,541 @@
// SPDX-License-Identifier: (GPL-2.0+)
/dts-v1/;
#include "ipq5018.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "CMCC RAX3000Q";
compatible = "cmcc,rax3000q", "qcom,ipq5018";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&intc>;
aliases {
serial0 = &blsp1_uart1;
ethernet0 = &mac0;
ethernet1 = &mac1;
led-boot = &led_status_green;
led-failsafe = &led_status_red;
led-running = &led_status_green;
led-upgrade = &led_status_blue;
};
chosen {
// Override the root parameter from u-boot
// Increase coherent_pool size for WiFi
bootargs-append = " root=/dev/ubiblock0_1 coherent_pool=2M";
stdout-path = "serial0:115200n8";
};
reserved-memory {
// Not sure why but without this, WiFi will crash
tz_apps@4a400000 {
no-map;
// The size is incorrent, but it works
reg = <0x0 0x4a400000 0x0 0x700000>;
};
q6_mem_regions: q6_mem_regions@4b000000 {
no-map;
// reg = <0x0 0x4b000000 0x0 0x3b00000>;
reg = <0x0 0x4b000000 0x0 0x3000000>;
};
};
thermal-zones {
status = "ok";
};
};
&tlmm {
blsp_uart0_pins: blsp_uart0_pins {
pins =
"gpio28", // RX
"gpio29"; // TX
function = "blsp0_uart1";
drive-strength = <8>;
bias-disable;
};
qspi_nand_pins: qspi_nand_pins {
clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
data0 {
pins = "gpio7";
function = "qspi0";
drive-strength = <8>;
bias-disable;
};
data1 {
pins = "gpio6";
function = "qspi1";
drive-strength = <8>;
bias-disable;
};
data2 {
pins = "gpio5";
function = "qspi2";
drive-strength = <8>;
bias-disable;
};
data3 {
pins = "gpio4";
function = "qspi3";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio1_pins {
mdc {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mdio {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
leds_pins: leds_pins {
led_status_red {
pins = "gpio24";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_status_green {
pins = "gpio19";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_status_blue {
pins = "gpio17";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
button_pins: button_pins {
button_reset {
pins = "gpio23";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
button_mesh {
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
};
&blsp1_uart1 {
pinctrl-0 = <&blsp_uart0_pins>;
pinctrl-names = "default";
status = "ok";
};
&qpic_bam {
status = "ok";
};
&nand {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
&soc {
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led_status_red: led_status_red {
label = "blue:system";
gpio = <&tlmm 24 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_green: led_status_green {
label = "yellow:system";
gpio = <&tlmm 19 GPIO_ACTIVE_HIGH>;
};
led_status_blue: led_status_blue {
label = "blue:internet";
gpio = <&tlmm 17 GPIO_ACTIVE_HIGH>;
};
};
button {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button_reset {
label = "reset";
gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_KEY>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
button_mesh {
label = "mesh";
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_KEY>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
};
};
ess-instance {
num_devices = <2>;
// Dummy switch, to describe how the external ports connects to the MAC
// For example, some chips have PSGMII ports which combine 5 MAC into
// 1 external port.
// For IPQ50xx, this is used to choose SGMII or SGMII-plus
ess-switch@0x39c00000 {
compatible = "qcom,ess-switch-ipq50xx";
device_id = <0>;
cmnblk_clk = "internal_96MHz";
// MAC1 Mode
// switch_mac_mode = <0xc>; // PORT_WRAPPER_SGMII_PLUS
switch_mac_mode = <0xf>; // PORT_WRAPPER_SGMII_CHANNEL0
qcom,port_phyinfo {
// MAC0 -> GE Phy -> QCA8337 Phy2
port@0 {
port_id = <1>;
mdiobus = <&mdio0>;
phy_address = <7>;
phy_dac = <0x10 0x10>;
};
// MAC1 ---SGMII---> QCA8337 SerDes
port@1 {
port_id = <2>;
forced-speed = <1000>;
forced-duplex = <1>;
};
};
};
// QCA8337
ess-switch1@1 {
compatible = "qcom,ess-switch-qca83xx";
device_id = <1>;
reset_gpio = <26>;
switch_access_mode = "mdio";
mdio-bus = <&mdio1>;
qca,ar8327-initvals = <
0x000c 0x00000080 // PAD6_MODE = MAC6_SGMII_EN
0x0010 0x002613a0 // PWS_REG = DEFAULT_VALUE | SERDES_AEN
0x0094 0x000010ce // PORT6_STATUS = DEFAULT_VALUE | DUPLEX_MODE_6 | RXMAC_EN_6 |
// TXMAC_EN_6 | SPEED_6(1000M)
0x00e0 0xc74164de // SGMII_CTRL = DEFAULT_VALUE | MODE_CTRL_25M(SGMII_PHY) | SGMII_EN_SD |
// SGMII_EN_TX | SGMII_EN_RX | SGMII_EN_PLL
>;
switch_cpu_bmp = <0x48>; // CPU port bitmap: 3 6
switch_lan_bmp = <0x34>; // LAN port bitmap: 2 4 5
switch_wan_bmp = <0x02>; // WAN port bitmap: 1
qcom,port_phyinfo {
// MAC1 -> Phy0 -> WAN
port@1 {
port_id = <1>;
phy_address = <0>;
};
// MAC2 -> Phy1 -> LAN1
port@2 {
port_id = <2>;
phy_address = <1>;
};
// MAC3 -> Phy2 -> IPQ5000 GE Phy
port@3 {
port_id = <3>;
phy_address = <2>;
};
// MAC4 -> Phy3 -> LAN2
port@4 {
port_id = <4>;
phy_address = <3>;
};
// MAC5 -> Phy4 -> LAN3
port@5 {
port_id = <5>;
phy_address = <4>;
};
// MAC6 ---SGMII---> IPQ5000 MAC1
port@6 {
port_id = <6>;
forced-speed = <1000>;
forced-duplex = <1>;
};
};
};
};
// MAC0 -> GE Phy
mac0: dp1 {
compatible = "qcom,nss-dp";
device_type = "network";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,mactype = <2>; // GMAC_HAL_TYPE_SYN_GMAC
local-mac-address = [000000000000];
phy-handle = <&ge_phy>;
phy-mode = "internal";
};
// MAC1 ---SGMII---> QCA8337 SerDes
mac1: dp2 {
compatible = "qcom,nss-dp";
device_type = "network";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,mactype = <2>; // GMAC_HAL_TYPE_SYN_GMAC
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
};
&mdio0 {
status = "ok";
resets = <&gcc GCC_GEPHY_MDC_SW_ARES>;
reset-names = "phy";
// IPQ5018 GE Phy -> QCA8337 Phy2
ge_phy: ethernet-phy@0 {
reg = <7>;
};
};
&mdio1 {
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
status = "ok";
reset-gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
// QCA8337 Phy0 -> WAN
ethernet-phy@0 {
reg = <0>;
};
// QCA8337 Phy1 -> LAN1
ethernet-phy@1 {
reg = <1>;
};
// QCA8337 Phy2 -> IPQ5018 GE Phy
ethernet-phy@2 {
reg = <2>;
};
// QCA8337 Phy3 -> LAN2
ethernet-phy@3 {
reg = <3>;
};
// QCA8337 Phy4 -> LAN3
ethernet-phy@4 {
reg = <4>;
};
};
&q6v5_wcss {
memory-region = <&q6_mem_regions>;
qcom,rproc = <&q6v5_wcss>;
firmware = "IPQ5018/q6_fw.mdt";
qcom,bootargs_smem = <507>;
boot-args = </* type: */ 0x2 /* PCIE1 */
/* length: */ 4
/* PD id: */ 2
/* reset GPIO: */ 27
/* reserved: */ 0 0>;
status = "ok";
// IPQ5018
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
resets =
<&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names =
"wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks =
<&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names =
"gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
// qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
interrupts-extended =
<&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names =
"fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states =
<&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names =
"shutdown",
"stop",
"spawn";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
};
// QCN6102
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
interrupts-extended =
<&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names =
"fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states =
<&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names =
"shutdown",
"stop",
"spawn";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
};
};
&wifi0 {
// IPQ5000
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
qcom,board_id = <0x24>;
// qcom,ath11k-fw-memory-mode = <0>;
// qcom,bdf-addr = <0x4c400000>;
// qcom,caldb-addr = <0x4d200000>;
// qcom,m3-dump-addr = <0x4d400000>;
qcom,ath11k-fw-memory-mode = <2>;
qcom,bdf-addr = <0x4c400000>;
status = "ok";
};
&wifi1 {
// QCN6102
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd2>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,board_id = <0x60>;
// qcom,ath11k-fw-memory-mode = <0>;
// qcom,bdf-addr = <0x4d500000>;
// qcom,caldb-addr = <0x4e500000>;
// qcom,m3-dump-addr = <0x4ea00000>;
qcom,ath11k-fw-memory-mode = <2>;
qcom,bdf-addr = <0x4d100000>;
qcom,m3-dump-addr = <0x4df00000>;
status = "ok";
};

View File

@ -31,6 +31,23 @@ define Device/UbiFit
IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/cmcc_rax3000q
$(call Device/FitImage)
$(call Device/UbiFit)
SOC := ipq5000
DEVICE_VENDOR := CMCC
DEVICE_MODEL := RAX3000Q
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_DTS_CONFIG := config@mp02.1
IMAGES := nand-factory.ubi
DEVICE_PACKAGES := \
ath11k-firmware-ipq5018 \
ath11k-firmware-qcn6122 \
ipq-wifi-cmcc_rax3000q
endef
TARGET_DEVICES += cmcc_rax3000q
define Device/redmi_ax3000
$(call Device/FitImage)
$(call Device/UbiFit)