openwrt MT7620 固件编译记录
-
下载,安装相关软件
git clone git@github.com:openwrt-mirror/openwrt.git
sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip zip unrar p7zip p7zip-rar p7zip-full sharutils subversion libncurses5-dev ncurses-term zlib1g-dev gawk git-core libssl-dev
-
下载完了之后更新
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
-
配置参考
https://blog.csdn.net/weiniliuchao/article/details/49277023
-
遇到问题
install -d -m0755 /bin
install -m0755 src/po2lmo /bin/po2lmo
install: cannot create regular file '/bin/po2lmo': Permission denied
make[3]: *** [/home/oepnwrt/openwrt/staging_dir/target-mipsel_24kec+dsp_musl-1.1.14/host/stamp/.luci-base_installed] Error 1
make[3]: Leaving directory `/home/oepnwrt/openwrt/feeds/luci/modules/luci-base'
make[2]: *** [package/feeds/luci/luci-base/host/compile] Error 2
// 解决
cd /home/oepnwrt/openwrt/feeds/luci/modules/luci-base
修改 这个 Makefile
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
$(INSTALL_BIN) src/po2lmo $(STAGING_DIR_HOST)/bin/po2lmo
$(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/LuaSrcDiet.lua $(STAGING_DIR_HOST)/bin/LuaSrcDiet
endef
Makefile:49: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
这个是因为刚才复制的时候把 table 复制成 空格了, 将 8 个空格换成 table 就行
-
编译
make -j8 V=s
// V=s 是指打印编译信息
Read The Fucking Source Code