Compare commits
122 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a58a86693f | ||
|
|
101988c61a | ||
|
|
b7e81d210b | ||
|
|
3d006f95f2 | ||
|
|
46385eb7f8 | ||
|
|
11a41bc4b2 | ||
|
|
f6a9f0c57b | ||
|
|
2285eb732a | ||
|
|
f5e9fd624d | ||
|
|
85d1b43be4 | ||
|
|
1cab0d74b3 | ||
|
|
c9e8453de7 | ||
|
|
2ef625e769 | ||
|
|
5106f554bb | ||
|
|
6fd16b0d27 | ||
|
|
6de0e0d01a | ||
|
|
bbfb920e99 | ||
|
|
f780cfb92f | ||
|
|
d3c193525e | ||
|
|
429715a237 | ||
|
|
b209f45640 | ||
|
|
04cde73d56 | ||
|
|
3223f31fd3 | ||
|
|
cfadbc090c | ||
|
|
7c43ced160 | ||
|
|
ec54022549 | ||
|
|
610ae4d344 | ||
|
|
8ed934f371 | ||
|
|
250ab7b7a5 | ||
|
|
592aacc3d9 | ||
|
|
65a10c8230 | ||
|
|
21e5db97c4 | ||
|
|
4ef8899c7a | ||
|
|
fdeb7d6dd0 | ||
|
|
21552a955a | ||
|
|
40203cdbde | ||
|
|
f34ccb10dd | ||
|
|
51b1d5950e | ||
|
|
b549880815 | ||
|
|
41f27bbb6d | ||
|
|
0dec0e0f19 | ||
|
|
20736013e9 | ||
|
|
066971615f | ||
|
|
b649b0bf71 | ||
|
|
e465592155 | ||
|
|
1157b8c1f1 | ||
|
|
89184b15cf | ||
|
|
25bb84e273 | ||
|
|
3f6e28e39c | ||
|
|
958817b1c3 | ||
|
|
16fcad47a4 | ||
|
|
6bb3c2eba8 | ||
|
|
eaf44c5696 | ||
|
|
220ab83cd1 | ||
|
|
ed6e13649d | ||
|
|
26164312b4 | ||
|
|
f1ea45f853 | ||
|
|
1d5d149330 | ||
|
|
b5817d14c9 | ||
|
|
fefa446127 | ||
|
|
07e9c27bde | ||
|
|
3d0a78add2 | ||
|
|
620721f642 | ||
|
|
982f859144 | ||
|
|
64ab02aff8 | ||
|
|
06efc8027f | ||
|
|
8ff9264177 | ||
|
|
269896fed0 | ||
|
|
aaa1286b89 | ||
|
|
5368066e9b | ||
|
|
525adac8ee | ||
|
|
c4c9f61331 | ||
|
|
9eec4eb268 | ||
|
|
6150df13a3 | ||
|
|
7bd682bc58 | ||
|
|
cd189cdefe | ||
|
|
a1e3ec0ff6 | ||
|
|
ba300c8a1c | ||
|
|
97980323ef | ||
|
|
07d4455cee | ||
|
|
74dbee1ea0 | ||
|
|
cdf7c3a16e | ||
|
|
6a1b92b024 | ||
|
|
75fe50defe | ||
|
|
263ef841d4 | ||
|
|
c53dda11a2 | ||
|
|
b63c6e3512 | ||
|
|
76a9b0e02a | ||
|
|
3826ebbd18 | ||
|
|
b00fcab13c | ||
|
|
6cdd9a6de4 | ||
|
|
37395ecb32 | ||
|
|
05331f0ef8 | ||
|
|
f7e4f8cbbf | ||
|
|
5bfa66bcf3 | ||
|
|
15f4d6b244 | ||
|
|
51adcb7cd2 | ||
|
|
d7e2468e13 | ||
|
|
c8d4694d2c | ||
|
|
fad08e8e23 | ||
|
|
c5441d24d9 | ||
|
|
f666723f6d | ||
|
|
e83384b87e | ||
|
|
e2780cbb2f | ||
|
|
6099d083a6 | ||
|
|
6c80c7533b | ||
|
|
b98b3d4296 | ||
|
|
6420851c0c | ||
|
|
ee3600a91e | ||
|
|
023f90fbc8 | ||
|
|
03cb2d63f4 | ||
|
|
58d57f7673 | ||
|
|
4afff7b8b5 | ||
|
|
1304234dd7 | ||
|
|
0da199f60c | ||
|
|
c0c4a9bce4 | ||
|
|
72f7f18d2b | ||
|
|
77061285e4 | ||
|
|
4245adf4e0 | ||
|
|
2ce5521bd2 | ||
|
|
0bc33a6505 | ||
|
|
86e852bcd0 |
4
.github/workflows/Dockerfile.tools
vendored
4
.github/workflows/Dockerfile.tools
vendored
@@ -1,4 +0,0 @@
|
||||
FROM ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2
|
||||
|
||||
COPY --chown=buildbot staging_dir/host /prebuilt_tools/staging_dir/host
|
||||
COPY --chown=buildbot build_dir/host /prebuilt_tools/build_dir/host
|
||||
72
.github/workflows/build-tools.yml
vendored
72
.github/workflows/build-tools.yml
vendored
@@ -1,72 +0,0 @@
|
||||
name: Build host tools
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
generate_prebuilt_artifacts:
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build tools
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Fix permission
|
||||
run: chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Set configs for tools container
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
touch .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
- name: Make prereq
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-logs
|
||||
path: openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-config
|
||||
path: openwrt/.config
|
||||
|
||||
- name: Archive prebuilt tools
|
||||
if: inputs.generate_prebuilt_artifacts == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: tar -cf tools.tar staging_dir/host build_dir/host
|
||||
|
||||
- name: Upload prebuilt tools
|
||||
if: inputs.generate_prebuilt_artifacts == true
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt/tools.tar
|
||||
retention-days: 1
|
||||
435
.github/workflows/build.yml
vendored
435
.github/workflows/build.yml
vendored
@@ -1,435 +0,0 @@
|
||||
name: Build sub target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
coverity_api_token:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
subtarget:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
build_toolchain:
|
||||
type: boolean
|
||||
include_feeds:
|
||||
type: boolean
|
||||
build_full:
|
||||
type: boolean
|
||||
build_kernel:
|
||||
type: boolean
|
||||
build_all_modules:
|
||||
type: boolean
|
||||
build_all_kmods:
|
||||
type: boolean
|
||||
build_all_boards:
|
||||
type: boolean
|
||||
use_openwrt_container:
|
||||
type: boolean
|
||||
default: true
|
||||
coverity_project_name:
|
||||
type: string
|
||||
default: OpenWrt
|
||||
coverity_check_packages:
|
||||
type: string
|
||||
coverity_compiler_template_list:
|
||||
type: string
|
||||
default: >-
|
||||
arm-openwrt-linux-gcc
|
||||
coverity_force_compile_packages:
|
||||
type: string
|
||||
default: >-
|
||||
curl
|
||||
libnl
|
||||
mbedtls
|
||||
wolfssl
|
||||
openssl
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build ${{ inputs.target }}/${{ inputs.subtarget }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [ ${{ inputs.use_openwrt_container }} == "true" ]; then
|
||||
OWNER_LC=openwrt
|
||||
fi
|
||||
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate ccache hash
|
||||
id: ccache_hash
|
||||
run: |
|
||||
CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \
|
||||
| md5sum | awk '{ print $1 }')
|
||||
echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build ${{ inputs.target }}/${{ inputs.subtarget }}
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Checkout packages feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/packages
|
||||
path: openwrt/feeds/packages
|
||||
|
||||
- name: Checkout luci feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/luci
|
||||
path: openwrt/feeds/luci
|
||||
|
||||
- name: Checkout routing feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/routing
|
||||
path: openwrt/feeds/routing
|
||||
|
||||
- name: Checkout telephony feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/telephony
|
||||
path: openwrt/feeds/telephony
|
||||
|
||||
- name: Parse toolchain file
|
||||
if: inputs.build_toolchain == false
|
||||
id: parse-toolchain
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_PATH=snapshots
|
||||
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.base_ref }} | sed 's/^openwrt-/v/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-/v/')"
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-\([0-9][0-9]\.[0-9][0-9]\)-.*/v\1/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^\(v[0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$major_ver" ]; then
|
||||
git fetch --tags -f
|
||||
latest_tag="$(git tag --sort=-creatordate -l $major_ver* | head -n1)"
|
||||
if [ -n "$latest_tag" ]; then
|
||||
TOOLCHAIN_PATH=releases/$(echo $latest_tag | sed 's/^v//')
|
||||
fi
|
||||
fi
|
||||
|
||||
SUMS_FILE="https://downloads.cdn.openwrt.org/$TOOLCHAIN_PATH/targets/${{ inputs.target }}/${{ inputs.subtarget }}/sha256sums"
|
||||
if curl $SUMS_FILE | grep -q ".*openwrt-toolchain.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-toolchain.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p')
|
||||
|
||||
echo "toolchain-type=external_toolchain" >> $GITHUB_OUTPUT
|
||||
elif curl $SUMS_FILE | grep -q ".*openwrt-sdk.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-sdk.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-sdk.*\).tar.xz/\1/p')
|
||||
|
||||
echo "toolchain-type=external_sdk" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "toolchain-type=internal" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV"
|
||||
echo "TOOLCHAIN_PATH=$TOOLCHAIN_PATH" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Prepare prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
mkdir -p staging_dir build_dir
|
||||
ln -s /prebuilt_tools/staging_dir/host staging_dir/host
|
||||
ln -s /prebuilt_tools/build_dir/host build_dir/host
|
||||
|
||||
./scripts/ext-tools.sh --refresh
|
||||
|
||||
- name: Update & Install feeds
|
||||
if: inputs.include_feeds == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: Cache ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: openwrt/.ccache
|
||||
key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ needs.setup_build.outputs.ccache_hash }}
|
||||
restore-keys: |
|
||||
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
|
||||
|
||||
- name: Download external toolchain/sdk
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
wget -O - https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ inputs.target }}/${{ inputs.subtarget }}/${{ env.TOOLCHAIN_FILE }}.tar.xz \
|
||||
| tar --xz -xf -
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure all kernel modules
|
||||
if: inputs.build_all_kmods == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
|
||||
- name: Configure all modules
|
||||
if: inputs.build_all_modules == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL=y >> .config
|
||||
|
||||
- name: Configure all boards
|
||||
if: inputs.build_all_boards == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TARGET_MULTI_PROFILE=y >> .config
|
||||
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
||||
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
|
||||
|
||||
- name: Configure external toolchain
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ inputs.target }}/${{ inputs.subtarget }}
|
||||
|
||||
- name: Adapt external sdk to external toolchain format
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_DIR=${{ env.TOOLCHAIN_FILE }}/staging_dir/$(ls ${{ env.TOOLCHAIN_FILE }}/staging_dir | grep toolchain)
|
||||
TOOLCHAIN_BIN=$TOOLCHAIN_DIR/bin
|
||||
OPENWRT_DIR=$(pwd)
|
||||
|
||||
# Find target name from toolchain info.mk
|
||||
GNU_TARGET_NAME=$(cat $TOOLCHAIN_DIR/info.mk | grep TARGET_CROSS | sed 's/^TARGET_CROSS=\(.*\)-$/\1/')
|
||||
|
||||
cd $TOOLCHAIN_BIN
|
||||
|
||||
# Revert sdk wrapper scripts applied to all the bins
|
||||
for app in $(find . -name "*.bin"); do
|
||||
TARGET_APP=$(echo $app | sed 's/\.\/\.\(.*\)\.bin/\1/')
|
||||
rm $TARGET_APP
|
||||
mv .$TARGET_APP.bin $TARGET_APP
|
||||
done
|
||||
|
||||
# Setup the wrapper script in the sdk toolchain dir simulating an external toolchain build
|
||||
cp $OPENWRT_DIR/target/toolchain/files/wrapper.sh $GNU_TARGET_NAME-wrapper.sh
|
||||
for app in cc gcc g++ c++ cpp ld as ; do
|
||||
[ -f $GNU_TARGET_NAME-$app ] && mv $GNU_TARGET_NAME-$app $GNU_TARGET_NAME-$app.bin
|
||||
ln -sf $GNU_TARGET_NAME-wrapper.sh $GNU_TARGET_NAME-$app
|
||||
done
|
||||
|
||||
- name: Configure external toolchain with sdk
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/staging_dir/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ inputs.target }}/${{ inputs.subtarget }}
|
||||
|
||||
- name: Configure internal toolchain
|
||||
if: inputs.build_toolchain == true || steps.parse-toolchain.outputs.toolchain-type == 'internal'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ inputs.target }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ inputs.target }}_${{ inputs.subtarget }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Show configuration
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/diffconfig.sh
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build toolchain
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make toolchain/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel
|
||||
if: inputs.build_kernel == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make target/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel Kmods
|
||||
if: inputs.build_kernel == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make package/linux/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build everything
|
||||
if: inputs.build_full == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Coverity prepare toolchain
|
||||
if: inputs.coverity_check_packages != ''
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
wget -q https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.coverity_api_token }}&project=${{ inputs.coverity_project_name }}" -O coverity.tar.gz
|
||||
wget -q https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.coverity_api_token }}&project=${{ inputs.coverity_project_name }}&md5=1" -O coverity.tar.gz.md5
|
||||
echo ' coverity.tar.gz' >> coverity.tar.gz.md5
|
||||
md5sum -c coverity.tar.gz.md5
|
||||
|
||||
mkdir cov-analysis-linux64
|
||||
tar xzf coverity.tar.gz --strip 1 -C cov-analysis-linux64
|
||||
export PATH=$(pwd)/cov-analysis-linux64/bin:$PATH
|
||||
|
||||
for template in ${{ inputs.coverity_compiler_template_list }}; do
|
||||
cov-configure --template --comptype gcc --compiler "$template"
|
||||
done
|
||||
|
||||
- name: Clean and recompile packages with Coverity toolchain
|
||||
if: inputs.coverity_check_packages != ''
|
||||
shell: su buildbot -c "bash {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
set -o pipefail -o errexit
|
||||
|
||||
coverity_check_packages=(${{ inputs.coverity_check_packages }})
|
||||
printf -v clean_packages "package/%s/clean " "${coverity_check_packages[@]}"
|
||||
make -j$(nproc) BUILD_LOG=1 $clean_packages || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
coverity_force_compile_packages=(${{ inputs.coverity_force_compile_packages }})
|
||||
printf -v force_compile_packages "package/%s/compile " "${coverity_force_compile_packages[@]}"
|
||||
make -j$(nproc) BUILD_LOG=1 $force_compile_packages || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
printf -v compile_packages "package/%s/compile " "${coverity_check_packages[@]}"
|
||||
export PATH=$(pwd)/cov-analysis-linux64/bin:$PATH
|
||||
cov-build --dir cov-int make -j $(nproc) BUILD_LOG=1 $compile_packages || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload build to Coverity for analysis
|
||||
if: inputs.coverity_check_packages != ''
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
tar czf cov-int.tar.gz ./cov-int
|
||||
curl \
|
||||
--form token="${{ secrets.coverity_api_token }}" \
|
||||
--form email="contact@openwrt.org" \
|
||||
--form file=@cov-int.tar.gz \
|
||||
--form version="${{ github.ref_name }}-${{ github.sha }}" \
|
||||
--form description="OpenWrt ${{ github.ref_name }}-${{ github.sha }}" \
|
||||
"https://scan.coverity.com/builds?project=${{ inputs.coverity_project_name }}"
|
||||
|
||||
- name: Upload logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.target }}-${{ inputs.subtarget }}-logs
|
||||
path: "openwrt/logs"
|
||||
155
.github/workflows/check-kernel-patches.yml
vendored
155
.github/workflows/check-kernel-patches.yml
vendored
@@ -1,155 +0,0 @@
|
||||
name: Refresh kernel for target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
subtarget:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
use_openwrt_container:
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [ ${{ inputs.use_openwrt_container }} == "true" ]; then
|
||||
OWNER_LC=openwrt
|
||||
fi
|
||||
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
check-patch:
|
||||
name: Check Kernel patches
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Prepare prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
mkdir -p staging_dir build_dir
|
||||
ln -sf /prebuilt_tools/staging_dir/host staging_dir/host
|
||||
ln -sf /prebuilt_tools/build_dir/host build_dir/host
|
||||
|
||||
./scripts/ext-tools.sh --refresh
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure system
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ inputs.target }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ inputs.target }}_${{ inputs.subtarget }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/quilt/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Refresh Kernel patches
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make target/linux/refresh V=s
|
||||
|
||||
- name: Validate Refreshed Kernel Patches
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
. .github/workflows/scripts/ci_helpers.sh
|
||||
|
||||
if git diff --name-only --exit-code; then
|
||||
success "Kernel patches for ${{ inputs.target }}/${{ inputs.subtarget }} seems ok"
|
||||
else
|
||||
err "Kernel patches for ${{ inputs.target }}/${{ inputs.subtarget }} require refresh. (run 'make target/linux/refresh' and force push this pr)"
|
||||
err "You can also check the provided artifacts with the refreshed patch from this CI run."
|
||||
mkdir ${{ inputs.target }}-${{ inputs.subtarget }}-refreshed
|
||||
for f in $(git diff --name-only); do
|
||||
cp --parents $f ${{ inputs.target }}-${{ inputs.subtarget }}-refreshed/
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Refreshed Patches
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.target }}-${{ inputs.subtarget }}-refreshed
|
||||
path: openwrt/${{ inputs.target }}-${{ inputs.subtarget }}-refreshed
|
||||
50
.github/workflows/coverity.yml
vendored
50
.github/workflows/coverity.yml
vendored
@@ -15,51 +15,5 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: x86
|
||||
subtarget: 64
|
||||
build_full: true
|
||||
include_feeds: true
|
||||
coverity_compiler_template_list: >-
|
||||
x86_64-openwrt-linux-gcc
|
||||
x86_64-openwrt-linux-musl-gcc
|
||||
# qosify fails to build with cov-build
|
||||
coverity_check_packages: >-
|
||||
cgi-io
|
||||
dnsmasq
|
||||
dropbear
|
||||
firewall
|
||||
fstools
|
||||
fwtool
|
||||
iwinfo
|
||||
jsonfilter
|
||||
libnl-tiny
|
||||
libubox
|
||||
mtd
|
||||
netifd
|
||||
odhcp6c
|
||||
odhcpd
|
||||
opkg
|
||||
procd
|
||||
relayd
|
||||
rpcd
|
||||
swconfig
|
||||
ubox
|
||||
ubus
|
||||
ucert
|
||||
uci
|
||||
uclient
|
||||
ucode
|
||||
ugps
|
||||
uhttpd
|
||||
umbim
|
||||
umdns
|
||||
unetd
|
||||
uqmi
|
||||
urngd
|
||||
usbmode
|
||||
usign
|
||||
usteer
|
||||
ustp
|
||||
ustream-ssl
|
||||
actions: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/coverity.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
|
||||
111
.github/workflows/kernel.yml
vendored
111
.github/workflows/kernel.yml
vendored
@@ -17,6 +17,8 @@ on:
|
||||
- 'include/kernel*'
|
||||
- 'package/kernel/**'
|
||||
- 'target/linux/**'
|
||||
branches-ignore:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -26,106 +28,15 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
determine_targets:
|
||||
name: Set targets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
targets_subtargets: ${{ steps.find_targets.outputs.targets_subtargets }}
|
||||
targets: ${{ steps.find_targets.outputs.targets }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35
|
||||
|
||||
- name: Set targets
|
||||
id: find_targets
|
||||
run: |
|
||||
ALL_TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null)"
|
||||
CHANGED_FILES="$(echo ${{ steps.changed-files.outputs.all_changed_files }} | tr ' ' '\n')"
|
||||
|
||||
TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1 | awk '{ print $1 }')"
|
||||
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1 | awk '{ print $1 }')"
|
||||
|
||||
# On testing non-specific target, skip testing each subtarget
|
||||
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
|
||||
echo "$CHANGED_FILES" | grep -q target/linux/generic; then
|
||||
TARGETS_SUBTARGETS=$TARGETS
|
||||
fi
|
||||
|
||||
JSON_TARGETS_SUBTARGETS='['
|
||||
FIRST=1
|
||||
for TARGET in $TARGETS_SUBTARGETS; do
|
||||
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
|
||||
echo "$CHANGED_FILES" | grep -q target/linux/generic ||
|
||||
echo "$CHANGED_FILES" | grep -q $(echo $TARGET | cut -d "/" -f 1); then
|
||||
TUPLE='{"target":"'"$(echo $TARGET | cut -d "/" -f 1)"'","subtarget":"'"$(echo $TARGET | cut -d "/" -f 2)"'"}'
|
||||
[[ $FIRST -ne 1 ]] && JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"','
|
||||
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS""$TUPLE"
|
||||
FIRST=0
|
||||
fi
|
||||
done
|
||||
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"']'
|
||||
|
||||
JSON_TARGETS='['
|
||||
FIRST=1
|
||||
for TARGET in $TARGETS; do
|
||||
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
|
||||
echo "$CHANGED_FILES" | grep -q target/linux/generic ||
|
||||
echo "$CHANGED_FILES" | grep -q $(echo $TARGET | cut -d "/" -f 1); then
|
||||
TUPLE='{"target":"'"$(echo $TARGET | cut -d "/" -f 1)"'","subtarget":"'"$(echo $TARGET | cut -d "/" -f 2)"'"}'
|
||||
[[ $FIRST -ne 1 ]] && JSON_TARGETS="$JSON_TARGETS"','
|
||||
JSON_TARGETS="$JSON_TARGETS""$TUPLE"
|
||||
FIRST=0
|
||||
fi
|
||||
done
|
||||
JSON_TARGETS="$JSON_TARGETS"']'
|
||||
|
||||
echo -e "\n---- targets to build ----\n"
|
||||
echo "$JSON_TARGETS_SUBTARGETS"
|
||||
echo -e "\n---- targets to build ----\n"
|
||||
|
||||
echo -e "\n---- targets to check patch ----\n"
|
||||
echo "$JSON_TARGETS"
|
||||
echo -e "\n---- targets to check patch ----\n"
|
||||
|
||||
echo "targets_subtargets=$JSON_TARGETS_SUBTARGETS" >> $GITHUB_OUTPUT
|
||||
echo "targets=$JSON_TARGETS" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build Kernel with external toolchain
|
||||
needs: determine_targets
|
||||
build-kernels:
|
||||
name: Build all affected Kernels
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
subtarget: ${{ matrix.subtarget }}
|
||||
build_kernel: true
|
||||
build_all_kmods: true
|
||||
|
||||
check-kernel-patches:
|
||||
name: Check Kernel patches
|
||||
needs: determine_targets
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include: ${{fromJson(needs.determine_targets.outputs.targets)}}
|
||||
uses: ./.github/workflows/check-kernel-patches.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
subtarget: ${{ matrix.subtarget }}
|
||||
|
||||
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
|
||||
|
||||
42
.github/workflows/label-kernel.yml
vendored
42
.github/workflows/label-kernel.yml
vendored
@@ -7,44 +7,10 @@ on:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
set_target:
|
||||
if: startsWith(github.event.label.name, 'ci:kernel:')
|
||||
name: Set target
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
target: ${{ steps.set_target.outputs.target }}
|
||||
subtarget: ${{ steps.set_target.outputs.subtarget }}
|
||||
|
||||
steps:
|
||||
- name: Set target
|
||||
id: set_target
|
||||
env:
|
||||
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
||||
run: |
|
||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target=\1/p' | tee --append $GITHUB_OUTPUT
|
||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget=\2/p' | tee --append $GITHUB_OUTPUT
|
||||
|
||||
build_kernel:
|
||||
name: Build Kernel with external toolchain
|
||||
needs: set_target
|
||||
build-kernels-label:
|
||||
name: Build all affected Kernels from defined label
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
container_name: toolchain
|
||||
target: ${{ needs.set_target.outputs.target }}
|
||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
||||
build_kernel: true
|
||||
build_all_kmods: true
|
||||
|
||||
check-kernel-patches:
|
||||
name: Check Kernel patches
|
||||
needs: set_target
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
uses: ./.github/workflows/check-kernel-patches.yml
|
||||
with:
|
||||
target: ${{ needs.set_target.outputs.target }}
|
||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
||||
actions: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/label-kernel.yml@main
|
||||
|
||||
33
.github/workflows/label-target.yml
vendored
33
.github/workflows/label-target.yml
vendored
@@ -7,35 +7,10 @@ on:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
set_target:
|
||||
if: startsWith(github.event.label.name, 'ci:target:')
|
||||
name: Set target
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
target: ${{ steps.set_target.outputs.target }}
|
||||
subtarget: ${{ steps.set_target.outputs.subtarget }}
|
||||
|
||||
steps:
|
||||
- name: Set target
|
||||
id: set_target
|
||||
env:
|
||||
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
||||
run: |
|
||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target=\1/p' | tee --append $GITHUB_OUTPUT
|
||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget=\2/p' | tee --append $GITHUB_OUTPUT
|
||||
|
||||
build_target:
|
||||
name: Build target
|
||||
needs: set_target
|
||||
build-target-label:
|
||||
name: Build target from defined label
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
container_name: toolchain
|
||||
target: ${{ needs.set_target.outputs.target }}
|
||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
||||
build_full: true
|
||||
build_all_kmods: true
|
||||
build_all_boards: true
|
||||
build_all_modules: true
|
||||
actions: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/label-target.yml@main
|
||||
|
||||
32
.github/workflows/packages.yml
vendored
32
.github/workflows/packages.yml
vendored
@@ -3,7 +3,6 @@ name: Build all core packages
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
@@ -12,13 +11,14 @@ on:
|
||||
- 'toolchain/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
- 'package/**'
|
||||
- 'target/linux/generic/**'
|
||||
- 'toolchain/**'
|
||||
branches-ignore:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -28,25 +28,15 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Packages with external toolchain
|
||||
build-packages:
|
||||
name: Build all core packages for selected target
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include:
|
||||
- target: malta
|
||||
subtarget: be
|
||||
- target: x86
|
||||
subtarget: 64
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
subtarget: ${{ matrix.subtarget }}
|
||||
build_kernel: true
|
||||
build_all_kmods: true
|
||||
build_all_modules: true
|
||||
build_full: true
|
||||
|
||||
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
|
||||
|
||||
84
.github/workflows/push-containers.yml
vendored
84
.github/workflows/push-containers.yml
vendored
@@ -6,9 +6,10 @@ on:
|
||||
- 'include/version.mk'
|
||||
- 'include/cmake.mk'
|
||||
- 'tools/**'
|
||||
- '.github/workflows/build-tools.yml'
|
||||
- '.github/workflows/push-containers.yml'
|
||||
- '.github/workflows/Dockerfile.tools'
|
||||
- 'toolchain/**'
|
||||
branches-ignore:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -18,81 +19,10 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-linux-buildbot:
|
||||
name: Build tools with buildbot container
|
||||
if: ${{ github.repository_owner == 'openwrt' }}
|
||||
uses: ./.github/workflows/build-tools.yml
|
||||
with:
|
||||
generate_prebuilt_artifacts: true
|
||||
|
||||
push-tools-container:
|
||||
needs: build-linux-buildbot
|
||||
name: Push prebuilt tools container
|
||||
if: ${{ github.repository_owner == 'openwrt' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
build-push-containers:
|
||||
name: Build and Push all prebuilt containers
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
run: |
|
||||
echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_ENV"
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9]
|
||||
# will refresh the tools container with the matching tag.
|
||||
# (example branch openwrt-22.03 -> tools:openwrt-22.03)
|
||||
# (example branch openwrt-22.03-test -> tools:openwrt-22.03)
|
||||
- name: Determine tools container tag
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
|
||||
if [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\).*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Tools container to push tools:$CONTAINER_TAG"
|
||||
echo "CONTAINER_TAG=$CONTAINER_TAG" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'openwrt'
|
||||
|
||||
- name: Download prebuilt tools from build job
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt
|
||||
|
||||
- name: Extract prebuild tools
|
||||
working-directory: openwrt
|
||||
run: tar -xf tools.tar
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: openwrt
|
||||
push: true
|
||||
tags: ghcr.io/${{ env.OWNER_LC }}/tools:${{ env.CONTAINER_TAG }}
|
||||
file: openwrt/.github/workflows/Dockerfile.tools
|
||||
actions: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/push-containers.yml@main
|
||||
|
||||
53
.github/workflows/toolchain.yml
vendored
53
.github/workflows/toolchain.yml
vendored
@@ -3,14 +3,14 @@ name: Build Toolchains
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/toolchain.yml'
|
||||
- 'toolchain/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/toolchain.yml'
|
||||
- 'toolchain/**'
|
||||
branches-ignore:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -20,51 +20,10 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
determine_targets:
|
||||
name: Set targets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
target: ${{ steps.find_targets.outputs.target }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set targets
|
||||
id: find_targets
|
||||
run: |
|
||||
export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
|
||||
| sort -u -t '/' -k1,1 \
|
||||
| awk '{ print $1 }')"
|
||||
|
||||
JSON='['
|
||||
FIRST=1
|
||||
for TARGET in $TARGETS; do
|
||||
TUPLE='{"target":"'"$(echo $TARGET | cut -d "/" -f 1)"'","subtarget":"'"$(echo $TARGET | cut -d "/" -f 2)"'"}'
|
||||
[[ $FIRST -ne 1 ]] && JSON="$JSON"','
|
||||
JSON="$JSON""$TUPLE"
|
||||
FIRST=0
|
||||
done
|
||||
JSON="$JSON"']'
|
||||
|
||||
echo -e "\n---- targets ----\n"
|
||||
echo "$JSON"
|
||||
echo -e "\n---- targets ----\n"
|
||||
|
||||
echo "target=$JSON" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build Target Toolchain
|
||||
needs: determine_targets
|
||||
build-toolchains:
|
||||
name: Build Toolchains for each target
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include: ${{fromJson(needs.determine_targets.outputs.target)}}
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
subtarget: ${{ matrix.subtarget }}
|
||||
build_toolchain: true
|
||||
actions: write
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/toolchain.yml@main
|
||||
|
||||
76
.github/workflows/tools.yml
vendored
76
.github/workflows/tools.yml
vendored
@@ -5,14 +5,14 @@ on:
|
||||
paths:
|
||||
- 'include/**'
|
||||
- 'tools/**'
|
||||
- '.github/workflows/build-tools.yml'
|
||||
- '.github/workflows/tools.yml'
|
||||
push:
|
||||
paths:
|
||||
- 'include/**'
|
||||
- 'tools/**'
|
||||
- '.github/workflows/build-tools.yml'
|
||||
- '.github/workflows/tools.yml'
|
||||
branches-ignore:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -22,72 +22,6 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
build-macos-latest:
|
||||
name: Build tools with macos latest
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Setup MacOS
|
||||
run: |
|
||||
echo "WORKPATH=/Volumes/OpenWrt" >> "$GITHUB_ENV"
|
||||
hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
|
||||
hdiutil attach OpenWrt.sparseimage
|
||||
mv "$GITHUB_WORKSPACE/openwrt" /Volumes/OpenWrt/
|
||||
|
||||
- name: Install required prereq on MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: |
|
||||
brew install \
|
||||
automake \
|
||||
coreutils \
|
||||
diffutils \
|
||||
findutils \
|
||||
gawk \
|
||||
git-extras \
|
||||
gnu-getopt \
|
||||
gnu-sed \
|
||||
grep \
|
||||
make
|
||||
|
||||
echo "/bin" >> "$GITHUB_PATH"
|
||||
echo "/sbin/Library/Apple/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/coreutils/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gettext/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/sbin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Make prereq
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-logs
|
||||
path: ${{ env.WORKPATH }}/openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-config
|
||||
path: ${{ env.WORKPATH }}/openwrt/.config
|
||||
|
||||
build-linux-buildbot:
|
||||
name: Build tools with buildbot container
|
||||
uses: ./.github/workflows/build-tools.yml
|
||||
build-tools:
|
||||
name: Build host tools for linux and macos based systems
|
||||
uses: openwrt/actions-shared-workflows/.github/workflows/tools.yml@main
|
||||
|
||||
2
Makefile
2
Makefile
@@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
|
||||
|
||||
world:
|
||||
|
||||
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
|
||||
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1)
|
||||
|
||||
export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
|
||||
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)
|
||||
|
||||
@@ -26,6 +26,14 @@ menu "Global build settings"
|
||||
directory containing machine readable list of built profiles
|
||||
and resulting images.
|
||||
|
||||
config JSON_CYCLONEDX_SBOM
|
||||
bool "Create CycloneDX SBOM JSON"
|
||||
default BUILDBOT
|
||||
help
|
||||
Create a JSON files *.bom.cdx.json in the build
|
||||
directory containing Software Bill Of Materials in CycloneDX
|
||||
format.
|
||||
|
||||
config ALL_NONSHARED
|
||||
bool "Select all target specific packages by default"
|
||||
select ALL_KMODS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^0da9f622975aa1e4efe452da4acbae15479bee63
|
||||
src-git luci https://git.openwrt.org/project/luci.git^257f54cb8bcd493d9be0a45a3c316668b793e8ae
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^2272106e0839ee06957e88e3596489e1b510d3c2
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^9671ba6eb02e0069ffec4da3c705af1e56cf93cd
|
||||
src-git luci https://git.openwrt.org/project/luci.git^5a811622d8216fdae46e1b486b471f593dee222a
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^83ef3784a9092cfd0a900cc28e2ed4e13671d667
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^9746ae8f964e18f04b64fbe1956366954ff223f8
|
||||
|
||||
@@ -277,6 +277,13 @@ endef
|
||||
define Image/Manifest
|
||||
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
|
||||
ifndef IB
|
||||
$(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
|
||||
$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
|
||||
$(TMP_DIR)/.packageinfo \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Image/gzip-ext4-padded-squashfs
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .134
|
||||
LINUX_KERNEL_HASH-5.15.134 = f37182aecb57ed6853d01e1074d3a60a653331e35f3115728381e08be050b9d3
|
||||
LINUX_VERSION-5.15 = .137
|
||||
LINUX_KERNEL_HASH-5.15.137 = 9749b21609f9e7ad9c46160c2c107db823b99cef77fa6cb080b6c2dc685fb2f7
|
||||
|
||||
@@ -166,7 +166,7 @@ define Kernel/CompileImage/Initramfs
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
|
||||
ifneq ($(call qstrip,$(CONFIG_EXTERNAL_CPIO)),)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
|
||||
@@ -36,6 +36,8 @@ $(if $(USERID),Require-User: $(USERID)
|
||||
)Source: $(PKG_SOURCE)
|
||||
$(if $(LICENSE),License: $(LICENSE)
|
||||
)$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES)
|
||||
)$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID)
|
||||
)$(if $(ABI_VERSION),ABI-Version: $(ABI_VERSION)
|
||||
)Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
|
||||
$(if $(KCONFIG),Kernel-Config: $(KCONFIG)
|
||||
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
|
||||
|
||||
@@ -107,16 +107,9 @@ define SetupHostCommand
|
||||
bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \
|
||||
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
|
||||
case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \
|
||||
*" -> $$$$$$$$bin"*) \
|
||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
||||
;; \
|
||||
"-"*) \
|
||||
find "$(STAGING_DIR_HOST)/stamp" | grep $(strip $(1)) && \
|
||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
||||
;; \
|
||||
*" -> /"*) \
|
||||
;; \
|
||||
*" -> "*) \
|
||||
"-"* | \
|
||||
*" -> $$$$$$$$bin"* | \
|
||||
*" -> "[!/]*) \
|
||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
||||
;; \
|
||||
esac; \
|
||||
|
||||
@@ -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),23.05.0)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.1)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r23497-6637af95aa)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r23619-101988c61a)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.0)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.1)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -106,6 +106,14 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||
$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \
|
||||
); done
|
||||
endif
|
||||
ifdef CONFIG_JSON_CYCLONEDX_SBOM
|
||||
@echo Creating CycloneDX package SBOMs...
|
||||
@for d in $(PACKAGE_SUBDIRS); do ( \
|
||||
[ -d $$d ] && \
|
||||
cd $$d || continue; \
|
||||
$(SCRIPT_DIR)/package-metadata.pl pkgcyclonedxsbom Packages.manifest > Packages.bom.cdx.json || true; \
|
||||
); done
|
||||
endif
|
||||
|
||||
$(curdir)/flags-install:= -j1
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ ucidef_set_bridge_mac() {
|
||||
}
|
||||
|
||||
ucidef_set_network_device_mac() {
|
||||
json_select_object "network-device"
|
||||
json_select_object "network_device"
|
||||
json_select_object "${1}"
|
||||
json_add_string macaddr "${2}"
|
||||
json_select ..
|
||||
|
||||
@@ -190,7 +190,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/23.05.0"
|
||||
default "https://downloads.openwrt.org/releases/23.05.1"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -94,6 +94,22 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
|
||||
DDR3_FLYBY:=1
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-emmc-ddr4
|
||||
NAME:=MediaTek MT7981 (eMMC, DDR4)
|
||||
BOOT_DEVICE:=emmc
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7981
|
||||
DDR_TYPE:=ddr4
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-spim-nand-ddr4
|
||||
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
|
||||
BOOT_DEVICE:=spim-nand
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7981
|
||||
DDR_TYPE:=ddr4
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-nor-ddr3
|
||||
NAME:=MediaTek MT7981 (SPI-NOR, DDR3)
|
||||
BOOT_DEVICE:=nor
|
||||
@@ -118,7 +134,7 @@ define Trusted-Firmware-A/mt7981-sdmmc-ddr3
|
||||
DDR_TYPE:=ddr3
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-snand-ddr3
|
||||
define Trusted-Firmware-A/mt7981-snand-ddr3
|
||||
NAME:=MediaTek MT7981 (SPI-NAND via SNFI, DDR3)
|
||||
BOOT_DEVICE:=snand
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -347,8 +363,10 @@ TFA_TARGETS:= \
|
||||
mt7981-emmc-ddr3 \
|
||||
mt7981-nor-ddr3 \
|
||||
mt7981-sdmmc-ddr3 \
|
||||
mt7986-snand-ddr3 \
|
||||
mt7981-snand-ddr3 \
|
||||
mt7981-spim-nand-ddr3 \
|
||||
mt7981-emmc-ddr4 \
|
||||
mt7981-spim-nand-ddr4 \
|
||||
mt7986-emmc-ddr3 \
|
||||
mt7986-nor-ddr3 \
|
||||
mt7986-sdmmc-ddr3 \
|
||||
|
||||
@@ -37,6 +37,23 @@ bananapi,bpi-r3)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
case "$(cmdline_get_var root)" in
|
||||
/dev/mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
glinet,gl-mt3000)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
|
||||
;;
|
||||
|
||||
@@ -200,6 +200,30 @@ define U-Boot/mt7629_rfb
|
||||
UBOOT_CONFIG:=mt7629_rfb
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_rax3000m-emmc
|
||||
NAME:=CMCC RAX3000M
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=cmcc_rax3000m
|
||||
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-emmc
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=emmc
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_rax3000m-nand
|
||||
NAME:=CMCC RAX3000M
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=cmcc_rax3000m
|
||||
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-nand
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_h3c_magic-nx30-pro
|
||||
NAME:=H3C Magic NX30 Pro
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -212,6 +236,66 @@ define U-Boot/mt7981_h3c_magic-nx30-pro
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_rfb-spim-nand
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7981-rfb
|
||||
UBOOT_CONFIG:=mt7981_rfb
|
||||
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_rfb-emmc
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7981-rfb
|
||||
UBOOT_CONFIG:=mt7981_emmc_rfb
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=emmc
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_rfb-nor
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7981-rfb
|
||||
UBOOT_CONFIG:=mt7981_nor_rfb
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_rfb-sd
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7981-rfb
|
||||
UBOOT_CONFIG:=mt7981_sd_rfb
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=sdmmc
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-sdmmc-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_rfb-snfi
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7981-rfb
|
||||
UBOOT_CONFIG:=mt7981_snfi_nand_rfb
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=snand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-snand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_qihoo_360t7
|
||||
NAME:=Qihoo 360T7
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -424,7 +508,14 @@ UBOOT_TARGETS := \
|
||||
mt7628_rfb \
|
||||
ravpower_rp-wd009 \
|
||||
mt7629_rfb \
|
||||
mt7981_cmcc_rax3000m-emmc \
|
||||
mt7981_cmcc_rax3000m-nand \
|
||||
mt7981_h3c_magic-nx30-pro \
|
||||
mt7981_rfb-spim-nand \
|
||||
mt7981_rfb-emmc \
|
||||
mt7981_rfb-nor \
|
||||
mt7981_rfb-sd \
|
||||
mt7981_rfb-snfi \
|
||||
mt7981_qihoo_360t7 \
|
||||
mt7981_xiaomi_mi-router-wr30u \
|
||||
mt7986_bananapi_bpi-r3-emmc \
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
--- a/configs/mt7981_rfb_defconfig
|
||||
+++ b/configs/mt7981_rfb_defconfig
|
||||
@@ -30,6 +30,9 @@ CONFIG_CMD_MTD=y
|
||||
CONFIG_CMD_SF_TEST=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
--- a/configs/mt7981_snfi_nand_rfb_defconfig
|
||||
+++ b/configs/mt7981_snfi_nand_rfb_defconfig
|
||||
@@ -1,11 +1,12 @@
|
||||
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_ENV_SIZE=0x20000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="mt7981-snfi-nand-rfb"
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
CONFIG_TARGET_MT7981=y
|
||||
CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
@@ -15,7 +16,6 @@ CONFIG_DEBUG_UART=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-snfi-nand-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
-CONFIG_SYS_PROMPT="MT7981> "
|
||||
CONFIG_SYS_CBSIZE=512
|
||||
CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_NETBSD is not set
|
||||
@@ -29,8 +29,6 @@ CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MTD=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
-CONFIG_MTDIDS_DEFAULT="spi-nand0=spi-nand0"
|
||||
-CONFIG_MTDPARTS_DEFAULT="spi-nand0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),65536k(ubi)"
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_CMD_UBI_RENAME=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
@@ -45,7 +43,6 @@ CONFIG_DM_MTD=y
|
||||
CONFIG_MTK_SPI_NAND=y
|
||||
CONFIG_MTK_SPI_NAND_MTD=y
|
||||
CONFIG_PHY_FIXED=y
|
||||
-CONFIG_DM_ETH=y
|
||||
CONFIG_MEDIATEK_ETH=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCONF=y
|
||||
@@ -55,3 +52,4 @@ CONFIG_MTK_POWER_DOMAIN=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_MTK_SERIAL=y
|
||||
CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_nor_rfb_defconfig
|
||||
@@ -0,0 +1,68 @@
|
||||
+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-rfb"
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_DEFAULT_FDT_FILE="mt7981-rfb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_CBSIZE=512
|
||||
+CONFIG_SYS_PBSIZE=1049
|
||||
+# CONFIG_BOOTM_NETBSD is not set
|
||||
+# CONFIG_BOOTM_PLAN9 is not set
|
||||
+# CONFIG_BOOTM_RTEMS is not set
|
||||
+# CONFIG_BOOTM_VXWORKS is not set
|
||||
+# CONFIG_CMD_ELF is not set
|
||||
+# CONFIG_CMD_UNLZ4 is not set
|
||||
+# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
+CONFIG_SPI_FLASH_EON=y
|
||||
+CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
+CONFIG_SPI_FLASH_ISSI=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_SPANSION=y
|
||||
+CONFIG_SPI_FLASH_STMICRO=y
|
||||
+CONFIG_SPI_FLASH_WINBOND=y
|
||||
+CONFIG_SPI_FLASH_XMC=y
|
||||
+CONFIG_SPI_FLASH_XTX=y
|
||||
+CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
@@ -0,0 +1,474 @@
|
||||
--- a/configs/mt7981_emmc_rfb_defconfig
|
||||
+++ b/configs/mt7981_emmc_rfb_defconfig
|
||||
@@ -14,7 +14,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_MMC_BOOT=y
|
||||
+CONFIG_BOOTSTD_DEFAULTS=y
|
||||
+CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-emmc-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
@@ -24,9 +39,23 @@ CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
-# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_ELF=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_GPT_RENAME=y
|
||||
@@ -36,13 +65,35 @@ CONFIG_CMD_PART=y
|
||||
CONFIG_CMD_READ=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
CONFIG_PARTITION_TYPE_GUID=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGEX=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
--- a/configs/mt7981_rfb_defconfig
|
||||
+++ b/configs/mt7981_rfb_defconfig
|
||||
@@ -12,7 +12,23 @@ CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_SPI_BOOT=y
|
||||
+CONFIG_NAND_BOOT=y
|
||||
+CONFIG_BOOTSTD_DEFAULTS=y
|
||||
+CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
@@ -22,23 +38,74 @@ CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
-# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_ELF=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MTD=y
|
||||
-CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+# CONFIG_MTD_RAW_NAND is not set
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_SF=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
CONFIG_CMD_SMC=y
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGEX=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
# CONFIG_MMC is not set
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
--- a/configs/mt7981_sd_rfb_defconfig
|
||||
+++ b/configs/mt7981_sd_rfb_defconfig
|
||||
@@ -14,7 +14,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_MMC_BOOT=y
|
||||
+CONFIG_BOOTSTD_DEFAULTS=y
|
||||
+CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-sd-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
@@ -24,9 +39,23 @@ CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
-# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_ELF=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_GPT_RENAME=y
|
||||
@@ -36,13 +65,35 @@ CONFIG_CMD_PART=y
|
||||
CONFIG_CMD_READ=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
CONFIG_PARTITION_TYPE_GUID=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGEX=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
--- a/configs/mt7981_snfi_nand_rfb_defconfig
|
||||
+++ b/configs/mt7981_snfi_nand_rfb_defconfig
|
||||
@@ -12,7 +12,23 @@ CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_SPI_BOOT=y
|
||||
+CONFIG_NAND_BOOT=y
|
||||
+CONFIG_BOOTSTD_DEFAULTS=y
|
||||
+CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-snfi-nand-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
@@ -22,22 +38,73 @@ CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
-# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_ELF=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+# CONFIG_MTD_RAW_NAND is not set
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
CONFIG_CMD_SMC=y
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGEX=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
# CONFIG_MMC is not set
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTK_SPI_NAND=y
|
||||
--- a/configs/mt7981_nor_rfb_defconfig
|
||||
+++ b/configs/mt7981_nor_rfb_defconfig
|
||||
@@ -12,7 +12,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_AUTOBOOT is not set
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_SPI_BOOT=y
|
||||
+CONFIG_BOOTSTD_DEFAULTS=y
|
||||
+CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
@@ -22,21 +37,66 @@ CONFIG_SYS_PBSIZE=1049
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
-# CONFIG_CMD_ELF is not set
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_ELF=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_SF_TEST=y
|
||||
CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_ENV_IS_IN_MTD=y
|
||||
+CONFIG_ENV_MTD_NAME="u-boot-env"
|
||||
+CONFIG_ENV_SIZE_REDUND=0x4000
|
||||
+CONFIG_ENV_SIZE=0x4000
|
||||
+CONFIG_ENV_OFFSET=0x0
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGEX=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
# CONFIG_MMC is not set
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
@@ -0,0 +1,140 @@
|
||||
--- a/arch/arm/dts/mt7981-rfb.dts
|
||||
+++ b/arch/arm/dts/mt7981-rfb.dts
|
||||
@@ -143,6 +143,37 @@
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "BL2";
|
||||
+ reg = <0x00000 0x0100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x0100000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ factory: partition@180000 {
|
||||
+ label = "Factory";
|
||||
+ reg = <0x180000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "FIP";
|
||||
+ reg = <0x380000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x4000000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -164,6 +195,37 @@
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@00000 {
|
||||
+ label = "BL2";
|
||||
+ reg = <0x00000 0x0040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@40000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x40000 0x0010000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@50000 {
|
||||
+ label = "Factory";
|
||||
+ reg = <0x50000 0x00B0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "FIP";
|
||||
+ reg = <0x100000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x180000 0xE00000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/dts/mt7981-snfi-nand-rfb.dts
|
||||
+++ b/arch/arm/dts/mt7981-snfi-nand-rfb.dts
|
||||
@@ -107,11 +107,11 @@
|
||||
};
|
||||
|
||||
mmc0_pins_default: mmc0default {
|
||||
- mux {
|
||||
- function = "flash";
|
||||
- groups = "emmc_45";
|
||||
- };
|
||||
- };
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "emmc_45";
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&snand {
|
||||
@@ -119,6 +119,42 @@
|
||||
pinctrl-0 = <&snfi_pins>;
|
||||
status = "okay";
|
||||
quad-spi;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "BL2";
|
||||
+ reg = <0x00000 0x0100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x0100000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ factory: partition@180000 {
|
||||
+ label = "Factory";
|
||||
+ reg = <0x180000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "FIP";
|
||||
+ reg = <0x380000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x4000000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm {
|
||||
@@ -0,0 +1,47 @@
|
||||
From 41f225dae30ea6ddcff10f120a9e732f994d3a07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nicol=C3=B2=20Veronese?= <nicveronese@gmail.com>
|
||||
Date: Tue, 3 Oct 2023 23:46:52 +0200
|
||||
Subject: [PATCH] spi: mtk_spim: prevent global pll clock override
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
With commit 793e6230118032a099ec42a1ea67f434721edcc0
|
||||
a new system to calculate the SPI clocks has been added.
|
||||
|
||||
Unfortunately, the do_div macro overrides the global
|
||||
priv->pll_clk_rate field. This will cause to have a reduced
|
||||
clock rate on each subsequent SPI call.
|
||||
|
||||
Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
|
||||
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
|
||||
---
|
||||
drivers/spi/mtk_spim.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/spi/mtk_spim.c
|
||||
+++ b/drivers/spi/mtk_spim.c
|
||||
@@ -409,7 +409,7 @@ static int mtk_spim_transfer_wait(struct
|
||||
{
|
||||
struct udevice *bus = dev_get_parent(slave->dev);
|
||||
struct mtk_spim_priv *priv = dev_get_priv(bus);
|
||||
- u32 sck_l, sck_h, clk_count, reg;
|
||||
+ u32 pll_clk, sck_l, sck_h, clk_count, reg;
|
||||
ulong us = 1;
|
||||
int ret = 0;
|
||||
|
||||
@@ -418,11 +418,12 @@ static int mtk_spim_transfer_wait(struct
|
||||
else
|
||||
clk_count = op->data.nbytes;
|
||||
|
||||
+ pll_clk = priv->pll_clk_rate;
|
||||
sck_l = readl(priv->base + SPI_CFG2_REG) >> SPI_CFG2_SCK_LOW_OFFSET;
|
||||
sck_h = readl(priv->base + SPI_CFG2_REG) & SPI_CFG2_SCK_HIGH_MASK;
|
||||
- do_div(priv->pll_clk_rate, sck_l + sck_h + 2);
|
||||
+ do_div(pll_clk, sck_l + sck_h + 2);
|
||||
|
||||
- us = CLK_TO_US(priv->pll_clk_rate, clk_count * 8);
|
||||
+ us = CLK_TO_US(pll_clk, clk_count * 8);
|
||||
us += 1000 * 1000; /* 1s tolerance */
|
||||
|
||||
if (us > UINT_MAX)
|
||||
@@ -70,7 +70,7 @@
|
||||
{
|
||||
--- a/boot/image-fit.c
|
||||
+++ b/boot/image-fit.c
|
||||
@@ -2051,6 +2051,49 @@ static const char *fit_get_image_type_pr
|
||||
@@ -2051,6 +2051,47 @@ static const char *fit_get_image_type_pr
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
@@ -93,11 +93,8 @@
|
||||
+ max_size = hdrsize;
|
||||
+
|
||||
+ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
|
||||
+ if (images_noffset < 0) {
|
||||
+ printf("Can't find images parent node '%s' (%s)\n",
|
||||
+ FIT_IMAGES_PATH, fdt_strerror(images_noffset));
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (images_noffset < 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ for (ndepth = 0,
|
||||
+ noffset = fdt_next_node(fit, images_noffset, &ndepth);
|
||||
@@ -106,7 +103,7 @@
|
||||
+ if (ndepth == 1) {
|
||||
+ ret = fit_image_get_data_and_size(fit, noffset, &data, &data_size);
|
||||
+ if (ret)
|
||||
+ return 0;
|
||||
+ goto out;
|
||||
+
|
||||
+ img_total = data_size + (data - fit);
|
||||
+
|
||||
@@ -114,6 +111,7 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ return max_size;
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -239,12 +239,12 @@
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
|
||||
697
package/boot/uboot-mediatek/patches/437-add-cmcc_rax3000m.patch
Normal file
697
package/boot/uboot-mediatek/patches/437-add-cmcc_rax3000m.patch
Normal file
@@ -0,0 +1,697 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_cmcc_rax3000m-emmc_defconfig
|
||||
@@ -0,0 +1,175 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-rax3000m-emmc"
|
||||
+CONFIG_DEFAULT_ENV_FILE="cmcc_rax3000m-emmc_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cmcc-rax3000m-emmc.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MMC=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_CMD_SCSI=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_MMC=y
|
||||
+CONFIG_MMC_DEFAULT_DEV=1
|
||||
+CONFIG_MMC_HS200_SUPPORT=y
|
||||
+CONFIG_MMC_MTK=y
|
||||
+CONFIG_MMC_SUPPORTS_TUNING=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_ENV_OFFSET=0x400000
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x440000
|
||||
+CONFIG_ENV_SIZE=0x40000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x40000
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=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_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_CMD_SF=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_cmcc_rax3000m-nand_defconfig
|
||||
@@ -0,0 +1,175 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-rax3000m-nand"
|
||||
+CONFIG_DEFAULT_ENV_FILE="cmcc_rax3000m-nand_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cmcc-rax3000m-nand.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_CMD_SCSI=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+# CONFIG_MMC is not set
|
||||
+# CONFIG_DM_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=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_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cmcc-rax3000m.dtsi
|
||||
@@ -0,0 +1,85 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+/*
|
||||
+ * Copyright (c) 2022 MediaTek Inc.
|
||||
+ * Author: Sam Shih <sam.shih@mediatek.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 = "CMCC RAX3000M";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-mesh {
|
||||
+ label = "mesh";
|
||||
+ linux,code = <BTN_9>;
|
||||
+ linux,input-type = <EV_SW>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led-0 {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-2 {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ 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;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cmcc-rax3000m-emmc.dts
|
||||
@@ -0,0 +1,53 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981-cmcc-rax3000m.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fixed-3.3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins_default>;
|
||||
+ max-frequency = <26000000>;
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ mmc0_pins_default: mmc0default {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "emmc_45";
|
||||
+ };
|
||||
+ conf-cmd-dat {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
|
||||
+ "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
|
||||
+ "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
|
||||
+ input-enable;
|
||||
+ drive-strength = <MTK_DRIVE_4mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
+ };
|
||||
+ conf-clk {
|
||||
+ pins = "SPI1_CS";
|
||||
+ drive-strength = <MTK_DRIVE_6mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
|
||||
+ };
|
||||
+ conf-rst {
|
||||
+ pins = "PWM0";
|
||||
+ drive-strength = <MTK_DRIVE_4mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cmcc-rax3000m-nand.dts
|
||||
@@ -0,0 +1,77 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981-cmcc-rax3000m.dtsi"
|
||||
+
|
||||
+&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 = "orig-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@160000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7200000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/cmcc_rax3000m-emmc_env
|
||||
@@ -0,0 +1,55 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootargs=root=/dev/mmcblk0p65
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
|
||||
+bootconf=config-1#mt7981b-cmcc-rax3000m-emmc
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-cmcc_rax3000m-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-cmcc_rax3000m-emmc-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-cmcc_rax3000m-emmc-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-cmcc_rax3000m-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 ) ) ) [0;36m[eMMC][0m
|
||||
+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 eMMC.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to eMMC.=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 eMMC.=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 eMMC.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to eMMC.[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 emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_emmc=run boot_production ; run boot_recovery
|
||||
+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 emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
|
||||
+mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=eraseenv && reset
|
||||
+emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
|
||||
+emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
|
||||
+emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
|
||||
+emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
|
||||
+emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
|
||||
+emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
|
||||
+_init_env=setenv _init_env ; setenv _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"
|
||||
--- /dev/null
|
||||
+++ b/cmcc_rax3000m-nand_env
|
||||
@@ -0,0 +1,56 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootconf=config-1#mt7981b-cmcc-rax3000m-nand
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-cmcc_rax3000m-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-cmcc_rax3000m-nand-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-cmcc_rax3000m-nand-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-cmcc_rax3000m-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 ) ) ) [0;36m[SPI-NAND][0m
|
||||
+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
|
||||
+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 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || 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 2 && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && 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"
|
||||
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
PKG_NAME:=ipq-wifi
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
||||
PKG_SOURCE_DATE:=2023-06-03
|
||||
PKG_SOURCE_VERSION:=cd9c30ca47b8e5388b770c523a7f6b8b969e2f92
|
||||
PKG_MIRROR_HASH:=45e623fcc512b514ade0f22e217275536aa8de4afba7dfdb11696482b8fa71a2
|
||||
PKG_SOURCE_DATE:=2023-11-10
|
||||
PKG_SOURCE_VERSION:=0c2e810e71ed0a59fb00246c7fa2c236ff67a0ee
|
||||
PKG_MIRROR_HASH:=fc6016540bd2c67484952d0e4432d740f0e022d9b688e851bb6321def8d36844
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
|
||||
@@ -1013,31 +1013,33 @@ define KernelPackage/zram/description
|
||||
endef
|
||||
|
||||
define KernelPackage/zram/config
|
||||
choice
|
||||
prompt "ZRAM Default compressor"
|
||||
default ZRAM_DEF_COMP_LZORLE
|
||||
if PACKAGE_kmod-zram
|
||||
choice
|
||||
prompt "ZRAM Default compressor"
|
||||
default ZRAM_DEF_COMP_LZORLE
|
||||
|
||||
config ZRAM_DEF_COMP_LZORLE
|
||||
config ZRAM_DEF_COMP_LZORLE
|
||||
bool "lzo-rle"
|
||||
select PACKAGE_kmod-lib-lzo
|
||||
|
||||
config ZRAM_DEF_COMP_LZO
|
||||
config ZRAM_DEF_COMP_LZO
|
||||
bool "lzo"
|
||||
select PACKAGE_kmod-lib-lzo
|
||||
|
||||
config ZRAM_DEF_COMP_LZ4
|
||||
config ZRAM_DEF_COMP_LZ4
|
||||
bool "lz4"
|
||||
select PACKAGE_kmod-lib-lz4
|
||||
|
||||
config ZRAM_DEF_COMP_LZ4HC
|
||||
config ZRAM_DEF_COMP_LZ4HC
|
||||
bool "lz4-hc"
|
||||
select PACKAGE_kmod-lib-lz4hc
|
||||
|
||||
config ZRAM_DEF_COMP_ZSTD
|
||||
config ZRAM_DEF_COMP_ZSTD
|
||||
bool "zstd"
|
||||
select PACKAGE_kmod-lib-zstd
|
||||
|
||||
endchoice
|
||||
endchoice
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,zram))
|
||||
|
||||
@@ -940,7 +940,7 @@ mac80211_setup_supplicant() {
|
||||
if [ "$mode" = "sta" ]; then
|
||||
wpa_supplicant_add_network "$ifname"
|
||||
else
|
||||
wpa_supplicant_add_network "$ifname" "$freq" "$htmode" "$noscan"
|
||||
wpa_supplicant_add_network "$ifname" "$freq" "$htmode" "$hostapd_noscan"
|
||||
fi
|
||||
|
||||
wpa_supplicant_add_interface "$ifname" "$mode"
|
||||
|
||||
@@ -55,10 +55,16 @@ $(call Package/libnl/default)
|
||||
DEPENDS:=+libnl-route
|
||||
endef
|
||||
|
||||
define Package/libnl-cli
|
||||
$(call Package/libnl/default)
|
||||
TITLE:=CLI Netlink Library
|
||||
DEPENDS:=+libnl-genl +libnl-nf
|
||||
endef
|
||||
|
||||
define Package/libnl
|
||||
$(call Package/libnl/default)
|
||||
TITLE:=Full Netlink Library
|
||||
DEPENDS:=+libnl-genl +libnl-route +libnl-nf
|
||||
DEPENDS:=+libnl-genl +libnl-route +libnl-nf +libnl-cli
|
||||
endef
|
||||
|
||||
define Package/libnl-core/description
|
||||
@@ -77,6 +83,10 @@ define Package/libnl-nf/description
|
||||
Netfilter Netlink Library Functions
|
||||
endef
|
||||
|
||||
define Package/libnl-cli/description
|
||||
CLI Netlink Library Functions
|
||||
endef
|
||||
|
||||
define Package/libnl/description
|
||||
Socket handling, connection management, sending and receiving of data,
|
||||
message construction and parsing, object caching system, etc.
|
||||
@@ -98,6 +108,7 @@ define Build/InstallDev
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-cli-3.so $(1)/usr/lib/libnl-cli.so
|
||||
endef
|
||||
|
||||
define Package/libnl-core/install
|
||||
@@ -120,6 +131,11 @@ define Package/libnl-nf/install
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libnl-cli/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-cli-3.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libnl/install
|
||||
:
|
||||
endef
|
||||
@@ -128,4 +144,5 @@ $(eval $(call BuildPackage,libnl-core))
|
||||
$(eval $(call BuildPackage,libnl-genl))
|
||||
$(eval $(call BuildPackage,libnl-route))
|
||||
$(eval $(call BuildPackage,libnl-nf))
|
||||
$(eval $(call BuildPackage,libnl-cli))
|
||||
$(eval $(call BuildPackage,libnl))
|
||||
|
||||
@@ -18,6 +18,8 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
PKG_CPE_ID:=cpe:/a:selinuxproject:libselinux
|
||||
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
|
||||
HOST_BUILD_DEPENDS:=libsepol/host musl-fts/host pcre2/host
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -16,6 +16,8 @@ PKG_HASH:=78fdaf69924db780bac78546e43d9c44074bad798c2c415d0b9bb96d065ee8a2
|
||||
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
PKG_CPE_ID:=cpe:/a:selinuxproject:libsepol
|
||||
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ config MBEDTLS_ECP_DP_SECP384R1_ENABLED
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP521R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP521R1_ENABLED"
|
||||
default n
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP192K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP192K1_ENABLED"
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mbedtls
|
||||
PKG_VERSION:=2.28.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=2.28.5
|
||||
PKG_RELEASE:=2
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=578c4dcd15bbff3f5cd56aa07cd4f850fc733634e3d5947be4f7157d5bfd81ac
|
||||
PKG_HASH:=849e86b626e42ded6bf67197b64aa771daa54e2a7e2868dc67e1e4711959e5e3
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=gpl-2.0.txt
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
@@ -3001,6 +3005,61 @@ find_parent:
|
||||
@@ -3002,6 +3006,61 @@ find_parent:
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
/*
|
||||
* Check for CN match
|
||||
*/
|
||||
@@ -3021,24 +3080,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3049,31 +3135,23 @@ static void x509_crt_verify_name(const m
|
||||
@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
|
||||
uint32_t *flags)
|
||||
{
|
||||
const mbedtls_x509_name *name;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_VERSION:=3.0.11
|
||||
PKG_VERSION:=3.0.12
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
@@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55
|
||||
PKG_HASH:=f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/crypto/build.info
|
||||
+++ b/crypto/build.info
|
||||
@@ -111,7 +111,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
|
||||
@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
|
||||
|
||||
DEPEND[info.o]=buildinf.h
|
||||
DEPEND[cversion.o]=buildinf.h
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.6.3-stable
|
||||
PKG_VERSION:=5.6.4-stable
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=2e74a397fa797c2902d7467d500de904907666afb4ff80f6464f6efd5afb114a
|
||||
PKG_HASH:=031691906794ff45e1e792561cf31759f5d29ac74936bc8dffb8b14f16d820b4
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 41d248461bd9ad44193a4806ecb5361513e8944e Mon Sep 17 00:00:00 2001
|
||||
From: jordan <jordan@wolfssl.com>
|
||||
Date: Tue, 27 Jun 2023 13:18:25 -0500
|
||||
Subject: [PATCH] fix detection of cut tool in configure.ac
|
||||
|
||||
---
|
||||
configure.ac | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -8723,10 +8723,11 @@ echo "extern \"C\" {" >> $OPTION_FILE
|
||||
echo "#endif" >> $OPTION_FILE
|
||||
echo "" >> $OPTION_FILE
|
||||
|
||||
-# check for supported command to trim option with
|
||||
+# Check for supported command to trim option with.
|
||||
+# note: cut requires an argument to exit with success.
|
||||
if colrm >/dev/null 2>&1 </dev/null; then
|
||||
TRIM="colrm 3"
|
||||
-elif cut >/dev/null 2>&1 </dev/null; then
|
||||
+elif cut --version >/dev/null 2>&1 </dev/null; then
|
||||
TRIM="cut -c1-2"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find colrm or cut to make options file])
|
||||
@@ -9,9 +9,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
|
||||
PKG_SOURCE_DATE:=2023-03-23
|
||||
PKG_SOURCE_VERSION:=04a06bd70b9808b14444cae81a2faba4708ee231
|
||||
PKG_MIRROR_HASH:=37c34facb733c50d0fdbfa238765a23e667e4daaae9728aaccbaba87a2a07bb9
|
||||
PKG_SOURCE_DATE:=2023-09-01
|
||||
PKG_SOURCE_VERSION:=598d9fbb5179667aa0c525040eaa41bc7f2dc015
|
||||
PKG_MIRROR_HASH:=038b5b5611425e3c0fcc3ef4a0aea37296733300766d787909a689d16d4f39b4
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2023-09-19
|
||||
PKG_SOURCE_VERSION:=7a58b995fdbecd9beed57e4d66d42cb3cf66aee2
|
||||
PKG_MIRROR_HASH:=a460a3b912047f8802eb24bb737084a08dad65b2dd520e5f5e7459379d1fcf8c
|
||||
PKG_SOURCE_DATE:=2023-11-10
|
||||
PKG_SOURCE_VERSION:=35facc8306f590a7330789ab6d5785c0d43073ef
|
||||
PKG_MIRROR_HASH:=4f73591ae1873e18df235349e478f2196ca0d3123c313a04149dc9d5e2bfb403
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=6
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -10,6 +10,36 @@ const iftypes = {
|
||||
monitor: nl80211.const.NL80211_IFTYPE_MONITOR,
|
||||
};
|
||||
|
||||
const mesh_params = {
|
||||
mesh_retry_timeout: "retry_timeout",
|
||||
mesh_confirm_timeout: "confirm_timeout",
|
||||
mesh_holding_timeout: "holding_timeout",
|
||||
mesh_max_peer_links: "max_peer_links",
|
||||
mesh_max_retries: "max_retries",
|
||||
mesh_ttl: "ttl",
|
||||
mesh_element_ttl: "element_ttl",
|
||||
mesh_auto_open_plinks: "auto_open_plinks",
|
||||
mesh_hwmp_max_preq_retries: "hwmp_max_preq_retries",
|
||||
mesh_path_refresh_time: "path_refresh_time",
|
||||
mesh_min_discovery_timeout: "min_discovery_timeout",
|
||||
mesh_hwmp_active_path_timeout: "hwmp_active_path_timeout",
|
||||
mesh_hwmp_preq_min_interval: "hwmp_preq_min_interval",
|
||||
mesh_hwmp_net_diameter_traversal_time: "hwmp_net_diam_trvs_time",
|
||||
mesh_hwmp_rootmode: "hwmp_rootmode",
|
||||
mesh_hwmp_rann_interval: "hwmp_rann_interval",
|
||||
mesh_gate_announcements: "gate_announcements",
|
||||
mesh_sync_offset_max_neighor: "sync_offset_max_neighbor",
|
||||
mesh_rssi_threshold: "rssi_threshold",
|
||||
mesh_hwmp_active_path_to_root_timeout: "hwmp_path_to_root_timeout",
|
||||
mesh_hwmp_root_interval: "hwmp_root_interval",
|
||||
mesh_hwmp_confirmation_interval: "hwmp_confirmation_interval",
|
||||
mesh_awake_window: "awake_window",
|
||||
mesh_plink_timeout: "plink_timeout",
|
||||
mesh_fwding: "forwarding",
|
||||
mesh_power_mode: "power_mode",
|
||||
mesh_nolearn: "nolearn"
|
||||
};
|
||||
|
||||
function wdev_remove(name)
|
||||
{
|
||||
nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE, 0, { dev: name });
|
||||
@@ -94,6 +124,31 @@ function wdev_create(phy, name, data)
|
||||
return null;
|
||||
}
|
||||
|
||||
function wdev_set_mesh_params(name, data)
|
||||
{
|
||||
let mesh_cfg = {};
|
||||
|
||||
for (let key in mesh_params) {
|
||||
let val = data[key];
|
||||
if (val == null)
|
||||
continue;
|
||||
mesh_cfg[mesh_params[key]] = int(val);
|
||||
}
|
||||
|
||||
if (!length(mesh_cfg))
|
||||
return null;
|
||||
|
||||
nl80211.request(nl80211.const.NL80211_CMD_SET_MESH_CONFIG, 0,
|
||||
{ dev: name, mesh_params: mesh_cfg });
|
||||
|
||||
return nl80211.error();
|
||||
}
|
||||
|
||||
function wdev_set_up(name, up)
|
||||
{
|
||||
rtnl.request(rtnl.const.RTM_SETLINK, 0, { dev: name, change: 1, flags: up ? 1 : 0 });
|
||||
}
|
||||
|
||||
function phy_sysfs_file(phy, name)
|
||||
{
|
||||
return trim(readfile(`/sys/class/ieee80211/${phy}/${name}`));
|
||||
@@ -315,4 +370,4 @@ function vlist_new(cb) {
|
||||
}, vlist_proto);
|
||||
}
|
||||
|
||||
export { wdev_remove, wdev_create, is_equal, vlist_new, phy_is_fullmac, phy_open };
|
||||
export { wdev_remove, wdev_create, wdev_set_mesh_params, wdev_set_up, is_equal, vlist_new, phy_is_fullmac, phy_open };
|
||||
|
||||
@@ -571,7 +571,7 @@ function iface_load_config(filename)
|
||||
|
||||
let bss;
|
||||
let line;
|
||||
while ((line = trim(f.read("line"))) != null) {
|
||||
while ((line = rtrim(f.read("line"), "\n")) != null) {
|
||||
let val = split(line, "=", 2);
|
||||
if (!val[0])
|
||||
continue;
|
||||
@@ -593,7 +593,7 @@ function iface_load_config(filename)
|
||||
push(config.radio.data, line);
|
||||
}
|
||||
|
||||
while ((line = trim(f.read("line"))) != null) {
|
||||
while ((line = rtrim(f.read("line"), "\n")) != null) {
|
||||
if (line == "#default_macaddr")
|
||||
bss.default_macaddr = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env ucode
|
||||
'use strict';
|
||||
import { vlist_new, is_equal, wdev_create, wdev_remove, phy_open } from "/usr/share/hostap/common.uc";
|
||||
import { vlist_new, is_equal, wdev_create, wdev_set_mesh_params, wdev_remove, wdev_set_up, phy_open } from "/usr/share/hostap/common.uc";
|
||||
import { readfile, writefile, basename, readlink, glob } from "fs";
|
||||
let libubus = require("ubus");
|
||||
|
||||
@@ -9,17 +9,6 @@ let phy = shift(ARGV);
|
||||
let command = shift(ARGV);
|
||||
let phydev;
|
||||
|
||||
const mesh_params = [
|
||||
"mesh_retry_timeout", "mesh_confirm_timeout", "mesh_holding_timeout", "mesh_max_peer_links",
|
||||
"mesh_max_retries", "mesh_ttl", "mesh_element_ttl", "mesh_hwmp_max_preq_retries",
|
||||
"mesh_path_refresh_time", "mesh_min_discovery_timeout", "mesh_hwmp_active_path_timeout",
|
||||
"mesh_hwmp_preq_min_interval", "mesh_hwmp_net_diameter_traversal_time", "mesh_hwmp_rootmode",
|
||||
"mesh_hwmp_rann_interval", "mesh_gate_announcements", "mesh_sync_offset_max_neighor",
|
||||
"mesh_rssi_threshold", "mesh_hwmp_active_path_to_root_timeout", "mesh_hwmp_root_interval",
|
||||
"mesh_hwmp_confirmation_interval", "mesh_awake_window", "mesh_plink_timeout",
|
||||
"mesh_auto_open_plinks", "mesh_fwding", "mesh_power_mode"
|
||||
];
|
||||
|
||||
function iface_stop(wdev)
|
||||
{
|
||||
if (keep_devices[wdev.ifname])
|
||||
@@ -33,7 +22,7 @@ function iface_start(wdev)
|
||||
let ifname = wdev.ifname;
|
||||
|
||||
if (readfile(`/sys/class/net/${ifname}/ifindex`)) {
|
||||
system([ "ip", "link", "set", "dev", ifname, "down" ]);
|
||||
wdev_set_up(ifname, false);
|
||||
wdev_remove(ifname);
|
||||
}
|
||||
let wdev_config = {};
|
||||
@@ -42,7 +31,7 @@ function iface_start(wdev)
|
||||
if (!wdev_config.macaddr && wdev.mode != "monitor")
|
||||
wdev_config.macaddr = phydev.macaddr_next();
|
||||
wdev_create(phy, ifname, wdev_config);
|
||||
system([ "ip", "link", "set", "dev", ifname, "up" ]);
|
||||
wdev_set_up(ifname, true);
|
||||
if (wdev.freq)
|
||||
system(`iw dev ${ifname} set freq ${wdev.freq} ${wdev.htmode}`);
|
||||
if (wdev.mode == "adhoc") {
|
||||
@@ -60,19 +49,8 @@ function iface_start(wdev)
|
||||
push(cmd, key, wdev[key]);
|
||||
system(cmd);
|
||||
|
||||
cmd = ["iw", "dev", ifname, "set", "mesh_param" ];
|
||||
let len = length(cmd);
|
||||
|
||||
for (let param in mesh_params)
|
||||
if (wdev[param])
|
||||
push(cmd, param, wdev[param]);
|
||||
|
||||
if (len == length(cmd))
|
||||
return;
|
||||
|
||||
system(cmd);
|
||||
wdev_set_mesh_params(ifname, wdev);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function iface_cb(new_if, old_if)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
let libubus = require("ubus");
|
||||
import { open, readfile } from "fs";
|
||||
import { wdev_create, wdev_remove, is_equal, vlist_new, phy_open } from "common";
|
||||
import { wdev_create, wdev_set_mesh_params, wdev_remove, is_equal, wdev_set_up, vlist_new, phy_open } from "common";
|
||||
|
||||
let ubus = libubus.connect();
|
||||
|
||||
@@ -40,6 +40,7 @@ function iface_start(phydev, iface, macaddr_list)
|
||||
let ret = wdev_create(phy, ifname, wdev_config);
|
||||
if (ret)
|
||||
wpas.printf(`Failed to create device ${ifname}: ${ret}`);
|
||||
wdev_set_up(ifname, true);
|
||||
wpas.add_iface(iface.config);
|
||||
iface.running = true;
|
||||
}
|
||||
@@ -316,6 +317,23 @@ return {
|
||||
}
|
||||
|
||||
iface_hostapd_notify(phy, ifname, iface, state);
|
||||
|
||||
if (state != "COMPLETED")
|
||||
return;
|
||||
|
||||
let phy_data = wpas.data.config[phy];
|
||||
if (!phy_data)
|
||||
return;
|
||||
|
||||
let iface_data = phy_data.data[ifname];
|
||||
if (!iface_data)
|
||||
return;
|
||||
|
||||
let wdev_config = iface_data.config;
|
||||
if (!wdev_config || wdev_config.mode != "mesh")
|
||||
return;
|
||||
|
||||
wdev_set_mesh_params(ifname, wdev_config);
|
||||
},
|
||||
event: function(ifname, iface, ev, info) {
|
||||
let phy = wpas.data.iface_phy[ifname];
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
The code for hostapd-mbedtls did not work when used for OWE association.
|
||||
|
||||
When handling association requests, the buffer offsets and length assumptions were incorrect, leading to never calculating the y point, thus denying association.
|
||||
|
||||
Also when crafting the association response, the buffer contained the trailing key-type.
|
||||
|
||||
Fix up both issues to adhere to the specification and make hostapd-mbedtls work with the OWE security type.
|
||||
|
||||
--- a/src/crypto/crypto_mbedtls.c
|
||||
+++ b/src/crypto/crypto_mbedtls.c
|
||||
@@ -2299,25 +2299,30 @@ struct crypto_ecdh * crypto_ecdh_init2(i
|
||||
struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y)
|
||||
{
|
||||
mbedtls_ecp_group *grp = &ecdh->grp;
|
||||
- size_t len = CRYPTO_EC_plen(grp);
|
||||
+ size_t prime_len = CRYPTO_EC_plen(grp);
|
||||
+ size_t output_len = prime_len;
|
||||
+ u8 output_offset = 0;
|
||||
+ u8 buf[256];
|
||||
+
|
||||
#ifdef MBEDTLS_ECP_MONTGOMERY_ENABLED
|
||||
/* len */
|
||||
#endif
|
||||
#ifdef MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED
|
||||
- if (mbedtls_ecp_get_type(grp) == MBEDTLS_ECP_TYPE_SHORT_WEIERSTRASS)
|
||||
- len = inc_y ? len*2+1 : len+1;
|
||||
+ if (mbedtls_ecp_get_type(grp) == MBEDTLS_ECP_TYPE_SHORT_WEIERSTRASS) {
|
||||
+ output_len = inc_y ? prime_len * 2 + 1 : prime_len + 1;
|
||||
+ output_offset = 1;
|
||||
+ }
|
||||
#endif
|
||||
- struct wpabuf *buf = wpabuf_alloc(len);
|
||||
- if (buf == NULL)
|
||||
+
|
||||
+ if (output_len > sizeof(buf))
|
||||
return NULL;
|
||||
+
|
||||
inc_y = inc_y ? MBEDTLS_ECP_PF_UNCOMPRESSED : MBEDTLS_ECP_PF_COMPRESSED;
|
||||
- if (mbedtls_ecp_point_write_binary(grp, &ecdh->Q, inc_y, &len,
|
||||
- wpabuf_mhead_u8(buf), len) == 0) {
|
||||
- wpabuf_put(buf, len);
|
||||
- return buf;
|
||||
+ if (mbedtls_ecp_point_write_binary(grp, &ecdh->Q, inc_y, &output_len,
|
||||
+ buf, output_len) == 0) {
|
||||
+ return wpabuf_alloc_copy(buf + output_offset, output_len - output_offset);
|
||||
}
|
||||
|
||||
- wpabuf_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2379,10 +2384,7 @@ struct wpabuf * crypto_ecdh_set_peerkey(
|
||||
os_memcpy(buf+2, key, len);
|
||||
}
|
||||
len >>= 1; /*(repurpose len to prime_len)*/
|
||||
- }
|
||||
- else if (key[0] == 0x02 || key[0] == 0x03) { /* (inc_y == 0) */
|
||||
- --len; /*(repurpose len to prime_len)*/
|
||||
-
|
||||
+ } else { /* (inc_y == 0) */
|
||||
/* mbedtls_ecp_point_read_binary() does not currently support
|
||||
* MBEDTLS_ECP_PF_COMPRESSED format (buf[1] = 0x02 or 0x03)
|
||||
* (returns MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE) */
|
||||
@@ -2390,22 +2392,21 @@ struct wpabuf * crypto_ecdh_set_peerkey(
|
||||
/* derive y, amend buf[] with y for UNCOMPRESSED format */
|
||||
if (sizeof(buf)-2 < len*2 || len == 0)
|
||||
return NULL;
|
||||
+
|
||||
buf[0] = (u8)(1+len*2);
|
||||
buf[1] = 0x04;
|
||||
+ os_memcpy(buf+2, key, len);
|
||||
+
|
||||
mbedtls_mpi bn;
|
||||
mbedtls_mpi_init(&bn);
|
||||
- int ret = mbedtls_mpi_read_binary(&bn, key+1, len)
|
||||
- || crypto_mbedtls_short_weierstrass_derive_y(grp, &bn,
|
||||
- key[0] & 1)
|
||||
+ int ret = mbedtls_mpi_read_binary(&bn, key, len)
|
||||
+ || crypto_mbedtls_short_weierstrass_derive_y(grp, &bn, 0)
|
||||
|| mbedtls_mpi_write_binary(&bn, buf+2+len, len);
|
||||
mbedtls_mpi_free(&bn);
|
||||
if (ret != 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (key[0] == 0) /*(repurpose len to prime_len)*/
|
||||
- len = CRYPTO_EC_plen(grp);
|
||||
-
|
||||
if (mbedtls_ecdh_read_public(&ecdh->ctx, buf, buf[0]+1))
|
||||
return NULL;
|
||||
}
|
||||
@@ -24,8 +24,8 @@
|
||||
frequency);
|
||||
goto out_free;
|
||||
}
|
||||
+ if (ssid->noscan)
|
||||
+ conf->noscan = 1;
|
||||
+ if (conf->noscan)
|
||||
+ ssid->noscan = 1;
|
||||
|
||||
if (ssid->mesh_basic_rates == NULL) {
|
||||
/*
|
||||
@@ -45,7 +45,7 @@
|
||||
unsigned int j;
|
||||
static const int ht40plus[] = {
|
||||
- 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
|
||||
+ 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
|
||||
+ 1, 2, 3, 4, 5, 6, 7, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
|
||||
184, 192
|
||||
};
|
||||
int ht40 = -1;
|
||||
@@ -58,6 +58,15 @@
|
||||
u8 channel;
|
||||
bool is_6ghz;
|
||||
bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
@@ -3080,6 +3080,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode,
|
||||
ieee80211_mode);
|
||||
freq->channel = channel;
|
||||
+ if (mode->mode == HOSTAPD_MODE_IEEE80211G && ssid->noscan)
|
||||
+ ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
|
||||
/* Setup higher BW only for 5 GHz */
|
||||
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
|
||||
ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -1035,6 +1035,8 @@ struct wpa_ssid {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -5767,7 +5767,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
@@ -5769,7 +5769,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||
|
||||
@@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
* macsec_policy - Determines the policy for MACsec secure session
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -4175,6 +4175,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
params.beacon_int = ssid->beacon_int;
|
||||
else
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -7593,6 +7593,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
@@ -7595,6 +7595,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
return wpa_s;
|
||||
}
|
||||
|
||||
@@ -7619,6 +7621,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
@@ -7621,6 +7623,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
struct wpa_supplicant *parent = wpa_s->parent;
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
/* Remove interface from the global list of interfaces */
|
||||
prev = global->ifaces;
|
||||
if (prev == wpa_s) {
|
||||
@@ -7965,8 +7969,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
@@ -7967,8 +7971,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
#ifdef CONFIG_BGSCAN
|
||||
if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
|
||||
@@ -7594,6 +7595,7 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
@@ -7596,6 +7597,7 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
wpas_ubus_add_bss(wpa_s);
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
return wpa_s;
|
||||
}
|
||||
@@ -7621,6 +7623,7 @@ int wpa_supplicant_remove_iface(struct w
|
||||
@@ -7623,6 +7625,7 @@ int wpa_supplicant_remove_iface(struct w
|
||||
struct wpa_supplicant *parent = wpa_s->parent;
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
wpas_ubus_free_bss(wpa_s);
|
||||
|
||||
/* Remove interface from the global list of interfaces */
|
||||
@@ -7931,6 +7934,7 @@ struct wpa_global * wpa_supplicant_init(
|
||||
@@ -7933,6 +7936,7 @@ struct wpa_global * wpa_supplicant_init(
|
||||
|
||||
eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
|
||||
wpas_periodic, global, NULL);
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
return global;
|
||||
}
|
||||
@@ -7969,12 +7973,8 @@ int wpa_supplicant_run(struct wpa_global
|
||||
@@ -7971,12 +7975,8 @@ int wpa_supplicant_run(struct wpa_global
|
||||
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8007,6 +8007,8 @@ void wpa_supplicant_deinit(struct wpa_gl
|
||||
@@ -8009,6 +8009,8 @@ void wpa_supplicant_deinit(struct wpa_gl
|
||||
|
||||
wpas_notify_supplicant_deinitialized(global);
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
To: hostap@lists.infradead.org
|
||||
Cc: =?utf-8?q?=C3=89tienne_Morice?= <neon.emorice@mail.com>
|
||||
Subject: [PATCH] nl80211: add extra-ies only if allowed by driver
|
||||
Date: Sun, 30 Jan 2022 20:22:00 +0100
|
||||
Message-Id: <20220130192200.10883-1-mail@david-bauer.net>
|
||||
List-Id: <hostap.lists.infradead.org>
|
||||
|
||||
Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl
|
||||
based adapters. The reason for it is hostapd tries to install additional
|
||||
IEs for scanning while the driver does not support this.
|
||||
|
||||
The kernel indicates the maximum number of bytes for additional scan IEs
|
||||
using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and
|
||||
only add additional scan IEs in case the driver can accommodate these
|
||||
additional IEs.
|
||||
|
||||
Reported-by: Étienne Morice <neon.emorice@mail.com>
|
||||
Tested-by: Étienne Morice <neon.emorice@mail.com>
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
src/drivers/driver.h | 3 +++
|
||||
src/drivers/driver_nl80211_capa.c | 4 ++++
|
||||
src/drivers/driver_nl80211_scan.c | 2 +-
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -2283,6 +2283,9 @@ struct wpa_driver_capa {
|
||||
/** Maximum number of iterations in a single scan plan */
|
||||
u32 max_sched_scan_plan_iterations;
|
||||
|
||||
+ /** Maximum number of extra IE bytes for scans */
|
||||
+ u16 max_scan_ie_len;
|
||||
+
|
||||
/** Whether sched_scan (offloaded scanning) is supported */
|
||||
int sched_scan_supported;
|
||||
|
||||
--- a/src/drivers/driver_nl80211_capa.c
|
||||
+++ b/src/drivers/driver_nl80211_capa.c
|
||||
@@ -949,6 +949,10 @@ static int wiphy_info_handler(struct nl_
|
||||
nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
|
||||
}
|
||||
|
||||
+ if (tb[NL80211_ATTR_MAX_SCAN_IE_LEN])
|
||||
+ capa->max_scan_ie_len =
|
||||
+ nla_get_u16(tb[NL80211_ATTR_MAX_SCAN_IE_LEN]);
|
||||
+
|
||||
if (tb[NL80211_ATTR_MAX_MATCH_SETS])
|
||||
capa->max_match_sets =
|
||||
nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
|
||||
--- a/src/drivers/driver_nl80211_scan.c
|
||||
+++ b/src/drivers/driver_nl80211_scan.c
|
||||
@@ -222,7 +222,7 @@ nl80211_scan_common(struct i802_bss *bss
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
|
||||
}
|
||||
|
||||
- if (params->extra_ies) {
|
||||
+ if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) {
|
||||
wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs",
|
||||
params->extra_ies, params->extra_ies_len);
|
||||
if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len,
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_MIRROR_HASH:=e2e00e2bb6b7bacda5dcb713e4f9a4b1e316d75b140a4aa77145471bf6fe5c17
|
||||
PKG_SOURCE_DATE:=2023-06-24
|
||||
PKG_SOURCE_VERSION:=52112643308bb02a3b4fa2894dd7d4340ba4a237
|
||||
PKG_MIRROR_HASH:=9936331b64880260cf969cc5656e1e1a8b7dc0e0843d64621242c500a330b4d6
|
||||
PKG_SOURCE_DATE:=2023-10-24
|
||||
PKG_SOURCE_VERSION:=d8118f6e76e5519881f9a37137c3a06b3cb60fd2
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-01-16
|
||||
PKG_SOURCE_VERSION:=65b3308d13de7d7975444d34389651612e2a4d38
|
||||
PKG_MIRROR_HASH:=945fdf51a299b68982aab74e8fba5614f2553a7b4c49a3a53b3093ea8aac0279
|
||||
PKG_SOURCE_DATE:=2023-10-19
|
||||
PKG_SOURCE_VERSION:=d45c443aa1e6514aab58bbbf9311913e484d31a6
|
||||
PKG_MIRROR_HASH:=20d91d867f4f34a37c7b2a600327884375f9f16c1ea9bbb3199347d8b617d856
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
|
||||
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=iptables
|
||||
PKG_VERSION:=1.8.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
@@ -20,7 +20,7 @@ PKG_FIXUP:=autoreconf
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_FLAGS:=gc-sections
|
||||
PKG_BUILD_FLAGS:=gc-sections no-lto
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From da5b32fb4656ab69fe1156eb7e36c7c961839e8a Mon Sep 17 00:00:00 2001
|
||||
From: Phil Sutter <phil@nwl.cc>
|
||||
Date: Wed, 8 Jun 2022 13:45:13 +0200
|
||||
Subject: [PATCH] extensions: string: Review parse_string() function
|
||||
|
||||
* Compare against sizeof(info->pattern) which is more clear than having
|
||||
to know that this buffer is of size XT_STRING_MAX_PATTERN_SIZE
|
||||
|
||||
* Invert the check and error early to reduce indenting
|
||||
|
||||
* Pass info->patlen to memcpy() to avoid reading past end of 's'
|
||||
|
||||
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
---
|
||||
extensions/libxt_string.c | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/extensions/libxt_string.c
|
||||
+++ b/extensions/libxt_string.c
|
||||
@@ -78,14 +78,13 @@ static void string_init(struct xt_entry_
|
||||
|
||||
static void
|
||||
parse_string(const char *s, struct xt_string_info *info)
|
||||
-{
|
||||
+{
|
||||
/* xt_string does not need \0 at the end of the pattern */
|
||||
- if (strlen(s) <= XT_STRING_MAX_PATTERN_SIZE) {
|
||||
- memcpy(info->pattern, s, XT_STRING_MAX_PATTERN_SIZE);
|
||||
- info->patlen = strnlen(s, XT_STRING_MAX_PATTERN_SIZE);
|
||||
- return;
|
||||
- }
|
||||
- xtables_error(PARAMETER_PROBLEM, "STRING too long \"%s\"", s);
|
||||
+ if (strlen(s) > sizeof(info->pattern))
|
||||
+ xtables_error(PARAMETER_PROBLEM, "STRING too long \"%s\"", s);
|
||||
+
|
||||
+ info->patlen = strnlen(s, sizeof(info->pattern));
|
||||
+ memcpy(info->pattern, s, info->patlen);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -17,6 +17,8 @@ PKG_MIRROR_HASH:=5eddf584a1c3ed5637162d6bfc573ed1ce3691fcb38bdd55bf9f1e11e82ccc4
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
|
||||
IWINFO_ABI_VERSION:=20230701
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uqmi
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
|
||||
PKG_SOURCE_DATE:=2022-05-04
|
||||
PKG_SOURCE_VERSION:=56cb2d4056fef132ccf78dfb6f3074ae5d109992
|
||||
PKG_MIRROR_HASH:=cc832b5318805df8c8387a3650f250dee72d5f1dbda4e4866b5503e186b2210c
|
||||
PKG_SOURCE_DATE:=2022-10-20
|
||||
PKG_SOURCE_VERSION:=c8c9f105aa2d03146664fa1cc1bd2c837aa4aadd
|
||||
PKG_MIRROR_HASH:=5fd1b3c8f5e7c4b52ed81a0c69504fbf39e69c0ecd1f8278969cf22f57fdb2a9
|
||||
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
|
||||
PKG_SOURCE_DATE:=2023-07-25
|
||||
PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4
|
||||
PKG_MIRROR_HASH:=427d4228fd65cf4320b8c212e710b86bcbfcdd4239f4e67132b3b471f7437202
|
||||
PKG_SOURCE_DATE:=2023-11-01
|
||||
PKG_SOURCE_VERSION:=44365eb1e1165f2a44cb31f404b04cf85031718e
|
||||
PKG_MIRROR_HASH:=743bdfacf1f1e779047a55fe8f388aaf31f6e55e8a4d0a00fcabffb68af2202e
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
@@ -21,6 +21,8 @@ PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYRIGHT
|
||||
PKG_CPE_ID:=cpe:/a:lua:lua
|
||||
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
|
||||
HOST_PATCH_DIR := ./patches-host
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -9,6 +9,7 @@ clear_partialboots() {
|
||||
# clear partialboots
|
||||
|
||||
case $(board_name) in
|
||||
linksys,ea9200|\
|
||||
linksys,panamera)
|
||||
COMMIT=1
|
||||
nvram set partialboots=0
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=px5g-mbedtls
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <mbedtls/bignum.h>
|
||||
#include <mbedtls/entropy.h>
|
||||
@@ -55,10 +56,13 @@ static int _urandom(void *ctx, unsigned char *out, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void write_file(const char *path, int len, bool pem)
|
||||
static void write_file(const char *path, size_t len, bool pem, bool cert)
|
||||
{
|
||||
FILE *f = stdout;
|
||||
mode_t mode = S_IRUSR | S_IWUSR;
|
||||
const char *buf_start = buf;
|
||||
int fd = STDERR_FILENO;
|
||||
ssize_t written;
|
||||
int err;
|
||||
|
||||
if (!pem)
|
||||
buf_start += sizeof(buf) - len;
|
||||
@@ -67,17 +71,30 @@ static void write_file(const char *path, int len, bool pem)
|
||||
fprintf(stderr, "No data to write\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (cert)
|
||||
mode |= S_IRGRP | S_IROTH;
|
||||
|
||||
if (!f) {
|
||||
if (path)
|
||||
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
|
||||
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "error: I/O error\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
written = write(fd, buf_start, len);
|
||||
if (written != len) {
|
||||
fprintf(stderr, "writing key failed with: %s\n", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
err = fsync(fd);
|
||||
if (err < 0) {
|
||||
fprintf(stderr, "syncing key failed with: %s\n", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if (path)
|
||||
f = fopen(path, "w");
|
||||
|
||||
fwrite(buf_start, 1, len, f);
|
||||
fclose(f);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static mbedtls_ecp_group_id ecp_curve(const char *name)
|
||||
@@ -110,7 +127,7 @@ static void write_key(mbedtls_pk_context *key, const char *path, bool pem)
|
||||
len = 0;
|
||||
}
|
||||
|
||||
write_file(path, len, pem);
|
||||
write_file(path, len, pem, false);
|
||||
}
|
||||
|
||||
static void gen_key(mbedtls_pk_context *key, bool rsa, int ksize, int exp,
|
||||
@@ -301,7 +318,7 @@ int selfsigned(char **arg)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
write_file(certpath, len, pem);
|
||||
write_file(certpath, len, pem, true);
|
||||
|
||||
mbedtls_x509write_crt_free(&cert);
|
||||
mbedtls_mpi_free(&serial);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=px5g-wolfssl
|
||||
PKG_RELEASE:=8.2
|
||||
PKG_RELEASE:=9
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <wolfssl/options.h>
|
||||
#include <wolfssl/wolfcrypt/asn.h>
|
||||
#include <wolfssl/wolfcrypt/asn_public.h>
|
||||
@@ -24,27 +26,38 @@ enum {
|
||||
RSA_KEY_TYPE = 1,
|
||||
};
|
||||
|
||||
int write_file(byte *buf, int bufSz, char *path) {
|
||||
int ret;
|
||||
FILE *file;
|
||||
int write_file(byte *buf, int bufSz, char *path, bool cert) {
|
||||
mode_t mode = S_IRUSR | S_IWUSR;
|
||||
ssize_t written;
|
||||
int err;
|
||||
int fd;
|
||||
|
||||
if (cert)
|
||||
mode |= S_IRGRP | S_IROTH;
|
||||
|
||||
if (path) {
|
||||
file = fopen(path, "wb");
|
||||
if (file == NULL) {
|
||||
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
|
||||
if (fd < 0) {
|
||||
perror("Error opening file");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
file = stdout;
|
||||
fd = STDERR_FILENO;
|
||||
}
|
||||
written = write(fd, buf, bufSz);
|
||||
if (written != bufSz) {
|
||||
perror("Error write file");
|
||||
exit(1);
|
||||
}
|
||||
err = fsync(fd);
|
||||
if (err < 0) {
|
||||
perror("Error fsync file");
|
||||
exit(1);
|
||||
}
|
||||
ret = (int)fwrite(buf, 1, bufSz, file);
|
||||
if (path) {
|
||||
fclose(file);
|
||||
close(fd);
|
||||
}
|
||||
if (ret > 0) {
|
||||
/* ret > 0 indicates a successful file write, set to zero for return */
|
||||
ret = 0;
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_key(ecc_key *ecKey, RsaKey *rsaKey, int type, int keySz, char *fName,
|
||||
@@ -73,9 +86,9 @@ int write_key(ecc_key *ecKey, RsaKey *rsaKey, int type, int keySz, char *fName,
|
||||
fprintf(stderr, "DER to PEM failed: %d\n", ret);
|
||||
}
|
||||
pemSz = ret;
|
||||
ret = write_file(pem, pemSz, fName);
|
||||
ret = write_file(pem, pemSz, fName, false);
|
||||
} else {
|
||||
ret = write_file(der, derSz, fName);
|
||||
ret = write_file(der, derSz, fName, false);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -281,7 +294,7 @@ int selfsigned(WC_RNG *rng, char **arg) {
|
||||
}
|
||||
pemSz = ret;
|
||||
|
||||
ret = write_file(pemBuf, pemSz, certpath);
|
||||
ret = write_file(pemBuf, pemSz, certpath, true);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Write Cert failed: %d\n", ret);
|
||||
return ret;
|
||||
|
||||
@@ -12,21 +12,31 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
PKG_SOURCE_DATE:=2023-06-06
|
||||
PKG_SOURCE_VERSION:=c7d84aae09691a99ae3db427c0b2463732ef84f4
|
||||
PKG_MIRROR_HASH:=38826ae70d886d1d7ada3fc6591ac807169aa28107f60f7f2e617520083525fb
|
||||
PKG_SOURCE_DATE:=2023-11-07
|
||||
PKG_SOURCE_VERSION:=a6e75e02528e36f3610a7f0073453018336def2e
|
||||
PKG_MIRROR_HASH:=e1a0f98ba865ed5911d5db3bfca55a2f1b825992bf5f7c7e324928d9412d7ae2
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
PKG_ABI_VERSION:=20220812
|
||||
PKG_ABI_VERSION:=20230711
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION)
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_MACOSX_RPATH=1 \
|
||||
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
|
||||
else
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DSOVERSION=$(PKG_ABI_VERSION)
|
||||
endif
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DSOVERSION=$(PKG_ABI_VERSION) \
|
||||
-DFS_SUPPORT=ON \
|
||||
-DMATH_SUPPORT=ON \
|
||||
-DNL80211_SUPPORT=OFF \
|
||||
@@ -35,7 +45,9 @@ CMAKE_HOST_OPTIONS += \
|
||||
-DSTRUCT_SUPPORT=ON \
|
||||
-DUBUS_SUPPORT=OFF \
|
||||
-DUCI_SUPPORT=OFF \
|
||||
-DULOOP_SUPPORT=OFF
|
||||
-DULOOP_SUPPORT=OFF \
|
||||
-DDEBUG_SUPPORT=ON \
|
||||
-DLOG_SUPPORT=OFF
|
||||
|
||||
|
||||
define Package/ucode/default
|
||||
@@ -70,105 +82,29 @@ define Package/libucode/description
|
||||
The libucode package provides the shared runtime library for the ucode interpreter.
|
||||
endef
|
||||
|
||||
# 1: name
|
||||
# 2: cmake symbol
|
||||
# 3: depends
|
||||
# 4: description
|
||||
define UcodeModule
|
||||
UCODE_MODULES += ucode-mod-$(strip $(1))
|
||||
CMAKE_OPTIONS += -D$(strip $(2))=$(if $(CONFIG_PACKAGE_ucode-mod-$(strip $(1))),ON,OFF)
|
||||
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_ucode-mod-$(strip $(1))
|
||||
|
||||
define Package/ucode-mod-fs
|
||||
define Package/ucode-mod-$(strip $(1))
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (filesystem module)
|
||||
DEPENDS:=ucode
|
||||
endef
|
||||
TITLE+= ($(strip $(1)) module)
|
||||
DEPENDS:=ucode $(3)
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-fs/description
|
||||
The filesystem plugin module allows interaction with the local file system.
|
||||
endef
|
||||
define Package/ucode-mod-$(strip $(1))/description
|
||||
$(strip $(4))
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-math
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (math module)
|
||||
DEPENDS:=ucode
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-math/description
|
||||
The math plugin provides access to various <math.h> procedures.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-nl80211
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (nl80211 module)
|
||||
DEPENDS:=ucode +libnl-tiny +libubox
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-nl80211/description
|
||||
The nl80211 plugin provides access to the Linux wireless 802.11 netlink API.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-resolv
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (resolv module)
|
||||
DEPENDS:=ucode
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-resolv/description
|
||||
The resolv plugin implements simple DNS resolving.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-rtnl
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (rtnl module)
|
||||
DEPENDS:=ucode +libnl-tiny +libubox
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-rtnl/description
|
||||
The rtnl plugin provides access to the Linux routing netlink API.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-struct
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (struct module)
|
||||
DEPENDS:=ucode
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-struct/description
|
||||
The struct plugin implements Python 3 compatible struct.pack/unpack functionality.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-ubus
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (ubus module)
|
||||
DEPENDS:=ucode +libubus +libblobmsg-json
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-ubus/description
|
||||
The ubus module allows ucode template scripts to enumerate and invoke ubus
|
||||
procedures.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-uci
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (uci module)
|
||||
DEPENDS:=ucode +libuci
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-uci/description
|
||||
The uci module allows templates to read and modify uci configuration.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ucode-mod-uloop
|
||||
$(Package/ucode/default)
|
||||
TITLE+= (uloop module)
|
||||
DEPENDS:=ucode +libubox
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-uloop/description
|
||||
The uloop module allows ucode scripts to interact with OpenWrt uloop event
|
||||
loop implementation.
|
||||
define Package/ucode-mod-$(strip $(1))/install
|
||||
$(INSTALL_DIR) $$(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/$(strip $(1)).so $$(1)/usr/lib/ucode/
|
||||
endef
|
||||
endef
|
||||
|
||||
|
||||
@@ -189,60 +125,55 @@ define Package/libucode/install
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-math/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
debug, DEBUG_SUPPORT, +libubox +libucode, \
|
||||
The debug plugin module provides runtime debugging and introspection facilities.))
|
||||
|
||||
define Package/ucode-mod-nl80211/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
fs, FS_SUPPORT, , \
|
||||
The filesystem plugin module allows interaction with the local file system.))
|
||||
|
||||
define Package/ucode-mod-resolv/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/resolv.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
log, LOG_SUPPORT, +libubox, \
|
||||
The log plugin module provides access to the syslog and libubox ulog APIs.))
|
||||
|
||||
define Package/ucode-mod-rtnl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
math, MATH_SUPPORT, , \
|
||||
The math plugin provides access to various <math.h> procedures.))
|
||||
|
||||
define Package/ucode-mod-struct/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
nl80211, NL80211_SUPPORT, +libnl-tiny +libubox, \
|
||||
The nl80211 plugin provides access to the Linux wireless 802.11 netlink API.))
|
||||
|
||||
define Package/ucode-mod-ubus/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
resolv, RESOLV_SUPPORT, , \
|
||||
The resolv plugin implements simple DNS resolving.))
|
||||
|
||||
define Package/ucode-mod-uci/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
rtnl, RTNL_SUPPORT, +libnl-tiny +libubox, \
|
||||
The rtnl plugin provides access to the Linux routing netlink API.))
|
||||
|
||||
define Package/ucode-mod-uloop/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uloop.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
$(eval $(call UcodeModule, \
|
||||
struct, STRUCT_SUPPORT, , \
|
||||
The struct plugin implements Python 3 compatible struct.pack/unpack functionality.))
|
||||
|
||||
$(eval $(call UcodeModule, \
|
||||
ubus, UBUS_SUPPORT, +libubus +libblobmsg-json, \
|
||||
The ubus module allows ucode template scripts to enumerate and invoke ubus procedures.))
|
||||
|
||||
$(eval $(call UcodeModule, \
|
||||
uci, UCI_SUPPORT, +libuci, \
|
||||
The uci module allows templates to read and modify uci configuration.))
|
||||
|
||||
$(eval $(call UcodeModule, \
|
||||
uloop, ULOOP_SUPPORT, +libubox, \
|
||||
The uloop module allows ucode scripts to interact with OpenWrt uloop event loop implementation.))
|
||||
|
||||
$(eval $(call BuildPackage,libucode))
|
||||
$(eval $(call BuildPackage,ucode))
|
||||
$(eval $(call BuildPackage,ucode-mod-fs))
|
||||
$(eval $(call BuildPackage,ucode-mod-math))
|
||||
$(eval $(call BuildPackage,ucode-mod-nl80211))
|
||||
$(eval $(call BuildPackage,ucode-mod-resolv))
|
||||
$(eval $(call BuildPackage,ucode-mod-rtnl))
|
||||
$(eval $(call BuildPackage,ucode-mod-struct))
|
||||
$(eval $(call BuildPackage,ucode-mod-ubus))
|
||||
$(eval $(call BuildPackage,ucode-mod-uci))
|
||||
$(eval $(call BuildPackage,ucode-mod-uloop))
|
||||
|
||||
$(foreach mod,$(UCODE_MODULES), \
|
||||
$(eval $(call BuildPackage,$(mod))))
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
@@ -21,7 +21,7 @@ try_git() {
|
||||
r*)
|
||||
GET_REV="$(echo $GET_REV | tr -d 'r')"
|
||||
BASE_REV="$(git rev-list ${REBOOT}..HEAD 2>/dev/null | wc -l | awk '{print $1}')"
|
||||
REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
|
||||
[ $((BASE_REV - GET_REV)) -ge 0 ] && REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
|
||||
;;
|
||||
*)
|
||||
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
@@ -2,7 +2,7 @@ package metadata;
|
||||
use base 'Exporter';
|
||||
use strict;
|
||||
use warnings;
|
||||
our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
|
||||
our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides clear_packages parse_package_metadata parse_package_manifest_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames);
|
||||
|
||||
our %package;
|
||||
our %vpackage;
|
||||
@@ -256,6 +256,8 @@ sub parse_package_metadata($) {
|
||||
/^Source: \s*(.+)\s*$/ and $pkg->{source} = $1;
|
||||
/^License: \s*(.+)\s*$/ and $pkg->{license} = $1;
|
||||
/^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1;
|
||||
/^CPE-ID: \s*(.+)\s*$/ and $pkg->{cpe_id} = $1;
|
||||
/^ABI-Version: \s*(.+)\s*$/ and $pkg->{abi_version} = $1;
|
||||
/^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
|
||||
/^Provides: \s*(.+)\s*$/ and do {
|
||||
my @vpkg = split /\s+/, $1;
|
||||
@@ -315,4 +317,42 @@ sub parse_package_metadata($) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub parse_package_manifest_metadata($) {
|
||||
my $file = shift;
|
||||
my $pkg;
|
||||
my %pkgs;
|
||||
|
||||
open FILE, "<$file" or do {
|
||||
warn "Cannot open '$file': $!\n";
|
||||
return undef;
|
||||
};
|
||||
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
/^Package:\s*(.+?)\s*$/ and do {
|
||||
$pkg = {};
|
||||
$pkg->{name} = $1;
|
||||
$pkg->{depends} = [];
|
||||
$pkgs{$1} = $pkg;
|
||||
};
|
||||
/^Version:\s*(.+)\s*$/ and $pkg->{version} = $1;
|
||||
/^Depends:\s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
|
||||
/^Source:\s*(.+)\s*$/ and $pkg->{source} = $1;
|
||||
/^SourceName:\s*(.+)\s*$/ and $pkg->{sourcename} = $1;
|
||||
/^License:\s*(.+)\s*$/ and $pkg->{license} = $1;
|
||||
/^LicenseFiles:\s*(.+)\s*$/ and $pkg->{licensefiles} = $1;
|
||||
/^Section:\s*(.+)\s*$/ and $pkg->{section} = $1;
|
||||
/^SourceDateEpoch: \s*(.+)\s*$/ and $pkg->{sourcedateepoch} = $1;
|
||||
/^CPE-ID:\s*(.+)\s*$/ and $pkg->{cpe_id} = $1;
|
||||
/^Architecture:\s*(.+)\s*$/ and $pkg->{architecture} = $1;
|
||||
/^Installed-Size:\s*(.+)\s*$/ and $pkg->{installedsize} = $1;
|
||||
/^Filename:\s*(.+)\s*$/ and $pkg->{filename} = $1;
|
||||
/^Size:\s*(\d+)\s*$/ and $pkg->{size} = $1;
|
||||
/^SHA256sum:\s*(.*)\s*$/ and $pkg->{sha256sum} = $1;
|
||||
}
|
||||
|
||||
close FILE;
|
||||
return %pkgs;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -4,6 +4,8 @@ use lib "$FindBin::Bin";
|
||||
use strict;
|
||||
use metadata;
|
||||
use Getopt::Long;
|
||||
use Time::Piece;
|
||||
use JSON::PP;
|
||||
|
||||
my %board;
|
||||
|
||||
@@ -609,6 +611,7 @@ ${json}{
|
||||
"version":"$pkg->{version}",
|
||||
"category":"$pkg->{category}",
|
||||
"license":"$pkg->{license}",
|
||||
"cpe_id":"$pkg->{cpe_id}",
|
||||
"maintainer": [$pkg_maintainer],
|
||||
"depends":[$pkg_deps]},
|
||||
END_JSON
|
||||
@@ -619,6 +622,173 @@ END_JSON
|
||||
print "[$json]";
|
||||
}
|
||||
|
||||
sub image_manifest_packages($)
|
||||
{
|
||||
my %packages;
|
||||
my $imgmanifest = shift;
|
||||
|
||||
open FILE, "<$imgmanifest" or return;
|
||||
while (<FILE>) {
|
||||
/^(.+?) - (.+)$/ and $packages{$1} = $2;
|
||||
}
|
||||
close FILE;
|
||||
|
||||
return %packages;
|
||||
}
|
||||
|
||||
sub dump_cyclonedxsbom_json {
|
||||
my (@components) = @_;
|
||||
|
||||
my $uuid = sprintf(
|
||||
"%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
rand(0xffff), rand(0xffff), rand(0xffff),
|
||||
rand(0x0fff) | 0x4000,
|
||||
rand(0x3fff) | 0x8000,
|
||||
rand(0xffff), rand(0xffff), rand(0xffff)
|
||||
);
|
||||
|
||||
my $cyclonedx = {
|
||||
bomFormat => "CycloneDX",
|
||||
specVersion => "1.4",
|
||||
serialNumber => "urn:uuid:$uuid",
|
||||
version => 1,
|
||||
metadata => {
|
||||
timestamp => gmtime->datetime,
|
||||
},
|
||||
"components" => [@components],
|
||||
};
|
||||
|
||||
return encode_json($cyclonedx);
|
||||
}
|
||||
|
||||
sub gen_image_cyclonedxsbom() {
|
||||
my $pkginfo = shift @ARGV;
|
||||
my $imgmanifest = shift @ARGV;
|
||||
my @components;
|
||||
my %image_packages;
|
||||
|
||||
%image_packages = image_manifest_packages($imgmanifest);
|
||||
%image_packages or exit 1;
|
||||
parse_package_metadata($pkginfo) or exit 1;
|
||||
|
||||
$package{"kernel"} = {
|
||||
license => "GPL-2.0",
|
||||
cpe_id => "cpe:/o:linux:linux_kernel",
|
||||
name => "kernel",
|
||||
};
|
||||
|
||||
my %abimap;
|
||||
my @abipkgs = grep { defined $package{$_}->{abi_version} } keys %package;
|
||||
foreach my $name (@abipkgs) {
|
||||
my $pkg = $package{$name};
|
||||
my $abipkg = $name . $pkg->{abi_version};
|
||||
$abimap{$abipkg} = $name;
|
||||
}
|
||||
|
||||
foreach my $name (sort {uc($a) cmp uc($b)} keys %image_packages) {
|
||||
my $pkg = $package{$name};
|
||||
if (!$pkg) {
|
||||
$pkg = $package{$abimap{$name}};
|
||||
next if !$pkg;
|
||||
}
|
||||
|
||||
my @licenses;
|
||||
my @license = split(/\s+/, $pkg->{license});
|
||||
foreach my $lic (@license) {
|
||||
push @licenses, (
|
||||
{ "license" => { "name" => $lic } }
|
||||
);
|
||||
}
|
||||
my $type;
|
||||
if ($pkg->{category}) {
|
||||
my $category = $pkg->{category};
|
||||
my %cat_type = (
|
||||
"Firmware" => "firmware",
|
||||
"Libraries" => "library"
|
||||
);
|
||||
|
||||
if ($cat_type{$category}) {
|
||||
$type = $cat_type{$category};
|
||||
} else {
|
||||
$type = "application";
|
||||
}
|
||||
}
|
||||
|
||||
my $version = $pkg->{version};
|
||||
if ($image_packages{$name}) {
|
||||
$version = $image_packages{$name};
|
||||
}
|
||||
$version =~ s/-\d+$// if $version;
|
||||
if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) {
|
||||
$version = $1;
|
||||
}
|
||||
|
||||
push @components, {
|
||||
name => $pkg->{name},
|
||||
version => $version,
|
||||
@licenses > 0 ? (licenses => [ @licenses ]) : (),
|
||||
$pkg->{cpe_id} ? (cpe => $pkg->{cpe_id}.":".$version) : (),
|
||||
$type ? (type => $type) : (),
|
||||
$version ? (version => $version) : (),
|
||||
};
|
||||
}
|
||||
|
||||
print dump_cyclonedxsbom_json(@components);
|
||||
}
|
||||
|
||||
sub gen_package_cyclonedxsbom() {
|
||||
my $pkgmanifest = shift @ARGV;
|
||||
my @components;
|
||||
my %mpkgs;
|
||||
|
||||
%mpkgs = parse_package_manifest_metadata($pkgmanifest);
|
||||
%mpkgs or exit 1;
|
||||
|
||||
foreach my $name (sort {uc($a) cmp uc($b)} keys %mpkgs) {
|
||||
my $pkg = $mpkgs{$name};
|
||||
|
||||
my @licenses;
|
||||
my @license = split(/\s+/, $pkg->{license});
|
||||
foreach my $lic (@license) {
|
||||
push @licenses, (
|
||||
{ "license" => { "name" => $lic } }
|
||||
);
|
||||
}
|
||||
|
||||
my $type;
|
||||
if ($pkg->{section}) {
|
||||
my $section = $pkg->{section};
|
||||
my %section_type = (
|
||||
"firmware" => "firmware",
|
||||
"libs" => "library"
|
||||
);
|
||||
|
||||
if ($section_type{$section}) {
|
||||
$type = $section_type{$section};
|
||||
} else {
|
||||
$type = "application";
|
||||
}
|
||||
}
|
||||
|
||||
my $version = $pkg->{version};
|
||||
$version =~ s/-\d+$// if $version;
|
||||
if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) {
|
||||
$version = $1;
|
||||
}
|
||||
|
||||
push @components, {
|
||||
name => $name,
|
||||
version => $version,
|
||||
@licenses > 0 ? (licenses => [ @licenses ]) : (),
|
||||
$pkg->{cpe_id} ? (cpe => $pkg->{cpe_id}.":".$version) : (),
|
||||
$type ? (type => $type) : (),
|
||||
$version ? (version => $version) : (),
|
||||
};
|
||||
}
|
||||
|
||||
print dump_cyclonedxsbom_json(@components);
|
||||
}
|
||||
|
||||
sub parse_command() {
|
||||
GetOptions("ignore=s", \@ignore);
|
||||
my $cmd = shift @ARGV;
|
||||
@@ -629,6 +799,8 @@ sub parse_command() {
|
||||
/^source$/ and return gen_package_source();
|
||||
/^pkgaux$/ and return gen_package_auxiliary();
|
||||
/^pkgmanifestjson$/ and return gen_package_manifest_json();
|
||||
/^imgcyclonedxsbom$/ and return gen_image_cyclonedxsbom();
|
||||
/^pkgcyclonedxsbom$/ and return gen_package_cyclonedxsbom();
|
||||
/^license$/ and return gen_package_license(0);
|
||||
/^licensefull$/ and return gen_package_license(1);
|
||||
/^usergroup$/ and return gen_usergroup_list();
|
||||
@@ -636,15 +808,17 @@ sub parse_command() {
|
||||
}
|
||||
die <<EOF
|
||||
Available Commands:
|
||||
$0 mk [file] Package metadata in makefile format
|
||||
$0 config [file] Package metadata in Kconfig format
|
||||
$0 mk [file] Package metadata in makefile format
|
||||
$0 config [file] Package metadata in Kconfig format
|
||||
$0 kconfig [file] [config] [patchver] Kernel config overrides
|
||||
$0 source [file] Package source file information
|
||||
$0 pkgaux [file] Package auxiliary variables in makefile format
|
||||
$0 pkgmanifestjson [file] Package manifests in JSON format
|
||||
$0 license [file] Package license information
|
||||
$0 source [file] Package source file information
|
||||
$0 pkgaux [file] Package auxiliary variables in makefile format
|
||||
$0 pkgmanifestjson [file] Package manifests in JSON format
|
||||
$0 imgcyclonedxsbom <file> [manifest] Image package manifest in CycloneDX SBOM JSON format
|
||||
$0 pkgcyclonedxsbom <file> Package manifest in CycloneDX SBOM JSON format
|
||||
$0 license [file] Package license information
|
||||
$0 licensefull [file] Package license information (full list)
|
||||
$0 usergroup [file] Package usergroup allocation list
|
||||
$0 usergroup [file] Package usergroup allocation list
|
||||
$0 version_filter [patchver] [list...] Filter list of version tagged strings
|
||||
|
||||
Options:
|
||||
|
||||
@@ -3,7 +3,12 @@ define Build/create-uImage-dtb
|
||||
-$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) \
|
||||
-O linux -T kernel -C none \
|
||||
-n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
|
||||
-d "$@.dtb" "$@.dtb.uimage"
|
||||
-d "$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb" "$@.dtb.uimage"
|
||||
endef
|
||||
|
||||
define Build/prepend-dtb-uImage
|
||||
cat "$@.dtb.uimage" "$@" > "$@.new"
|
||||
mv "$@.new" "$@"
|
||||
endef
|
||||
|
||||
define Build/meraki-header
|
||||
@@ -104,7 +109,7 @@ define Device/netgear_wndr4700
|
||||
# append a fake/empty rootfs to fool netgear's uboot
|
||||
# CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg()
|
||||
KERNEL := kernel-bin | lzma -d16 | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
|
||||
append-uImage-fakehdr filesystem | create-uImage-dtb | prepend-dtb
|
||||
append-uImage-fakehdr filesystem | create-uImage-dtb | prepend-dtb-uImage
|
||||
KERNEL_INITRAMFS := kernel-bin | libdeflate-gzip | MuImage-initramfs gzip
|
||||
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
|
||||
netgear-dni | check-size
|
||||
|
||||
19
target/linux/armsr/base-files/lib/preinit/79_move_config
Normal file
19
target/linux/armsr/base-files/lib/preinit/79_move_config
Normal file
@@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
move_config() {
|
||||
local partdev parttype=ext4
|
||||
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
if export_bootdevice && export_partdevice partdev 1; then
|
||||
part_magic_fat "/dev/$partdev" && parttype=vfat
|
||||
if mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt; then
|
||||
if [ -f "/mnt/$BACKUP_FILE" ]; then
|
||||
mv -f "/mnt/$BACKUP_FILE" /
|
||||
fi
|
||||
umount /mnt
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
@@ -36,7 +36,8 @@ platform_check_image() {
|
||||
platform_copy_config() {
|
||||
local partdev parttype=ext4
|
||||
|
||||
if export_partdevice partdev 2; then
|
||||
if export_partdevice partdev 1; then
|
||||
part_magic_fat "/dev/$partdev" && parttype=vfat
|
||||
mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt
|
||||
cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
|
||||
umount /mnt
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
|
||||
&keys {
|
||||
rfkill {
|
||||
label = "rfkill";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
linux,input-type = <EV_SW>;
|
||||
debounce-interval = <60>;
|
||||
debounce-interval = <1000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -130,6 +130,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
||||
mtd->type = MTD_NORFLASH;
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -847,6 +847,17 @@ out_error:
|
||||
@@ -870,6 +870,17 @@ out_error:
|
||||
*/
|
||||
static void mtd_set_dev_defaults(struct mtd_info *mtd)
|
||||
{
|
||||
|
||||
@@ -349,7 +349,7 @@ SVN-Revision: 35130
|
||||
list_for_each_entry(p, head, list) {
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -610,48 +610,53 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -609,48 +609,53 @@ static void tcp_options_write(__be32 *pt
|
||||
u16 options = opts->options; /* mungable copy */
|
||||
|
||||
if (unlikely(OPTION_MD5 & options)) {
|
||||
@@ -426,7 +426,7 @@ SVN-Revision: 35130
|
||||
}
|
||||
|
||||
if (unlikely(opts->num_sack_blocks)) {
|
||||
@@ -659,16 +664,17 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -658,16 +663,17 @@ static void tcp_options_write(__be32 *pt
|
||||
tp->duplicate_sack : tp->selective_acks;
|
||||
int this_sack;
|
||||
|
||||
@@ -450,7 +450,7 @@ SVN-Revision: 35130
|
||||
}
|
||||
|
||||
tp->rx_opt.dsack = 0;
|
||||
@@ -681,13 +687,14 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -680,13 +686,14 @@ static void tcp_options_write(__be32 *pt
|
||||
|
||||
if (foc->exp) {
|
||||
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
|
||||
@@ -750,7 +750,7 @@ SVN-Revision: 35130
|
||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -4157,14 +4157,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
@@ -4170,14 +4170,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
{
|
||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||
|
||||
|
||||
@@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
}
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5640,7 +5640,7 @@ static void port_event(struct usb_hub *h
|
||||
@@ -5659,7 +5659,7 @@ static void port_event(struct usb_hub *h
|
||||
port_dev->over_current_count++;
|
||||
port_over_current_notify(port_dev);
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ Subject: [PATCH] ARM64: Force hardware emulation of deprecated
|
||||
|
||||
--- a/arch/arm64/kernel/armv8_deprecated.c
|
||||
+++ b/arch/arm64/kernel/armv8_deprecated.c
|
||||
@@ -183,10 +183,15 @@ static void __init register_insn_emulati
|
||||
@@ -546,10 +546,15 @@ static void __init register_insn_emulati
|
||||
|
||||
switch (ops->status) {
|
||||
switch (insn->status) {
|
||||
case INSN_DEPRECATED:
|
||||
+#if 0
|
||||
insn->current_mode = INSN_EMULATE;
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -1622,6 +1622,109 @@ command_cleanup:
|
||||
@@ -1631,6 +1631,109 @@ command_cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5461,6 +5564,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5470,6 +5573,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -431,6 +431,11 @@ mode_fixup(struct drm_atomic_state *stat
|
||||
@@ -436,6 +436,11 @@ mode_fixup(struct drm_atomic_state *stat
|
||||
new_crtc_state =
|
||||
drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/sound/usb/quirks.c
|
||||
+++ b/sound/usb/quirks.c
|
||||
@@ -1884,6 +1884,8 @@ static const struct usb_audio_quirk_flag
|
||||
@@ -1888,6 +1888,8 @@ static const struct usb_audio_quirk_flag
|
||||
QUIRK_FLAG_GENERIC_IMPLICIT_FB),
|
||||
DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */
|
||||
QUIRK_FLAG_GENERIC_IMPLICIT_FB),
|
||||
|
||||
@@ -226,7 +226,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
}
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -880,8 +880,8 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -889,8 +889,8 @@ static void xhci_clear_command_ring(stru
|
||||
seg = ring->deq_seg;
|
||||
do {
|
||||
memset(seg->trbs, 0,
|
||||
@@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
cpu_to_le32(~TRB_CYCLE);
|
||||
seg = seg->next;
|
||||
} while (seg != ring->deq_seg);
|
||||
@@ -892,7 +892,7 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -901,7 +901,7 @@ static void xhci_clear_command_ring(stru
|
||||
ring->enq_seg = ring->deq_seg;
|
||||
ring->enqueue = ring->dequeue;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -1507,13 +1507,6 @@ drm_atomic_helper_wait_for_vblanks(struc
|
||||
@@ -1516,13 +1516,6 @@ drm_atomic_helper_wait_for_vblanks(struc
|
||||
int i, ret;
|
||||
unsigned int crtc_mask = 0;
|
||||
|
||||
@@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||
if (!new_crtc_state->active)
|
||||
continue;
|
||||
@@ -2141,12 +2134,6 @@ int drm_atomic_helper_setup_commit(struc
|
||||
@@ -2150,12 +2143,6 @@ int drm_atomic_helper_setup_commit(struc
|
||||
complete_all(&commit->flip_done);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1241,9 +1278,14 @@ static const u16 bcm_sf2_4908_reg_offset
|
||||
@@ -1247,9 +1284,14 @@ static const u16 bcm_sf2_4908_reg_offset
|
||||
[REG_SPHY_CNTRL] = 0x24,
|
||||
[REG_CROSSBAR] = 0xc8,
|
||||
[REG_RGMII_11_CNTRL] = 0x014c,
|
||||
|
||||
@@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/drivers/net/dsa/bcm_sf2.c
|
||||
+++ b/drivers/net/dsa/bcm_sf2.c
|
||||
@@ -1542,10 +1542,14 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
@@ -1548,10 +1548,14 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
rev = reg_readl(priv, REG_PHY_REVISION);
|
||||
priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/drivers/net/dsa/bcm_sf2.c
|
||||
+++ b/drivers/net/dsa/bcm_sf2.c
|
||||
@@ -1556,6 +1556,12 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
@@ -1562,6 +1562,12 @@ static int bcm_sf2_sw_probe(struct platf
|
||||
priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
|
||||
priv->irq0, priv->irq1);
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ bcm53xx_setup_macs()
|
||||
offset=1
|
||||
;;
|
||||
dlink,dir-885l | \
|
||||
linksys,ea9200 | \
|
||||
linksys,panamera | \
|
||||
netgear,r7900 | \
|
||||
netgear,r8000 | \
|
||||
|
||||
@@ -137,6 +137,7 @@ USB2_PACKAGES += kmod-usb-ledtrig-usbport
|
||||
USB3_PACKAGES := $(USB2_PACKAGES) kmod-usb3 kmod-phy-bcm-ns-usb3
|
||||
|
||||
define Device/Default
|
||||
PROFILES = Generic $$(DEVICE_NAME)
|
||||
# .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included in device/image names
|
||||
# extract the full dtb name based on the device info
|
||||
DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(subst _,-,$(1)).dtb)))
|
||||
@@ -159,6 +160,14 @@ define Device/asus
|
||||
IMAGE/trx := append-ubi | trx-nand | asus-trx
|
||||
endef
|
||||
|
||||
define Device/asus_rt-ac3100
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC3100
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC3100
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac3100
|
||||
|
||||
define Device/asus_rt-ac56u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC56U
|
||||
@@ -461,6 +470,10 @@ TARGET_DEVICES += smartrg_sr400ac
|
||||
define Device/phicomm_k3
|
||||
DEVICE_VENDOR := PHICOMM
|
||||
DEVICE_MODEL := K3
|
||||
DEVICE_ALT0_VENDOR := Wavlink
|
||||
DEVICE_ALT0_MODEL := QUANTUM DAX
|
||||
DEVICE_ALT1_VENDOR := Wavlink
|
||||
DEVICE_ALT1_MODEL := WL-WN538A8
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
IMAGES := trx
|
||||
endef
|
||||
|
||||
@@ -0,0 +1,431 @@
|
||||
From 2900083269f7c0f0ff430bffc6ced2038aed9b6b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Thu, 3 Aug 2023 10:14:54 +0300
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for ASUS RT-AC3100
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
ASUS RT-AC3100 is ASUS RT-AC88U without the external switch. Move the
|
||||
shared bindings to bcm47094-asus-rt-ac3100.dtsi.
|
||||
|
||||
Remove the fixed-link node on port@7 as commit ba4aebce23b2 ("ARM: dts:
|
||||
BCM5301X: Describe switch ports in the main DTS") states it's not
|
||||
necessary.
|
||||
|
||||
Replace the copyright notice with an author notice.
|
||||
|
||||
Rename the model name from Asus to ASUS on bcm47094-asus-rt-ac88u.dts.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230803071454.5902-2-arinc.unal@arinc9.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
.../dts/bcm47094-asus-rt-ac3100.dts | 23 +++
|
||||
.../dts/bcm47094-asus-rt-ac3100.dtsi | 163 ++++++++++++++++++
|
||||
.../dts/bcm47094-asus-rt-ac88u.dts | 155 +----------------
|
||||
4 files changed, 190 insertions(+), 152 deletions(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -119,6 +119,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-netgear-r7000.dtb \
|
||||
bcm4709-netgear-r8000.dtb \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
+ bcm47094-asus-rt-ac3100.dtb \
|
||||
bcm47094-asus-rt-ac88u.dtb \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
bcm47094-dlink-dir-890l.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts
|
||||
@@ -0,0 +1,23 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094-asus-rt-ac3100.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "asus,rt-ac3100", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "ASUS RT-AC3100";
|
||||
+
|
||||
+ nvram@1c080000 {
|
||||
+ et0macaddr: et0macaddr {
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gmac0 {
|
||||
+ nvmem-cells = <&et0macaddr>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi
|
||||
@@ -0,0 +1,163 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
+ */
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x08000000>,
|
||||
+ <0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ nvram@1c080000 {
|
||||
+ compatible = "brcm,nvram";
|
||||
+ reg = <0x1c080000 0x00180000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led-power {
|
||||
+ label = "white:power";
|
||||
+ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ led-wan-red {
|
||||
+ label = "red:wan";
|
||||
+ gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ led-lan {
|
||||
+ label = "white:lan";
|
||||
+ gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ led-usb2 {
|
||||
+ label = "white:usb2";
|
||||
+ gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ehci_port2>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ led-usb3 {
|
||||
+ label = "white:usb3";
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ehci_port1>, <&xhci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ led-wps {
|
||||
+ label = "white:wps";
|
||||
+ gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-wps {
|
||||
+ label = "WPS";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-wifi {
|
||||
+ label = "Wi-Fi";
|
||||
+ linux,code = <KEY_RFKILL>;
|
||||
+ gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-led {
|
||||
+ label = "Backlight";
|
||||
+ linux,code = <KEY_BRIGHTNESS_ZERO>;
|
||||
+ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&srab {
|
||||
+ compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&nandcs {
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "boot";
|
||||
+ reg = <0x00000000 0x00080000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@80000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0x00080000 0x00180000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@200000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x00200000 0x07e00000>;
|
||||
+ compatible = "brcm,trx";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
|
||||
@@ -1,102 +1,21 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
- * Copyright (C) 2021-2022 Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
-#include "bcm47094.dtsi"
|
||||
-#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+#include "bcm47094-asus-rt-ac3100.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
|
||||
- model = "Asus RT-AC88U";
|
||||
-
|
||||
- chosen {
|
||||
- bootargs = "earlycon";
|
||||
- };
|
||||
-
|
||||
- memory@0 {
|
||||
- device_type = "memory";
|
||||
- reg = <0x00000000 0x08000000>,
|
||||
- <0x88000000 0x18000000>;
|
||||
- };
|
||||
+ model = "ASUS RT-AC88U";
|
||||
|
||||
nvram@1c080000 {
|
||||
- compatible = "brcm,nvram";
|
||||
- reg = <0x1c080000 0x00180000>;
|
||||
-
|
||||
et1macaddr: et1macaddr {
|
||||
};
|
||||
};
|
||||
|
||||
- leds {
|
||||
- compatible = "gpio-leds";
|
||||
-
|
||||
- led-power {
|
||||
- label = "white:power";
|
||||
- gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
|
||||
- linux,default-trigger = "default-on";
|
||||
- };
|
||||
-
|
||||
- led-wan-red {
|
||||
- label = "red:wan";
|
||||
- gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
-
|
||||
- led-lan {
|
||||
- label = "white:lan";
|
||||
- gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
-
|
||||
- led-usb2 {
|
||||
- label = "white:usb2";
|
||||
- gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
|
||||
- trigger-sources = <&ehci_port2>;
|
||||
- linux,default-trigger = "usbport";
|
||||
- };
|
||||
-
|
||||
- led-usb3 {
|
||||
- label = "white:usb3";
|
||||
- gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
- trigger-sources = <&ehci_port1>, <&xhci_port1>;
|
||||
- linux,default-trigger = "usbport";
|
||||
- };
|
||||
-
|
||||
- led-wps {
|
||||
- label = "white:wps";
|
||||
- gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- gpio-keys {
|
||||
- compatible = "gpio-keys";
|
||||
-
|
||||
- button-wps {
|
||||
- label = "WPS";
|
||||
- linux,code = <KEY_WPS_BUTTON>;
|
||||
- gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
-
|
||||
- button-reset {
|
||||
- label = "Reset";
|
||||
- linux,code = <KEY_RESTART>;
|
||||
- gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
-
|
||||
- button-wifi {
|
||||
- label = "Wi-Fi";
|
||||
- linux,code = <KEY_RFKILL>;
|
||||
- gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
-
|
||||
- button-led {
|
||||
- label = "Backlight";
|
||||
- linux,code = <KEY_BRIGHTNESS_ZERO>;
|
||||
- gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
switch {
|
||||
compatible = "realtek,rtl8365mb";
|
||||
/* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
|
||||
@@ -175,31 +94,9 @@
|
||||
};
|
||||
|
||||
&srab {
|
||||
- compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
|
||||
- status = "okay";
|
||||
dsa,member = <0 0>;
|
||||
|
||||
ports {
|
||||
- port@0 {
|
||||
- label = "lan4";
|
||||
- };
|
||||
-
|
||||
- port@1 {
|
||||
- label = "lan3";
|
||||
- };
|
||||
-
|
||||
- port@2 {
|
||||
- label = "lan2";
|
||||
- };
|
||||
-
|
||||
- port@3 {
|
||||
- label = "lan1";
|
||||
- };
|
||||
-
|
||||
- port@4 {
|
||||
- label = "wan";
|
||||
- };
|
||||
-
|
||||
sw0_p5: port@5 {
|
||||
/delete-property/ethernet;
|
||||
|
||||
@@ -212,19 +109,6 @@
|
||||
pause;
|
||||
};
|
||||
};
|
||||
-
|
||||
- port@7 {
|
||||
- label = "cpu";
|
||||
-
|
||||
- fixed-link {
|
||||
- speed = <1000>;
|
||||
- full-duplex;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- port@8 {
|
||||
- label = "cpu";
|
||||
- };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -236,36 +120,3 @@
|
||||
nvmem-cells = <&et1macaddr>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
-
|
||||
-&usb2 {
|
||||
- vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
|
||||
-};
|
||||
-
|
||||
-&usb3_phy {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-&nandcs {
|
||||
- partitions {
|
||||
- compatible = "fixed-partitions";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
-
|
||||
- partition@0 {
|
||||
- label = "boot";
|
||||
- reg = <0x00000000 0x00080000>;
|
||||
- read-only;
|
||||
- };
|
||||
-
|
||||
- partition@80000 {
|
||||
- label = "nvram";
|
||||
- reg = <0x00080000 0x00180000>;
|
||||
- };
|
||||
-
|
||||
- partition@200000 {
|
||||
- label = "firmware";
|
||||
- reg = <0x00200000 0x07e00000>;
|
||||
- compatible = "brcm,trx";
|
||||
- };
|
||||
- };
|
||||
-};
|
||||
@@ -0,0 +1,56 @@
|
||||
From 5cbee5828219c4f7b33e96b5d8ce5e467b2857c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 1 Sep 2023 12:55:49 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Set MACs for D-Link DIR-885L
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Specify NVRAM access and use its "et2macaddr" NVMEM cell.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20230901105549.7076-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
.../dts/broadcom/bcm47094-dlink-dir-885l.dts | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
@@ -25,6 +25,15 @@
|
||||
<0x88000000 0x08000000>;
|
||||
};
|
||||
|
||||
+ nvram@1e3f0000 {
|
||||
+ compatible = "brcm,nvram";
|
||||
+ reg = <0x1e3f0000 0x10000>;
|
||||
+
|
||||
+ et2macaddr: et2macaddr {
|
||||
+ #nvmem-cell-cells = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
nand_controller: nand-controller@18028000 {
|
||||
nand@0 {
|
||||
partitions {
|
||||
@@ -112,6 +121,11 @@
|
||||
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
+&gmac0 {
|
||||
+ nvmem-cells = <&et2macaddr 0>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+};
|
||||
+
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -142,6 +156,8 @@
|
||||
|
||||
port@4 {
|
||||
label = "wan";
|
||||
+ nvmem-cells = <&et2macaddr 3>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
port@8 {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user