External Toolchain

Using an external toolchain reduce build time when starting with a cleaned-up source tree. Useful when using an automated build system like Hudson/Tinderbox.

Just do the same as everytime you (re)compile OpenWrt. Checkout openwrt repo, set your options in .config and build the whole thing. Only difference you have to select Package the OpenWrt-based Toolchain in the main view of make menuconfig

Alternatively you can download precompiled toolchain from openwrt download page by searching for the correct toolchain for your target. For example if you need precompiled toolchain for openwrt 22.03.0 for target ipq806x/generic this is the link to use.

  1. Checkout OpenWrt into directory openwrt
  2. Follow normal instruction for openwrt prereq
  3. Use the utility script to setup your buildroot
       ./scripts/ext-toolchain.sh \
                --toolchain TOOLCHAIN_FILE_LOCATION \
                --config TARGET_NAME (example ipq806x/generic)
      
  4. Use your buildroot like a normal one. Edit your config with make menuconfig and run make to compile your image

If you want to update a .config to use an external toolchain you can use the --overwrite-config. For example:

   ./scripts/ext-toolchain.sh \
            --toolchain TOOLCHAIN_FILE_LOCATION \
            --overwrite-config
            --config TARGET_NAME (example ipq806x/generic)
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2022/09/10 12:53
  • by ansuel