customize-rootfs.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // -*- mode:doc -*- ;
  2. [[rootfs-custom]]
  3. Customizing the generated target filesystem
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. There are a few ways to customize the resulting target filesystem:
  6. * Customize the target filesystem directly and rebuild the image. The
  7. target filesystem is available under +output/target/+. You can
  8. simply make your changes here and run make afterwards - this will
  9. rebuild the target filesystem image. This method allows you to do
  10. anything to the target filesystem, but if you decide to completely
  11. rebuild your toolchain and tools, these changes will be lost.
  12. * Create your own 'target skeleton'. You can start with the default
  13. skeleton available under +system/skeleton+ and then customize it to
  14. suit your needs. The +BR2_ROOTFS_SKELETON_CUSTOM+ and
  15. +BR2_ROOTFS_SKELETON_CUSTOM_PATH+ will allow you to specify the
  16. location of your custom skeleton. At build time, the contents of the
  17. skeleton are copied to output/target before any package
  18. installation.
  19. * In the Buildroot configuration, you can specify the path to a
  20. post-build script, that gets called 'after' Buildroot builds all the
  21. selected software, but 'before' the rootfs packages are
  22. assembled. The destination root filesystem folder is given as the
  23. first argument to this script, and this script can then be used to
  24. copy programs, static data or any other needed file to your target
  25. filesystem. You should, however, use this feature with care.
  26. Whenever you find that a certain package generates wrong or unneeded
  27. files, you should fix that package rather than work around it with a
  28. post-build cleanup script.
  29. * A special package, 'customize', stored in +package/customize+ can be
  30. used. You can put all the files that you want to see in the final
  31. target root filesystem in +package/customize/source+, and then
  32. enable this special package in the configuration system.