- 不要用 root 用户 git 和编译!!!
- 国内用户编译前最好准备好梯子
-
首先装好 Ubuntu 64bit,推荐 Ubuntu 18 LTS x64 / Mint 19.1
-
命令行输入
sudo apt-get update
,然后输入sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 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 libncurses5:i386 libelf1:i386 lib32z1 lib32stdc++6 gtk-doc-tools intltool binutils-dev cmake lzma liblzma-dev lzma-dev uuid-dev liblzo2-dev xsltproc dos2unix libstdc++5 docbook-xsl-* sharutils autogen shtool gengetopt libltdl-dev libtool-bin
-
使用
git clone https://github.com/SWRT-dev/asuswrt-bcm
命令下载好源代码 -
使用
git clone https://github.com/SWRT-dev/bcmhnd-toolchains
命令下载toolchains -
分别执行
cd bcmhnd-toolchains
sudo mkdir -p /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25 /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25 /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.24-binutils-2.25 /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-aarch64-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1 /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.24-binutils-2.25 /opt/toolchains/
sudo ln -sf $(pwd)crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1 /opt/toolchains/
sudo ln -sf $(pwd)/crosstools-gcc-5.3-linux-4.1-uclibc-1.0.12-glibc-2.24-binutils-2.25 /opt/toolchains/
sudo mkdir -p /projects/
sudo mkdir -p /projects/bca/
sudo mkdir -p /projects/bca/tools/
sudo mkdir -p /projects/bca/tools/linux/
sudo mkdir -p /projects/bca/tools/linux/bin/
sudo ln -sf $(pwd)/hndtools-armeabi-2013.11 /projects/bca/tools/linux/
sudo ln -sf $(pwd)/fwtag.ini /projects/bca/tools/linux/bin/
sudo ln -sf /projects/bca/ /projects/hnd/
chsh -s /bin/bash
sudo ln -sf /bin/bash /bin/sh
-
编译固件
cd asuswrt-bcm/release/src-rt-6.x.4708
make rt-ac68u
cd asuswrt-bcm/release/src-rt-7.14.114.x/src
make rt-ac88u
make rt-ac3100
make rt-ac5300
cd asuswrt-bcm/release/src-rt-5.02hnd
make rt-ac86u
make gt-ac2900
cd asuswrt-bcm/release/src-rt-5.02axhnd.675x
make rt-ax95q
make rt-axe95q
make rt-ax56u
make rt-ax58u
make rt-ax82u
make tuf-ax3000
make tuf-ax5400
cd asuswrt-bcm/release/src-rt-5.02p1axhnd.675x
make rt-ax68u
make rt-ax86u
cd asuswrt-bcm/release/src-rt-5.02axhnd
make rt-ax88u
make gt-ax11000
编译完成后输出固件路径:
asuswrt-bcm/release/src-rt-6.x.4708/image
asuswrt-bcm/release/src-rt-7.14.114.x/src/image
asuswrt-bcm/release/src-rt-5.02hnd/image
asuswrt-bcm/release/src-rt-5.02axhnd.675x/image
asuswrt-bcm/release/src-rt-5.02p1axhnd.675x/image
asuswrt-bcm/release/src-rt-5.02axhnd/image
如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。