Skip to content

Commit

Permalink
build script
Browse files Browse the repository at this point in the history
  • Loading branch information
arix00 committed Sep 26, 2024
1 parent 2b0e70a commit d3ad601
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build_mx4300_nss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: nss build with kmod

on: workflow_dispatch

jobs:
build:
name: nss build with kmod
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install packages
run: |
sudo apt-get update && \
sudo apt-get install -y \
build-essential \
clang \
flex \
bison \
g++ \
gawk \
gcc-multilib \
g++-multilib \
gettext \
git \
libncurses-dev \
libssl-dev \
python3-distutils \
rsync \
unzip \
zlib1g-dev \
file \
wget && \
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v4

- name: Update feed
run: scripts/feeds update -a && scripts/feeds install -a

- name: Generate config with extra kmod
run: sh genconfig_nss.sh full

- name: Build firmware images
run: make -j$(($(nproc)+1)) world

- name: Pack packages
run: sh pack_kmod.sh

- name: Get SHA
uses: benjlevesque/[email protected]

- name: Release
uses: ncipollo/release-action@v1
with:
tag: qualcommax-nss-${{ env.SHA }}
artifacts: bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-*, kmod.tar.gz
13 changes: 13 additions & 0 deletions genconfig_nss.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

cat nss-setup/config-nss.seed | grep -v luci- > .config
echo CONFIG_FEED_nss_packages=n >> .config
make defconfig


if [ "$1" = "full" ]; then
kmods=$(wget -qO- https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/packages/ | grep kmod- | grep -v ath | grep -v mt7 | awk -F'<|>' '{print $7}' | cut -d '_' -f 1)
for k in $kmods; do grep -q $k=y .config || echo CONFIG_PACKAGE_$k=m >> .config; done
make defconfig
fi

6 changes: 6 additions & 0 deletions pack_kmod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

mkdir kmod
cp bin/targets/qualcommax/ipq807x/packages/Packages* kmod
cp bin/targets/qualcommax/ipq807x/packages/kmod-* kmod
tar cfz kmod.tar.gz kmod/

0 comments on commit d3ad601

Please sign in to comment.