toolchains.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!--#include file="header.html" -->
  2. <h3>Toolchains</h3>
  3. To use uClibc, you need to have a toolchain. A toolchain consists
  4. of <a href="http://sources.redhat.com/binutils/">GNU binutils</a>,
  5. <a href="http://gcc.gnu.org/">the gcc compiler</a>, and uClibc, all
  6. built to produce binaries for your target system linked with uClibc.
  7. You can build your own native uClibc toolchain using the
  8. <a href="/cgi-bin/viewcvs.cgi/trunk/buildroot/">uClibc buildroot system</a>.
  9. <p>
  10. To build your own uClibc toolchain, follow the following simple
  11. steps:
  12. <ul>
  13. <li> Point your web browser <a href="/cgi-bin/viewcvs.cgi/trunk/buildroot/">here</a>,
  14. <li> Click on "Download tarball"
  15. <li> Unpack the tarball on your Linux system somewhere
  16. <li> Edit the Makefile as needed if you wish to change anything.
  17. <li> run 'unset CC'. Then run 'unset CXX'. Some Linux systems
  18. (i.e. Gentoo) set variables such as 'CC' in the system environment
  19. which really messes things up when cross compiling.
  20. <li> run 'make menuconfig'
  21. <li> Select the things you want to build. If you <em>only</em> want a
  22. toolchain, leave everything except the toolchain disabled.
  23. <li> save your buildroot configuration.
  24. <li> run 'make'
  25. <li> go eat a nice wholesome sandwich, drink a pop, call a friend,
  26. play a video game, and generally find something to do. While you
  27. are waiting, buildroot will download all the needed source code and
  28. then compile things up for you.
  29. <li> You should now have a shiny new toolchain, and maybe even a shiny
  30. new uClibc based root filesystem or development system, depending on
  31. the options you selected.
  32. </ul>
  33. <p>
  34. If you want to be <em>really</em> lazy and start using uClibc right away
  35. without needing to compile your own toolchain or anything, you can grab a
  36. pre-compiled uClibc development system. These are currently available for
  37. <a href="http://www.uclibc.org/downloads/root_fs_arm.ext2.bz2">arm</a>,
  38. <a href="http://www.uclibc.org/downloads/root_fs_armeb.ext2.bz2">armeb</a>,
  39. <a href="http://www.uclibc.org/downloads/root_fs_i386.ext2.bz2">i386</a>,
  40. <a href="http://www.uclibc.org/downloads/root_fs_mips.ext2.bz2">mips</a>,
  41. <a href="http://www.uclibc.org/downloads/root_fs_mipsel.ext2.bz2">mipsel</a>,
  42. <a href="http://www.uclibc.org/downloads/root_fs_powerpc.ext2.bz2">powerpc</a>, and
  43. <a href="http://www.uclibc.org/downloads/root_fs_sh4.ext2.bz2">sh4</a>.
  44. <p>
  45. These are bzip2 compressed ext2 filesystems containing all the development
  46. software you need to build your own uClibc applications, including: bash, awk,
  47. make, gcc, g++, autoconf, automake, ncurses, zlib, openssl, openssh, gdb,
  48. strace, busybox, GNU coreutils, GNU tar, GNU grep, etc.
  49. <p>
  50. Each of these uClibc development systems was created using
  51. <a href="/cgi-bin/viewcvs.cgi/trunk/buildroot/">buildroot</a>, specifically,
  52. <a href="http://www.uclibc.org/downloads/buildroot.tar.bz2">buildroot.tar.bz2</a>
  53. along with <a href="http://www.uclibc.org/downloads/buildroot-sources">these sources</a>.
  54. <p>
  55. These development systems should provide pretty much everything you need to get
  56. started building your own applications with uClibc. Once you download one of
  57. these systems, you can then boot into it, loop mount it, dd it to a spare drive
  58. and use a tool such as resize2fs to make it fill a partition... Whatever works
  59. best for you.
  60. <p>
  61. The quickest way to get started using a root_fs image (using the i386
  62. platform as an example) is:
  63. <ul>
  64. <li>Download root_fs_i386.bz2 from uclibc.org</li>
  65. <li>bunzip2 root_fs_i386.bz2</li>
  66. <li>mkdir root_fs</li>
  67. <li>su root</li>
  68. <li>mount -o loop root_fs_i386 root_fs</li>
  69. <li>chroot root_fs /bin/su -</li>
  70. </ul>
  71. Type "exit" to end the chroot session and return to your host system.
  72. <p>
  73. <!--#include file="footer.html" -->