def post_init(self, custom_args): """ zipl post initialization method :param dict custom_args: Contains zipl config arguments .. code:: python {'targetbase': 'device_name'} """ self.custom_args = custom_args arch = Defaults.get_platform_name() if 's390' in arch: self.arch = arch else: raise KiwiBootLoaderZiplPlatformError( 'host architecture %s not supported for zipl setup' % arch ) if not custom_args or 'targetbase' not in custom_args: raise KiwiBootLoaderZiplSetupError( 'targetbase device name is required for zipl setup' ) self.bootpath = '.' self.timeout = self.get_boot_timeout_seconds() self.cmdline = self.get_boot_cmdline() self.cmdline_failsafe = ' '.join( [self.cmdline, Defaults.get_failsafe_kernel_options()] ) self.target_blocksize = \ self.xml_state.build_type.get_target_blocksize() if not self.target_blocksize: self.target_blocksize = Defaults.get_s390_disk_block_size() self.target_type = \ self.xml_state.get_build_type_bootloader_targettype() if not self.target_type: self.target_type = Defaults.get_s390_disk_type() self.failsafe_boot = self.failsafe_boot_entry_requested() self.target_device = custom_args['targetbase'] self.firmware = FirmWare(self.xml_state) self.target_table_type = self.firmware.get_partition_table_type() self.zipl = BootLoaderTemplateZipl() self.config = None
def setup(self): self.zipl = BootLoaderTemplateZipl()