作者:滴水之功
第1步
準備相應(yīng)的環(huán)境,我使用的環(huán)境是VMware16+ubuntu20.04,如圖1所示安裝編譯所需的依賴包;
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync
圖1
第2步
如圖2所示,在~目錄下創(chuàng)建project文件夾,在project文件夾下下載相應(yīng)的代碼;
mkdir project,cd projectgit clone https://github.com/openwrt/openwrt
圖2
第3步
如圖3所示,進入openwrt目錄下,執(zhí)行./scripts/feeds update -a命令下載feeds.conf/feeds.conf.default中的所有最新包;
圖3
第4步
如圖4所示,執(zhí)行./scripts/feeds install -a命令將所有獲得的包的符號鏈接安裝到fees包中;
圖4
第5步
如圖5所示,執(zhí)行make menuconfig打開配置界面;
圖5
第6步
如圖5所示,配置完之后右鍵移動到Save使用回車保存,如圖6和圖7所示,接下來選擇Ok回車即可;
圖6
圖7
第7步
如圖8所示提前使用make download下載編譯所需的依賴包,或者直接make也可以;
圖8
第8步
如圖9所示使用make編譯即可,如圖10編譯完成。如果要查看詳細編譯信息,使用make V=99編譯;
圖9
圖10
第9步
如圖11所示,在/bin/targets/ramips/mt76x8目錄下有固件生成,使用openwrt-ramips-mt76x8-widora_neo-32m-squashfs-sysupgrade.bin拿去刷機即可!刷機教程看我第一篇文章。
圖11
參考鏈接:
GitHub - openwrt/openwrt: This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
原文鏈接:https://blog.csdn.net/m0_55584063/article/details/143952584