use mic in bootstrap without copy host mic to bootstrap.
by default, copy host mic to bootstrap and use it
Change-Id: I3f4f03cc666df05ad4a7c393b771a2487350b9fe
Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>
cachedir= /var/tmp/mic/cache
outdir= ./mic-output
runtime=bootstrap
+#use_mic_in_bootstrap = yes
pkgmgr = auto
if args.runtime:\r
configmgr.set_runtime(args.runtime)\r
\r
+ if args.use_mic_in_bootstrap:\r
+ configmgr.create['use_mic_in_bootstrap'] = args.use_mic_in_bootstrap\r
+\r
if args.pack_to is not None:\r
configmgr.create['pack_to'] = args.pack_to\r
\r
"strict_mode": False,
"run_script": None,
"tpk_install": None,
+ "use_mic_in_bootstrap": False,
},
'chroot': {
"saveto": None,
packages = packages.split()
self.bootstrap['packages'] = packages
+ if type(self.create['use_mic_in_bootstrap']) != 'bool':
+ use_mic_in_bootstrap = str(self.create['use_mic_in_bootstrap'])
+ if use_mic_in_bootstrap.lower() in ('on', 'yes', 'true', '1'):
+ self.create['use_mic_in_bootstrap'] = True
+ else:
+ self.create['use_mic_in_bootstrap'] = False
+
def _parse_kickstart(self, ksconf=None):
if not ksconf:
return
rootdir = os.path.join(rootdir, "bootstrap")
bsenv.dirsetup(rootdir)
- sync_mic(rootdir, plugin=cropts['plugin_dir'])
+ if cropts['use_mic_in_bootstrap']:
+ msger.info("No copy host mic")
+ else:
+ msger.info("Copy host mic to bootstrap")
+ sync_mic(rootdir, plugin=cropts['plugin_dir'])
#FIXME: sync the ks file to bootstrap
if "/" == os.path.dirname(os.path.abspath(configmgr._ksconf)):
dest='strict_mode', default=False,
help='Abort creation of image, if there are some errors'
' during rpm installation. ')
+ parent_parser.add_argument('--use-mic-in-bootstrap', action='store_true',
+ dest='use_mic_in_bootstrap', default=False,
+ help='This option works in bootstrap runtime mode,'
+ ' Use mic in bootstrap to create image.'
+ ' By default, copy host mic to bootstrap and use it.')
parent_parser.add_argument('-d', '--debug', action='store_true',
help='debug output')