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 是指打印編譯信息