customize-kernel-config.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[kernel-custom]]
  4. Customizing the Linux kernel configuration
  5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. The Linux kernel can be configured in the following manners by choosing the
  7. desired "Kernel configuration" option in the OpenADK configuration menu:
  8. * using +make menuconfig+ in conjunction with an OpenADK minimal configuration
  9. * choosing a Linux kernel in-tree default configuration
  10. * providing an extern kernel configuration file
  11. Choosing the first option, OpenADK uses a combination of Linux miniconfig
  12. feature and user defined features to generate a valid Linux configuration for
  13. your target. Some features and drivers are not selectable via
  14. +make menuconfig+, either because your choosen target system does not have
  15. support for it or the option is not implemented, yet. OpenADK uses some kind of
  16. abstraction layer between the real full featured and complicated Linux kernel
  17. configuration and you. It is not perfect and does include a lot of manual work
  18. in +target/linux/config+, but it works in an acceptable way.
  19. If you just want to view the Linux configuration, which is actually
  20. used for your target, you can execute following command:
  21. ---------------
  22. $ make kernelconfig
  23. ---------------
  24. Any changes here will get lost and will not be used to generate a kernel for
  25. your target. If you want to change the existing kernel configuration you need
  26. to follow these steps.
  27. The basic kernel configuration used for your choosen target is concatenated from
  28. following two files:
  29. +target/linux/kernel.config+ and +target/<arch>/kernel/<system>+.
  30. So if you would like to change any basic stuff, just edit the files and recreate your
  31. firmware via:
  32. ---------------
  33. $ make
  34. ---------------
  35. OpenADK automatically recognizes any change and will rebuild the kernel.
  36. The base kernel configuration for your target generated by OpenADK is normally just enough to
  37. bootup the system with support for your board, serial console, network card and boot medium.
  38. (like a hard disk, sd card or flash partition)
  39. If you need to enable some new optional drivers or features, which are not available in
  40. +make menuconfig+, you need to dig in +target/linux/config+. There is the abstraction layer
  41. for the real kernel configuration.
  42. The defconfig option will choose a kernel in-tree default configuration
  43. specific to your target architecture. You won't be able to do further
  44. customization.
  45. Choosing the external configuration option, the OpenADK menu will prompt for
  46. the location of a Linux +.config+ file relative to the OpenADK root directory.
  47. You will be able to alter the configuration by +make kernelconfig+. But the
  48. changes will get lost unless you save your changes by executing
  49. ---------------
  50. $ make savekconfig
  51. ---------------
  52. after completing the Linux kernel configuration dialog. Despite this is the
  53. most flexible way to configure the kernel, keep in mind that you are fully
  54. responsible to enable all kernel features needed to mount your filesystems
  55. and required by your applications.