OpenWrt Buildroot – About 編譯過程

OpenWrt Buildroot is a set of Makefiles and patches that allows users to easily generate both a cross-compilation toolchain and a root filesystem for embedded systems. It is a heavily modified Buildroot. The cross-compilation toolchain uses uClibc, a tiny C standard library.

A compilation toolchain is the set of tools used to compile code for your system. It consists of:

Using a PC, the compilation toolchain runs on an x86 processor and generates code for a x86 processor. On most Linux systems, the compilation toolchain uses the GNU libc as C standard library. It is called the "host compilation toolchain", and the machine it is running on is called the "host system". The compilation toolchain is provided by the distribution, and has nothing to do with OpenWrt Buildroot.

Embedded systems use a different processor and require a cross-compilation toolchain - a compilation toolchain that runs on a host system but that generates code for a target system (and target processor's instruction set architecture (ISA)). For example, if your host system uses x86 and your target system uses MIPS32, the regular compilation toolchain of your host runs on x86 and generates code for x86, while the cross-compilation toolchain runs on x86 and generates code for MIPS32.

While it is possible to manually configure and compile your own software, OpenWrt Buildroot automates this process to work on the instruction set architecture of most embedded systems.

While the OpenWrt Buildroot was designed for developers, inexperienced users can also use it to easily build their own custom firmware!

The OpenWrt Makefile has its own syntax, different from the conventional Makefile of Linux make tool. The OpenWrt Makefile defines the meta information of the package, where to download the package, how to compile, where to install the compiled binaries, etc. See How to Build OpenWrt Application Package for more detail.

OpenWrt Buildroot – Build sequence

tools – automake, autoconf, sed, cmake

toolchain/binutils – as, ld, …

toolchain/gcc – gcc, g++, cpp, …

target/linux – kernel modules

package – core and feed packages

target/linux – kernel image

target/linux/image – firmware image file generation

本文章由http://www.wifidog.pro/2015/08/07/openwrt-%E7%BC%96%E8%AF%91%E8%BF%87%E7%A8%8B.htmlhttp://www.wifidog.pro/2015/08/07/openwrt-%E7%BC%96%E8%AF%91%E8%BF%87%E7%A8%8B.html整理編輯,轉載請注明出處

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 我在人海流浪, 風吹向夢中的海港。 你聽浪潮在歌唱, 是有人哭泣的聲響。 我在人海流浪, 尋找北極星的方向。 你看...
    努力找自己的魏天天閱讀 650評論 0 9
  • 請問,怎樣才能夠清新脫俗? 請問,怎樣才能夠見解獨特? 我們本就是俗人,想要不俗哪有那么容易。我們看見別人有很高的...
    希文啊閱讀 502評論 0 1
  • 落葉知秋!
    寒冰皓月沒夜閱讀 178評論 0 0
  • 朦朧初醒,柔聲呼喚。 假寐思索,卻是家母。 腹痛難耐,思念生起。 環顧四周,唯有獨吾。
    林夕焱閱讀 284評論 6 11