GL-SF1200 路由器 利用 github actions 自编译软件包并安装

背景介绍

GL-SF1200 路由器使用了siflowerSF19A28国产芯片,虽然也是mips架构,但由于经过了魔改,不论是mips_24kc还是mipsel_24kcelf均无法在其上运行。虽然官方在软件仓库提供了大量软件包以供下载,但是有时我们想要安装一些不常见的或者专有的软件包的时候,就会遇到困难。

解决思路

好在官方提供了该固件的完整源码,因此我们可以在略微调整构建流程后,利用github actions迅速构建我们自己的软件包。
本文基于官网固件V3.204 - Aug 9, 2021版本,目前最新的3.207版本也可使用,对应源码位于官方仓库openwrt-18.06-siflower分支commit789db2edb75f4924c6b9227847240d0bfb0d2cd0

编译流程

我的仓库已经配置好了全部所需内容,整合了lean openwrt的常用软件包。只需要先在本地运行如下命令配置好需要的软件包

sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf swig libtinfo5

git clone --depth=1 -b openwrt-18.06-siflower https://github.com/fumiama/openwrt-gl.git
cd openwrt-gl/openwrt-18.06

git clone --depth=1 https://github.com/fumiama/openwrt-passwall.git ./package/passwall
git clone --depth=1 https://github.com/fumiama/openwrt-packages.git ./package/useful
git clone --depth=1 https://github.com/fumiama/opackages.git ./package/fumiama
git clone --depth=1 https://github.com/fumiama/openwrt-upx.git ./package/fumiama/upx
git clone --depth=1 https://github.com/fumiama/luci-theme-rosy.git ./package/fumiama/luci-theme-rosy
git clone --depth=1 https://github.com/fumiama/lede.git package/leana
mv package/leana/package/lean package/
mv -n package/leana/package/libs/* package/libs/
rm -rf package/leana

cp .config.sf1200 .config
cd include
mv siwifi_version.mk.sf1200 siwifi_version.mk
cd ..

./scripts/feeds update -a
./scripts/feeds install -a

make menuconfig

然后fork我的仓库,将生成的.config文件覆盖到openwrt-18.06/.config.sf1200,即可激活自动编译。编译完成后,前往actions下载编译好的软件包即可。另外只建议安装软件包,不建议直接安装编译出的固件,可能会出现各种疑难杂症。

其他选择

如果您并不擅长自己编译,这里提供一个编译好的软件包合集,增加的软件包比较有限,基本上是我自己常用的,主要是一些主题和一些你懂的软件,所以如果里面没有您想要的软件包,也请勿私信打扰,谢谢您的配合。

安装软件包

首先您需要在路由器官方管理界面的更多设置->高级功能中选择安装luci,然后使用scp上传软件包filetransfer及其i18n翻译到/tmp,用ssh登录后,使用opkg install命令安装二者,即可在luci中找到文件传输。接下来的软件包就可以方便地通过文件传输一键上传+安装,无需再用ssh
推荐使用rosy主题美化界面,效果如下
rosy

  • 4
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值