Skip to content

Commit

Permalink
update with fix and adjustment on builder script and fw
Browse files Browse the repository at this point in the history
frizkyiman authored May 5, 2024
2 parents faf6fd2 + 248b8e6 commit d3ddafc
Showing 40 changed files with 6,778 additions and 624 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/generate-friwrt-amlogic.yml
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ on:
- openclash
- neko
- passwall
- neko-openclash
- openclash-passwall
- neko-passwall
- openclash-passwall-neko
@@ -117,8 +118,20 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checking Tunnel Option
id: tunnelopt
run: |
if [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "${RELEASE_BRANCH#*:}" == "21.02.7" ]]; then
echo "Cannot continue the process because the selected tunnel [$TUNNEL]"
echo "only support for newer branch with fw4 firewall!"
exit 1
else
echo "Selected tunnel option: [$TUNNEL]"
echo "status=success" >> $GITHUB_OUTPUT
fi
- name: Initialization environment (normal)
if: github.event.inputs.target != 'all'
if: github.event.inputs.target != 'all' && steps.tunnelopt.outputs.status == 'success' && !cancelled()
env:
DEBIAN_FRONTEND: noninteractive
run: |
@@ -128,7 +141,7 @@ jobs:
- name: Initialization environment (deep)
id: init
if: github.event.inputs.target == 'all'
if: github.event.inputs.target == 'all' && steps.tunnelopt.outputs.status == 'success' && !cancelled()
env:
DEBIAN_FRONTEND: noninteractive
run: |
@@ -227,7 +240,6 @@ jobs:
run: |
cd $WORKING_DIR
bash scripts/external-package-urls.sh
bash scripts/amlogic_service.sh
if [[ "$BRANCH" == "21.02.7" ]]; then
grep -E "^all-all|^old-21.02|^amlogic-$tags|^amlogic" external-package-urls.txt | awk '{print $2}' > output_url.txt
else
@@ -247,7 +259,7 @@ jobs:
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh openclash-passwall-neko
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh "$TUNNEL"
elif [[ "$TUNNEL" == "all" && "$BRANCH" = "21.02.7" ]]; then
@@ -258,7 +270,8 @@ jobs:
fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "neko" ] || [ "$TUNNEL" = "neko-passwall" ]; then bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" == "neko-openclash" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
echo "Total custom packages: $(find packages -type f -name "*.ipk" | wc -l)"
ls packages
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage before starting to compile: \n$(df -hT ${PWD}) \n"
@@ -270,7 +283,7 @@ jobs:
cd $WORKING_DIR
mkdir -p compiled_images
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
for t in openclash-passwall neko-passwall openclash-passwall-neko openclash passwall neko no-tunnel; do
for t in openclash-passwall neko-passwall neko-openclash openclash-passwall-neko openclash passwall neko no-tunnel; do
echo "Compiling with VPN Client: $t"
if [ "$CLEAN" == "true" ]; echo "Start 'make clean' before building images."; then make clean; fi
time bash make-build.sh $PROFILE $t
@@ -283,7 +296,7 @@ jobs:
time bash make-build.sh $PROFILE $t
for file in bin/targets/"$TARGET_SYSTEM"/*rootfs.tar.gz; do mv "$file" compiled_images; done
done
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
echo "Compiling with VPN Client: $TUNNEL"
bash make-build.sh $PROFILE $TUNNEL
for file in bin/targets/"$TARGET_SYSTEM"/*rootfs.tar.gz; do mv "$file" compiled_images; done
@@ -328,12 +341,13 @@ jobs:
ls -l
echo "status=success" >> $GITHUB_OUTPUT
- name: Add changelog info to new release description
- name: Add changelog info and set tag name to new release
if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()
id: changelog
shell: bash
run: |
cd $WORKING_DIR
echo "RELEASE_TAG=amlogic-${{ env.openwrt_board }}-$BASE-$BRANCH-$DATEMONTH$([ "$REVISION_TAG" == "true" ] && echo -rev)" >> $GITHUB_ENV
r=$(awk '/^\*\*Changelog\*\*/ {if(found) exit; found=1} found' changelog_amlogic.md)
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
@@ -348,12 +362,12 @@ jobs:
file_glob: true
file: ${{ env.PACKAGED_OUTPUTPATH }}/*
asset_name: ${{ github.event.repository.name }}-${{ github.sha }}
tag: amlogic-${{ env.openwrt_board }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}
release_name: amlogic-${{ env.openwrt_board }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}
tag: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
overwrite: true
prerelease: ${{ env.PRE_RELEASE }}
body: |
![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/frizkyiman/friWrt-MyWrtBuilder/amlogic-${{ env.openwrt_board }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}/total?style=for-the-badge&logo=Openwrt)
![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/frizkyiman/friWrt-MyWrtBuilder/${{ env.RELEASE_TAG }}/total?style=for-the-badge&logo=Openwrt)
### friWrt ${{ env.BASE }}-${{ env.BRANCH }} Image information
Build date: ${{ env.DATETIME }}
@@ -364,7 +378,7 @@ jobs:
- Default username: root
- Default password: friwrt
- Default WIFI name: friWrt_2g | friWrt_5g (if device supported)
- Default WIFI password: friwrt2023 (if device supported)
- Default WIFI password: friwrt2024 (if device supported)
### Install to EMMC
- Login to OpenWrt → System → Amlogic Service → Install OpenWrt
36 changes: 25 additions & 11 deletions .github/workflows/generate-friwrt.yml
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ on:
- openclash
- neko
- passwall
- neko-openclash
- openclash-passwall
- neko-passwall
- openclash-passwall-neko
@@ -91,13 +92,24 @@ jobs:
outputs:
target: ${{ steps.set-matrix.outputs.target }}
steps:
- id: set-matrix
- name: Set Matrix Run
id: set-matrix
run: |
if [ "${{ inputs.target }}" == "all" ]; then
echo "target=['Raspberry Pi 3B','Raspberry Pi 4B','x86-64']" >> $GITHUB_OUTPUT
else
echo "target=['${{ inputs.target }}']" >> $GITHUB_OUTPUT
fi
- name: Checking Tunnel Option
run: |
if [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "${RELEASE_BRANCH#*:}" == "21.02.7" ]]; then
echo "Cannot continue the process because the selected tunnel [ $TUNNEL ]"
echo "only support for newer branch with fw4 firewall!"
exit 1
else
echo "Selected tunnel option: [ $TUNNEL ]"
fi
Generate:
needs: prebuild
@@ -109,7 +121,7 @@ jobs:
matrix:
target: ${{fromJSON(needs.prebuild.outputs.target)}}

steps:
steps:
- name: Initialization System Environment
run: |
sudo apt-get -qq update
@@ -209,7 +221,7 @@ jobs:
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh openclash-passwall-neko
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
elif [[ ("$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "neko" ]]; then
echo "VPN Client: $TUNNEL"
bash scripts/tunnel_app.sh "$TUNNEL"
elif [[ "$TUNNEL" == "all" && "$BRANCH" = "21.02.7" ]]; then
@@ -220,7 +232,8 @@ jobs:
fi
if [ "$TUNNEL" = "openclash" ] || [ "$TUNNEL" = "openclash-passwall" ]; then bash scripts/clash-core.sh; fi
if [ "$TUNNEL" = "neko" ] || [ "$TUNNEL" = "neko-passwall" ]; then bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
if [ "$TUNNEL" = "openclash-passwall-neko" ] || [ "$TUNNEL" == "neko-openclash" ] || [ "$TUNNEL" = "all" ]; then bash scripts/clash-core.sh; bash scripts/neko_core.sh; fi
echo "Total custom packages: $(find packages -type f -name "*.ipk" | wc -l)"
ls packages
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage before starting to compile: \n$(df -hT ${PWD}) \n"
@@ -232,7 +245,7 @@ jobs:
cd $WORKING_DIR
mkdir -p compiled_images
if [[ "$TUNNEL" == "all" && "$BRANCH" != "21.02.7" ]]; then
for t in openclash-passwall neko-passwall openclash-passwall-neko openclash passwall neko no-tunnel; do
for t in openclash-passwall neko-passwall neko-openclash openclash-passwall-neko openclash passwall neko no-tunnel; do
echo "Compiling with VPN Client: $t"
if [ "$CLEAN" == "true" ]; echo "Start 'make clean' before building images."; then make clean; fi
time bash make-build.sh $PROFILE $t
@@ -247,7 +260,7 @@ jobs:
rm -rf bin/targets/"$TARGET_SYSTEM"/*.{json,manifest,bin,*-rootfs*,*factory*,sha256sums}
for file in bin/targets/"$TARGET_SYSTEM"/*-"$TARGET_NAME"-*.img.gz; do mv "$file" compiled_images/fri_$(basename "$file" .img.gz)$( echo "_$t" )_$DATE$([ "$REVISION_TAG" == "true" ] && echo _rev).img.gz; done
done
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
elif [[ ("$TUNNEL" == "neko" || "$TUNNEL" == "passwall" || "$TUNNEL" == "openclash-passwall" || "$TUNNEL" == "neko-passwall" || "$TUNNEL" == "neko-openclash" || "$TUNNEL" == "openclash-passwall-neko") && "$BRANCH" != "21.02.7" || "$TUNNEL" == "openclash" || "$TUNNEL" == "no-tunnel" ]]; then
echo "Compiling with VPN Client: $TUNNEL"
bash make-build.sh $PROFILE $TUNNEL
rm -rf bin/targets/"$TARGET_SYSTEM"/*.{json,manifest,bin,*-rootfs*,*factory*,sha256sums}
@@ -259,14 +272,15 @@ jobs:
sha256sum compiled_images/fri_*.img.gz > compiled_images/sha256sums
fi
ls -l compiled_images
echo "RELEASE_TAG=$PROFILE-$BASE-$BRANCH-$DATEMONTH$([ "$REVISION_TAG" == "true" ] && echo -rev)" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
echo -e "Server space usage after compilation: \n$(df -hT ${PWD}) \n"
- name: Upload All Firmware to Artifacts
if: github.event.inputs.upload-artifacts == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}
name: ${{ env.RELEASE_TAG }}
path: ${{ env.WORKING_DIR }}/compiled_images//*

- name: Add changelog info to new release description
@@ -289,12 +303,12 @@ jobs:
file_glob: true
file: ${{ env.WORKING_DIR }}/compiled_images//*
asset_name: ${{ github.event.repository.name }}-${{ github.sha }}
tag: ${{ env.PROFILE }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}
release_name: ${{ env.PROFILE }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}
tag: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
overwrite: true
prerelease: ${{ env.PRE_RELEASE }}
body: |
![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/frizkyiman/friWrt-MyWrtBuilder/${{ env.PROFILE }}-${{ env.BASE }}-${{ env.BRANCH }}-${{ env.DATEMONTH }}/total?style=for-the-badge&logo=Openwrt)
![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/frizkyiman/friWrt-MyWrtBuilder/${{ env.RELEASE_TAG }}/total?style=for-the-badge&logo=Openwrt)
### friWrt ${{ env.BASE }}-${{ env.BRANCH }} Image information
Build date: ${{ env.DATETIME }}
@@ -305,4 +319,4 @@ jobs:
- Default username: root
- Default password: friwrt
- Default WIFI name: friWrt_2g | friWrt_5g (if device supported)
- Default WIFI password: friwrt2023 (if device supported)
- Default WIFI password: friwrt2024 (if device supported)
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# What's New!

**Changelog** (05-05-2024):
- add new tunnel option; neko-openclash,
- add new script cek_sms.sh for modem rakitan,
- update several packages,
- add and replace some packagas,
- replace some packages source,
- fix and tweak some script,
- update and fix bug on builder script,
- some adjustment and tweak on builder script.

**Changelog** (02-04-2024):
- add release device NanoPi R5S and R2S (not tested)

11 changes: 11 additions & 0 deletions changelog_amlogic.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# What's New!

**Changelog** (05-05-2024):
- add wifi on for HGP, unknown for BH (experimental) [PR#18](https://github.com/frizkyiman/friWrt-MyWrtBuilder/pull/18)
- add new tunnel option; neko-openclash,
- update several packages,
- add new script cek_sms.sh for modem rakitan,
- add and replace some packagas,
- replace some packages source,
- fix and tweak some script,
- update and fix bug on builder script,
- some adjustment and tweak on builder script.

**Changelog** (30-03-2024):
- update openwrt to 23.05.3 latest branch,
- update immortalwrt to 23.05.2 latest branch,
Loading

0 comments on commit d3ddafc

Please sign in to comment.