官术网_书友最值得收藏!

Summary

The toolchain is always your starting point: everything that follows from that is dependent on having a working, reliable toolchain.

Most embedded build environments are based on a cross development toolchain which creates a clear separation between a powerful host computer building the code and a target computer on which it runs. The toolchain itself consists of the GNU binutils, a C compiler from the GNU compiler collection – and quite likely the C++ compiler as well – plus one of the C libraries I have described. Usually the GNU debugger, gdb, will be generated at this point, which I describe in Chapter 12, Debugging with GDB. Also, keep a watch out for the Clang compiler, as it will develop over the next few years.

You may start with nothing but a toolchain – perhaps built using crosstool-NG or downloaded from Linaro – and use it to compile all of the packages that you need on your target, accepting the amount of hard work this will entail. Or, you may obtain the toolchain as part of a distribution which includes a range of packages. A distribution can be generated from source code using a build system such as Buildroot or the Yocto Project, or it can be a binary distribution from a third party, maybe a commercial enterprise like Mentor Graphics or an open source project such as the Denx ELDK. Beware of toolchains or distributions that are offered to you for free as part of a hardware package: they are often poorly configured and not maintained. In any case, you should make the choice according to your situation, and then be consistent in its use throughout the project.

Once you have a toolchain, you can use it to build the other components of your embedded Linux system. In the next chapter, you will learn about the bootloader, which brings your device to life and begins the boot process.

主站蜘蛛池模板: 南溪县| 乌苏市| 会昌县| 依兰县| 巨鹿县| 湖南省| 东丰县| 廉江市| 准格尔旗| 来凤县| 安国市| 定陶县| 十堰市| 什邡市| 宁阳县| 交口县| 资兴市| 汝州市| 绥德县| 庆安县| 奇台县| 万山特区| 玉门市| 台东市| 鸡泽县| 西乌珠穆沁旗| 孝昌县| 会泽县| 灵武市| 安丘市| 大新县| 丰城市| 瑞安市| 东山县| 哈尔滨市| 红桥区| 尼勒克县| 阿合奇县| 和顺县| 垣曲县| 葵青区|