copy-overlay 782 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. import distutils.dir_util
  3. import os
  4. import shutil
  5. import common
  6. class CopyOverlayComponent(self.Component):
  7. def do_build(self, args):
  8. distutils.dir_util.copy_tree(
  9. kwargs['rootfs_overlay_dir'],
  10. kwargs['out_rootfs_overlay_dir'],
  11. update=1,
  12. )
  13. def get_argparse_args(self):
  14. return {
  15. 'description': '''\
  16. Copy our git tracked rootfs_overlay to the final generated rootfs_overlay
  17. that also contains generated build outputs. This has the following advantages
  18. over just adding that to BR2_ROOTFS_OVERLAY:
  19. - also works for non Buildroot root filesystesms
  20. - places everything in one place for a nice 9P mount
  21. ''',
  22. }
  23. if __name__ == '__main__':
  24. CopyOverlayComponent().build()