Compile packages from sources

Andrey Zabolotnyi edited this page Dec 7, 2018 · 26 revisions

Make sure that there are at least 7 GB of free disk space. You need approx. 32 GB of free space to compile the whole repository.

Install Dependencies

Entware uses OpenWrt Buildroot, please install its dependencies first. Also, there a some package-specific dependencies:

Package Dependencies
nethack flex

On Debian 9 Stretch or newer you should install openssl 1.0.x first:

sudo apt remove libssl-dev
sudo apt install libssl1.0-dev

Clone repo

git clone https://github.com/Entware/Entware.git
cd Entware

Update package feeds

make package/symlinks

Pick up one of supported platform

...by copying buildroot config file from configs folder. Example below uses MIPSEL platform config:

cp configs/mipsel-3.4.config .config

Rebuild repo

make 

Please refer to OpenWrt buildroot documentation for more details.

Tips

You can build one package (squid in example) with all its dependencies by:

make package/squid/compile

If something goes wrong, turn on verbose mode by adding V=s:

make package/tmux/compile V=s

You can speed up compilation on multiprocessor systems by running several build threads simultaneously by adding -jN:

make -j4 package/compile

You can run make in several steps

make tools/install
make toolchain/install
make target/compile
make package/compile

This can also be used in case you don't need to build all packages. Replace the last command with the command to build the package you need. You have to modify it a little. Say, you're getting a error during compilation of a package:

...
make[3] -C feeds/rtndev/telegram-cli host-compile
make[3] -C feeds/rtndev/totd compile
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on

You can follow the advice and run 'make -j1 V=s' to see what happened. But you'll have to wait a lot until the build system gets through all the already built packages. It's much more convenient to proceed directly to the package that failed:

$ make package/feeds/rtndev/totd/compile -j1 V=s

Sometimes you have to omit the package section, e.g. 'make[3] -C feeds/packages/utils/ttyd compile' -> 'make package/feeds/packages/ttyd/compile'. You can run 'make printdb >log.txt' and then search the exact target name of the package you're interested in.

Error in tools or toolchain

In case there is an error in the tools/install or toolchain/install phase, and you change your configuration, remember to run a make dirclean instead of make clean. To clean only one specific part you can run a make toolchain/uClibc/headers/clean for example.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.