mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
CliFunction
This commit is contained in:
29
copy-overlay
29
copy-overlay
@@ -5,25 +5,26 @@ import os
|
||||
import shutil
|
||||
|
||||
import common
|
||||
from shell_helpers import LF
|
||||
|
||||
class CopyOverlayComponent(common.Component):
|
||||
def do_build(self, args):
|
||||
distutils.dir_util.copy_tree(
|
||||
common.rootfs_overlay_dir,
|
||||
common.out_rootfs_overlay_dir,
|
||||
update=1,
|
||||
)
|
||||
|
||||
def get_argparse_args(self):
|
||||
return {
|
||||
'description': '''\
|
||||
class Main(common.BuildCliFunction):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
description='''\
|
||||
Copy our git tracked rootfs_overlay to the final generated rootfs_overlay
|
||||
that also contains generated build outputs. This has the following advantages
|
||||
over just adding that to BR2_ROOTFS_OVERLAY:
|
||||
- also works for non Buildroot root filesystesms
|
||||
- places everything in one place for a nice 9P mount
|
||||
''',
|
||||
}
|
||||
''')
|
||||
|
||||
def build(self):
|
||||
# TODO: print rsync equivalent, move into shell_helpers.
|
||||
distutils.dir_util.copy_tree(
|
||||
self.env['rootfs_overlay_dir'],
|
||||
self.env['out_rootfs_overlay_dir'],
|
||||
update=1,
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
CopyOverlayComponent().build()
|
||||
Main().cli()
|
||||
|
||||
Reference in New Issue
Block a user