|
|
|
@ -28,65 +28,69 @@ from cl_lang import lang
|
|
|
|
|
lang().setLanguage(sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
DESCRIPTION = _("The Calculate Linux kernel builder")
|
|
|
|
|
CMD_OPTIONS = [{'shortOption':"c",
|
|
|
|
|
CMD_OPTIONS = [{'shortOption':"o",
|
|
|
|
|
'longOption':"use-own-config",
|
|
|
|
|
'help':_("use config from kernel directory")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"c",
|
|
|
|
|
'longOption':"kernel-config",
|
|
|
|
|
'optVal':"FILE",
|
|
|
|
|
'help':_("kernel configuration file to use for compilation")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"dmraid",
|
|
|
|
|
'help':_("include DMRAID support")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"e",
|
|
|
|
|
'longOption':"extraversion",
|
|
|
|
|
'optVal':"VER",
|
|
|
|
|
'help':_("specify extraversion for kernel")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"k",
|
|
|
|
|
'longOption':"kerneldir",
|
|
|
|
|
'optVal':"DIR",
|
|
|
|
|
'help':_("location of the kernel sources")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"m",
|
|
|
|
|
'longOption':"menuconfig",
|
|
|
|
|
'help':_("run menuconfig after oldconfig")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"dmraid",
|
|
|
|
|
'help':_("include DMRAID support")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"lvm",
|
|
|
|
|
'help':_("include LVM support")
|
|
|
|
|
},
|
|
|
|
|
{ 'longOption':"mdadm",
|
|
|
|
|
'help':_("copy /etc/mdadm.conf to initramfs")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"m",
|
|
|
|
|
'longOption':"menuconfig",
|
|
|
|
|
'help':_("run menuconfig after oldconfig")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"mrproper",
|
|
|
|
|
'help':_("run make mrproper before compilation")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"no-clean",
|
|
|
|
|
'help':_("do not run make clean before compilation")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"o",
|
|
|
|
|
'longOption':"use-own-config",
|
|
|
|
|
'help':_("use config from kernel directory")
|
|
|
|
|
},
|
|
|
|
|
{'shortOption':"q",
|
|
|
|
|
'help':_("do not display kernel compilation process")
|
|
|
|
|
{'shortOption':"e",
|
|
|
|
|
'longOption':"extraversion",
|
|
|
|
|
'optVal':"VER",
|
|
|
|
|
'help':_("specify extraversion for kernel")
|
|
|
|
|
},
|
|
|
|
|
{'longOption':"initrd",
|
|
|
|
|
'help':_("perform current initramfs optimization")},
|
|
|
|
|
{'longOption':"ebuild",
|
|
|
|
|
'help':
|
|
|
|
|
'help':
|
|
|
|
|
_("build kernel by ebuild phase (need ebuild enviroment)")},
|
|
|
|
|
{'longOption':"set"},
|
|
|
|
|
{'longOption':"initrd",
|
|
|
|
|
'help':_("perform current initramfs optimization")},
|
|
|
|
|
{'longOption':"symlink",
|
|
|
|
|
'help':
|
|
|
|
|
_("set uid symlinks for current kernel in boot directory")}
|
|
|
|
|
]
|
|
|
|
|
_("set uid symlinks for current kernel in boot directory")},
|
|
|
|
|
{'shortOption':"q",
|
|
|
|
|
'help':_("do not display kernel compilation process")
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class kernel_cmd(share_cmd):
|
|
|
|
|
"""Class for work with cl_install by console"""
|
|
|
|
|
def __init__(self):
|
|
|
|
|
setpos = \
|
|
|
|
|
filter(lambda x:x[1].get('longOption')=="set",
|
|
|
|
|
enumerate(CMD_OPTIONS))[0][0]
|
|
|
|
|
CMD_OPTIONS[setpos] = opt.variable_set[0]
|
|
|
|
|
self.optobj = opt(package=__app__,
|
|
|
|
|
version=__version__,
|
|
|
|
|
description=DESCRIPTION,
|
|
|
|
|
option_list= CMD_OPTIONS + opt.variable_control +
|
|
|
|
|
option_list= CMD_OPTIONS + opt.variable_view +
|
|
|
|
|
opt.color_control,
|
|
|
|
|
check_values=self.checkOpts)
|
|
|
|
|
self.logicObj = cl_kernel()
|
|
|
|
|