Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync bananapi4 branch with rmandrad/openwrt #166

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
51ec38b
Merge pull request #1 from openwrt/main
N-Storm Sep 23, 2024
3e563f9
Merge branch 'main' into bananapi4
N-Storm Sep 23, 2024
0291e27
Merge branch 'rmandrad:main' into main
N-Storm Sep 24, 2024
0c12b0d
Increase partition sizes to fit current images
N-Storm Sep 25, 2024
cde283c
Refresh patches & fixup packages
N-Storm Sep 25, 2024
8ab07e0
Merge branch 'rmandrad:main' into main
N-Storm Sep 25, 2024
8eddc70
Merge pull request #3 from rmandrad/bananapi4
N-Storm Sep 25, 2024
aae49b0
Changed mtk-openwrt-feeds to upstream url. Added BPI-R4 config.
N-Storm Sep 26, 2024
0b44d57
config r16
N-Storm Sep 26, 2024
094f626
Config r17
N-Storm Sep 26, 2024
217419a
Merge branch 'rmandrad:bananapi4' into bananapi4
N-Storm Sep 26, 2024
3ccc2d4
Merge branch 'rmandrad:main' into main
N-Storm Sep 26, 2024
2082d7c
r18. Further fixes on partition sizes. This build proven to boot.
N-Storm Sep 27, 2024
11c644b
Merge branch 'bananapi4' of github.com:N-Storm/openwrt into bananapi4
N-Storm Sep 27, 2024
0730724
Merge pull request #4 from openwrt/main
N-Storm Sep 27, 2024
a1afdc0
Merge pull request #5 from N-Storm/main
N-Storm Sep 27, 2024
63b2b7f
Merge branch 'openwrt:main' into main
rmandrad Sep 27, 2024
b0d710b
Merge branch 'rmandrad:main' into main
N-Storm Sep 29, 2024
e48cb56
Merge branch 'rmandrad:bananapi4' into bananapi4
N-Storm Sep 29, 2024
adc9626
Merge pull request #6 from openwrt/main
N-Storm Sep 29, 2024
2216e31
Merge pull request #7 from N-Storm/main
N-Storm Sep 29, 2024
207ed35
Merge pull request #8 from openwrt/main
N-Storm Sep 29, 2024
90794bb
Merge branch 'bananapi4' into main
N-Storm Sep 29, 2024
92757cd
Merge pull request #9 from N-Storm/main
N-Storm Sep 29, 2024
91a49a1
Added PPPoA, PPTP & PPPoL2TP options and their deps to config
N-Storm Sep 29, 2024
2c8fb50
Build date/number bump
N-Storm Sep 30, 2024
4e831b5
Switched compiler optimizations to favor speed instead of space now, …
N-Storm Sep 30, 2024
dc553a7
Version/date bump. Attepmt to change CI/CD to build only filogic images
N-Storm Oct 1, 2024
3554024
Fix reusable actions path
N-Storm Oct 1, 2024
8d95153
Fix missing version reference
N-Storm Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,18 @@
- any-glob-to-any-file:
- "target/linux/bcm4908/**"
- "package/boot/uboot-bcm4908/**"
- "package/boot/arm-trusted-firmware-bcm63xx/**"
"target/bcm53xx":
- changed-files:
- any-glob-to-any-file:
- "target/linux/bcm53xx/**"
- "package/boot/uboot-bcm53xx/**"
"target/bcm63xx":
- changed-files:
- any-glob-to-any-file:
- "target/linux/bcm63xx/**"
- "package/kernel/bcm63xx-cfe/**"
- "package/boot/arm-trusted-firmware-bcm63xx/**"
"target/bmips":
- changed-files:
- any-glob-to-any-file:
- "target/linux/bmips/**"
- "package/boot/uboot-bmips/**"
- "package/kernel/bcm63xx-cfe/**"
"target/d1":
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -83,6 +79,12 @@
- changed-files:
- any-glob-to-any-file:
- "target/linux/qualcommax/**"
"target/ixp4xx":
- changed-files:
- any-glob-to-any-file:
- "target/linux/ixp4xx/**"
- "package/boot/apex/Makefile/**"
- "package/firmware/ixp4xx-microcode/**"
"target/kirkwood":
- changed-files:
- any-glob-to-any-file:
Expand All @@ -103,6 +105,10 @@
- "package/boot/tfa-layerscape/**"
- "package/boot/uboot-layerscape/**"
- "package/network/utils/layerscape/**"
"target/loongarch64":
- changed-files:
- any-glob-to-any-file:
- "target/linux/loongarch64/**"
"target/malta":
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -165,6 +171,14 @@
- "target/linux/sifiveu/**"
- "package/boot/uboot-sifiveu/**"
- "package/boot/opensbi/**"
"target/siflower":
- changed-files:
- any-glob-to-any-file:
- "target/linux/siflower/**"
"target/starfive":
- changed-files:
- any-glob-to-any-file:
- "target/linux/starfive/**"
"target/sunxi":
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
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
uses: ./.github/workflows/reusable-kernel.yml
189 changes: 189 additions & 0 deletions .github/workflows/reusable-kernel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: Build Kernel

