faq-troubleshooting.txt 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. Frequently Asked Questions & Troubleshooting
  4. ============================================
  5. [[faq-boot-hang-after-starting]]
  6. The boot hangs after 'Starting network...'
  7. ------------------------------------------
  8. If the boot process seems to hang after the following messages
  9. (messages not necessarily exactly similar, depending on the list of
  10. packages selected):
  11. ------------------------
  12. Freeing init memory: 3972K
  13. Initializing random number generator... done.
  14. Starting network...
  15. Starting dropbear sshd: generating rsa key... generating dsa key... OK
  16. ------------------------
  17. then it means that your system is running, but didn't start a shell on
  18. the serial console. In order to have the system start a shell on your
  19. serial console, you have to go into the Buildroot configuration, +System
  20. configuration+, and modify +Port to run a getty (login prompt) on+ and
  21. +Baudrate to use+ as appropriate. This will automatically tune the
  22. +/etc/inittab+ file of the generated system so that a shell starts on
  23. the correct serial port.
  24. [[faq-no-compiler-on-target]]
  25. Why is there no compiler on the target?
  26. ---------------------------------------
  27. It has been decided that support for the _native compiler on the
  28. target_ would be stopped from the Buildroot-2012.11 release because:
  29. * this feature was neither maintained nor tested, and often broken;
  30. * this feature was only available for Buildroot toolchains;
  31. * Buildroot mostly targets _small_ or _very small_ target hardware
  32. with limited resource onboard (CPU, ram, mass-storage), for which
  33. compiling does not make much sense.
  34. If you need a compiler on your target anyway, then Buildroot is not
  35. suitable for your purpose. In such case, you need a _real
  36. distribution_ and you should opt for something like:
  37. * http://www.openembedded.org[openembedded]
  38. * https://www.yoctoproject.org[yocto]
  39. * http://www.emdebian.org[emdebian]
  40. * https://fedoraproject.org/wiki/Architectures[Fedora]
  41. * http://en.opensuse.org/Portal:ARM[openSUSE ARM]
  42. * http://archlinuxarm.org[Arch Linux ARM]
  43. * ...
  44. [[faq-no-dev-files-on-target]]
  45. Why are there no development files on the target?
  46. -------------------------------------------------
  47. Since there is no compiler available on the target (see
  48. xref:faq-no-compiler-on-target[]), it does not make sense to waste
  49. space with headers or static libraries.
  50. Therefore, those files are always removed from the target since the
  51. Buildroot-2012.11 release.
  52. [[faq-no-doc-on-target]]
  53. Why is there no documentation on the target?
  54. --------------------------------------------
  55. Because Buildroot mostly targets _small_ or _very small_ target
  56. hardware with limited resource onboard (CPU, ram, mass-storage), it
  57. does not make sense to waste space with the documentation data.
  58. If you need documentation data on your target anyway, then Buildroot
  59. is not suitable for your purpose, and you should look for a _real
  60. distribution_ (see: xref:faq-no-compiler-on-target[]).
  61. [[faq-why-not-visible-package]]
  62. Why are some packages not visible in the Buildroot config menu?
  63. ---------------------------------------------------------------
  64. If a package exists in the Buildroot tree and does not appear in the
  65. config menu, this most likely means that some of the package's
  66. dependencies are not met.
  67. To know more about the dependencies of a package, search for the
  68. package symbol in the config menu (see xref:make-tips[]).
  69. Then, you may have to recursively enable several options (which
  70. correspond to the unmet dependencies) to finally be able to select
  71. the package.
  72. If the package is not visible due to some unmet toolchain options,
  73. then you should certainly run a full rebuild (see xref:make-tips[] for
  74. more explanations).
  75. [[faq-why-not-use-target-as-chroot]]
  76. Why not use the target directory as a chroot directory?
  77. -------------------------------------------------------
  78. There are plenty of reasons to *not* use the target directory a chroot
  79. one, among these:
  80. * file ownerships, modes and permissions are not correctly set in the
  81. target directory;
  82. * device nodes are not created in the target directory.
  83. For these reasons, commands run through chroot, using the target
  84. directory as the new root, will most likely fail.
  85. If you want to run the target filesystem inside a chroot, or as an NFS
  86. root, then use the tarball image generated in +images/+ and extract it
  87. as root.
  88. [[faq-no-binary-packages]]
  89. Why doesn't Buildroot generate binary packages (.deb, .ipkg...)?
  90. ----------------------------------------------------------------
  91. One feature that is often discussed on the Buildroot list is the
  92. the general topic of "package management". To summarize, the idea
  93. would be to add some tracking of which Buildroot package installs
  94. what files, with the goals of:
  95. * being able to remove files installed by a package when this package
  96. gets unselected from the menuconfig;
  97. * being able to generate binary packages (ipk or other format) that
  98. can be installed on the target without re-generating a new root
  99. filesystem image.
  100. In general, most people think it is easy to do: just track which package
  101. installed what and remove it when the package is unselected. However, it
  102. is much more complicated than that:
  103. * It is not only about the +target/+ directory, but also the sysroot in
  104. +host/usr/<tuple>/sysroot+ and the +host/+ directory itself. All files
  105. installed in those directories by various packages must be tracked.
  106. * When a package is unselected from the configuration, it is not
  107. sufficient to remove just the files it installed. One must also
  108. remove all its reverse dependencies (i.e packages relying on it)
  109. and rebuild all those packages. For example, package A depends
  110. optionally on the OpenSSL library. Both are selected, and Buildroot
  111. is built. Package A is built with crypto support using OpenSSL.
  112. Later on, OpenSSL gets unselected from the configuration, but
  113. package A remains (since OpenSSL is an optional dependency, this
  114. is possible.) If only OpenSSL files are removed, then the files
  115. installed by package A are broken: they use a library that is no
  116. longer present on the target. Although this is technically doable,
  117. it adds a lot of complexity to Buildroot, which goes against the
  118. simplicity we try to stick to.
  119. * In addition to the previous problem, there is the case where the
  120. optional dependency is not even known to Buildroot. For example,
  121. package A in version 1.0 never used OpenSSL, but in version 2.0 it
  122. automatically uses OpenSSL if available. If the Buildroot .mk file
  123. hasn't been updated to take this into account, then package A will
  124. not be part of the reverse dependencies of OpenSSL and will not be
  125. removed and rebuilt when OpenSSL is removed. For sure, the .mk file
  126. of package A should be fixed to mention this optional dependency,
  127. but in the mean time, you can have non-reproducible behaviors.
  128. * The request is to also allow changes in the menuconfig to be
  129. applied on the output directory without having to rebuild
  130. everything from scratch. However, this is very difficult to achieve
  131. in a reliable way: what happens when the suboptions of a package
  132. are changed (we would have to detect this, and rebuild the package
  133. from scratch and potentially all its reverse dependencies), what
  134. happens if toolchain options are changed, etc. At the moment, what
  135. Buildroot does is clear and simple so its behaviour is very
  136. reliable and it is easy to support users. If configuration changes
  137. done in menuconfig are applied after the next make, then it has to
  138. work correctly and properly in all situations, and not have some
  139. bizarre corner cases. The risk is to get bug reports like "I have
  140. enabled package A, B and C, then ran make, then disabled package
  141. C and enabled package D and ran make, then re-enabled package C
  142. and enabled package E and then there is a build failure". Or worse
  143. "I did some configuration, then built, then did some changes,
  144. built, some more changes, built, some more changes, built, and now
  145. it fails, but I don't remember all the changes I did and in which
  146. order". This will be impossible to support.
  147. For all these reasons, the conclusion is that adding tracking of
  148. installed files to remove them when the package is unselected, or to
  149. generate a repository of binary packages, is something that is very
  150. hard to achieve reliably and will add a lot of complexity.
  151. On this matter, the Buildroot developers make this position statement:
  152. * Buildroot strives to make it easy to generate a root filesystem (hence
  153. the name, by the way.) That is what we want to make Buildroot good at:
  154. building root filesystems.
  155. * Buildroot is not meant to be a distribution (or rather, a distribution
  156. generator.) It is the opinion of most Buildroot developers that this
  157. is not a goal we should pursue. We believe that there are other tools
  158. better suited to generate a distro than Buildroot is. For example,
  159. http://openembedded.org/[Open Embedded], or https://openwrt.org/[openWRT],
  160. are such tools.
  161. * We prefer to push Buildroot in a direction that makes it easy (or even
  162. easier) to generate complete root filesystems. This is what makes
  163. Buildroot stands out in the crowd (among other things, of course!)
  164. * We believe that for most embedded Linux systems, binary packages are
  165. not necessary, and potentially harmful. When binary packages are
  166. used, it means that the system can be partially upgraded, which
  167. creates an enormous number of possible combinations of package
  168. versions that should be tested before doing the upgrade on the
  169. embedded device. On the other hand, by doing complete system
  170. upgrades by upgrading the entire root filesystem image at once,
  171. the image deployed to the embedded system is guaranteed to really
  172. be the one that has been tested and validated.