New Xiaomi router AC2100

How to generate a proper config for compiling your own images:

At first read Quick Image Building Guide
Dependencies mentiond in the official repository:
gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev, libc headers.

  • clone your favorite repository with git clone <URL> e.g. git clone https://github.com/phs07/openwrt.git
  • checkout to the branch you want to use for the compilation e.g. git checkout openwrt-19.07.3_xiaomi_router_ac2100

Now follow this procedure:

  1. Run ./scripts/feeds update -a and then ./scripts/feeds install -a
  2. Optional: If you want to use a provided config template copy everything form the config.buildinfo into a new .config file in your openwrt sourcecode folder
  3. Run make defconfig
    3.1 Optional: If you want to make some changes or include other packages (e.g. luci-ssl for a Web UI) run make menuconfig and apply your changes
    3.2 Optional: If you already compiled something and want to start with a clean compile just use make clean
  4. Run make download
  5. Run make -j<cpu_cores> e.g make -j4

The config.buildinfo is automatically generated after every compilation and is located in the device's target bin folder.

Advantage over using .config files directly: Much cleaner build process and it will also work after version changes e.g. from 19.07 to master (this wouldn't work with full config files).

2 Likes