on:
workflow_call:
secrets:
ccache_s3_endpoint:
ccache_s3_bucket:
ccache_s3_access_key:
ccache_s3_secret_key:

jobs:
determine_changed_files:
name: Determine Changed Files
uses: openwrt/actions-shared-workflows/.github/workflows/reusable_determine_changed_files.yml@main

determine_targets:
name: Set targets
needs: determine_changed_files
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@v4
with:
sparse-checkout: |
include
scripts/dump-target-info.pl
target/linux

- name: Determine Affected Kernel Versions
id: determine_affected_kernel_versions
run: |
CHANGED_FILES="$(echo ${{ needs.determine_changed_files.outputs.all_changed_files }} | tr ' ' '\n')"

# Extract from changed files list pattern of (patches|backport|hack|pending|files|kernel|config)-[0-9]+.[0-9]+ and compose list of [0-9]+.[0-9]+
AFFECTED_KERNEL_VERSIONS_LIST="$(echo $CHANGED_FILES | grep -oP "(patches|backport|hack|pending|files|kernel|config)-[0-9]+\.[0-9]+" | sort | uniq | \
sed -E 's/(patches|backport|hack|pending|files|kernel|config)-//' | sort | uniq)"

echo "affected_kernel_versions="$AFFECTED_KERNEL_VERSIONS_LIST"" >> $GITHUB_OUTPUT

- name: Set targets
id: find_targets
env:
AFFECTED_KERNEL_VERSIONS: ${{ steps.determine_affected_kernel_versions.outputs.affected_kernel_versions }}
run: |
# Dirty hack to leave only mediatek/filogic target remain, as this fork targets only that platform
ALL_TARGETS="mediatek/filogic aarch64_cortex-a53"
TARGET_KERNELS="$(perl ./scripts/dump-target-info.pl kernels 2>/dev/null | grep 'mediatek/filogic')"

CHANGED_FILES="$(echo ${{ needs.determine_changed_files.outputs.all_changed_files }} | tr ' ' '\n')"

TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1 | cut -d " " -f 1)"
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1 | cut -d " " -f 1)"

# On testing non-specific target, skip testing each subtarget if we are testing pr
if [ ${{ github.event_name }} != 'push' ]; then
if echo "$CHANGED_FILES" | grep -v -q -P ^target/linux/.*/ ||
echo "$CHANGED_FILES" | grep -q target/linux/generic; then
TARGETS_SUBTARGETS=$TARGETS
fi
fi

JSON_TARGETS_SUBTARGETS='['
FIRST=1
for TARGET_SUBTARGET in $TARGETS_SUBTARGETS; do
TARGET_KERNEL_VER="$(echo "$TARGET_KERNELS" | grep -w $TARGET_SUBTARGET | cut -d " " -f 2)"
TARGET_TESTING_KERNEL_VER="$(echo "$TARGET_KERNELS" | grep -w $TARGET_SUBTARGET | cut -d " " -f 3)"

TARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 1)
SUBTARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 2)

