Building the entire toolchain for openwrt

I’m trying to build openwrt and I’m following the procedure written on readme.md.

I started compiling and it seems the build script is building the entire toolchain?

Why is this necessary?

1 Like

Good spot! By default OpenWrt builds the toolchain.

The morse_setup script will allow you to easily download a toolchain with the -E parameter. e.g, try running.

./scripts/morse_setup.sh -i -b ekh01-03 -E
1 Like

Shouldn’t downloading the toolchain the standard practice?

Also, build environment setup already requires build-essential clang flex g++ gawk gcc-multilib git gettext libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev swig.

Why do we need extra toolchains? If we’re downloading the required toolchains anyway, it seems we only need wget or curl.

In part, we’re just inheriting from OpenWrt’s build system here, so we don’t want to reinvent more than is necessary. And, well, they build their toolchain by default :slight_smile:

The build environment setup is some basic necessary stuff for the host system sufficient to build a toolchain which can target aarch64/mips/x86/etc. So it’s not completely wasting your time! EDIT: ah, ok, the point is that if you have a toolchain via -E you shouldn’t need build-essential and friends? Hmm, perhaps. Try it out! I suspect you still need a local ‘make’ though.

But yes, we control the morse_setup.sh script, so we could make ‘-E’ the default behaviour so users don’t have to wait around so much.

1 Like