1 前言
istoreos中有许多可安装的软件,但如果自己需要制作一个特定的固件或者编译开源的源码时就需要编译来生成所需软件
2 所需工具
- 1.Ubuntu系统
- 2.VMware虚拟机
- 3.相应版本的sdk开发包
- 4.ssh连接工具
- 5.git(可选)
3 软件编译
3.1 openwrt与immortalwrt
首先我们需要在VMware中安装Ubuntu
下载链接
可自行选择服务器或桌面版下载
安装好并启动后通过ssh连接
然后下载对应sdk包
注:固件编译istoreos,openwrt与immortalwrt方法相同
中科大镜像
搜索openwrt或immortalwrt来获取相应版本sdk(以immortalwrt为例)
然后选择对应的处理器型号(这里以mediatek为例)
在此页中找到immortalwrt-sdk-24.10.4-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst下载并上传到Ubuntu上解压
使用如下代码解压
tar-xvf immortalwrt-sdk-24.10.4-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64.tar.zstcdimmortalwrt-sdk-24.10.4-mediatek-filogic_gcc-13.3.0_musl.Linux-x86_64/我们需要安装如下软件
sudoaptupdatesudoaptinstall-ymakepython3-pip aria2 genisoimage build-essentialgawkgcc-multilib g++-multilib flex bison gettext\unzipzlib1g-dev libncurses-dev libssl-devrsynccurlwget\python3 python3-venv python3-setuptoolsfiletargitpatch\libelf-dev libtool autoconf automake subversion xsltproc其次需要更新包内容,如果是编译软件就执行
./scripts/feeds update luci ./scripts/feedsinstallluci如果因为网络问题无法更新,需要修改feeds.conf.default的下载链接
我们做完这些之后需要将自己写的软件或者git下的源码放入当前目录的package文件夹下(以luci-app-parentcontrol为例)
然后返回上一级目录编译相应软件包
cd..makepackage/luci-app-parentcontrol/compileV=s
显示如图情况后可以去bin/packages/aarch64_cortex-a53/base/目录查看打包软件包
将打包好的软件包在浏览器登陆相应设备管理页面后在软件包内上传并安装即可
3.2 istoreos
需要将仓库git到本地,或直接在网页下载
点此访问
gitclone https://github.com/istoreos/istoreos.gitcdistoreos ./scripts/feeds update luci ./scripts/feedsinstallluci其余部分与3.1的方法相同
补充:如果是第一次运行打包编译软件会遇到
只需要save保存.config即可退出该页面,后期编译就不会弹出这个页面了
4 固件编译
在固件编译上来说,我们需要下载全部内容
./scripts/feeds update -a ./scripts/feedsinstall-a执行后需要自行配置相应功能
makemenuconfig配置好后保存并编译(期间会下载各种编译包,编译时间长并且占用空间大)
最好保留60GB空间来进行编译
maketools/installV=s编译后固件也会存放在bin/packages/aarch64_cortex-a53/base/