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:
- Run
./scripts/feeds update -a
and then./scripts/feeds install -a
- 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
- 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) runmake menuconfig
and apply your changes
3.2 Optional: If you already compiled something and want to start with a clean compile just usemake clean
- Run
make download
- Run
make -j<cpu_cores>
e.gmake -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).