From baa715aeeb0e191e54f536cf7af2d7015ee2169e Mon Sep 17 00:00:00 2001 From: arix00 <15333224+arix00@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:38:52 -0700 Subject: [PATCH] Build script --- .github/workflows/build_mx4300_foss.yml | 55 +++++++++++++++++++++++++ README.md | 19 +++++++++ genconfig.sh | 22 ++++++++++ 3 files changed, 96 insertions(+) create mode 100644 .github/workflows/build_mx4300_foss.yml create mode 100644 genconfig.sh diff --git a/.github/workflows/build_mx4300_foss.yml b/.github/workflows/build_mx4300_foss.yml new file mode 100644 index 00000000000000..443166f0c0a98d --- /dev/null +++ b/.github/workflows/build_mx4300_foss.yml @@ -0,0 +1,55 @@ +name: Build MX4300 FOSS Image + +on: workflow_dispatch + +jobs: + build: + name: Build MX4300 FOSS Images + 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 feeds + run: scripts/feeds update -a && scripts/feeds install -a + + - name: Generate config + run: sh genconfig.sh + + - name: Build firmware images + run: make -j$(($(nproc)+1)) world + + - name: Get SHA + uses: benjlevesque/short-sha@v2.2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + tag: qualcommax-foss-${{ env.SHA }} + artifacts: bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-linksys_mx4300* diff --git a/README.md b/README.md index 9141b2392df73e..250c6a29a2c24a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ +## About + +This is for Linksys LN1301/MX4300 router as [no official support](https://github.com/openwrt/openwrt/pull/16070) in OpenWrt yet. +Firmware images are generated from github action. + +### Credit: + +- The OpenWrt project. +- mx4300-dev: Open source OpenWRT build, from [testuser7](https://github.com/testuser7/openwrt/tree/mx4300). +- mx4300-nss: NSS enabled build with proprietary driver, from [qosmio](https://github.com/qosmio/openwrt-ipq/tree/qualcommax-6.x-nss-mx4300) + +### Warning + +Auto build binaries, untested and no guarantee. USE AT YOUR OWN RISK. + + + +------------------- + ![OpenWrt logo](include/logo.png) OpenWrt Project is a Linux operating system targeting embedded devices. Instead diff --git a/genconfig.sh b/genconfig.sh new file mode 100644 index 00000000000000..042e61c17884b6 --- /dev/null +++ b/genconfig.sh @@ -0,0 +1,22 @@ + +#!/bin/sh + +wget https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/config.buildinfo -O config.buildinfo +cat config.buildinfo | grep -v CONFIG_TARGET_DEVICE_ | grep -v CONFIG_TARGET_ALL_PROFILES | grep -v CONFIG_TARGET_MULTI_PROFILE > .config +echo CONFIG_TARGET_ALL_PROFILES=n >> .config +echo CONFIG_TARGET_MULTI_PROFILE=n >> .config +echo CONFIG_IB=n >> .config +echo CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4300=y >> .config +echo CONFIG_TARGET_DEVICE_qualcommax_ipq807x_DEVICE_linksys_mx4300=y >> .config +echo CONFIG_TARGET_DEVICE_PACKAGES_qualcommax_ipq807x_DEVICE_linksys_mx4300=\"\" >> .config +#add luci +echo CONFIG_PACKAGE_luci=y >> .config +make defconfig + +#add libpam +#echo CONFIG_PACKAGE_libpam=y >> .config + +#skip xdp +cat .config | grep -v "CONFIG_PACKAGE.*xdp" > .config.tmp +cp .config.tmp .config +