Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:external_toolchain [2022/09/10 12:45] – [Step 1: Build Toolchain] ansueldocs:guide-developer:external_toolchain [2022/09/10 12:53] (current) – [Step 2: Build Firmware] ansuel
Line 15: Line 15:
 ==== Step 2: Build Firmware ==== ==== 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 27109it is not possible to use OpenWrt for both.+  - Checkout OpenWrt into directory **openwrt** 
 +  - Follow normal instruction for openwrt prereq 
 +  - Use the utility script to setup your buildroot <code> 
 +   ./scripts/ext-toolchain.sh \ 
 +            --toolchain TOOLCHAIN_FILE_LOCATION \ 
 +            --config TARGET_NAME (example ipq806x/generic) 
 +  </code> 
 +  - Use your buildroot like a normal one. Edit your config with ''make menuconfig'' and run ''make'' to compile your image
  
-Apply these patches in the order listet here: 
-  * 1. [[https://lists.openwrt.org/pipermail/openwrt-devel/2011-June/011142.html|[PATCH] Resend: base-files: copy uClibc files from ext. toolchain]] ([[http://mcbachmann.de/openwrt/0001-base-files-copy-uClibc-files-from-ext.-toolchain.patch|Direct-Download from mcbachmann.de]], [[https://dev.openwrt.org/ticket/9157|Ticket #9157]]) 
-  * 2. [[https://dev.openwrt.org/ticket/8786|Ticket #8786 - Zlib 1.2.5 compilation is failing]] ([[http://mcbachmann.de/openwrt/0001-rules.mk-always-enable-fhonour-copts.patch|Direct-Download from mcbachmann.de]]) (Patch maybe not compatible with non-OpenWrt-Toolchains as **xMff** pointed out in IRC)  
- 
-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. 
  
 +If you want to update a .config to use an external toolchain you can use the ''--overwrite-config''. For example:
 +<code>
 +   ./scripts/ext-toolchain.sh \
 +            --toolchain TOOLCHAIN_FILE_LOCATION \
 +            --overwrite-config
 +            --config TARGET_NAME (example ipq806x/generic)
 +</code>
  • Last modified: 2022/09/10 12:45
  • by ansuel