build-buildroot: add the --no-overlay option

Initial motivation: modprobe. More to come most likely.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-06 00:00:00 +00:00
parent 72167f9f68
commit 753cbe68ff
4 changed files with 23 additions and 12 deletions

View File

@@ -46,6 +46,15 @@ Pass multiple times to use multiple fragment files.
help='''\
Don't build the all target which normally gets build by default.
That target builds the root filesystem and all its dependencies.
'''
)
parser.add_argument(
'--no-overlay', default=self._defaults['no_all'], action='store_true',
help='''\
Don't add our overlay which contains all files we build without going through Buildroot.
This prevents us from overwriting certain Buildroot files. Remember however that you must
still rebuild the Buildroot package that provides those files to actually put the Buildroot
files on the root filesystem.
'''
)
parser.add_argument(
@@ -106,9 +115,6 @@ usually extra Buildroot targets.
'BR2_PACKAGE_OVERRIDE_FILE="{}"'.format(
self._path_relative_to_buildroot(os.path.join(common.root_dir, 'buildroot_override'))
),
'BR2_ROOTFS_OVERLAY="{}"'.format(
self._path_relative_to_buildroot(common.out_rootfs_overlay_dir),
),
'BR2_ROOTFS_POST_BUILD_SCRIPT="{}"'.format(
self._path_relative_to_buildroot(os.path.join(common.root_dir, 'rootfs-post-build-script'))
),
@@ -116,6 +122,10 @@ usually extra Buildroot targets.
self._path_relative_to_buildroot(os.path.join(common.root_dir, 'user_table'))
),
])
if not args.no_overlay:
configs.append('BR2_ROOTFS_OVERLAY="{}"'.format(
self._path_relative_to_buildroot(common.out_rootfs_overlay_dir)
))
config_fragments = [
os.path.join(common.root_dir, 'buildroot_config', 'default')
] + args.config_fragment