INSTALL 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. SOFTWARE REQUIREMENTS
  2. Compiling uClibc-ng requires Linux kernel header files. uClibc-ng will
  3. be compiled to match the interfaces available in the provided
  4. version of the Linux kernel headers. Any modern Linux kernel is
  5. supported (3.x/4.x).
  6. Its also helpful to have a working version of GNU binutils, and
  7. GNU gcc -- using excessively old versions of these packages can
  8. cause very strange errors that are difficult to find and fix.
  9. INSTALLING Linux kernel headers:
  10. Extract a Linux kernel source tree and create a populated headers
  11. directory:
  12. make INSTALL_HDR_PATH=/tmp/linux-headers headers_install
  13. CONFIGURING uClibc-ng:
  14. - Users must have a valid configuration file to compile uClibc-ng. Do not
  15. skip this step. New configuration options are added in each
  16. release, and odd configuration options are sometimes removed.
  17. To configure uClibc-ng, you can run:
  18. make menuconfig
  19. or
  20. make config
  21. You need to point in "Target Architecture Features and Options"
  22. the field "Linux kernel header location" to for example
  23. /tmp/linux-headers/include if you installed the headers to
  24. /tmp/linux-headers (Variable name KERNEL_HEADERS in .config).
  25. If you have an existing .config file, you can update this file
  26. using the
  27. make oldconfig
  28. command, which will only ask you about new configuration options.
  29. Available configuration commands are:
  30. "make config" Text based configuration, no menus or colors.
  31. "make menuconfig" Text based color menus, radiolists & dialogs.
  32. "make oldconfig" Default all questions based on the contents of
  33. your existing ./.config file.
  34. "make defconfig" Use defaults for all options.
  35. "make randconfig" Use random values for all options.
  36. "make allyesconfig" Set all values to "yes" for all options.
  37. "make allnoconfig" Set all values to "no" for all options.
  38. COMPILING uClibc-ng:
  39. - uClibc-ng does not have proper dependancy checking so if you
  40. change your uClibc-ng configuration, you must current rebuild the
  41. entire library, by first running
  42. make clean
  43. - Once you have a valid configuration file, just run
  44. make
  45. to compile uClibc-ng. or if you are cross compiling, you would
  46. instead run something like:
  47. make CROSS_COMPILE=arm-linux-
  48. INSTALLING the uClibc-ng development environment:
  49. - As root, if necessary, run something like:
  50. make PREFIX=<some path> install
  51. This will install the uClibc-ng runtime and development system (i.e.
  52. all the header files, libraries, etc) into the directories defined
  53. within your .config file.
  54. USING uClibc-ng:
  55. - To compile programs with uClibc-ng you will need a complete toolchain
  56. (i.e. binutils, gcc and uClibc-ng) that was built expressly for use
  57. with uClibc-ng.
  58. - You have following choices at the moment:
  59. - Use OpenADK from https://openadk.org
  60. - Use Buildroot from http://www.buildroot.org
  61. - Use Crosstool-NG from http://crosstool-ng.org
  62. - Use your own build scripts or environment