customize-rootfs.txt 1.8 KB

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