mac 下 编译 x86 LEDE

 
brew unlink awk
brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
brew install gcc@11


hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
hdiutil attach OpenWrt.sparseimage
cd /Volumes/OpenWrt


echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
source ~/.bashrc
bash
source ~/.bashrc



git clone https://github.com/coolsnowwolf/lede
cd lede

echo "src-git PWpackages https://github.com/xiaorouji/openwrt-passwall.git;packages" >> feeds.conf.default
echo "src-git PWluci https://github.com/xiaorouji/openwrt-passwall.git;luci" >> feeds.conf.default

./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install luci-app-passwall

make menuconfig

make download -j4
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
make download -j4
find dl -size -1024c -exec ls -l {} \;
make package/feeds/luci/luci-base/compile -j4
make V=s -j4

如果遇到出错,就换用1个核心编译

make V=s -j1

如果遇到 在 .config 文件中修改:

CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT="/usr/bin/go"

如果遇到