External Toolchain

Use OpenWrt as External Toolchain

Goal: Reduce build time when starting with a cleaned-up source tree. Useful when using an automated build system like Hudson/Tinderbox.
Requirements:

  • based on Subversion revision 27109
  • two OpenWrt build directories - one which represents the toolchain and another one to build the firmware

Step 1: Build Toolchain

Just do the same as everytime you (re)compile OpenWrt. Checkout svn/git, set your options in .config and build the whole thing. Only difference this time: you call the directory toolchain.

Step 2: Build Firmware

We start at the same point as the toolchain. Checkout OpenWrt into directory openwrt (or anything else than toolchain). Now we need some patching, because at the moment (rev 27109) it is not possible to use OpenWrt for both.

Apply these patches in the order listet here:

After this, copy the .config-file from the toolchain directory into this build directory and do a make menuconfig.

  • [*] Advanced configuration options (for developers)
    • [*] Use external toolchain
      • Target name: arm-openwrt-linux-uclibcgnueabi (in my case, yours may vary)
      • Toolchain prefix: arm-openwrt-linux-uclibcgnueabi- (mind the dash at the end)
      • Toolchain root: /path/to/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi

Save and compile. For my case, the full toolchain build now needs about 1 1/2 hour and the normal firmware takes only 1 hour.

Back to top

doc/howto/external_toolchain.txt · Last modified: 2011/06/04 18:00 by sven