Compare commits
No commits in common. "master" and "istoreos-24.10.0" have entirely different histories.
master
...
istoreos-2
35
.github/ISSUE_TEMPLATE/bug-report.md
vendored
35
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -1,35 +0,0 @@
|
||||
---
|
||||
name: 反馈bug/问题
|
||||
about: 如果是固件问题请提供固件版本号
|
||||
title: "[BUG] [24.10.x]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 1.关于你要提交的问题
|
||||
为避免重复issue,请先搜索issue,确认没有类似issue再提交新issue;
|
||||
注意搜索时**包括已关闭**的issue(删掉搜索框的的“is:open”条件);
|
||||
|
||||
Q:是否用关键词搜索了issue? (使用 "x" 选择)
|
||||
* [ ] 没有类似的issue
|
||||
|
||||
## 2. 详细叙述
|
||||
|
||||
### (1) 具体问题
|
||||
|
||||
|
||||
### (2) 路由器型号和固件版本
|
||||
|
||||
|
||||
### (3) 详细日志和/或截图
|
||||
|
||||
|
||||
### (4) 复现步骤
|
||||
1.
|
||||
2.
|
||||
|
||||
### (5) 当前行为
|
||||
|
||||
|
||||
### (6) 预期行为
|
||||
95
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
95
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
name: Bug report
|
||||
description: Create a bug report to help us improve
|
||||
labels:
|
||||
- bug
|
||||
- bug-report
|
||||
- to-triage
|
||||
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: release
|
||||
attributes:
|
||||
label: OpenWrt release
|
||||
description: |
|
||||
The OpenWrt release or commit hash where this bug occurs (use command below).
|
||||
```. /etc/openwrt_release && echo $DISTRIB_RELEASE```
|
||||
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
|
||||
12
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
12
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
blank_issues_enabled: true
|
||||
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.
|
||||
10
.github/ISSUE_TEMPLATE/request.md
vendored
10
.github/ISSUE_TEMPLATE/request.md
vendored
@ -1,10 +0,0 @@
|
||||
---
|
||||
name: 功能请求
|
||||
about: 提供新的想法或功能需求
|
||||
title: "[Feature]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 建议或想法
|
||||
249
.github/labeler.yml
vendored
Normal file
249
.github/labeler.yml
vendored
Normal file
@ -0,0 +1,249 @@
|
||||
# target/*
|
||||
"target/airoha":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/airoha/**"
|
||||
"target/apm821xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/apm821xx/**"
|
||||
"target/archs38":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/archs38/**"
|
||||
"target/armsr":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/armsr/**"
|
||||
"target/at91":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/at91/**"
|
||||
- "package/boot/at91bootstrap/**"
|
||||
- "package/boot/uboot-at91/**"
|
||||
"target/ath79":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/ath79/**"
|
||||
"target/bcm27xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/bcm27xx/**"
|
||||
- "package/kernel/bcm27xx-gpu-fw/**"
|
||||
- "package/utils/bcm27xx-utils/**"
|
||||
"target/bcm47xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/bcm47xx/**"
|
||||
"target/bcm4908":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/bcm4908/**"
|
||||
- "package/boot/uboot-bcm4908/**"
|
||||
- "package/boot/arm-trusted-firmware-bcm63xx/**"
|
||||
"target/bcm53xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/bcm53xx/**"
|
||||
- "package/boot/uboot-bcm53xx/**"
|
||||
"target/bmips":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/bmips/**"
|
||||
- "package/boot/uboot-bmips/**"
|
||||
- "package/kernel/bcm63xx-cfe/**"
|
||||
"target/d1":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/d1/**"
|
||||
- "package/boot/uboot-d1/**"
|
||||
- "package/boot/opensbi/**"
|
||||
"target/gemini":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/gemini/**"
|
||||
"target/imx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/imx/**"
|
||||
- "package/boot/imx-bootlets/**"
|
||||
- "package/boot/uboot-imx/**"
|
||||
"target/ipq40xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/ipq40xx/**"
|
||||
"target/ipq806x":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/ipq806x/**"
|
||||
"target/qualcommax":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/qualcommax/**"
|
||||
"target/ixp4xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/ixp4xx/**"
|
||||
- "package/boot/apex/Makefile/**"
|
||||
- "package/firmware/ixp4xx-microcode/**"
|
||||
"target/kirkwood":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/kirkwood/**"
|
||||
- "package/boot/uboot-kirkwood/**"
|
||||
"target/lantiq":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/lantiq/**"
|
||||
- "package/kernel/lantiq/**"
|
||||
- "package/firmware/lantiq/**"
|
||||
- "package/boot/uboot-lantiq/**"
|
||||
"target/layerscape":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/layerscape/**"
|
||||
- "package/firmware/layerscape/**"
|
||||
- "package/boot/tfa-layerscape/**"
|
||||
- "package/boot/uboot-layerscape/**"
|
||||
- "package/network/utils/layerscape/**"
|
||||
"target/loongarch64":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/loongarch64/**"
|
||||
"target/malta":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/malta/**"
|
||||
"target/mediatek":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/mediatek/**"
|
||||
- "package/boot/arm-trusted-firmware-mediatek/**"
|
||||
- "package/boot/uboot-mediatek/**"
|
||||
"target/mpc85xx":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/mpc85xx/**"
|
||||
"target/mvebu":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/mvebu/**"
|
||||
- "package/boot/arm-trusted-firmware-mvebu/**"
|
||||
- "package/boot/uboot-mvebu/**"
|
||||
"target/mxs":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/mxs/**"
|
||||
- "package/boot/uboot-mxs/**"
|
||||
"target/octeon":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/octeon/**"
|
||||
"target/omap":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/omap/**"
|
||||
- "package/boot/uboot-omap/**"
|
||||
"target/pistachio":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/pistachio/**"
|
||||
"target/qoriq":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/qoriq/**"
|
||||
"target/ramips":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/ramips/**"
|
||||
"target/realtek":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/realtek/**"
|
||||
"target/rockchip":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/rockchip/**"
|
||||
- "package/boot/arm-trusted-firmware-rockchip/**"
|
||||
- "package/boot/uboot-rockchip/**"
|
||||
"target/sifiveu":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/sifiveu/**"
|
||||
- "package/boot/uboot-sifiveu/**"
|
||||
- "package/boot/opensbi/**"
|
||||
"target/siflower":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/siflower/**"
|
||||
"target/starfive":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/starfive/**"
|
||||
"target/stm32":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/stm32/**"
|
||||
- "package/boot/arm-trusted-firmware-stm32/**"
|
||||
- "package/boot/optee-os-stm32/**"
|
||||
- "package/boot/uboot-stm32/**"
|
||||
"target/sunxi":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/sunxi/**"
|
||||
- "package/boot/arm-trusted-firmware-sunxi/**"
|
||||
- "package/boot/uboot-sunxi/**"
|
||||
"target/tegra":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/tegra/**"
|
||||
- "package/boot/uboot-tegra/**"
|
||||
"target/uml":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/uml/**"
|
||||
"target/x86":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/x86/**"
|
||||
"target/zynq":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/zynq/**"
|
||||
- "package/boot/uboot-zynq/**"
|
||||
# target/imagebuilder
|
||||
"target/imagebuilder":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/imagebuilder/**"
|
||||
# kernel
|
||||
"kernel":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "target/linux/generic/**"
|
||||
- "target/linux/**/config-*"
|
||||
- "target/linux/**/patches-*"
|
||||
- "target/linux/**/files/**"
|
||||
- "package/kernel/linux/**"
|
||||
# core packages
|
||||
"core packages":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "package/**"
|
||||
# build/scripts/tools
|
||||
"build/scripts/tools":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "include/**"
|
||||
- "scripts/**"
|
||||
- "tools/**"
|
||||
# toolchain
|
||||
"toolchain":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- "toolchain/**"
|
||||
# GitHub/CI
|
||||
"GitHub/CI":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- ".github/**"
|
||||
19
.github/workflows/coverity.yml
vendored
Normal file
19
.github/workflows/coverity.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
||||
12
.github/workflows/formal.yml
vendored
Normal file
12
.github/workflows/formal.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
name: Test Formalities
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Formalities
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/formal.yml@main
|
||||
24
.github/workflows/github-release.yml
vendored
Normal file
24
.github/workflows/github-release.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
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
|
||||
11
.github/workflows/issue-labeller.yml
vendored
Normal file
11
.github/workflows/issue-labeller.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
name: Issue Labeller
|
||||
on:
|
||||
issues:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
label-component:
|
||||
name: Validate and Tag Bug Report
|
||||
permissions:
|
||||
issues: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/issue-labeller.yml@main
|
||||
42
.github/workflows/kernel.yml
vendored
Normal file
42
.github/workflows/kernel.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
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
|
||||
16
.github/workflows/label-kernel.yml
vendored
Normal file
16
.github/workflows/label-kernel.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# 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
|
||||
16
.github/workflows/label-target.yml
vendored
Normal file
16
.github/workflows/label-target.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# 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
|
||||
33
.github/workflows/labeler.yml
vendored
Normal file
33
.github/workflows/labeler.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
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@v5
|
||||
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.1
|
||||
if: ${{ steps.check-branch.outputs.release-tag }}
|
||||
with:
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
labels: ${{ steps.check-branch.outputs.release-tag }}
|
||||
type: add
|
||||
42
.github/workflows/packages.yml
vendored
Normal file
42
.github/workflows/packages.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
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
|
||||
28
.github/workflows/push-containers.yml
vendored
Normal file
28
.github/workflows/push-containers.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
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
|
||||
26
.github/workflows/scripts/ci_helpers.sh
vendored
Normal file
26
.github/workflows/scripts/ci_helpers.sh
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
}
|
||||
15
.github/workflows/scripts/show_build_failures.sh
vendored
Executable file
15
.github/workflows/scripts/show_build_failures.sh
vendored
Executable file
@ -0,0 +1,15 @@
|
||||
#!/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"
|
||||
29
.github/workflows/toolchain.yml
vendored
Normal file
29
.github/workflows/toolchain.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
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
|
||||
27
.github/workflows/tools.yml
vendored
Normal file
27
.github/workflows/tools.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
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
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -36,4 +36,3 @@ git-src
|
||||
.cproject
|
||||
.ccache
|
||||
.vscode*
|
||||
.config.bak
|
||||
|
||||
@ -176,7 +176,6 @@ menu "Global build settings"
|
||||
config MOLD
|
||||
depends on (aarch64 || arm || i386 || i686 || m68k || powerpc || powerpc64 || sh4 || x86_64)
|
||||
depends on !GCC_USE_VERSION_11
|
||||
depends on !HOST_OS_MACOS
|
||||
def_bool $(shell, ./config/check-hostcxx.sh 10 2 12)
|
||||
|
||||
config USE_MOLD
|
||||
|
||||
@ -1,40 +1,30 @@
|
||||
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN
|
||||
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
|
||||
LLVM_VER:=
|
||||
|
||||
CLANG_MIN_VER:=12
|
||||
|
||||
ifneq ($(CONFIG_USE_LLVM_HOST),)
|
||||
find-llvm-tool=$(firstword $(shell PATH='$(BPF_PATH)' command -v $(1) || echo '$(firstword $(1))-not-found'))
|
||||
|
||||
BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
|
||||
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
|
||||
BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
|
||||
else
|
||||
BPF_PATH:=$(PATH)
|
||||
endif
|
||||
CLANG:=$(call find-llvm-tool,clang clang-13 clang-12)
|
||||
CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12 clang-11))
|
||||
LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
|
||||
|
||||
BPF_PATH:=$(dir $(CLANG)):$(BPF_PATH)
|
||||
LLVM_LLC:=$(call find-llvm-tool,llc$(LLVM_VER))
|
||||
LLVM_DIS:=$(call find-llvm-tool,llvm-dis$(LLVM_VER))
|
||||
LLVM_OPT:=$(call find-llvm-tool,opt$(LLVM_VER))
|
||||
LLVM_STRIP:=$(call find-llvm-tool,llvm-strip$(LLVM_VER))
|
||||
else
|
||||
LLVM_PATH:=/invalid
|
||||
|
||||
ifneq ($(CONFIG_USE_LLVM_PREBUILT),)
|
||||
LLVM_PATH:=$(TOPDIR)/llvm-bpf/bin
|
||||
endif
|
||||
ifneq ($(CONFIG_USE_LLVM_BUILD),)
|
||||
LLVM_PATH:=$(STAGING_DIR_HOST)/llvm-bpf/bin
|
||||
endif
|
||||
|
||||
CLANG:=$(LLVM_PATH)/clang
|
||||
LLVM_LLC:=$(LLVM_PATH)/llc
|
||||
LLVM_DIS:=$(LLVM_PATH)/llvm-dis
|
||||
LLVM_OPT:=$(LLVM_PATH)/opt
|
||||
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip
|
||||
endif
|
||||
ifneq ($(CONFIG_USE_LLVM_PREBUILT),)
|
||||
CLANG:=$(TOPDIR)/llvm-bpf/bin/clang
|
||||
endif
|
||||
ifneq ($(CONFIG_USE_LLVM_BUILD),)
|
||||
CLANG:=$(STAGING_DIR_HOST)/llvm-bpf/bin/clang
|
||||
endif
|
||||
|
||||
LLVM_PATH:=$(dir $(CLANG))
|
||||
LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
|
||||
LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
|
||||
LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
|
||||
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
|
||||
|
||||
BPF_KARCH:=mips
|
||||
BPF_ARCH:=mips$(if $(CONFIG_ARCH_64BIT),64)$(if $(CONFIG_BIG_ENDIAN),,el)
|
||||
|
||||
@ -232,9 +232,7 @@ define DownloadMethod/rawgit
|
||||
echo "Generating formal git archive (apply .gitattributes rules)" && \
|
||||
(cd $(SUBDIR) && git config core.abbrev 8 && \
|
||||
git archive --format=tar HEAD --output=../$(SUBDIR).tar.git) && \
|
||||
$(if $(filter skip,$(SUBMODULES)),true, \
|
||||
$(TAR) --numeric-owner --owner=0 --group=0 --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null \
|
||||
) && \
|
||||
$(if $(filter skip,$(SUBMODULES)),true,$(TAR) --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null) && \
|
||||
rm -rf $(SUBDIR) && mkdir $(SUBDIR) && \
|
||||
$(TAR) -C $(SUBDIR) -xf $(SUBDIR).tar.git && \
|
||||
(cd $(SUBDIR) && $(if $(filter skip,$(SUBMODULES)),true,git submodule update --init --recursive -- $(SUBMODULES) && \
|
||||
|
||||
@ -391,9 +391,8 @@ define Build/fit
|
||||
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION), gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME))))
|
||||
$(call locked,PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
|
||||
-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new, \
|
||||
gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME))))
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
|
||||
-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
@ -733,10 +732,6 @@ define Build/zip
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Build/zyimage
|
||||
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
|
||||
endef
|
||||
|
||||
define Build/zyxel-ras-image
|
||||
let \
|
||||
newsize="$(call exp_units,$(RAS_ROOTFS_SIZE))"; \
|
||||
|
||||
@ -49,8 +49,8 @@ IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$
|
||||
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
|
||||
IMG_COMBINED:=$(IMG_PREFIX)-combined
|
||||
ifeq ($(DUMP),)
|
||||
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(REVISION)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8)
|
||||
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(REVISION)$(LINUX_VERMAGIC) | $(MKHASH) md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
|
||||
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8)
|
||||
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
|
||||
endif
|
||||
|
||||
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
|
||||
@ -569,15 +569,6 @@ endef
|
||||
|
||||
define Device/Check/Common
|
||||
_PROFILE_SET = $$(strip $$(foreach profile,$$(PROFILES) DEVICE_$(1),$$(call DEVICE_CHECK_PROFILE,$$(profile))))
|
||||
# Check if device is disabled and if so do not mark to be installed when ImageBuilder is used
|
||||
ifeq ($(IB),1)
|
||||
ifeq ($$(DEFAULT),n)
|
||||
_PROFILE_SET :=
|
||||
endif
|
||||
ifeq ($$(BROKEN),y)
|
||||
_PROFILE_SET :=
|
||||
endif
|
||||
endif
|
||||
DEVICE_PACKAGES += $$(call extra_packages,$$(DEVICE_PACKAGES))
|
||||
ifdef TARGET_PER_DEVICE_ROOTFS
|
||||
$$(eval $$(call merge_packages,_PACKAGES,$$(DEVICE_PACKAGES) $$(call DEVICE_EXTRA_PACKAGES,$(1))))
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .119
|
||||
LINUX_KERNEL_HASH-6.6.119 = 3da09b980bb404cc28793479bb2d6c636522679215ffa65a04c893575253e5e8
|
||||
LINUX_VERSION-6.6 = .73
|
||||
LINUX_KERNEL_HASH-6.6.73 = d2028db190c201650898be8db1c705e9fe73ab44fc04290b4f7af63514122490
|
||||
|
||||
@ -85,7 +85,7 @@ endef
|
||||
|
||||
define Build/Compile/Optee-os
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
PATH=$(LINUX_DIR)/scripts/dtc/:$(STAGING_DIR_HOST)/bin:$(PATH) \
|
||||
PATH=$(LINUX_DIR)/scripts/dtc/:$(PATH) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
CROSS_COMPILE_core="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \
|
||||
|
||||
@ -181,7 +181,7 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
|
||||
)$$(call addfield,Provides,$$(call mergelist,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))))
|
||||
)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
|
||||
)$$(call addfield,Source,$(SOURCE)
|
||||
)$$(call addfield,SourceName,$(1)
|
||||
)$$(call addfield,SourceName,$(PKG_NAME)
|
||||
)$$(call addfield,License,$(LICENSE)
|
||||
)$$(call addfield,LicenseFiles,$(LICENSE_FILES)
|
||||
)$$(call addfield,Section,$(SECTION)
|
||||
@ -248,7 +248,7 @@ endif
|
||||
)
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $$(PDIR_$(1))
|
||||
$(INSTALL_DIR) $$(PDIR_$(1))/tmp
|
||||
|
||||
ifeq ($(CONFIG_USE_APK),)
|
||||
mkdir -p $$(IDIR_$(1))/CONTROL
|
||||
|
||||
@ -205,7 +205,7 @@ else
|
||||
DOWNLOAD_DIRS = package/download
|
||||
endif
|
||||
|
||||
download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile) $(if $(wildcard $(STAGING_DIR_HOST)/bin/zstd),,tools/zstd/compile)
|
||||
download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile)
|
||||
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
|
||||
|
||||
clean dirclean: .config
|
||||
|
||||
@ -1,21 +1,13 @@
|
||||
PKG_NAME ?= trusted-firmware-a
|
||||
PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
|
||||
|
||||
PKG_LTS ?=
|
||||
|
||||
ifneq ($(PKG_LTS),)
|
||||
PKG_VERSION_PREFIX:=lts-v
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION_PREFIX)$(PKG_VERSION)
|
||||
else
|
||||
PKG_VERSION_PREFIX:=v
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION_PREFIX)$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/$(PKG_VERSION_PREFIX)$(PKG_VERSION)?
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/v$(PKG_VERSION)?
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_TARGETS := bin
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
@ -90,7 +82,7 @@ define Build/Compile/Trusted-Firmware-A
|
||||
OPENSSL_DIR=$(STAGING_DIR_HOST) \
|
||||
$(if $(DTC),DTC="$(DTC)") \
|
||||
PLAT=$(PLAT) \
|
||||
BUILD_STRING="OpenWrt $(PKG_VERSION_PREFIX)$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
|
||||
$(TFA_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.5)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.0)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.5)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.0)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),iStoreOS)
|
||||
|
||||
@ -142,7 +142,10 @@ else
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
$(SCRIPT_DIR)/make-index-json.py -f opkg -a "$(ARCH_PACKAGES)" Packages > index.json; \
|
||||
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
|
||||
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
|
||||
echo '}}' >> index.json; \
|
||||
sed -i 's/, }}/}}/' index.json; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
[ "$ACTION" = "stratum" ] || exit 0
|
||||
|
||||
touch /var/state/ntp_last_sync
|
||||
@ -22,7 +22,6 @@ start() {
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -e /var/state/ntp_last_sync ] && touch /etc/.last_saved_time
|
||||
hwclock_save
|
||||
}
|
||||
|
||||
|
||||
16
package/base-files/files/etc/uci-defaults/13_lan-ip6class
Normal file
16
package/base-files/files/etc/uci-defaults/13_lan-ip6class
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
[ "$(uci -q get network.lan)" = "interface" ] || exit 0
|
||||
[ -z "$(uci -q get network.lan.gateway)" ] || exit 0
|
||||
[ "$(uci -q get network.wan.proto)" = "dhcp" ] || exit 0
|
||||
[ "$(uci -q get network.wan6)" = "interface" ] || exit 0
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete network.lan.ip6class
|
||||
add_list network.lan.ip6class='wan6'
|
||||
add_list network.lan.ip6class='wan_6'
|
||||
add_list network.lan.ip6class='wan'
|
||||
commit network
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
|
||||
@ -384,19 +384,16 @@ default_postinst() {
|
||||
fi
|
||||
|
||||
if grep -m1 -q -s "^/usr/share/rpcd/acl\\.d/" "$filelist"; then
|
||||
/etc/init.d/rpcd reload 2>/dev/null
|
||||
/etc/init.d/rpcd reload
|
||||
fi
|
||||
|
||||
if grep -m1 -q -s "^/usr/lib/lua/luci/" "$filelist"; then
|
||||
if grep -m1 -q -s "^/usr/lib/lua/luci/i18n/" "$filelist"; then
|
||||
/etc/init.d/fix_luci_lang boot 2>/dev/null
|
||||
/etc/init.d/fix_luci_lang boot
|
||||
touch /tmp/luci-i18n-mtime
|
||||
fi
|
||||
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache /tmp/luci-indexcache.*
|
||||
fi
|
||||
if grep -m1 -q -s "^/usr/share/luci/menu.d/" "$filelist"; then
|
||||
rm -f /tmp/luci-indexcache.*
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$root/usr/lib/opkg/info/${pkgname}.postinst-pkg" ]; then
|
||||
|
||||
@ -125,8 +125,8 @@ caldata_valid() {
|
||||
caldata_patch_data() {
|
||||
local data=$1
|
||||
local data_count=$((${#1} / 2))
|
||||
[ -n "$2" ] && local data_offset=$(($2))
|
||||
[ -n "$3" ] && local chksum_offset=$(($3))
|
||||
local data_offset=$(($2))
|
||||
local chksum_offset=$(($3))
|
||||
local target=$4
|
||||
local fw_data
|
||||
local fw_chksum
|
||||
|
||||
@ -315,10 +315,3 @@ macaddr_canonicalize() {
|
||||
dt_is_enabled() {
|
||||
grep -q okay "/proc/device-tree/$1/status"
|
||||
}
|
||||
|
||||
get_linux_version() {
|
||||
local ver=$(uname -r)
|
||||
local minor=${ver%\.*}
|
||||
|
||||
printf "%d%02d%03d" ${ver%%\.*} ${minor#*\.} ${ver##*\.} 2>/dev/null
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ CONF_IMAGE=
|
||||
CONF_BACKUP_LIST=0
|
||||
CONF_BACKUP=
|
||||
CONF_RESTORE=
|
||||
USE_CURR_PART=0
|
||||
NEED_IMAGE=
|
||||
HELP=0
|
||||
TEST=0
|
||||
@ -51,7 +50,6 @@ while [ -n "$1" ]; do
|
||||
-r|--restore-backup) CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
|
||||
-l|--list-backup) CONF_BACKUP_LIST=1;;
|
||||
-f) CONF_IMAGE="$2"; shift;;
|
||||
-s) USE_CURR_PART=1;;
|
||||
-F|--force) export FORCE=1;;
|
||||
-T|--test) TEST=1;;
|
||||
-h|--help) HELP=1; break;;
|
||||
@ -81,7 +79,6 @@ upgrade-option:
|
||||
-p do not attempt to restore the partition table after flash.
|
||||
-k include in backup a list of current installed packages at
|
||||
$INSTALLED_PACKAGES
|
||||
-s stay on current partition (for dual firmware devices)
|
||||
-T | --test
|
||||
Verify image and config .tar.gz but do not actually flash.
|
||||
-F | --force
|
||||
@ -419,7 +416,6 @@ else
|
||||
json_add_string command "$COMMAND"
|
||||
json_add_object options
|
||||
json_add_int save_partitions "$SAVE_PARTITIONS"
|
||||
[ $USE_CURR_PART -eq 1 ] && json_add_boolean use_curr_part 1
|
||||
json_close_object
|
||||
|
||||
ubus call system sysupgrade "$(json_dump)"
|
||||
|
||||
@ -140,17 +140,6 @@ clean_overlayfs_origin() {
|
||||
cd - >/dev/null 2>&1
|
||||
}
|
||||
|
||||
clean_overlayfs_redundant_opaque() {
|
||||
local line
|
||||
cd "$1"
|
||||
getfattr -R -P -h --match='trusted.overlay.opaque' . 2>/dev/null | grep '^# file: ' | cut -c9- | while read; do
|
||||
line="$REPLY"
|
||||
[ -z "$line" -o -d "/$line" ] && continue
|
||||
setfattr -x "trusted.overlay.opaque" -h "$line" 2>/dev/null
|
||||
done
|
||||
cd - >/dev/null 2>&1
|
||||
}
|
||||
|
||||
clean_overlayfs_redundant_whiteout_marker()
|
||||
{
|
||||
local line
|
||||
@ -158,6 +147,7 @@ clean_overlayfs_redundant_whiteout_marker()
|
||||
find upper -xdev -path 'upper/opt' -prune ! -type d -o -type c -perm 0 -user 0 -group 0 | sed 's#^upper/#/#g' | while read; do
|
||||
line="$REPLY"
|
||||
[ ! -e "$line" -a \( -z "$2" -o ! -e "$2/upper$line" \) ] && \
|
||||
busybox ls -l "upper$line" | grep -Fq 'c--------- 1 root root 0, 0 ' && \
|
||||
rm -f "upper$line"
|
||||
done
|
||||
cd - >/dev/null 2>&1
|
||||
@ -171,6 +161,7 @@ clean_overlayfs_redundant_whiteout_marker_luci()
|
||||
find luci -xdev -type c -perm 0 -user 0 -group 0 | while read; do
|
||||
line="$REPLY"
|
||||
[ ! -e "/usr/lib/lua/$line" -a \( -z "$2" -o ! -e "$2/upper/usr/lib/lua/$line" \) ] && \
|
||||
busybox ls -l "$line" | grep -Fq 'c--------- 1 root root 0, 0 ' && \
|
||||
rm -f "$line"
|
||||
done
|
||||
cd - >/dev/null 2>&1
|
||||
@ -213,7 +204,8 @@ clean_pkg_content() {
|
||||
}
|
||||
|
||||
pkg_depends_rec() {
|
||||
local pkgname="$1"
|
||||
local overlay="$1"
|
||||
local pkgname="$2"
|
||||
local line
|
||||
local dep
|
||||
local deps
|
||||
@ -222,41 +214,39 @@ pkg_depends_rec() {
|
||||
|
||||
if [ -f /usr/lib/opkg/info/${pkgname}.control -a ! -f /tmp/reset_core_packages/${pkgname} ]; then
|
||||
deps=`grep '^Depends: ' /usr/lib/opkg/info/${pkgname}.control | sed -e 's/^Depends: //' -e 's/ ([^)]*)//g' -e 's/,/ /g'`
|
||||
# avoid loop deps
|
||||
rm -f $overlay/upper/usr/lib/opkg/info/${pkgname}.control
|
||||
touch /tmp/reset_core_packages/${pkgname}
|
||||
for dep in $deps ; do
|
||||
pkg_depends_rec "$dep"
|
||||
pkg_depends_rec "$overlay" "$dep"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
list_core_packages()
|
||||
{
|
||||
local pkg
|
||||
mkdir -p /tmp/reset_core_packages
|
||||
for pkg in \
|
||||
luci-compat luci-lua-runtime luci-lib-base luci-base uhttpd luci-ssl-openssl luci-ssl \
|
||||
rpcd procd \
|
||||
netifd dnsmasq-full dnsmasq firewall4 \
|
||||
block-mount \
|
||||
curl \
|
||||
ttyd dropbear kernel
|
||||
do
|
||||
pkg_depends_rec $pkg
|
||||
done
|
||||
}
|
||||
|
||||
reset_core_packages()
|
||||
{
|
||||
local overlay="$1"
|
||||
local running_ver=$(grep 'DISTRIB_RELEASE=' /etc/openwrt_release 2>/dev/null | sed -E "s/.*='(.+)'.*/\1/")
|
||||
[ "v$(cat "$overlay/.upgrading" 2>/dev/null)" = "v$running_ver" ] && return
|
||||
local pkg
|
||||
[ -d /tmp/reset_core_packages ] || list_core_packages
|
||||
echo "Reset packages in $overlay: `ls /tmp/reset_core_packages/ | xargs echo`" | dd bs=960 2>/dev/null
|
||||
rm -rf /tmp/reset_core_packages
|
||||
mkdir -p /tmp/reset_core_packages
|
||||
for pkg in \
|
||||
luci-compat luci-lua-runtime luci-lib-base luci-base uhttpd \
|
||||
rpcd procd \
|
||||
netifd dnsmasq-full dnsmasq firewall4 \
|
||||
block-mount \
|
||||
curl \
|
||||
ttyd kernel
|
||||
do
|
||||
pkg_depends_rec "$overlay" $pkg
|
||||
done
|
||||
log "Reset packages in $overlay: `ls /tmp/reset_core_packages/ | xargs echo`"
|
||||
ls /tmp/reset_core_packages/ | while read; do
|
||||
pkg="$REPLY"
|
||||
clean_pkg_content "$overlay" $pkg
|
||||
done
|
||||
rm -rf /tmp/reset_core_packages
|
||||
}
|
||||
|
||||
clean_kmods()
|
||||
@ -284,7 +274,7 @@ clean_kmods()
|
||||
rm -f /tmp/safe_kmods.txt
|
||||
|
||||
if [ -s /tmp/del_kmods.txt ]; then
|
||||
echo "Clean kmods in $1: `cat /tmp/del_kmods.txt | xargs echo`" | dd bs=960 2>/dev/null
|
||||
log "Clean kmods in $1: `cat /tmp/del_kmods.txt | xargs echo`"
|
||||
|
||||
cat /tmp/del_kmods.txt | sed 's/$/.list/' | xargs cat | sed "s#^/#$1/upper/#" | xargs -r rm -f
|
||||
cat /tmp/del_kmods.txt | xargs -rn1 sh -c 'rm -f $0.list $0.prerm $0.postinst'
|
||||
@ -309,34 +299,25 @@ prepare_primary_overlay()
|
||||
rm -rf /overlay/upper /overlay/work
|
||||
rm -f /overlay/.reset
|
||||
sync /overlay
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_primary_overlay_after_merge()
|
||||
{
|
||||
if [ -d /overlay/upper ]; then
|
||||
if update_overlay_lower_uuid /overlay || [ -f /overlay/.upgrading ] ; then
|
||||
clean_os_version_files /overlay
|
||||
reset_core_packages /overlay
|
||||
touch /overlay/.upgrading
|
||||
fi
|
||||
if [ -f /overlay/.upgrading -o -f /overlay/.merged ] ; then
|
||||
if is_overlayfs_use_xattr ; then
|
||||
clean_overlayfs_origin /overlay/upper
|
||||
clean_overlayfs_redundant_opaque /overlay/upper
|
||||
fi
|
||||
clean_overlayfs_redundant_whiteout_marker /overlay
|
||||
else
|
||||
clean_overlayfs_redundant_whiteout_marker_luci /overlay
|
||||
fi
|
||||
else
|
||||
update_overlay_lower_uuid /overlay
|
||||
fi
|
||||
if [ -f /overlay/upper/usr/lib/opkg/.upgrading ]; then
|
||||
clean_kmods /overlay
|
||||
if [ -d /overlay/upper ] ; then
|
||||
if update_overlay_lower_uuid /overlay || [ -f /overlay/.upgrading ] ; then
|
||||
clean_os_version_files /overlay
|
||||
reset_core_packages /overlay
|
||||
is_overlayfs_use_xattr && clean_overlayfs_origin /overlay/upper
|
||||
clean_overlayfs_redundant_whiteout_marker /overlay
|
||||
else
|
||||
clean_overlayfs_redundant_whiteout_marker_luci /overlay
|
||||
fi
|
||||
else
|
||||
update_overlay_lower_uuid /overlay
|
||||
fi
|
||||
if [ -f /overlay/upper/usr/lib/opkg/.upgrading ]; then
|
||||
clean_kmods /overlay
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f /overlay/.upgrading /overlay/.merged
|
||||
rm -f /overlay/.upgrading
|
||||
|
||||
mkdir -p /overlay/upper /overlay/work
|
||||
}
|
||||
@ -390,20 +371,7 @@ prepare_ext_overlay()
|
||||
if [ -f "$newoverlaydir/.reset" ]; then
|
||||
rm -rf "$newoverlaydir/upper"
|
||||
rm -f "$newoverlaydir/.commit" "$newoverlaydir/.reset"
|
||||
elif [ -f "$newoverlaydir/.commit" ]; then
|
||||
if [ -d "$newoverlaydir/upper" ]; then
|
||||
apply_overlayfs_opaque "$newoverlaydir" "$overlaydir"
|
||||
fi
|
||||
cp -a "$newoverlaydir/upper/." "$overlaydir/upper" && {
|
||||
touch "$overlaydir/.merged"
|
||||
rmdir "$overlaydir/upper/ext_overlay"
|
||||
rm -rf "$newoverlaydir/upper"
|
||||
mkdir -m 0755 -p "$newoverlaydir/upper/ext_overlay"
|
||||
}
|
||||
rm -f "$newoverlaydir/.commit"
|
||||
else
|
||||
prepare_primary_overlay_after_merge
|
||||
touch "$overlaydir/.clean"
|
||||
if [ -f "$newoverlaydir/upper/usr/lib/opkg/.upgrading" ]; then
|
||||
clean_kmods "$newoverlaydir"
|
||||
fi
|
||||
@ -412,7 +380,18 @@ prepare_ext_overlay()
|
||||
reset_core_packages "$newoverlaydir"
|
||||
is_overlayfs_use_xattr && clean_overlayfs_origin "$newoverlaydir/upper"
|
||||
fi
|
||||
if [ -d "$newoverlaydir/upper" -a \( -f "$newoverlaydir/upper/usr/lib/opkg/.upgrading" -o ! -f "$overlaydir/.sandbox" \) ]; then
|
||||
if [ -f "$newoverlaydir/.commit" ]; then
|
||||
if [ -d "$newoverlaydir/upper" ]; then
|
||||
apply_overlayfs_opaque "$newoverlaydir" "$overlaydir"
|
||||
fi
|
||||
cp -a "$newoverlaydir/upper/." "$overlaydir/upper" && {
|
||||
rmdir "$overlaydir/upper/ext_overlay"
|
||||
clean_overlayfs_redundant_whiteout_marker "$overlaydir"
|
||||
rm -rf "$newoverlaydir/upper"
|
||||
mkdir -m 0755 -p "$newoverlaydir/upper/ext_overlay"
|
||||
}
|
||||
rm -f "$newoverlaydir/.commit"
|
||||
elif [ -d "$newoverlaydir/upper" -a \( -f "$newoverlaydir/upper/usr/lib/opkg/.upgrading" -o ! -f "$overlaydir/.sandbox" \) ]; then
|
||||
clean_overlayfs_redundant_whiteout_marker "$newoverlaydir" "$overlaydir"
|
||||
else
|
||||
clean_overlayfs_redundant_whiteout_marker_luci "$newoverlaydir" "$overlaydir"
|
||||
@ -429,11 +408,8 @@ prepare_ext_overlay()
|
||||
|
||||
prepare_mnt()
|
||||
{
|
||||
rm -rf /tmp/reset_core_packages
|
||||
prepare_primary_overlay
|
||||
|
||||
local dir
|
||||
if mount_extroot && mountpoint -q /tmp/extroot/mnt; then
|
||||
local dir
|
||||
for dir in proc dev tmp sys overlay rom root; do
|
||||
mkdir -m 0755 /tmp/extroot/mnt/$dir
|
||||
done
|
||||
@ -460,13 +436,6 @@ prepare_mnt()
|
||||
umount /tmp/extroot/overlay
|
||||
fi
|
||||
fi
|
||||
if [ -f /overlay/.clean ]; then
|
||||
rm -f /overlay/.clean
|
||||
else
|
||||
prepare_primary_overlay_after_merge
|
||||
fi
|
||||
|
||||
rm -rf /tmp/reset_core_packages
|
||||
|
||||
mount -o noatime,lowerdir=$lowerdir,upperdir=$overlaydir/upper,workdir=$overlaydir/work \
|
||||
-t overlay "overlayfs:/overlay" /mnt \
|
||||
@ -514,6 +483,8 @@ do_mount_overlayfs()
|
||||
return 0
|
||||
fi
|
||||
|
||||
inlog prepare_primary_overlay
|
||||
|
||||
inlog prepare_mnt || return 1
|
||||
|
||||
inlog pivot_root_to_overlayfs || return 1
|
||||
|
||||
@ -117,7 +117,7 @@ menuconfig INITOPT
|
||||
config TARGET_INIT_PATH
|
||||
string
|
||||
prompt "PATH for regular boot" if INITOPT
|
||||
default "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
default "/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
help
|
||||
Default PATH used during normal operation
|
||||
|
||||
@ -190,7 +190,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/24.10.5"
|
||||
default "https://downloads.openwrt.org/releases/24.10.0"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@ -35,8 +35,6 @@ define Trusted-Firmware-A/Default
|
||||
DRAM_USE_COMB:=
|
||||
RAM_BOOT_UART_DL:=
|
||||
USE_UBI:=
|
||||
FIP_OFFSET:=
|
||||
FIP_SIZE:=
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7622-nor-1ddr
|
||||
@ -223,16 +221,6 @@ define Trusted-Firmware-A/mt7981-spim-nand-ddr3
|
||||
DDR_TYPE:=ddr3
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-cudy-tr3000-v1
|
||||
NAME:=Cudy TR3000 v1 (SPI-NAND via SPIM, DDR3)
|
||||
BOOT_DEVICE:=spim-nand
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7981
|
||||
DDR_TYPE:=ddr3
|
||||
FIP_OFFSET:=0x3c0000
|
||||
FIP_SIZE:=0x200000
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-ram-ddr4
|
||||
NAME:=MediaTek MT7986 (RAM, DDR4)
|
||||
BOOT_DEVICE:=ram
|
||||
@ -546,7 +534,6 @@ TFA_TARGETS:= \
|
||||
mt7981-ram-ddr4 \
|
||||
mt7981-emmc-ddr4 \
|
||||
mt7981-spim-nand-ddr4 \
|
||||
mt7981-cudy-tr3000-v1 \
|
||||
mt7986-ram-ddr3 \
|
||||
mt7986-emmc-ddr3 \
|
||||
mt7986-nor-ddr3 \
|
||||
@ -594,8 +581,6 @@ TFA_MAKE_FLAGS += \
|
||||
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
|
||||
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7981,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x100000)) \
|
||||
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7986,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x200000)) \
|
||||
$(if $(FIP_OFFSET),OVERRIDE_FIP_BASE=$(FIP_OFFSET)) \
|
||||
$(if $(FIP_SIZE),OVERRIDE_FIP_SIZE=$(FIP_SIZE)) \
|
||||
$(if $(RAM_BOOT_UART_DL),bl2,all)
|
||||
|
||||
define Package/trusted-firmware-a-ram/install
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2.10.17
|
||||
PKG_VERSION:=2.10
|
||||
PKG_RELEASE:=1
|
||||
PKG_LTS:=1
|
||||
|
||||
PKG_HASH:=2558b2579dd1c45db6de89c49e647c109022d45da03eb74e0f6123c294295099
|
||||
PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201
|
||||
PKG_MAINTAINER:=Thomas Richard <thomas.richard@bootlin.com>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
@ -201,9 +201,4 @@ define Build/Compile
|
||||
CROSS_COMPILE=$(TARGET_CROSS)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-at91bootstrap.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/AT91Bootstrap))
|
||||
|
||||
@ -63,40 +63,13 @@ define Trusted-Firmware-A/rk3588
|
||||
TPL:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/rk3528
|
||||
BUILD_SUBTARGET:=armv8
|
||||
ATF:=rk35/rk3528_bl31_v1.17.elf
|
||||
TPL:=rk35/rk3528_ddr_1056MHz_v1.09.bin
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/rk3576
|
||||
BUILD_SUBTARGET:=armv8
|
||||
ATF:=rk35/$$(ATF_FILE)
|
||||
TPL:=rk35/$$(TPL_FILE)
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/rk3588-lp4-1866
|
||||
$(call Trusted-Firmware-A/rk3588,$(1))
|
||||
TPL:=$$(MOD_TPL)
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/rk3588-uart2-115200
|
||||
$(call Trusted-Firmware-A/rk3588,$(1))
|
||||
TPL:=$$(MOD_TPL)
|
||||
endef
|
||||
|
||||
|
||||
TFA_TARGETS:= \
|
||||
rk3308 \
|
||||
rk3308-rock-pi-s \
|
||||
rk3528 \
|
||||
rk3566 \
|
||||
rk3568 \
|
||||
rk3568-e25 \
|
||||
rk3576 \
|
||||
rk3588 \
|
||||
rk3588-lp4-1866 \
|
||||
rk3588-uart2-115200
|
||||
rk3588
|
||||
|
||||
ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s)
|
||||
TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin
|
||||
@ -130,58 +103,6 @@ ifeq ($(BUILD_VARIANT),rk3568-e25)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),rk3576)
|
||||
ATF_FILE:=rk3576_bl31_v1.15.elf
|
||||
TPL_FILE:=rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.09.bin
|
||||
define Download/rk3576-atf
|
||||
FILE:=$(ATF_FILE)
|
||||
URL:=https://github.com/rockchip-linux/rkbin/raw/f43a462e7a1429a9d407ae52b4745033034a6cf9/bin/rk35/
|
||||
HASH:=86c1c3e449612bd4ed045da187e58042e3dfb582f14bf5bd3e0954874095a581
|
||||
endef
|
||||
define Download/rk3576-tpl
|
||||
FILE:=$(TPL_FILE)
|
||||
URL:=https://github.com/rockchip-linux/rkbin/raw/f43a462e7a1429a9d407ae52b4745033034a6cf9/bin/rk35/
|
||||
HASH:=79bdf7eb259274eec83ea2f6330214b0c0035255bc5563746871f6f8ce7cf089
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(eval $(call Download,rk3576-atf))
|
||||
$(eval $(call Download,rk3576-tpl))
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
$(CP) $(DL_DIR)/$(ATF_FILE) $(PKG_BUILD_DIR)/bin/rk35/
|
||||
$(CP) $(DL_DIR)/$(TPL_FILE) $(PKG_BUILD_DIR)/bin/rk35/
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),rk3588-lp4-1866)
|
||||
$(eval $(call Trusted-Firmware-A/rk3588,$(BUILD_VARIANT)))
|
||||
SRC_TPL:=$(TPL)
|
||||
MOD_TPL:=$(subst _lp4_2112MHz_,_lp4_1866MHz_,$(TPL))
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/sed 's/^lp4_freq=.*/lp4_freq=1866/' $(PKG_BUILD_DIR)/tools/ddrbin_param.txt > $(PKG_BUILD_DIR)/tools/ddrbin_param_lp4-1866.txt
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(SRC_TPL) $(PKG_BUILD_DIR)/bin/$(MOD_TPL)
|
||||
$(PKG_BUILD_DIR)/tools/ddrbin_tool rk3588 $(PKG_BUILD_DIR)/tools/ddrbin_param_lp4-1866.txt $(PKG_BUILD_DIR)/bin/$(MOD_TPL)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),rk3588-uart2-115200)
|
||||
$(eval $(call Trusted-Firmware-A/rk3588,$(BUILD_VARIANT)))
|
||||
SRC_TPL:=$(TPL)
|
||||
MOD_TPL:=$(subst MHz_v,MHz_uart2_115200_v,$(TPL))
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/sed 's/^uart baudrate=.*/uart baudrate=115200/' $(PKG_BUILD_DIR)/tools/ddrbin_param.txt > $(PKG_BUILD_DIR)/tools/ddrbin_param_uart2-115200.txt
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(SRC_TPL) $(PKG_BUILD_DIR)/bin/$(MOD_TPL)
|
||||
$(PKG_BUILD_DIR)/tools/ddrbin_tool rk3588 $(PKG_BUILD_DIR)/tools/ddrbin_param_uart2-115200.txt $(PKG_BUILD_DIR)/bin/$(MOD_TPL)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ endef
|
||||
define Trusted-Firmware-A/Default
|
||||
BUILD_TARGET:=layerscape
|
||||
BUILD_SUBTARGET:=armv8_64b
|
||||
BUILD_DEVICES:=fsl_$(1)
|
||||
DEPENDS:=+layerscape-rcw +u-boot-fsl_$(1)
|
||||
endef
|
||||
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=git-20240315
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=default
|
||||
PKG_SOURCE:=ophub-uboot-prebuilt-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_VERSION:=abe491ab386607f9ab0d66728e5766bc5d7e8a20
|
||||
PKG_SOURCE_URL_FILE:=$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/ophub/u-boot/archive/
|
||||
PKG_HASH:=3f98f5728f48d13f33cf4fd21fb6032a625ad3c61aa2e8073dda821f71f067ec
|
||||
|
||||
PKG_MAINTAINER:=jjm2473
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
|
||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=amlogic
|
||||
UENV:=default
|
||||
HIDDEN:=1
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
define U-Boot/phicomm-n1
|
||||
NAME:=Phicomm N1
|
||||
OVERLAY:=u-boot-n1.bin
|
||||
BUILD_SUBTARGET:=meson
|
||||
BUILD_DEVICES:=phicomm_n1
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := phicomm-n1
|
||||
|
||||
define Build/Configure
|
||||
true
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot/amlogic/overload/$(OVERLAY) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-overlay.bin
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
@ -179,9 +179,4 @@ define Build/Compile
|
||||
$(UBOOT_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*|\
|
||||
gateworks,imx8m*)
|
||||
# board boots from emmc boot0 hardware partition
|
||||
ubootenv_add_uci_config /dev/mmcblk2boot0 0x3f0000 0x8000
|
||||
ubootenv_add_uci_config /dev/mmcblk2boot0 0x3f8000 0x8000
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config ubootenv
|
||||
|
||||
exit 0
|
||||
@ -34,14 +34,10 @@ ubootenv_add_ubi_default() {
|
||||
|
||||
case "$board" in
|
||||
abt,asr3000|\
|
||||
cmcc,a10-ubootmod|\
|
||||
cudy,tr3000-v1-ubootmod|\
|
||||
h3c,magic-nx30-pro|\
|
||||
jcg,q30-pro|\
|
||||
konka,komi-a31|\
|
||||
mercusys,mr90x-v1-ubi|\
|
||||
netcore,n60|\
|
||||
netis,nx31|\
|
||||
nokia,ea0326gmp|\
|
||||
qihoo,360t7|\
|
||||
routerich,ax3000-ubootmod|\
|
||||
@ -61,8 +57,7 @@ acer,vero-w6m|\
|
||||
glinet,gl-mt2500|\
|
||||
glinet,gl-mt6000|\
|
||||
glinet,gl-x3000|\
|
||||
glinet,gl-xe3000|\
|
||||
huasifei,wh3000)
|
||||
glinet,gl-xe3000)
|
||||
local envdev=$(find_mmc_part "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
|
||||
;;
|
||||
@ -110,10 +105,8 @@ gatonetworks,gdsp)
|
||||
glinet,gl-mt3000)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
|
||||
;;
|
||||
mercusys,mr80x-v3|\
|
||||
mercusys,mr90x-v1|\
|
||||
routerich,ax3000|\
|
||||
routerich,ax3000-v1|\
|
||||
tplink,re6000xd)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
@ -131,9 +124,6 @@ smartrg,sdg-8734)
|
||||
local envdev=$(find_mmc_part "u-boot-env" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x8000" "0x8000"
|
||||
;;
|
||||
tplink,archer-ax80-v1)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
|
||||
;;
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
|
||||
@ -29,11 +29,6 @@ edimax,cax1800)
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
linksys,homewrk)
|
||||
idx="$(find_mtd_index 0:appsblenv)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x40000"
|
||||
;;
|
||||
linksys,mx4200v1|\
|
||||
linksys,mx4200v2|\
|
||||
linksys,mx5300|\
|
||||
@ -42,11 +37,6 @@ linksys,mx8500)
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
|
||||
;;
|
||||
linksys,mx4300)
|
||||
idx="$(find_mtd_index u_env)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
netgear,sxr80|\
|
||||
netgear,sxs80|\
|
||||
tplink,eap660hd-v1)
|
||||
|
||||
@ -19,10 +19,8 @@ alfa-network,r36m-e4g|\
|
||||
alfa-network,tube-e4g|\
|
||||
engenius,epg600|\
|
||||
engenius,esr600h|\
|
||||
hongdian,h8922-v30|\
|
||||
linksys,re7000|\
|
||||
meig,slt866|\
|
||||
qding,qc202|\
|
||||
sitecom,wlr-4100-v1-002|\
|
||||
zyxel,keenetic-lite-iii-a)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
|
||||
@ -64,7 +62,6 @@ kroks,kndrt31r19|\
|
||||
mediatek,linkit-smart-7688|\
|
||||
samknows,whitebox-v8|\
|
||||
xiaomi,mi-router-4c|\
|
||||
xiaomi,miwifi-3a|\
|
||||
xiaomi,miwifi-nano|\
|
||||
zbtlink,zbt-wg2626|\
|
||||
zte,mf283plus)
|
||||
@ -150,8 +147,7 @@ xiaomi,mi-router-cr6608|\
|
||||
xiaomi,mi-router-cr6609)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
dna,valokuitu-plus-ex400|\
|
||||
genexis,pulse-ex400)
|
||||
dna,valokuitu-plus-ex400)
|
||||
ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
|
||||
@ -28,7 +28,6 @@ zyxel,gs1900-10hp|\
|
||||
zyxel,gs1900-16|\
|
||||
zyxel,gs1900-24-v1|\
|
||||
zyxel,gs1900-24e|\
|
||||
zyxel,gs1900-24ep|\
|
||||
zyxel,gs1900-24hp-v1|\
|
||||
zyxel,gs1900-24hp-v2)
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
|
||||
@ -231,18 +231,6 @@ define U-Boot/mt7981_abt_asr3000
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_a10
|
||||
NAME:=CMCC A10
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=cmcc_a10-ubootmod
|
||||
UBOOT_CONFIG:=mt7981_cmcc_a10
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_rax3000m-emmc
|
||||
NAME:=CMCC RAX3000M
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@ -267,17 +255,6 @@ define U-Boot/mt7981_cmcc_rax3000m-nand
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cudy_tr3000-v1
|
||||
NAME:=Cudy TR3000 v1
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=cudy_tr3000-v1-ubootmod
|
||||
UBOOT_CONFIG:=mt7981_cudy_tr3000-v1
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=cudy-tr3000-v1
|
||||
BL2_SOC:=mt7981
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-cudy-tr3000-v1
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_glinet_gl-x3000
|
||||
NAME:=GL.iNet GL-X3000
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@ -326,30 +303,6 @@ define U-Boot/mt7981_jcg_q30-pro
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_konka_komi-a31
|
||||
NAME:=Konka KOMI A31
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=konka_komi-a31
|
||||
UBOOT_CONFIG:=mt7981_konka_komi-a31
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_netis_nx31
|
||||
NAME:=netis NX31
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=netis_nx31
|
||||
UBOOT_CONFIG:=mt7981_netis_nx31
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_nokia_ea0326gmp
|
||||
NAME:=Nokia EA0326GMP
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@ -879,17 +832,13 @@ UBOOT_TARGETS := \
|
||||
mt7628_ravpower_rp-wd009 \
|
||||
mt7629_rfb \
|
||||
mt7981_abt_asr3000 \
|
||||
mt7981_cmcc_a10 \
|
||||
mt7981_cmcc_rax3000m-emmc \
|
||||
mt7981_cmcc_rax3000m-nand \
|
||||
mt7981_cudy_tr3000-v1 \
|
||||
mt7981_gatonetworks_gdsp \
|
||||
mt7981_glinet_gl-x3000 \
|
||||
mt7981_glinet_gl-xe3000 \
|
||||
mt7981_h3c_magic-nx30-pro \
|
||||
mt7981_jcg_q30-pro \
|
||||
mt7981_konka_komi-a31 \
|
||||
mt7981_netis_nx31 \
|
||||
mt7981_nokia_ea0326gmp \
|
||||
mt7981_openwrt_one-snand \
|
||||
mt7981_openwrt_one-nor \
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
Subject: [PATCH] mtd: spinand: esmt: add support for F50L1G41LC
|
||||
|
||||
This adds support for ESMT F50L1G41LC, which appears to be an updated
|
||||
version of the already supported F50L1G41LB.
|
||||
Add esmt_8c SPI_NAND manufacturer to account for the newly used vendor
|
||||
ID with support for the ESMT F50L1G41LC chip.
|
||||
|
||||
--- a/drivers/mtd/nand/spi/core.c
|
||||
+++ b/drivers/mtd/nand/spi/core.c
|
||||
@@ -834,6 +834,7 @@ static const struct spinand_manufacturer
|
||||
&toshiba_spinand_manufacturer,
|
||||
&winbond_spinand_manufacturer,
|
||||
&esmt_c8_spinand_manufacturer,
|
||||
+ &esmt_8c_spinand_manufacturer,
|
||||
&xtx_spinand_manufacturer,
|
||||
};
|
||||
|
||||
--- a/drivers/mtd/nand/spi/esmt.c
|
||||
+++ b/drivers/mtd/nand/spi/esmt.c
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/* ESMT uses GigaDevice 0xc8 JECDEC ID on some SPI NANDs */
|
||||
#define SPINAND_MFR_ESMT_C8 0xc8
|
||||
+#define SPINAND_MFR_ESMT_8C 0x8c
|
||||
|
||||
static SPINAND_OP_VARIANTS(read_cache_variants,
|
||||
SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
|
||||
@@ -104,6 +105,18 @@ static const struct mtd_ooblayout_ops f5
|
||||
.rfree = f50l1g41lb_ooblayout_free,
|
||||
};
|
||||
|
||||
+static const struct spinand_info esmt_8c_spinand_table[] = {
|
||||
+ SPINAND_INFO("F50L1G41LC",
|
||||
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x2C),
|
||||
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
|
||||
+ NAND_ECCREQ(1, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ 0,
|
||||
+ SPINAND_ECCINFO(&f50l1g41lb_ooblayout, NULL)),
|
||||
+};
|
||||
+
|
||||
static const struct spinand_info esmt_c8_spinand_table[] = {
|
||||
SPINAND_INFO("F50L1G41LB",
|
||||
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x01),
|
||||
@@ -135,3 +148,11 @@ const struct spinand_manufacturer esmt_c
|
||||
.nchips = ARRAY_SIZE(esmt_c8_spinand_table),
|
||||
.ops = &esmt_spinand_manuf_ops,
|
||||
};
|
||||
+
|
||||
+const struct spinand_manufacturer esmt_8c_spinand_manufacturer = {
|
||||
+ .id = SPINAND_MFR_ESMT_8C,
|
||||
+ .name = "ESMT",
|
||||
+ .chips = esmt_8c_spinand_table,
|
||||
+ .nchips = ARRAY_SIZE(esmt_8c_spinand_table),
|
||||
+ .ops = &esmt_spinand_manuf_ops,
|
||||
+};
|
||||
--- a/include/linux/mtd/spinand.h
|
||||
+++ b/include/linux/mtd/spinand.h
|
||||
@@ -252,6 +252,7 @@ extern const struct spinand_manufacturer
|
||||
extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer winbond_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
|
||||
+extern const struct spinand_manufacturer esmt_8c_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer xtx_spinand_manufacturer;
|
||||
|
||||
/**
|
||||
File diff suppressed because it is too large
Load Diff
@ -187,12 +187,13 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -109,6 +122,18 @@
|
||||
@@ -109,6 +122,19 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ key_pins_a: keys-alt {
|
||||
+ mux {
|
||||
+ function = "gpio";
|
||||
+ groups = "msdc3";
|
||||
+ };
|
||||
+
|
||||
|
||||
@ -503,7 +503,7 @@
|
||||
+ compatible = "ethernet-phy-id03a2.a411";
|
||||
+ reg = <14>;
|
||||
+
|
||||
+ airoha,pnswap-rx;
|
||||
+ airoha,rx-pol-reverse;
|
||||
+
|
||||
+ reset-gpios = <&gpio 49 GPIO_ACTIVE_LOW>;
|
||||
+ reset-assert-us = <10000>;
|
||||
|
||||
@ -1,330 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_cudy_tr3000-v1_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cudy-tr3000-v1"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cudy-tr3000-v1.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="cudy_tr3000-v1_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cudy-tr3000-v1.dts
|
||||
@@ -0,0 +1,160 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Cudy TR3000 v1";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-mode {
|
||||
+ label = "mode";
|
||||
+ linux,code = <EV_SW>;
|
||||
+ linux,input-type = <BTN_0>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
+ debounce-interval = <60>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_status: led-0 {
|
||||
+ label = "red:power";
|
||||
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "white:status";
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <1>;
|
||||
+ phy-mode = "gmii";
|
||||
+ phy-handle = <&phy0>;
|
||||
+
|
||||
+ mdio {
|
||||
+ phy0: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-id03a2.9461";
|
||||
+ reg = <0x0>;
|
||||
+ phy-mode = "gmii";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "bdinfo";
|
||||
+ reg = <0x380000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@3c0000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x3c0000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@5c0000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x5c0000 0x7a40000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/cudy_tr3000-v1_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=red:power
|
||||
+bootled_rec=white:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -1,334 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_netis_nx31_defconfig
|
||||
@@ -0,0 +1,106 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-netis_nx31"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007ef00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-netis_nx31.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="defenvs/netis_nx31_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-netis_nx31.dts
|
||||
@@ -0,0 +1,162 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2025
|
||||
+ * Author: Mikhail Zhilkin <csharper2005@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "netis NX31";
|
||||
+ compatible = "netis,nx31", "mediatek,mt7981";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-0 {
|
||||
+ label = "mesh";
|
||||
+ linux,code = <BTN_0>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-1 {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led-0 {
|
||||
+ label = "blue:wlan2g";
|
||||
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-2 {
|
||||
+ label = "blue:wan";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-3 {
|
||||
+ label = "blue:wlan5g";
|
||||
+ gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "BL2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env (unused)";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@160000 {
|
||||
+ label = "Factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "FIP";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/defenvs/netis_nx31_env
|
||||
@@ -0,0 +1,57 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=run check_buttons ; if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-netis_nx31-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb
|
||||
+bootled_status=blue:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_status on ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_status on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led bootled_status off
|
||||
+boot_recovery=led $bootled_status on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led bootled_status off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_status on ; while true ; do run boot_tftp ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+check_buttons=if button reset ; then run boot_tftp ; fi
|
||||
+ethaddr_factory=mtd read Factory 0x40080000 0x1e0000 0x20000 && env readmem -b ethaddr 0x4009ef20 0x6 ; setenv ethaddr_factory
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase FIP && mtd write FIP $loadaddr
|
||||
+mtd_write_bl2=mtd erase BL2 && mtd write BL2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -1,327 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_cmcc_a10_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-a10"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cmcc-a10.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="cmcc_a10_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cmcc-a10.dts
|
||||
@@ -0,0 +1,157 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "CMCC A10";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-wps {
|
||||
+ label = "wps";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led-0 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ running_led: led-1 {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ boot_led: led-2 {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/cmcc_a10_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-cmcc_a10-ubootmod-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-cmcc_a10-ubootmod-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=red:status
|
||||
+bootled_rec=blue:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -1,328 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_konka_komi-a31_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-konka-komi-a31"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-konka-komi-a31.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="konka_komi-a31_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-konka-komi-a31.dts
|
||||
@@ -0,0 +1,158 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Konka KOMI A31";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-mesh {
|
||||
+ label = "mesh";
|
||||
+ linux,code = <BTN_9>;
|
||||
+ linux,input-type = <EV_SW>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ green_led: led-0 {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ red_led: led-2 {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/konka_komi-a31_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-konka_komi-a31-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-konka_komi-a31-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-konka_komi-a31-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-konka_komi-a31-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=red:status
|
||||
+bootled_rec=blue:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
|
||||
--- a/common/board_r.c
|
||||
+++ b/common/board_r.c
|
||||
@@ -651,19 +651,13 @@ static init_fnc_t init_sequence_r[] = {
|
||||
@@ -663,19 +663,13 @@ static init_fnc_t init_sequence_r[] = {
|
||||
serial_initialize,
|
||||
initr_announce,
|
||||
dm_announce,
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
#if defined(CONFIG_PCI_INIT_R) && defined(CONFIG_SYS_EARLY_PCI_INIT)
|
||||
/*
|
||||
* Do early PCI configuration _before_ the flash gets initialised,
|
||||
@@ -678,7 +672,6 @@ static init_fnc_t init_sequence_r[] = {
|
||||
@@ -690,7 +684,6 @@ static init_fnc_t init_sequence_r[] = {
|
||||
#ifdef CONFIG_MTD_NOR_FLASH
|
||||
initr_flash,
|
||||
#endif
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86)
|
||||
/* initialize higher level parts of CPU like time base and timers */
|
||||
cpu_init_r,
|
||||
@@ -707,6 +700,10 @@ static init_fnc_t init_sequence_r[] = {
|
||||
@@ -719,6 +712,10 @@ static init_fnc_t init_sequence_r[] = {
|
||||
#ifdef CONFIG_PVBLOCK
|
||||
initr_pvblock,
|
||||
#endif
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2017.09.20241018
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=default
|
||||
PKG_SOURCE:=rkuboot-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_VERSION:=2687dce2617032930f2c43fef349bdea694c6f68
|
||||
PKG_SOURCE_URL_FILE:=$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/rockchip-linux/u-boot/archive/
|
||||
PKG_HASH:=6c723ebd3f0732472e707ac3317847e038e606e7632d5a686f8278d333e5ef78
|
||||
|
||||
PKG_MAINTAINER:=jjm2473
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
|
||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=rockchip
|
||||
UENV:=default
|
||||
HIDDEN:=1
|
||||
BUILD_SUBTARGET:=armv8
|
||||
DEFAULT:=y
|
||||
PKG_BUILD_DEPENDS:=rkbin
|
||||
endef
|
||||
|
||||
# RK3528 boards
|
||||
define U-Boot/easepi-rk3528
|
||||
NAME:=RK3528 Generic
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3528
|
||||
ATF:=rk3528_bl31_v1.17.elf
|
||||
TPL:=rk3528_ddr_1056MHz_v1.09.bin
|
||||
SOC:=rk3528
|
||||
endef
|
||||
|
||||
# RK3576 boards
|
||||
define U-Boot/easepi-rk3576
|
||||
NAME:=RK3576 Generic
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3576
|
||||
ATF:=rk3576_bl31_v1.15.elf
|
||||
TPL:=rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.09.bin
|
||||
SOC:=rk3576
|
||||
IDB:=$$(IDB_FILE)
|
||||
endef
|
||||
|
||||
|
||||
UBOOT_TARGETS := easepi-rk3528 easepi-rk3576
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
UBOOT_MAKE_FLAGS += \
|
||||
IDB_SOC=$(SOC) \
|
||||
TPL_BIN=$(STAGING_DIR_IMAGE)/$(TPL) \
|
||||
u-boot.itb $(if $(IDB),,idbloader.img)
|
||||
|
||||
ifeq ($(BUILD_VARIANT),easepi-rk3576)
|
||||
# The idbloader.img built from uboot cannot boot from sd card, so use the pre-built one
|
||||
IDB_FILE:=easepi-rk3576-idbloader_v1.09.107.img
|
||||
define Download/rk3576-idbloader
|
||||
FILE:=$(IDB_FILE)
|
||||
URL:=https://github.com/jjm2473/uboot-nanopi/releases/download/rk3576-v1.0/
|
||||
HASH:=c55404e27f595942be438a52e1e6b58eb9c577b25615c7d9b68202d4af390971
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(eval $(call Download,rk3576-idbloader))
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/U-Boot)
|
||||
|
||||
$(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
|
||||
$(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
|
||||
echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(ATF) $(PKG_BUILD_DIR)/bl31.elf
|
||||
ifneq ($(IDB),)
|
||||
$(CP) $(DL_DIR)/$(IDB) $(PKG_BUILD_DIR)/idbloader.img
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
dd if=/dev/zero of=$(PKG_BUILD_DIR)/u-boot-rockchip.bin bs=512 count=16320
|
||||
dd if=$(PKG_BUILD_DIR)/idbloader.img of=$(PKG_BUILD_DIR)/u-boot-rockchip.bin conv=notrunc
|
||||
dd if=$(PKG_BUILD_DIR)/u-boot.itb of=$(PKG_BUILD_DIR)/u-boot-rockchip.bin seek=16320 conv=notrunc
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot-rockchip.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-rockchip.bin
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
@ -1,31 +0,0 @@
|
||||
Index: rk-u-boot/cmd/Kconfig
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/cmd/Kconfig
|
||||
+++ rk-u-boot/cmd/Kconfig
|
||||
@@ -589,6 +589,14 @@ config CMD_ARMFLASH
|
||||
help
|
||||
ARM Ltd reference designs flash partition access
|
||||
|
||||
+config CMD_ADC
|
||||
+ bool "adc - Access Analog to Digital Converters info and data"
|
||||
+ select ADC
|
||||
+ depends on DM_REGULATOR
|
||||
+ help
|
||||
+ Shows ADC device info and permit printing one-shot analog converted
|
||||
+ data from a named Analog to Digital Converter.
|
||||
+
|
||||
config CMD_CLK
|
||||
bool "clk - Show clock frequencies"
|
||||
help
|
||||
Index: rk-u-boot/cmd/Makefile
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/cmd/Makefile
|
||||
+++ rk-u-boot/cmd/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-y += help.o
|
||||
obj-y += version.o
|
||||
|
||||
# command
|
||||
+obj-$(CONFIG_CMD_ADC) += adc.o
|
||||
obj-$(CONFIG_CMD_AES) += aes.o
|
||||
obj-$(CONFIG_CMD_AMBAPP) += ambapp.o
|
||||
obj-$(CONFIG_CMD_ANDROID_AB_SELECT) += android_ab_select.o android_cmds.o
|
||||
@ -1,46 +0,0 @@
|
||||
Index: rk-u-boot/drivers/adc/adc-uclass.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/drivers/adc/adc-uclass.c
|
||||
+++ rk-u-boot/drivers/adc/adc-uclass.c
|
||||
@@ -84,6 +84,18 @@ int adc_data_mask(struct udevice *dev, u
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int adc_channel_mask(struct udevice *dev, unsigned int *channel_mask)
|
||||
+{
|
||||
+ struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
|
||||
+
|
||||
+ if (!uc_pdata)
|
||||
+ return -ENOSYS;
|
||||
+
|
||||
+ *channel_mask = uc_pdata->channel_mask;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int adc_stop(struct udevice *dev)
|
||||
{
|
||||
const struct adc_ops *ops = dev_get_driver_ops(dev);
|
||||
Index: rk-u-boot/include/adc.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/adc.h
|
||||
+++ rk-u-boot/include/adc.h
|
||||
@@ -220,6 +220,18 @@ int adc_channels_data(struct udevice *de
|
||||
int adc_data_mask(struct udevice *dev, unsigned int *data_mask);
|
||||
|
||||
/**
|
||||
+ * adc_channel_mask() - get channel mask for given ADC device
|
||||
+ *
|
||||
+ * This can be used if adc uclass platform data is filled.
|
||||
+ *
|
||||
+ * @dev: ADC device to check
|
||||
+ * @channel_mask: pointer to the returned channel bitmask
|
||||
+ * @return: 0 if OK, -ve on error
|
||||
+ */
|
||||
+int adc_channel_mask(struct udevice *dev, unsigned int *channel_mask);
|
||||
+
|
||||
+
|
||||
+/**
|
||||
* adc_channel_single_shot() - get output data of conversion for the ADC
|
||||
* device's channel. This function searches for the device with the given name,
|
||||
* starts the given channel conversion and returns the output data.
|
||||
@ -1,62 +0,0 @@
|
||||
Index: rk-u-boot/drivers/adc/adc-uclass.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/drivers/adc/adc-uclass.c
|
||||
+++ rk-u-boot/drivers/adc/adc-uclass.c
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <errno.h>
|
||||
+#include <div64.h>
|
||||
#include <dm.h>
|
||||
#include <dm/lists.h>
|
||||
#include <dm/device-internal.h>
|
||||
@@ -365,6 +366,30 @@ nodev:
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+int adc_raw_to_uV(struct udevice *dev, unsigned int raw, int *uV)
|
||||
+{
|
||||
+ unsigned int data_mask;
|
||||
+ int ret, val, vref;
|
||||
+ u64 raw64 = raw;
|
||||
+
|
||||
+ ret = adc_vdd_value(dev, &vref);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!adc_vss_value(dev, &val))
|
||||
+ vref -= val;
|
||||
+
|
||||
+ ret = adc_data_mask(dev, &data_mask);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ raw64 *= vref;
|
||||
+ do_div(raw64, data_mask);
|
||||
+ *uV = raw64;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
static int adc_vdd_platdata_set(struct udevice *dev)
|
||||
{
|
||||
Index: rk-u-boot/include/adc.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/adc.h
|
||||
+++ rk-u-boot/include/adc.h
|
||||
@@ -297,4 +297,14 @@ int adc_vss_value(struct udevice *dev, i
|
||||
*/
|
||||
int adc_stop(struct udevice *dev);
|
||||
|
||||
+/**
|
||||
+ * adc_raw_to_uV() - converts raw value to microvolts for given ADC device.
|
||||
+ *
|
||||
+ * @dev: ADC device used from conversion
|
||||
+ * @raw: raw value to convert
|
||||
+ * @uV: converted value in microvolts
|
||||
+ * @return: 0 on success or -ve on error
|
||||
+ */
|
||||
+int adc_raw_to_uV(struct udevice *dev, unsigned int raw, int *uV);
|
||||
+
|
||||
#endif
|
||||
@ -1,36 +0,0 @@
|
||||
From 34bfaa17488e5fd933dad63eacfef4f1c86ebd58 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Fri, 26 May 2023 14:25:07 +0800
|
||||
Subject: [PATCH] disable adc to volt convert
|
||||
|
||||
---
|
||||
drivers/adc/rockchip-saradc-v2.c | 2 ++
|
||||
drivers/adc/rockchip-saradc.c | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
Index: rk-u-boot/drivers/adc/rockchip-saradc-v2.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/drivers/adc/rockchip-saradc-v2.c
|
||||
+++ rk-u-boot/drivers/adc/rockchip-saradc-v2.c
|
||||
@@ -216,6 +216,8 @@ static int rockchip_saradc_ofdata_to_pla
|
||||
uc_pdata->data_format = ADC_DATA_FORMAT_BIN;
|
||||
uc_pdata->data_timeout_us = SARADC_TIMEOUT / 5;
|
||||
uc_pdata->channel_mask = (1 << priv->data->num_channels) - 1;
|
||||
+ uc_pdata->vdd_microvolts = -ENODATA;
|
||||
+ uc_pdata->vss_microvolts = -ENODATA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Index: rk-u-boot/drivers/adc/rockchip-saradc.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/drivers/adc/rockchip-saradc.c
|
||||
+++ rk-u-boot/drivers/adc/rockchip-saradc.c
|
||||
@@ -134,6 +134,8 @@ int rockchip_saradc_ofdata_to_platdata(s
|
||||
uc_pdata->data_format = ADC_DATA_FORMAT_BIN;
|
||||
uc_pdata->data_timeout_us = SARADC_TIMEOUT / 5;
|
||||
uc_pdata->channel_mask = (1 << priv->data->num_channels) - 1;
|
||||
+ uc_pdata->vdd_microvolts = -ENODATA;
|
||||
+ uc_pdata->vss_microvolts = -ENODATA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
Index: rk-u-boot/drivers/adc/rockchip-saradc.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/drivers/adc/rockchip-saradc.c
|
||||
+++ rk-u-boot/drivers/adc/rockchip-saradc.c
|
||||
@@ -164,6 +164,12 @@ static const struct rockchip_saradc_data
|
||||
.clk_rate = 1000000,
|
||||
};
|
||||
|
||||
+static const struct rockchip_saradc_data rk3568_saradc_data = {
|
||||
+ .num_bits = 10,
|
||||
+ .num_channels = 8,
|
||||
+ .clk_rate = 1000000,
|
||||
+};
|
||||
+
|
||||
static const struct udevice_id rockchip_saradc_ids[] = {
|
||||
{ .compatible = "rockchip,saradc",
|
||||
.data = (ulong)&saradc_data },
|
||||
@@ -171,6 +177,8 @@ static const struct udevice_id rockchip_
|
||||
.data = (ulong)&rk3066_tsadc_data },
|
||||
{ .compatible = "rockchip,rk3399-saradc",
|
||||
.data = (ulong)&rk3399_saradc_data },
|
||||
+ { .compatible = "rockchip,rk3568-saradc",
|
||||
+ .data = (ulong)&rk3568_saradc_data },
|
||||
{ }
|
||||
};
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
From 40361189b449992e14ff0bd0be18c92167ff8d00 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Tue, 6 Jun 2023 12:27:39 +0800
|
||||
Subject: [PATCH] fix efi detection
|
||||
|
||||
---
|
||||
disk/part_efi.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: rk-u-boot/disk/part_efi.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/disk/part_efi.c
|
||||
+++ rk-u-boot/disk/part_efi.c
|
||||
@@ -371,7 +371,7 @@ int part_get_info_efi(struct blk_desc *d
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
+#if 0
|
||||
#if defined(CONFIG_SPL_KERNEL_BOOT) || !defined(CONFIG_SPL_BUILD)
|
||||
static void gpt_entry_modify(struct blk_desc *dev_desc,
|
||||
gpt_entry *gpt_pte,
|
||||
@@ -504,7 +504,7 @@ static int part_test_efi(struct blk_desc
|
||||
|| (is_pmbr_valid(legacymbr) != 1)) {
|
||||
return -1;
|
||||
}
|
||||
-#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
+#if 0
|
||||
#if defined(CONFIG_SPL_KERNEL_BOOT) || !defined(CONFIG_SPL_BUILD)
|
||||
gpt_entry *h_gpt_pte = NULL;
|
||||
gpt_header *h_gpt_head = NULL;
|
||||
@@ -1147,7 +1147,7 @@ static int is_pmbr_valid(legacy_mbr * mb
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
-#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
+#if 0
|
||||
/*
|
||||
* In sd-update card, we use RKPARM partition in bootloader to load
|
||||
* firmware, and use MS-DOS partition in recovery to update system.
|
||||
@ -1,22 +0,0 @@
|
||||
From 600dbd1d1ca42e82aa11540954725a7c19952bef Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 16:58:02 +0800
|
||||
Subject: [PATCH] supports legacy image
|
||||
|
||||
---
|
||||
include/configs/rockchip-common.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Index: rk-u-boot/include/configs/rockchip-common.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/rockchip-common.h
|
||||
+++ rk-u-boot/include/configs/rockchip-common.h
|
||||
@@ -180,6 +180,8 @@
|
||||
"run distro_bootcmd;"
|
||||
#endif
|
||||
|
||||
+#define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */
|
||||
+
|
||||
#endif /* CONFIG_SPL_BUILD */
|
||||
|
||||
#define CONFIG_DISPLAY_BOARDINFO_LATE
|
||||
@ -1,23 +0,0 @@
|
||||
From fba85cc35e748ce82af8d23c8ae6b7594a927ca1 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 17:36:35 +0800
|
||||
Subject: [PATCH] fix source cmd bug introduced by rk
|
||||
|
||||
11a331d232dea79e25443776ebc3044cbe91d259
|
||||
---
|
||||
cmd/source.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: rk-u-boot/cmd/source.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/cmd/source.c
|
||||
+++ rk-u-boot/cmd/source.c
|
||||
@@ -87,7 +87,7 @@ source (ulong addr, const char *fit_unam
|
||||
* past the zero-terminated sequence of image lengths to get
|
||||
* to the actual image data
|
||||
*/
|
||||
- while (*data++ != IMAGE_PARAM_INVAL);
|
||||
+ while (*data++);
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONFIG_FIT)
|
||||
@ -1,29 +0,0 @@
|
||||
From ca4343eb308b019c6bc6930361b56306cd3ba55d Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 18:48:45 +0800
|
||||
Subject: [PATCH] fix boorargs not in effect
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/board.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Index: rk-u-boot/arch/arm/mach-rockchip/board.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/arch/arm/mach-rockchip/board.c
|
||||
+++ rk-u-boot/arch/arm/mach-rockchip/board.c
|
||||
@@ -1399,6 +1399,7 @@ static void bootargs_add_dtb_dtbo(void *
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CMD_BOOT_ANDROID
|
||||
char *board_fdt_chosen_bootargs(void *fdt)
|
||||
{
|
||||
int verbose = is_hotkey(HK_CMDLINE);
|
||||
@@ -1442,6 +1443,7 @@ char *board_fdt_chosen_bootargs(void *fd
|
||||
|
||||
return (char *)bootargs;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int ft_verify_fdt(void *fdt)
|
||||
{
|
||||
@ -1,36 +0,0 @@
|
||||
From 07015a9f00f8cafb0985ff88bf8beb2731a45559 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 21:39:00 +0800
|
||||
Subject: [PATCH] fix CE without RKIMG_BOOTLOADER
|
||||
|
||||
---
|
||||
common/image-android.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: rk-u-boot/common/image-android.c
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/common/image-android.c
|
||||
+++ rk-u-boot/common/image-android.c
|
||||
@@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1];
|
||||
static u32 android_kernel_comp_type = IH_COMP_NONE;
|
||||
|
||||
+#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
static int android_version_init(void)
|
||||
{
|
||||
struct andr_img_hdr *hdr = NULL;
|
||||
@@ -72,11 +73,13 @@ static int android_version_init(void)
|
||||
|
||||
return (os_version >> 25) & 0x7f;
|
||||
}
|
||||
+#endif
|
||||
|
||||
u32 android_bcb_msg_sector_offset(void)
|
||||
{
|
||||
+#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
static int android_version = -1; /* static */
|
||||
-
|
||||
+#endif
|
||||
/*
|
||||
* get android os version:
|
||||
*
|
||||
@ -1,32 +0,0 @@
|
||||
From 6928b3a2b8397bea88add5174821e7a9c6f405d9 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <jjm2473@gmail.com>
|
||||
Date: Wed, 11 Jun 2025 14:16:45 +0800
|
||||
Subject: [PATCH] fix CE without CMD_BOOT_ANDROID
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/board.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
|
||||
index f98eaca8..7714345d 100644
|
||||
--- a/arch/arm/mach-rockchip/board.c
|
||||
+++ b/arch/arm/mach-rockchip/board.c
|
||||
@@ -1217,6 +1217,7 @@ int board_rng_seed(struct abuf *buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CMD_BOOT_ANDROID
|
||||
/*
|
||||
* Pass fwver when any available.
|
||||
*/
|
||||
@@ -1398,6 +1399,7 @@ static void bootargs_add_dtb_dtbo(void *fdt, bool verbose)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_CMD_BOOT_ANDROID
|
||||
char *board_fdt_chosen_bootargs(void *fdt)
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 8a530b27f8c486281b60a4bbcf35ed463431a617 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <jjm2473@gmail.com>
|
||||
Date: Wed, 11 Jun 2025 14:28:23 +0800
|
||||
Subject: [PATCH] fix CE cmd_process signature mismatch
|
||||
|
||||
---
|
||||
common/command.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/command.c b/common/command.c
|
||||
index 71715572..001238a9 100644
|
||||
--- a/common/command.c
|
||||
+++ b/common/command.c
|
||||
@@ -501,7 +501,7 @@ static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
return result;
|
||||
}
|
||||
|
||||
-enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
|
||||
+int cmd_process(int flag, int argc, char * const argv[],
|
||||
int *repeatable, ulong *ticks)
|
||||
{
|
||||
enum command_ret_t rc = CMD_RET_SUCCESS;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From 41863d2b0c75b64dbd455eb4ad21936e92584b6a Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 24 Jul 2023 13:48:51 +0800
|
||||
Subject: [PATCH] optional tee.bin
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/fit_nodes.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: rk-u-boot/arch/arm/mach-rockchip/fit_nodes.sh
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/arch/arm/mach-rockchip/fit_nodes.sh
|
||||
+++ rk-u-boot/arch/arm/mach-rockchip/fit_nodes.sh
|
||||
@@ -167,6 +167,10 @@ function gen_bl32_node()
|
||||
return
|
||||
fi
|
||||
|
||||
+ if ! [ -e "tee.bin" ] && ! grep -q '^CONFIG_SPL_OPTEE=y' .config ; then
|
||||
+ return
|
||||
+ fi
|
||||
+
|
||||
if [ "${ARCH}" == "arm" ]; then
|
||||
# If not AArch32 mode
|
||||
if ! grep -q '^CONFIG_ARM64_BOOT_AARCH32=y' .config ; then
|
||||
@ -1,74 +0,0 @@
|
||||
From c291573436be43868a0963103985543e82d73cc7 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 12:44:57 +0800
|
||||
Subject: [PATCH] rk35: tftp speed
|
||||
|
||||
---
|
||||
include/configs/evb_rk3528.h | 11 ++++++++++++
|
||||
include/configs/evb_rk3568.h | 12 ++++++++++++
|
||||
include/configs/evb_rk3588.h | 12 ++++++++++++
|
||||
3 files changed, 35 insertions(+)
|
||||
|
||||
Index: rk-u-boot/include/configs/evb_rk3528.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/evb_rk3528.h
|
||||
+++ rk-u-boot/include/configs/evb_rk3528.h
|
||||
@@ -23,4 +23,15 @@
|
||||
#define CONFIG_BOOTCOMMAND RKIMG_BOOTCOMMAND
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * TFTP speed up, by enable ip fragment, and set default blksize to MTU.
|
||||
+ * Use `env set tftpblocksize 16384` to override blksize, max CONFIG_NET_MAXDEFRAG.
|
||||
+ * MUST: CONFIG_TFTP_BLOCKSIZE <= CONFIG_NET_MAXDEFRAG
|
||||
+ */
|
||||
+#define CONFIG_IP_DEFRAG
|
||||
+/* ip fragment, CONFIG_NET_MAXDEFRAG , default 16384, max 65536 */
|
||||
+/* #define CONFIG_NET_MAXDEFRAG 16384 */
|
||||
+#define CONFIG_UDP_CHECKSUM
|
||||
+#define CONFIG_TFTP_BLOCKSIZE 1468
|
||||
+
|
||||
#endif /* __CONFIGS_RK3528_EVB_H */
|
||||
Index: rk-u-boot/include/configs/evb_rk3568.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/evb_rk3568.h
|
||||
+++ rk-u-boot/include/configs/evb_rk3568.h
|
||||
@@ -60,4 +60,16 @@
|
||||
|
||||
#endif /* CONFIG_ANDROID_AB */
|
||||
#endif /* CONFIG_SPL_BUILD */
|
||||
+
|
||||
+/*
|
||||
+ * TFTP speed up, by enable ip fragment, and set default blksize to MTU.
|
||||
+ * Use `env set tftpblocksize 16384` to override blksize, max CONFIG_NET_MAXDEFRAG.
|
||||
+ * MUST: CONFIG_TFTP_BLOCKSIZE <= CONFIG_NET_MAXDEFRAG
|
||||
+ */
|
||||
+#define CONFIG_IP_DEFRAG
|
||||
+/* ip fragment, CONFIG_NET_MAXDEFRAG , default 16384, max 65536 */
|
||||
+/* #define CONFIG_NET_MAXDEFRAG 16384 */
|
||||
+#define CONFIG_UDP_CHECKSUM
|
||||
+#define CONFIG_TFTP_BLOCKSIZE 1468
|
||||
+
|
||||
#endif /* __CONFIGS_RK3568_EVB_H */
|
||||
Index: rk-u-boot/include/configs/evb_rk3588.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/evb_rk3588.h
|
||||
+++ rk-u-boot/include/configs/evb_rk3588.h
|
||||
@@ -22,4 +22,16 @@
|
||||
#define CONFIG_BOOTCOMMAND RKIMG_BOOTCOMMAND
|
||||
|
||||
#endif
|
||||
+
|
||||
+/*
|
||||
+ * TFTP speed up, by enable ip fragment, and set default blksize to MTU.
|
||||
+ * Use `env set tftpblocksize 16384` to override blksize, max CONFIG_NET_MAXDEFRAG.
|
||||
+ * MUST: CONFIG_TFTP_BLOCKSIZE <= CONFIG_NET_MAXDEFRAG
|
||||
+ */
|
||||
+#define CONFIG_IP_DEFRAG
|
||||
+/* ip fragment, CONFIG_NET_MAXDEFRAG , default 16384, max 65536 */
|
||||
+/* #define CONFIG_NET_MAXDEFRAG 16384 */
|
||||
+#define CONFIG_UDP_CHECKSUM
|
||||
+#define CONFIG_TFTP_BLOCKSIZE 1468
|
||||
+
|
||||
#endif
|
||||
\ No newline at end of file
|
||||
@ -1,42 +0,0 @@
|
||||
From 88d321d1512bbe4589985150997e559a3d8ac83f Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 12:40:10 +0800
|
||||
Subject: [PATCH] disable pcie and usb3.0 on rk3568
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3568-u-boot.dtsi | 15 +++++----------
|
||||
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: rk-u-boot/arch/arm/dts/rk3568-u-boot.dtsi
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/arch/arm/dts/rk3568-u-boot.dtsi
|
||||
+++ rk-u-boot/arch/arm/dts/rk3568-u-boot.dtsi
|
||||
@@ -80,6 +80,11 @@
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
u-boot,dm-pre-reloc;
|
||||
+ phys = <&u2phy0_otg>;
|
||||
+ phy-names = "usb2-phy";
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ maximum-speed = "high-speed"; /* only USB2.0 */
|
||||
+ snps,dis_u2_susphy_quirk; /* only USB2.0 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -389,16 +394,6 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
-&pcie30phy {
|
||||
- u-boot,dm-pre-reloc;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-&pcie3x2 {
|
||||
- u-boot,dm-pre-reloc;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&pinctrl {
|
||||
u-boot,dm-spl;
|
||||
status = "okay";
|
||||
@ -1,15 +0,0 @@
|
||||
Index: rk-u-boot/include/configs/rockchip-common.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/rockchip-common.h
|
||||
+++ rk-u-boot/include/configs/rockchip-common.h
|
||||
@@ -108,9 +108,7 @@
|
||||
BOOT_TARGET_MMC(func) \
|
||||
BOOT_TARGET_MTD(func) \
|
||||
BOOT_TARGET_RKNAND(func) \
|
||||
- BOOT_TARGET_USB(func) \
|
||||
- BOOT_TARGET_PXE(func) \
|
||||
- BOOT_TARGET_DHCP(func)
|
||||
+ BOOT_TARGET_USB(func)
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
#define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
|
||||
@ -1,30 +0,0 @@
|
||||
From f9dced95ce10893799be34534f605b34d15f3c39 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 16:43:41 +0800
|
||||
Subject: [PATCH] skip android boot when cmd disabled
|
||||
|
||||
---
|
||||
include/configs/rockchip-common.h | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: rk-u-boot/include/configs/rockchip-common.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/rockchip-common.h
|
||||
+++ rk-u-boot/include/configs/rockchip-common.h
|
||||
@@ -170,12 +170,15 @@
|
||||
#elif defined(CONFIG_FIT_SIGNATURE)
|
||||
#define RKIMG_BOOTCOMMAND \
|
||||
"boot_fit;"
|
||||
-#else
|
||||
+#elif defined(CONFIG_CMD_BOOT_ANDROID)
|
||||
#define RKIMG_BOOTCOMMAND \
|
||||
"boot_android ${devtype} ${devnum};" \
|
||||
"boot_fit;" \
|
||||
"bootrkp;" \
|
||||
"run distro_bootcmd;"
|
||||
+#else
|
||||
+#define RKIMG_BOOTCOMMAND \
|
||||
+ "run distro_bootcmd;"
|
||||
#endif
|
||||
|
||||
#define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */
|
||||
@ -1,29 +0,0 @@
|
||||
From d53d50dd1500d71f94ce5551606956f9373f3e52 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Thu, 14 Dec 2023 13:08:11 +0800
|
||||
Subject: [PATCH] rk3308: tftp speed
|
||||
|
||||
---
|
||||
include/configs/evb_rk3308.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
Index: rk-u-boot/include/configs/evb_rk3308.h
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/include/configs/evb_rk3308.h
|
||||
+++ rk-u-boot/include/configs/evb_rk3308.h
|
||||
@@ -22,4 +22,15 @@
|
||||
#define CONFIG_BOOTCOMMAND RKIMG_BOOTCOMMAND
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * TFTP speed up, by enable ip fragment, and set default blksize to MTU.
|
||||
+ * Use `env set tftpblocksize 16384` to override blksize, max CONFIG_NET_MAXDEFRAG.
|
||||
+ * MUST: CONFIG_TFTP_BLOCKSIZE <= CONFIG_NET_MAXDEFRAG
|
||||
+ */
|
||||
+#define CONFIG_IP_DEFRAG
|
||||
+/* ip fragment, CONFIG_NET_MAXDEFRAG , default 16384, max 65536 */
|
||||
+/* #define CONFIG_NET_MAXDEFRAG 16384 */
|
||||
+#define CONFIG_UDP_CHECKSUM
|
||||
+#define CONFIG_TFTP_BLOCKSIZE 1468
|
||||
+
|
||||
#endif
|
||||
@ -1,35 +0,0 @@
|
||||
From bb0df1fab4c945947d99022c2dc22ad25ab90165 Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 14:59:01 +0800
|
||||
Subject: [PATCH] build idb
|
||||
|
||||
---
|
||||
Makefile | 8 ++++++++
|
||||
1 files changed, 8 insertions(+)
|
||||
|
||||
Index: rk-u-boot/Makefile
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/Makefile
|
||||
+++ rk-u-boot/Makefile
|
||||
@@ -854,6 +854,9 @@ quiet_cmd_mkimage = MKIMAGE $@
|
||||
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
|
||||
$(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT))
|
||||
|
||||
+cmd_mkimage_combined = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $(COMBINED_FILE_$(@F)):$< $@ \
|
||||
+ $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT))
|
||||
+
|
||||
quiet_cmd_mkfitimage = MKIMAGE $@
|
||||
cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -E $@ \
|
||||
$(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT))
|
||||
@@ -1079,6 +1082,11 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I bi
|
||||
u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE
|
||||
$(call if_changed,pad_cat)
|
||||
|
||||
+MKIMAGEFLAGS_idbloader.img = -n $(IDB_SOC) -T rksd
|
||||
+COMBINED_FILE_idbloader.img = $(TPL_BIN)
|
||||
+idbloader.img: spl/u-boot-spl.bin FORCE
|
||||
+ $(call if_changed,mkimage_combined)
|
||||
+
|
||||
MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
|
||||
|
||||
lpc32xx-spl.img: spl/u-boot-spl.bin FORCE
|
||||
@ -1,31 +0,0 @@
|
||||
From 68c654bb60aba401e382174fb08ae41173c5ec9b Mon Sep 17 00:00:00 2001
|
||||
From: jjm2473 <1129525450@qq.com>
|
||||
Date: Mon, 5 Jun 2023 16:10:50 +0800
|
||||
Subject: [PATCH] fix itb ce
|
||||
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rk-u-boot/Makefile
|
||||
===================================================================
|
||||
--- rk-u-boot.orig/Makefile
|
||||
+++ rk-u-boot/Makefile
|
||||
@@ -1021,7 +1021,7 @@ U_BOOT_ITS = $(subst ",,$(CONFIG_SPL_FIT
|
||||
else
|
||||
ifneq ($(CONFIG_SPL_FIT_GENERATOR),"")
|
||||
U_BOOT_ITS := u-boot.its
|
||||
-$(U_BOOT_ITS): FORCE
|
||||
+$(U_BOOT_ITS): u-boot FORCE
|
||||
$(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
|
||||
$(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
|
||||
endif
|
||||
@@ -1059,7 +1059,7 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-b
|
||||
$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
-u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE
|
||||
+u-boot.itb: u-boot-nodtb.bin u-boot.dtb $(U_BOOT_ITS) FORCE
|
||||
$(call if_changed,mkfitimage)
|
||||
|
||||
u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
|
||||
@ -1,98 +0,0 @@
|
||||
|
||||
&otp {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&macphy_bgs {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&macphy_txlevel {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
ethernet-phy@2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0_stmmac_axi_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&gmac0_mtl_rx_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
queue0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0_mtl_tx_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
queue0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&fephym0_led_link {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&fephym0_led_spd {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
rgmii_phy: phy@1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&rgmii_miim {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rgmii_tx_bus2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rgmii_rx_bus2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rgmii_rgmii_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rgmii_rgmii_bus {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&gmac1_stmmac_axi_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&gmac1_mtl_rx_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
queue0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1_mtl_tx_setup {
|
||||
u-boot,dm-pre-reloc;
|
||||
queue0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* (C) Copyright 2020 Rockchip Electronics Co., Ltd
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "rk3528.dtsi"
|
||||
#include "rk3528-u-boot.dtsi"
|
||||
#include "rk3528-easepi-u-boot.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Easepi RK3528 Board";
|
||||
compatible = "linkease,rk3528-demo", "rockchip,rk3528";
|
||||
|
||||
adc-keys {
|
||||
compatible = "adc-keys";
|
||||
io-channels = <&saradc 1>;
|
||||
io-channel-names = "buttons";
|
||||
keyup-threshold-microvolt = <1800000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
|
||||
volumeup-key {
|
||||
u-boot,dm-pre-reloc;
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
label = "volume up";
|
||||
press-threshold-microvolt = <9>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&otp {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
/* Use rgmii-rxid mode to disable rx delay inside Soc */
|
||||
phy-mode = "rgmii-rxid";
|
||||
clock_in_out = "output";
|
||||
|
||||
snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
|
||||
tx_delay = <0x30>;
|
||||
/* rx_delay = <0x3f>; */
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_miim
|
||||
&rgmii_tx_bus2
|
||||
&rgmii_rx_bus2
|
||||
&rgmii_rgmii_clk
|
||||
&rgmii_rgmii_bus>;
|
||||
|
||||
phy-handle = <&rgmii_phy>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy: phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x1>;
|
||||
};
|
||||
};
|
||||
@ -1,188 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2018 BayLibre, SAS
|
||||
* Author: Neil Armstrong <narmstrong@baylibre.com>
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <dm.h>
|
||||
#include <adc.h>
|
||||
|
||||
static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
struct udevice *dev;
|
||||
int ret, err;
|
||||
|
||||
ret = err = uclass_first_device_check(UCLASS_ADC, &dev);
|
||||
|
||||
while (dev) {
|
||||
printf("- %s status: %i\n", dev->name, ret);
|
||||
|
||||
ret = uclass_next_device_check(&dev);
|
||||
if (ret)
|
||||
err = ret;
|
||||
}
|
||||
|
||||
return err ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
struct udevice *dev;
|
||||
unsigned int data_mask, ch_mask;
|
||||
int ret, vss, vdd;
|
||||
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
ret = uclass_get_device_by_name(UCLASS_ADC, argv[1], &dev);
|
||||
if (ret) {
|
||||
printf("Unknown ADC device %s\n", argv[1]);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
printf("ADC Device '%s' :\n", argv[1]);
|
||||
|
||||
ret = adc_channel_mask(dev, &ch_mask);
|
||||
if (!ret)
|
||||
printf("channel mask: %x\n", ch_mask);
|
||||
|
||||
ret = adc_data_mask(dev, &data_mask);
|
||||
if (!ret)
|
||||
printf("data mask: %x\n", data_mask);
|
||||
|
||||
ret = adc_vdd_value(dev, &vdd);
|
||||
if (!ret)
|
||||
printf("vdd: %duV\n", vdd);
|
||||
|
||||
ret = adc_vss_value(dev, &vss);
|
||||
if (!ret)
|
||||
printf("vss: %duV\n", vss);
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
char *varname = NULL;
|
||||
struct udevice *dev;
|
||||
unsigned int data;
|
||||
int ret, uV, val;
|
||||
|
||||
if (argc < 3)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (argc >= 4)
|
||||
varname = argv[3];
|
||||
|
||||
ret = adc_channel_single_shot(argv[1], simple_strtol(argv[2], NULL, 0),
|
||||
&data);
|
||||
if (ret) {
|
||||
printf("Error getting single shot for device %s channel %s (ret=%d)\n",
|
||||
argv[1], argv[2], ret);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
ret = uclass_get_device_by_name(UCLASS_ADC, argv[1], &dev);
|
||||
if (!ret && !adc_raw_to_uV(dev, data, &uV)) {
|
||||
val = uV;
|
||||
printf("%u, %d uV\n", data, uV);
|
||||
} else {
|
||||
val = data;
|
||||
printf("%u\n", data);
|
||||
}
|
||||
|
||||
if (varname)
|
||||
env_set_ulong(varname, val);
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
struct adc_channel ch[ADC_MAX_CHANNEL];
|
||||
struct udevice *dev;
|
||||
unsigned int ch_mask;
|
||||
int i, chan, ret, uV;
|
||||
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
ret = uclass_get_device_by_name(UCLASS_ADC, argv[1], &dev);
|
||||
if (ret) {
|
||||
pr_err("Can't get the ADC %s: %d\n", argv[1], ret);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
switch (argc) {
|
||||
case 3:
|
||||
ch_mask = simple_strtoul(argv[2], NULL, 0);
|
||||
if (ch_mask)
|
||||
break;
|
||||
case 2:
|
||||
ret = adc_channel_mask(dev, &ch_mask);
|
||||
if (ret) {
|
||||
pr_err("Can't get mask for %s: %d\n", dev->name, ret);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ret = adc_channels_single_shot(dev->name, ch_mask, ch);
|
||||
if (ret) {
|
||||
pr_err("Can't get single shot for %s (chans mask: 0x%x): %d\n",
|
||||
dev->name, ch_mask, ret);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
for (chan = 0, i = 0; chan < ADC_MAX_CHANNEL; chan++) {
|
||||
if (!(ch_mask & ADC_CHANNEL(chan)))
|
||||
continue;
|
||||
if (!adc_raw_to_uV(dev, ch[i].data, &uV))
|
||||
printf("[%02d]: %u, %d uV\n", ch[i].id, ch[i].data, uV);
|
||||
else
|
||||
printf("[%02d]: %u\n", ch[i].id, ch[i].data);
|
||||
i++;
|
||||
}
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static cmd_tbl_t cmd_adc_sub[] = {
|
||||
U_BOOT_CMD_MKENT(list, 1, 1, do_adc_list, "", ""),
|
||||
U_BOOT_CMD_MKENT(info, 2, 1, do_adc_info, "", ""),
|
||||
U_BOOT_CMD_MKENT(single, 4, 1, do_adc_single, "", ""),
|
||||
U_BOOT_CMD_MKENT(scan, 3, 1, do_adc_scan, "", ""),
|
||||
};
|
||||
|
||||
static int do_adc(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
cmd_tbl_t *c;
|
||||
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
/* Strip off leading 'adc' command argument */
|
||||
argc--;
|
||||
argv++;
|
||||
|
||||
c = find_cmd_tbl(argv[0], &cmd_adc_sub[0], ARRAY_SIZE(cmd_adc_sub));
|
||||
|
||||
if (c)
|
||||
return c->cmd(cmdtp, flag, argc, argv);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
}
|
||||
|
||||
static char adc_help_text[] =
|
||||
"list - list ADC devices\n"
|
||||
"adc info <name> - Get ADC device info\n"
|
||||
"adc single <name> <channel> [varname] - Get Single data of ADC device channel\n"
|
||||
"adc scan <name> [channel mask] - Scan all [or masked] ADC channels";
|
||||
|
||||
U_BOOT_CMD(adc, 5, 1, do_adc, "ADC sub-system", adc_help_text);
|
||||
@ -1,166 +0,0 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_SMCCC=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x80000
|
||||
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.sh"
|
||||
CONFIG_ROCKCHIP_RK3528=y
|
||||
# CONFIG_RKIMG_BOOTLOADER is not set
|
||||
CONFIG_ROCKCHIP_FIT_IMAGE=y
|
||||
CONFIG_USING_KERNEL_DTB_V2=y
|
||||
CONFIG_ROCKCHIP_FIT_IMAGE_PACK=y
|
||||
CONFIG_ROCKCHIP_NEW_IDB=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
CONFIG_TARGET_EVB_RK3528=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3528-easepi"
|
||||
CONFIG_DEBUG_UART=y
|
||||
# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_IMAGE_POST_PROCESS=y
|
||||
CONFIG_FIT_HW_CRYPTO=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
|
||||
CONFIG_SPL_FIT_HW_CRYPTO=y
|
||||
# CONFIG_SPL_SYS_DCACHE_OFF is not set
|
||||
CONFIG_CONSOLE_MUX=y
|
||||
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_SPL_BOARD_INIT=y
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
|
||||
CONFIG_SPL_SEPARATE_BSS=y
|
||||
CONFIG_SPL_CRYPTO_SUPPORT=y
|
||||
CONFIG_SPL_MMC_WRITE=y
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
# CONFIG_TPL is not set
|
||||
CONFIG_FASTBOOT_BUF_ADDR=0xc00800
|
||||
CONFIG_FASTBOOT_BUF_SIZE=0x04000000
|
||||
CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_CMD_ADC=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_IMI is not set
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
# CONFIG_CMD_LZMADEC is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
# CONFIG_CMD_FPGA is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
# CONFIG_CMD_LOADB is not set
|
||||
# CONFIG_CMD_LOADS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_ITEST is not set
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_CMD_TFTP_BOOTM=y
|
||||
CONFIG_CMD_TFTP_FLASH=y
|
||||
# CONFIG_CMD_MISC is not set
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clock-parents"
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
# CONFIG_SARADC_ROCKCHIP is not set
|
||||
CONFIG_SARADC_ROCKCHIP_V2=y
|
||||
CONFIG_CLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_CLK_SCMI=y
|
||||
CONFIG_SPL_CLK_SCMI=y
|
||||
CONFIG_DM_CRYPTO=y
|
||||
CONFIG_SPL_DM_CRYPTO=y
|
||||
CONFIG_ROCKCHIP_CRYPTO_V2=y
|
||||
CONFIG_SPL_ROCKCHIP_CRYPTO_V2=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_RNG_ROCKCHIP=y
|
||||
CONFIG_SCMI_FIRMWARE=y
|
||||
CONFIG_SPL_SCMI_FIRMWARE=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_ROCKCHIP_GPIO_V2=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_DM_KEY=y
|
||||
CONFIG_ADC_KEY=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_SPL_MISC=y
|
||||
CONFIG_ROCKCHIP_OTP=y
|
||||
CONFIG_SPL_ROCKCHIP_SECURE_OTP=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_PHY_REALTEK=y
|
||||
CONFIG_PHY_FIXED=y
|
||||
CONFIG_PHY_RK630=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_DM_MDIO=y
|
||||
CONFIG_DM_ETH_PHY=y
|
||||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_RGMII=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_SPL_PINCTRL=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_RAM=y
|
||||
CONFIG_SPL_RAM=y
|
||||
CONFIG_TPL_RAM=y
|
||||
CONFIG_DM_RESET=y
|
||||
CONFIG_SPL_DM_RESET=y
|
||||
CONFIG_SPL_RESET_ROCKCHIP=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_BASE=0xff9f0000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_ROCKCHIP_SFC=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GADGET=y
|
||||
CONFIG_USB_DWC3_GENERIC=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x2207
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0x350a
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
# CONFIG_SYS_WHITE_ON_BLACK is not set
|
||||
CONFIG_USE_TINY_PRINTF=y
|
||||
CONFIG_SPL_TINY_MEMSET=y
|
||||
CONFIG_RSA=y
|
||||
CONFIG_SPL_RSA=y
|
||||
CONFIG_RSA_N_SIZE=0x200
|
||||
CONFIG_RSA_E_SIZE=0x10
|
||||
CONFIG_RSA_C_SIZE=0x20
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_LZMA=y
|
||||
CONFIG_SPL_GZIP=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
@ -1,180 +0,0 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x80000
|
||||
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.sh"
|
||||
CONFIG_ROCKCHIP_RK3576=y
|
||||
# CONFIG_RKIMG_BOOTLOADER is not set
|
||||
CONFIG_ROCKCHIP_FIT_IMAGE=y
|
||||
CONFIG_USING_KERNEL_DTB_V2=y
|
||||
CONFIG_ROCKCHIP_FIT_IMAGE_PACK=y
|
||||
CONFIG_ROCKCHIP_NEW_IDB=y
|
||||
CONFIG_SANITY_CPU_SWAP=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
CONFIG_TARGET_EVB_RK3576=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_ARMV8_CRYPTO=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3576-evb"
|
||||
CONFIG_DEBUG_UART=y
|
||||
# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_IMAGE_POST_PROCESS=y
|
||||
CONFIG_FIT_HW_CRYPTO=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
|
||||
CONFIG_SPL_FIT_HW_CRYPTO=y
|
||||
# CONFIG_SPL_SYS_DCACHE_OFF is not set
|
||||
CONFIG_CONSOLE_MUX=y
|
||||
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_SPL_BOARD_INIT=y
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
|
||||
CONFIG_SPL_SEPARATE_BSS=y
|
||||
CONFIG_SPL_UFS_SUPPORT=y
|
||||
# CONFIG_TPL is not set
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_FASTBOOT_BUF_ADDR=0x40c00800
|
||||
CONFIG_FASTBOOT_BUF_SIZE=0x07000000
|
||||
CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_CMD_ADC=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_IMI is not set
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
# CONFIG_CMD_XIMG is not set
|
||||
# CONFIG_CMD_LZMADEC is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
# CONFIG_CMD_FPGA is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
# CONFIG_CMD_LOADB is not set
|
||||
# CONFIG_CMD_LOADS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_UFS=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_ITEST is not set
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_CMD_TFTP_BOOTM=y
|
||||
CONFIG_CMD_TFTP_FLASH=y
|
||||
# CONFIG_CMD_MISC is not set
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_SPL_DTB_MINIMUM=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_OF_U_BOOT_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
# CONFIG_SARADC_ROCKCHIP is not set
|
||||
CONFIG_SARADC_ROCKCHIP_V2=y
|
||||
CONFIG_CLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_CLK_SCMI=y
|
||||
CONFIG_DM_CRYPTO=y
|
||||
CONFIG_SPL_DM_CRYPTO=y
|
||||
CONFIG_ROCKCHIP_CRYPTO_V2=y
|
||||
CONFIG_SPL_ROCKCHIP_CRYPTO_V2=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_RNG_ROCKCHIP=y
|
||||
CONFIG_SCMI_FIRMWARE=y
|
||||
CONFIG_GPIO_HOG=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_ROCKCHIP_GPIO_V2=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_I2C_MUX=y
|
||||
CONFIG_DM_KEY=y
|
||||
CONFIG_RK8XX_PWRKEY=y
|
||||
CONFIG_ADC_KEY=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_SPL_MISC=y
|
||||
CONFIG_MISC_DECOMPRESS=y
|
||||
CONFIG_SPL_MISC_DECOMPRESS=y
|
||||
CONFIG_ROCKCHIP_OTP=y
|
||||
CONFIG_ROCKCHIP_HW_DECOMPRESS=y
|
||||
CONFIG_SPL_ROCKCHIP_HW_DECOMPRESS=y
|
||||
CONFIG_SPL_ROCKCHIP_SECURE_OTP=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_DM_ETH_PHY=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_SPL_PINCTRL=y
|
||||
CONFIG_DM_FUEL_GAUGE=y
|
||||
CONFIG_POWER_FG_CW201X=y
|
||||
CONFIG_POWER_FG_CW221X=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_PMIC_RK8XX=y
|
||||
CONFIG_DM_POWER_DELIVERY=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_RK8XX=y
|
||||
CONFIG_CHARGER_BQ25700=y
|
||||
CONFIG_CHARGER_BQ25890=y
|
||||
CONFIG_CHARGER_SGM41542=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_RAM=y
|
||||
CONFIG_SPL_RAM=y
|
||||
CONFIG_TPL_RAM=y
|
||||
CONFIG_DM_RESET=y
|
||||
CONFIG_SPL_DM_RESET=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_DM_SCSI=y
|
||||
CONFIG_SPL_RESET_ROCKCHIP=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_BASE=0x2ad40000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_ROCKCHIP_SFC=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GADGET=y
|
||||
CONFIG_USB_DWC3_GENERIC=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x2207
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0x350e
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_UFS=y
|
||||
CONFIG_ROCKCHIP_UFS=y
|
||||
CONFIG_USE_TINY_PRINTF=y
|
||||
CONFIG_LIB_RAND=y
|
||||
CONFIG_SPL_TINY_MEMSET=y
|
||||
CONFIG_RSA=y
|
||||
CONFIG_SPL_RSA=y
|
||||
CONFIG_RSA_N_SIZE=0x200
|
||||
CONFIG_RSA_E_SIZE=0x10
|
||||
CONFIG_RSA_C_SIZE=0x20
|
||||
CONFIG_XBC=y
|
||||
CONFIG_LZ4=y
|
||||
CONFIG_SPL_GZIP=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2024.10
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=1
|
||||
PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0
|
||||
|
||||
PKG_MAINTAINER:=Sarah Maedel <openwrt@tbspace.de>
|
||||
@ -143,20 +143,6 @@ define U-Boot/nanopi-r4se-rk3399
|
||||
friendlyarm_nanopi-r4se
|
||||
endef
|
||||
|
||||
define U-Boot/rock-4c-plus-rk3399
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=ROCK 4C+
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-4c-plus
|
||||
endef
|
||||
|
||||
define U-Boot/rock-4se-rk3399
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=ROCK 4SE
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-4se
|
||||
endef
|
||||
|
||||
define U-Boot/rock-pi-4-rk3399
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=Rock Pi 4
|
||||
@ -238,20 +224,6 @@ define U-Boot/bpi-r2-pro-rk3568
|
||||
sinovoip_bpi-r2-pro
|
||||
endef
|
||||
|
||||
define U-Boot/easepi-r1-rk3568
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=LinkEase EasePi R1
|
||||
BUILD_DEVICES:= \
|
||||
linkease_easepi-r1
|
||||
endef
|
||||
|
||||
define U-Boot/fastrhino-r66s-rk3568
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=FastRhino R66S
|
||||
BUILD_DEVICES:= \
|
||||
lunzn_fastrhino-r66s
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r5c-rk3568
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=NanoPi R5C
|
||||
@ -305,26 +277,6 @@ define U-Boot/easepi-rk3588
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
define U-Boot/easepi-rk3588-lp4-1866
|
||||
$(U-Boot/rk3588/Default)
|
||||
NAME:=Easepi RK3588 LPDDR4 1866Mhz
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588-lp4-1866
|
||||
TPL:=rk3588_ddr_lp4_1866MHz_lp5_2400MHz_v1.16.bin
|
||||
UBOOT_CONFIG:=easepi-rk3588
|
||||
BUILD_DEVICES:= \
|
||||
radxa_e52c
|
||||
endef
|
||||
|
||||
define U-Boot/easepi-rk3588-uart2-115200
|
||||
$(U-Boot/rk3588/Default)
|
||||
NAME:=Easepi RK3588 UART2 115200
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588-uart2-115200
|
||||
TPL:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_uart2_115200_v1.16.bin
|
||||
UBOOT_CONFIG:=easepi-rk3588-uart2-115200
|
||||
BUILD_DEVICES:= \
|
||||
lyt_t88m
|
||||
endef
|
||||
|
||||
define U-Boot/nanopc-t6-rk3588
|
||||
$(U-Boot/rk3588/Default)
|
||||
NAME:=NanoPC T6
|
||||
@ -374,8 +326,6 @@ UBOOT_TARGETS := \
|
||||
nanopc-t4-rk3399 \
|
||||
nanopi-r4s-rk3399 \
|
||||
nanopi-r4se-rk3399 \
|
||||
rock-4c-plus-rk3399 \
|
||||
rock-4se-rk3399 \
|
||||
rock-pi-4-rk3399 \
|
||||
rockpro64-rk3399 \
|
||||
rock-pi-s-rk3308 \
|
||||
@ -395,16 +345,12 @@ UBOOT_TARGETS := \
|
||||
easepi-rk3568 \
|
||||
easepi-rk3568-rk809 \
|
||||
bpi-r2-pro-rk3568 \
|
||||
easepi-r1-rk3568 \
|
||||
fastrhino-r66s-rk3568 \
|
||||
nanopi-r5c-rk3568 \
|
||||
nanopi-r5s-rk3568 \
|
||||
radxa-e25-rk3568 \
|
||||
rock-3a-rk3568 \
|
||||
rock-3b-rk3568 \
|
||||
easepi-rk3588 \
|
||||
easepi-rk3588-lp4-1866 \
|
||||
easepi-rk3588-uart2-115200 \
|
||||
nanopc-t6-rk3588 \
|
||||
rock5b-rk3588 \
|
||||
sige7-rk3588 \
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 09acb07f274a29341c32c09b932926aece67ebf4 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Fri, 13 Jun 2025 10:34:51 +0800
|
||||
Subject: [PATCH] disable efi loader
|
||||
|
||||
---
|
||||
lib/efi_loader/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
|
||||
index 6ffefa9103f..81f4711b5cf 100644
|
||||
--- a/lib/efi_loader/Kconfig
|
||||
+++ b/lib/efi_loader/Kconfig
|
||||
@@ -11,7 +11,7 @@ config EFI_LOADER
|
||||
# We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
|
||||
depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
|
||||
depends on !EFI_APP
|
||||
- default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
|
||||
+ # default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
|
||||
select BLK
|
||||
select CHARSET
|
||||
# We need to send DM events, dynamically, in the EFI block driver
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,132 +0,0 @@
|
||||
From 37a5383059d0c3d8a72394cbffef775042a40acd Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Mon, 8 Sep 2025 19:32:18 +0800
|
||||
Subject: [PATCH] board: rockchip: add Lunzn FastRhino R66S
|
||||
|
||||
Lunzn Fastrhino R66S is a high-performance mini router.
|
||||
|
||||
Specification:
|
||||
- Rockchip RK3568
|
||||
- 1/2GB LPDDR4 RAM
|
||||
- SD card slot
|
||||
- 2x USB 3.0 Port
|
||||
- 2x 2500 Base-T (PCIe, r8125b)
|
||||
- 12v DC Jack
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
.../arm/dts/rk3568-fastrhino-r66s-u-boot.dtsi | 3 +
|
||||
board/rockchip/evb_rk3568/MAINTAINERS | 7 ++
|
||||
configs/fastrhino-r66s-rk3568_defconfig | 64 +++++++++++++++++++
|
||||
doc/board/rockchip/rockchip.rst | 1 +
|
||||
4 files changed, 75 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3568-fastrhino-r66s-u-boot.dtsi
|
||||
create mode 100644 configs/fastrhino-r66s-rk3568_defconfig
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-fastrhino-r66s-u-boot.dtsi
|
||||
@@ -0,0 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+
|
||||
+#include "rk356x-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = &uart2;
|
||||
+ };
|
||||
+};
|
||||
--- a/board/rockchip/evb_rk3568/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3568/MAINTAINERS
|
||||
@@ -14,6 +14,13 @@ F: configs/evb-rk3568_defconfig
|
||||
F: arch/arm/dts/rk3568-evb-u-boot.dtsi
|
||||
F: arch/arm/dts/rk3568-evb.dts
|
||||
|
||||
+FASTRHINO-R66S-RK3568
|
||||
+M: Tianling Shen <cnsztl@gmail.com>
|
||||
+R: Jonas Karlman <jonas@kwiboo.se>
|
||||
+S: Maintained
|
||||
+F: configs/fastrhino-r66s-rk3568_defconfig
|
||||
+F: arch/arm/dts/rk3568-fastrhino-r66s-u-boot.dtsi
|
||||
+
|
||||
GENERIC-RK3568
|
||||
M: Jonas Karlman <jonas@kwiboo.se>
|
||||
S: Maintained
|
||||
--- /dev/null
|
||||
+++ b/configs/fastrhino-r66s-rk3568_defconfig
|
||||
@@ -0,0 +1,65 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-fastrhino-r66s"
|
||||
+CONFIG_ROCKCHIP_RK3568=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-fastrhino-r66s.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_RTL8169=y
|
||||
+CONFIG_PCIE_DW_ROCKCHIP=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_GENERIC=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
--- a/doc/board/rockchip/rockchip.rst
|
||||
+++ b/doc/board/rockchip/rockchip.rst
|
||||
@@ -118,6 +118,7 @@ List of mainline supported Rockchip boar
|
||||
- FriendlyElec NanoPi R5S (nanopi-r5s-rk3568)
|
||||
- Generic RK3566/RK3568 (generic-rk3568)
|
||||
- Hardkernel ODROID-M1 (odroid-m1-rk3568)
|
||||
+ - Lunzn FastRhino R66S (fastrhino-r66s-rk3568)
|
||||
- Radxa E25 Carrier Board (radxa-e25-rk3568)
|
||||
- Radxa ROCK 3A (rock-3a-rk3568)
|
||||
- Radxa ROCK 3B (rock-3b-rk3568)
|
||||
@ -1,66 +0,0 @@
|
||||
From 9aac85490c0a7b8fd236c68a051a903d5f4961e7 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Wed, 9 Jul 2025 14:22:01 +0800
|
||||
Subject: [PATCH] rockchip: rk3328-nanopi-r2s: supports emmc and saradc
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi | 26 ++++++++++++++++++++++
|
||||
configs/nanopi-r2s-rk3328_defconfig | 1 +
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
index d8c79600b65..6e7dde5c548 100644
|
||||
--- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
@@ -7,10 +7,36 @@
|
||||
#include "rk3328-u-boot.dtsi"
|
||||
#include "rk3328-sdram-ddr4-666.dtsi"
|
||||
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ mmc0 = &emmc;
|
||||
+ mmc1 = &sdmmc;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ max-frequency = <150000000>;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
+ vmmc-supply = <&vcc_io_33>;
|
||||
+ vqmmc-supply = <&vcc18_emmc>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&gpio1 {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_18>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdio_vcc_pin {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
|
||||
index 2591a9cc8ab..faf3965cf84 100644
|
||||
--- a/configs/nanopi-r2s-rk3328_defconfig
|
||||
+++ b/configs/nanopi-r2s-rk3328_defconfig
|
||||
@@ -28,6 +28,7 @@ CONFIG_SPL_PAD_TO=0x7f8000
|
||||
CONFIG_SPL_POWER=y
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||
+CONFIG_CMD_ADC=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,662 +0,0 @@
|
||||
From 63d60b21fd4933080ff22bdc21652f7c2a14bc52 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Tue, 14 Oct 2025 13:12:26 +0800
|
||||
Subject: [PATCH 1/2] arm64: dts: rockchip: add LinkEase EasePi R1
|
||||
|
||||
LinkEase EasePi R1 [1] is a high-performance mini router.
|
||||
|
||||
Specification:
|
||||
- Rockchip RK3568
|
||||
- 2GB/4GB LPDDR4 RAM
|
||||
- 16GB on-board eMMC
|
||||
- 1x M.2 key for 2280 NVMe (PCIe 3.0)
|
||||
- 1x USB 3.0 Type-A
|
||||
- 1x USB 2.0 Type-C (for USB flashing)
|
||||
- 2x 1000 Base-T (native, RTL8211F)
|
||||
- 2x 2500 Base-T (PCIe, RTL8125B)
|
||||
- 1x HDMI 2.0 Output
|
||||
- 12v DC Jack
|
||||
- 1x Power key connected to PMIC
|
||||
- 2x LEDs (one static power supplied, one GPIO controlled)
|
||||
|
||||
[1] https://doc.linkease.com/zh/guide/easepi-r1/hardware.html
|
||||
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
|
||||
Link: https://patch.msgid.link/20251014051226.64255-4-jjm2473@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
[ upstream commit: deaefeaf3df433d50935b9a85076041040f06d74 ]
|
||||
|
||||
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
|
||||
---
|
||||
.../src/arm64/rockchip/rk3568-easepi-r1.dts | 623 ++++++++++++++++++
|
||||
1 file changed, 623 insertions(+)
|
||||
create mode 100644 dts/upstream/src/arm64/rockchip/rk3568-easepi-r1.dts
|
||||
|
||||
--- /dev/null
|
||||
+++ b/dts/upstream/src/arm64/rockchip/rk3568-easepi-r1.dts
|
||||
@@ -0,0 +1,623 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
+#include "rk3568.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "LinkEase EasePi R1";
|
||||
+ compatible = "linkease,easepi-r1", "rockchip,rk3568";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac0;
|
||||
+ ethernet1 = &gmac1;
|
||||
+ mmc0 = &sdhci;
|
||||
+ };
|
||||
+
|
||||
+ chosen: chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ adc-keys {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 0>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+
|
||||
+ button-recovery {
|
||||
+ label = "Recovery";
|
||||
+ linux,code = <KEY_VENDOR>;
|
||||
+ press-threshold-microvolt = <1750>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&status_led_pin>;
|
||||
+
|
||||
+ status_led: led-status {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
+ gpios = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hdmi-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dc_12v: regulator-dc-12v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dc_12v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: regulator-vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: regulator-vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ pcie30_avdd0v9: regulator-pcie30-avdd0v9 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ pcie30_avdd1v8: regulator-pcie30-avdd1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ regulator-vdd0v95-25glan {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vdd0v95_25glan_en>;
|
||||
+ regulator-name = "vdd0v95_25glan";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_nvme: regulator-vcc3v3-nvme {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc3v3_nvme_en>;
|
||||
+ regulator-name = "vcc3v3_nvme";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac0 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ phy-handle = <&rgmii_phy0>;
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac0_miim
|
||||
+ &gmac0_tx_bus2
|
||||
+ &gmac0_rx_bus2
|
||||
+ &gmac0_rgmii_clk
|
||||
+ &gmac0_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m1_miim
|
||||
+ &gmac1m1_tx_bus2
|
||||
+ &gmac1m1_rx_bus2
|
||||
+ &gmac1m1_rgmii_clk
|
||||
+ &gmac1m1_rgmii_bus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ avdd-0v9-supply = <&vdda0v9_image>;
|
||||
+ avdd-1v8-supply = <&vcca1v8_image>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in {
|
||||
+ hdmi_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>;
|
||||
+ system-power-controller;
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio0 {
|
||||
+ rgmii_phy0: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x1>;
|
||||
+ pinctrl-0 = <ð_phy0_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x1>;
|
||||
+ pinctrl-0 = <ð_phy1_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* ETH3 */
|
||||
+&pcie2x1 {
|
||||
+ reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_sys>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie30phy {
|
||||
+ data-lanes = <1 2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* ETH2 */
|
||||
+&pcie3x1 {
|
||||
+ num-lanes = <1>;
|
||||
+ reset-gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_sys>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* M.2 Key for 2280 NVMe */
|
||||
+&pcie3x2 {
|
||||
+ num-lanes = <1>;
|
||||
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_nvme>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gmac0 {
|
||||
+ eth_phy0_reset_pin: eth-phy0-reset-pin {
|
||||
+ rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gmac1 {
|
||||
+ eth_phy1_reset_pin: eth-phy1-reset-pin {
|
||||
+ rockchip,pins = <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ status_led_pin: status-led-pin {
|
||||
+ rockchip,pins = <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ nvme {
|
||||
+ vcc3v3_nvme_en: vcc3v3-nvme-en {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie-nic {
|
||||
+ vdd0v95_25glan_en: vdd0v95-25glan-en {
|
||||
+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int: pmic-int {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_1v8>;
|
||||
+ vccio5-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* OTG Only USB2.0, Only device mode */
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "peripheral";
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ maximum-speed = "high-speed";
|
||||
+ phys = <&usb2phy0_otg>;
|
||||
+ phy-names = "usb2-phy";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_sys>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
@ -1,124 +0,0 @@
|
||||
From bb1996b423b81b94b1468fffe5eb9949434b941e Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Thu, 13 Nov 2025 14:51:21 +0800
|
||||
Subject: [PATCH 2/2] board: rockchip: add LinkEase EasePi R1
|
||||
|
||||
LinkEase EasePi R1 [1] is a high-performance mini router.
|
||||
|
||||
Specification:
|
||||
- Rockchip RK3568
|
||||
- 2GB/4GB LPDDR4 RAM
|
||||
- 16GB on-board eMMC
|
||||
- 1x M.2 key for 2280 NVMe (PCIe 3.0)
|
||||
- 1x USB 3.0 Type-A
|
||||
- 1x USB 2.0 Type-C (for USB flashing)
|
||||
- 2x 1000 Base-T (native, RTL8211F)
|
||||
- 2x 2500 Base-T (PCIe, RTL8125B)
|
||||
- 1x HDMI 2.0 Output
|
||||
- 12v DC Jack
|
||||
- 1x Power key connected to PMIC
|
||||
- 2x LEDs (one static power supplied, one GPIO controlled)
|
||||
|
||||
[1] https://doc.linkease.com/zh/guide/easepi-r1/hardware.html
|
||||
|
||||
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
|
||||
---
|
||||
arch/arm/dts/rk3568-easepi-r1-u-boot.dtsi | 3 +
|
||||
configs/easepi-r1-rk3568_defconfig | 84 +++++++++++++++++++++++
|
||||
2 files changed, 87 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3568-easepi-r1-u-boot.dtsi
|
||||
create mode 100644 configs/easepi-r1-rk3568_defconfig
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3568-easepi-r1-u-boot.dtsi
|
||||
@@ -0,0 +1,3 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+
|
||||
+#include "rk356x-u-boot.dtsi"
|
||||
--- /dev/null
|
||||
+++ b/configs/easepi-r1-rk3568_defconfig
|
||||
@@ -0,0 +1,84 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-easepi-r1"
|
||||
+CONFIG_ROCKCHIP_RK3568=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-easepi-r1.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_ROCKUSB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_SDMA=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_PHY_REALTEK=y
|
||||
+CONFIG_DWC_ETH_QOS=y
|
||||
+CONFIG_DWC_ETH_QOS_ROCKCHIP=y
|
||||
+CONFIG_RTL8169=y
|
||||
+CONFIG_NVME_PCI=y
|
||||
+CONFIG_PCIE_DW_ROCKCHIP=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_DM_PMIC=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_GENERIC=y
|
||||
+CONFIG_SPL_USB_DWC3_GENERIC=y
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
+CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
@ -1,120 +0,0 @@
|
||||
From 46fcbfcbc1fffbfefd75a5ba186e6bb56f27b859 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 10 Nov 2024 00:56:16 +0000
|
||||
Subject: [PATCH] rockchip: rk3588: Implement checkboard() to print SoC variant
|
||||
|
||||
Implement checkboard() to print current SoC model used by a board,
|
||||
e.g. one of:
|
||||
|
||||
SoC: RK3582
|
||||
SoC: RK3588
|
||||
SoC: RK3588J
|
||||
SoC: RK3588S
|
||||
SoC: RK3588S2
|
||||
|
||||
when U-Boot proper is running.
|
||||
|
||||
U-Boot 2025.01-rc1 (Nov 10 2024 - 00:31:29 +0000)
|
||||
|
||||
Model: Generic RK3588S/RK3588
|
||||
SoC: RK3588S2
|
||||
DRAM: 8 GiB
|
||||
|
||||
Information about the SoC model and variant is read from OTP.
|
||||
|
||||
Also update rk3588s-u-boot.dtsi to include OTP in U-Boot pre-reloc phase,
|
||||
where checkboard() is called.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
arch/arm/dts/rk3588s-u-boot.dtsi | 4 ++
|
||||
arch/arm/mach-rockchip/rk3588/rk3588.c | 52 ++++++++++++++++++++++++++
|
||||
2 files changed, 56 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi
|
||||
index 09d8b311cec..8880d162b11 100644
|
||||
--- a/arch/arm/dts/rk3588s-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3588s-u-boot.dtsi
|
||||
@@ -69,6 +69,10 @@
|
||||
bootph-all;
|
||||
};
|
||||
|
||||
+&otp {
|
||||
+ bootph-some-ram;
|
||||
+};
|
||||
+
|
||||
&pcfg_pull_down {
|
||||
bootph-all;
|
||||
};
|
||||
diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
index d3162d3447e..84a9ed6611c 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
@@ -4,6 +4,10 @@
|
||||
* Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
|
||||
*/
|
||||
|
||||
+#define LOG_CATEGORY LOGC_ARCH
|
||||
+
|
||||
+#include <dm.h>
|
||||
+#include <misc.h>
|
||||
#include <spl.h>
|
||||
#include <asm/armv8/mmu.h>
|
||||
#include <asm/arch-rockchip/bootrom.h>
|
||||
@@ -178,3 +182,51 @@ int arch_cpu_init(void)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#define RK3588_OTP_CPU_CODE_OFFSET 0x02
|
||||
+#define RK3588_OTP_SPECIFICATION_OFFSET 0x06
|
||||
+
|
||||
+int checkboard(void)
|
||||
+{
|
||||
+ u8 cpu_code[2], specification, package;
|
||||
+ struct udevice *dev;
|
||||
+ char suffix[3];
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!IS_ENABLED(CONFIG_ROCKCHIP_OTP) || !CONFIG_IS_ENABLED(MISC))
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
+ DM_DRIVER_GET(rockchip_otp), &dev);
|
||||
+ if (ret) {
|
||||
+ log_debug("Could not find otp device, ret=%d\n", ret);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* cpu-code: SoC model, e.g. 0x35 0x82 or 0x35 0x88 */
|
||||
+ ret = misc_read(dev, RK3588_OTP_CPU_CODE_OFFSET, cpu_code, 2);
|
||||
+ if (ret < 0) {
|
||||
+ log_debug("Could not read cpu-code, ret=%d\n", ret);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* specification: SoC variant, e.g. 0xA for RK3588J and 0x13 for RK3588S */
|
||||
+ ret = misc_read(dev, RK3588_OTP_SPECIFICATION_OFFSET, &specification, 1);
|
||||
+ if (ret < 0) {
|
||||
+ log_debug("Could not read specification, ret=%d\n", ret);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* package: likely SoC variant revision, 0x2 for RK3588S2 */
|
||||
+ package = specification >> 5;
|
||||
+ specification &= 0x1f;
|
||||
+
|
||||
+ /* for RK3588J i.e. '@' + 0xA = 'J' */
|
||||
+ suffix[0] = specification > 1 ? '@' + specification : '\0';
|
||||
+ /* for RK3588S2 i.e. '0' + 0x2 = '2' */
|
||||
+ suffix[1] = package > 1 ? '0' + package : '\0';
|
||||
+ suffix[2] = '\0';
|
||||
+
|
||||
+ printf("SoC: RK%02x%02x%s\n", cpu_code[0], cpu_code[1], suffix);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,176 +0,0 @@
|
||||
From d432653975cf1f4f738addde721e50ebaa4c0065 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 10 Dec 2024 22:23:35 +0000
|
||||
Subject: [PATCH] rockchip: Add initial RK3582 support
|
||||
|
||||
The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
|
||||
What blocks are disabled/non-working is indicated by ip-state in OTP.
|
||||
|
||||
This add initial support for RK3582 by using ft_system_setup() to mark
|
||||
any cpu and/or gpu node with status=fail as indicated by ip-state.
|
||||
|
||||
This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
|
||||
cores and the gpu is always failed/disabled.
|
||||
|
||||
Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
|
||||
the required DT fixups for RK3582 board variants.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3588/rk3588.c | 128 +++++++++++++++++++++++++
|
||||
1 file changed, 128 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
index 84a9ed6611c..1e660cc24d4 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#define LOG_CATEGORY LOGC_ARCH
|
||||
|
||||
#include <dm.h>
|
||||
+#include <fdt_support.h>
|
||||
#include <misc.h>
|
||||
#include <spl.h>
|
||||
#include <asm/armv8/mmu.h>
|
||||
@@ -185,6 +186,12 @@ int arch_cpu_init(void)
|
||||
|
||||
#define RK3588_OTP_CPU_CODE_OFFSET 0x02
|
||||
#define RK3588_OTP_SPECIFICATION_OFFSET 0x06
|
||||
+#define RK3588_OTP_IP_STATE_OFFSET 0x1d
|
||||
+
|
||||
+#define BAD_CPU_CLUSTER0 GENMASK(3, 0)
|
||||
+#define BAD_CPU_CLUSTER1 GENMASK(5, 4)
|
||||
+#define BAD_CPU_CLUSTER2 GENMASK(7, 6)
|
||||
+#define BAD_GPU GENMASK(4, 1)
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
@@ -230,3 +237,124 @@ int checkboard(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+#ifdef CONFIG_OF_SYSTEM_SETUP
|
||||
+static int fdt_path_del_node(void *fdt, const char *path)
|
||||
+{
|
||||
+ int nodeoffset;
|
||||
+
|
||||
+ nodeoffset = fdt_path_offset(fdt, path);
|
||||
+ if (nodeoffset < 0)
|
||||
+ return nodeoffset;
|
||||
+
|
||||
+ return fdt_del_node(fdt, nodeoffset);
|
||||
+}
|
||||
+
|
||||
+static int fdt_path_set_name(void *fdt, const char *path, const char *name)
|
||||
+{
|
||||
+ int nodeoffset;
|
||||
+
|
||||
+ nodeoffset = fdt_path_offset(fdt, path);
|
||||
+ if (nodeoffset < 0)
|
||||
+ return nodeoffset;
|
||||
+
|
||||
+ return fdt_set_name(fdt, nodeoffset, name);
|
||||
+}
|
||||
+
|
||||
+int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
+{
|
||||
+ static const char * const cpu_node_names[] = {
|
||||
+ "cpu@0", "cpu@100", "cpu@200", "cpu@300",
|
||||
+ "cpu@400", "cpu@500", "cpu@600", "cpu@700",
|
||||
+ };
|
||||
+ u8 cpu_code[2], ip_state[3];
|
||||
+ int parent, node, i, ret;
|
||||
+ struct udevice *dev;
|
||||
+
|
||||
+ if (!IS_ENABLED(CONFIG_ROCKCHIP_OTP) || !CONFIG_IS_ENABLED(MISC))
|
||||
+ return -ENOSYS;
|
||||
+
|
||||
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
+ DM_DRIVER_GET(rockchip_otp), &dev);
|
||||
+ if (ret) {
|
||||
+ log_debug("Could not find otp device, ret=%d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* cpu-code: SoC model, e.g. 0x35 0x82 or 0x35 0x88 */
|
||||
+ ret = misc_read(dev, RK3588_OTP_CPU_CODE_OFFSET, cpu_code, 2);
|
||||
+ if (ret < 0) {
|
||||
+ log_debug("Could not read cpu-code, ret=%d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ log_debug("cpu-code: %02x %02x\n", cpu_code[0], cpu_code[1]);
|
||||
+
|
||||
+ /* skip on rk3588 */
|
||||
+ if (cpu_code[0] == 0x35 && cpu_code[1] == 0x88)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = misc_read(dev, RK3588_OTP_IP_STATE_OFFSET, &ip_state, 3);
|
||||
+ if (ret < 0) {
|
||||
+ log_debug("Could not read ip-state, ret=%d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ log_debug("ip-state: %02x %02x %02x\n",
|
||||
+ ip_state[0], ip_state[1], ip_state[2]);
|
||||
+
|
||||
+ if (cpu_code[0] == 0x35 && cpu_code[1] == 0x82) {
|
||||
+ /* policy: always disable gpu */
|
||||
+ ip_state[1] |= BAD_GPU;
|
||||
+
|
||||
+ /* policy: always disable one big core cluster */
|
||||
+ if (!(ip_state[0] & (BAD_CPU_CLUSTER1 | BAD_CPU_CLUSTER2)))
|
||||
+ ip_state[0] |= BAD_CPU_CLUSTER2;
|
||||
+ }
|
||||
+
|
||||
+ if (ip_state[0] & BAD_CPU_CLUSTER1) {
|
||||
+ /* fail entire cluster when one or more core is bad */
|
||||
+ ip_state[0] |= BAD_CPU_CLUSTER1;
|
||||
+ fdt_path_del_node(blob, "/cpus/cpu-map/cluster1");
|
||||
+ }
|
||||
+
|
||||
+ if (ip_state[0] & BAD_CPU_CLUSTER2) {
|
||||
+ /* fail entire cluster when one or more core is bad */
|
||||
+ ip_state[0] |= BAD_CPU_CLUSTER2;
|
||||
+ fdt_path_del_node(blob, "/cpus/cpu-map/cluster2");
|
||||
+ } else if (ip_state[0] & BAD_CPU_CLUSTER1) {
|
||||
+ /* cluster nodes must be named in a continuous series */
|
||||
+ fdt_path_set_name(blob, "/cpus/cpu-map/cluster2", "cluster1");
|
||||
+ }
|
||||
+
|
||||
+ /* gpu: ip_state[1]: bit1~4 */
|
||||
+ if (ip_state[1] & BAD_GPU) {
|
||||
+ log_debug("fail gpu\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/gpu@fb000000");
|
||||
+ }
|
||||
+
|
||||
+ parent = fdt_path_offset(blob, "/cpus");
|
||||
+ if (parent < 0) {
|
||||
+ log_debug("Could not find /cpus, parent=%d\n", parent);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* cpu: ip_state[0]: bit0~7 */
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ /* fail any bad cpu core */
|
||||
+ if (!(ip_state[0] & BIT(i)))
|
||||
+ continue;
|
||||
+
|
||||
+ node = fdt_subnode_offset(blob, parent, cpu_node_names[i]);
|
||||
+ if (node >= 0) {
|
||||
+ log_debug("fail cpu %s\n", cpu_node_names[i]);
|
||||
+ fdt_status_fail(blob, node);
|
||||
+ } else {
|
||||
+ log_debug("Could not find %s, node=%d\n",
|
||||
+ cpu_node_names[i], node);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
From 43ad56b7176e57a92fe6846883817ca271da1c61 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 10 Dec 2024 22:23:36 +0000
|
||||
Subject: [PATCH] rockchip: rk3588-generic: Enable support for RK3582
|
||||
|
||||
Add Kconfig option OF_SYSTEM_SETUP=y to support booting boards with a
|
||||
RK3582 SoC. CPU and GPU cores are failed based on ip-state and policy.
|
||||
|
||||
Tested on a ROCK 5C Lite v1.1:
|
||||
|
||||
cpu-code: 35 82
|
||||
ip-state: 10 00 00
|
||||
fail gpu
|
||||
fail cpu cpu@400
|
||||
fail cpu cpu@500
|
||||
|
||||
and on a Radxa E52C:
|
||||
|
||||
cpu-code: 35 82
|
||||
ip-state: 00 04 00
|
||||
fail gpu
|
||||
fail cpu cpu@600
|
||||
fail cpu cpu@700
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
configs/generic-rk3588_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig
|
||||
index 42bc2c9a765..cbcbb6e91f1 100644
|
||||
--- a/configs/generic-rk3588_defconfig
|
||||
+++ b/configs/generic-rk3588_defconfig
|
||||
@@ -16,6 +16,7 @@ CONFIG_SPL_FIT_SIGNATURE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
# CONFIG_BOOTMETH_VBE is not set
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-generic.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 73f3bfac1998320bed3fafe5edcde8497f81ac89 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Wed, 11 Jun 2025 17:01:10 +0800
|
||||
Subject: [PATCH] rockchip: rk3588: unlock good big cores in RK3582
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3588/rk3588.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
index 1e660cc24d4..0571aab72df 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
@@ -307,9 +307,11 @@ int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
/* policy: always disable gpu */
|
||||
ip_state[1] |= BAD_GPU;
|
||||
|
||||
+#if 0
|
||||
/* policy: always disable one big core cluster */
|
||||
if (!(ip_state[0] & (BAD_CPU_CLUSTER1 | BAD_CPU_CLUSTER2)))
|
||||
ip_state[0] |= BAD_CPU_CLUSTER2;
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (ip_state[0] & BAD_CPU_CLUSTER1) {
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
From ee1d15ac3fd79e05e96c3036c6578d65b1b14314 Mon Sep 17 00:00:00 2001
|
||||
From: Liangbin Lian <jjm2473@gmail.com>
|
||||
Date: Wed, 11 Jun 2025 16:55:37 +0800
|
||||
Subject: [PATCH] rockchip: rk3588: disable bad vpu in RK3582
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3588/rk3588.c | 44 +++++++++++++++++++++++++-
|
||||
1 file changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
index 0571aab72df..1a8b7a96f5d 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
|
||||
@@ -193,6 +193,14 @@ int arch_cpu_init(void)
|
||||
#define BAD_CPU_CLUSTER2 GENMASK(7, 6)
|
||||
#define BAD_GPU GENMASK(4, 1)
|
||||
|
||||
+#define BAD_VDEC0 (1<<6)
|
||||
+#define BAD_VDEC1 (1<<7)
|
||||
+#define BAD_VDEC (BAD_VDEC0|BAD_VDEC1)
|
||||
+
|
||||
+#define BAD_VENC0 (1<<0)
|
||||
+#define BAD_VENC1 (1<<2)
|
||||
+#define BAD_VENC (BAD_VENC0|BAD_VENC1)
|
||||
+
|
||||
int checkboard(void)
|
||||
{
|
||||
u8 cpu_code[2], specification, package;
|
||||
@@ -305,7 +313,9 @@ int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
|
||||
if (cpu_code[0] == 0x35 && cpu_code[1] == 0x82) {
|
||||
/* policy: always disable gpu */
|
||||
- ip_state[1] |= BAD_GPU;
|
||||
+ //ip_state[1] |= BAD_GPU;
|
||||
+ /* policy: always disable vdec */
|
||||
+ //ip_state[1] |= BAD_VDEC;
|
||||
|
||||
#if 0
|
||||
/* policy: always disable one big core cluster */
|
||||
@@ -332,9 +342,41 @@ int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
/* gpu: ip_state[1]: bit1~4 */
|
||||
if (ip_state[1] & BAD_GPU) {
|
||||
log_debug("fail gpu\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/gpu-panthor@fb000000");
|
||||
fdt_status_fail_by_pathf(blob, "/gpu@fb000000");
|
||||
}
|
||||
|
||||
+ if (ip_state[1] & BAD_VDEC0) {
|
||||
+ log_debug("fail vdec0\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvdec-core@fdc38000");
|
||||
+ fdt_status_fail_by_pathf(blob, "/iommu@fdc38700");
|
||||
+ }
|
||||
+ if (ip_state[1] & BAD_VDEC1) {
|
||||
+ log_debug("fail vdec1\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvdec-core@fdc48000");
|
||||
+ fdt_status_fail_by_pathf(blob, "/iommu@fdc48700");
|
||||
+ }
|
||||
+ if (ip_state[1] & BAD_VDEC) {
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvdec-ccu@fdc30000");
|
||||
+ fdt_path_set_name(blob, "/rkvdec-core@fdc38000", "rkvdec@fdc38000");
|
||||
+ fdt_path_set_name(blob, "/rkvdec-core@fdc48000", "rkvdec@fdc48000");
|
||||
+ }
|
||||
+ if (ip_state[2] & BAD_VENC0) {
|
||||
+ log_debug("fail venc0\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvenc-core@fdbd0000");
|
||||
+ fdt_status_fail_by_pathf(blob, "/iommu@fdbdf000");
|
||||
+ }
|
||||
+ if (ip_state[2] & BAD_VENC1) {
|
||||
+ log_debug("fail venc1\n");
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvenc-core@fdbe0000");
|
||||
+ fdt_status_fail_by_pathf(blob, "/iommu@fdbef000");
|
||||
+ }
|
||||
+ if (ip_state[2] & BAD_VENC) {
|
||||
+ fdt_status_fail_by_pathf(blob, "/rkvenc-ccu");
|
||||
+ fdt_path_set_name(blob, "/rkvenc-core@fdbd0000", "rkvenc@fdbd0000");
|
||||
+ fdt_path_set_name(blob, "/rkvenc-core@fdbe0000", "rkvenc@fdbe0000");
|
||||
+ }
|
||||
+
|
||||
parent = fdt_path_offset(blob, "/cpus");
|
||||
if (parent < 0) {
|
||||
log_debug("Could not find /cpus, parent=%d\n", parent);
|
||||
--
|
||||
2.46.0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user