Compiling OpenWrt Firmware for Xiaomi Mi Router 4A Gigabit Edition on Ubuntu

Install Dependencies

sudo apt-get update
sudo apt-get -y 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

Clone the Source Code

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

Prepare and Compile

cd lede

./scripts/feeds update -a

./scripts/feeds install -a

make menuconfig

make -j4 download V=s

make -j4 V=s

Additional Information

For custom online firmware builds or to download historical images for the Xiaomi Mi Router 4A Gigabit Edition