if echo "$CHANGED_FILES" | grep -q target/linux/generic ||
echo "$CHANGED_FILES" | grep -q "package/kernel" ||
echo "$CHANGED_FILES" | grep -q "target/linux/$TARGET"; then

# test target if kernel version is affected
# If AFFECTED_KERNEL_VERSIONS is empty fallback to simple testing (case of changed files)
if [ -z "${{ env.AFFECTED_KERNEL_VERSIONS }}" ] || echo "${{ env.AFFECTED_KERNEL_VERSIONS }}" | grep -q "$TARGET_KERNEL_VER"; then
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'"}'
[[ $FIRST -ne 1 ]] && JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"','
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS""$TUPLE"
FIRST=0
fi

# Also test testing kernel version if kernel version is affected
if [ -n "$TARGET_TESTING_KERNEL_VER" ] && echo "${{ env.AFFECTED_KERNEL_VERSIONS }}" | grep -q "$TARGET_TESTING_KERNEL_VER"; then
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'","testing":"'"$TARGET_TESTING_KERNEL_VER"'"}'
[[ $FIRST -ne 1 ]] && JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"','
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS""$TUPLE"
FIRST=0
fi
fi
done
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"']'

JSON_TARGETS='['
FIRST=1
for TARGET_SUBTARGET in $TARGETS; do
TARGET_KERNEL_VER="$(echo "$TARGET_KERNELS" | grep -w $TARGET_SUBTARGET | cut -d " " -f 2)"
TARGET_TESTING_KERNEL_VER="$(echo "$TARGET_KERNELS" | grep -w $TARGET_SUBTARGET | cut -d " " -f 3)"

TARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 1)
SUBTARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 2)

if echo "$CHANGED_FILES" | grep -q target/linux/generic ||
echo "$CHANGED_FILES" | grep -q "package/kernel" ||
echo "$CHANGED_FILES" | grep -q "target/linux/$TARGET"; then

# test target if kernel version is affected
# If AFFECTED_KERNEL_VERSIONS is empty fallback to simple testing (case of changed files)
if [ -z "${{ env.AFFECTED_KERNEL_VERSIONS }}" ] || echo "${{ env.AFFECTED_KERNEL_VERSIONS }}" | grep -q "$TARGET_KERNEL_VER"; then
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'"}'
[[ $FIRST -ne 1 ]] && JSON_TARGETS="$JSON_TARGETS"','
JSON_TARGETS="$JSON_TARGETS""$TUPLE"
FIRST=0
fi

# Also test testing kernel version if kernel version is affected
if [ -n "$TARGET_TESTING_KERNEL_VER" ] && echo "${{ env.AFFECTED_KERNEL_VERSIONS }}" | grep -q "$TARGET_TESTING_KERNEL_VER"; then
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'","testing":"'"$TARGET_TESTING_KERNEL_VER"'"}'
[[ $FIRST -ne 1 ]] && JSON_TARGETS="$JSON_TARGETS"','
JSON_TARGETS="$JSON_TARGETS""$TUPLE"
FIRST=0
fi
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

determine_changed_packages:
name: Determine Changed Packages
needs: determine_changed_files
uses: openwrt/actions-shared-workflows/.github/workflows/reusable_determine_changed_packages.yml@main
with:
all_changed_files: ${{ needs.determine_changed_files.outputs.all_changed_files }}

build:
name: Build Kernel with external toolchain
needs: [ determine_targets, determine_changed_packages ]
permissions:
contents: read
packages: read
actions: write
strategy:
fail-fast: False
matrix:
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
uses: ./.github/workflows/reusable_build.yml
with:
container_name: toolchain
target: ${{ matrix.target }}
subtarget: ${{ matrix.subtarget }}
testing: ${{ matrix.testing != '' }}
build_toolchain: true
build_kernel: true
build_all_kmods: true
build_dtb: true
include_feeds: true
use_ccache_cache: true
check_packages_list: ${{ needs.determine_changed_packages.outputs.changed_packages }}

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: openwrt/actions-shared-workflows/.github/workflows/reusable_check-kernel-patches.yml@main
with:
target: ${{ matrix.target }}
subtarget: ${{ matrix.subtarget }}
testing: ${{ matrix.testing != '' }}
Loading