tools/ktool
2022-12-21 02:46:51 +01:00

28 lines
611 B
Python
Executable file

#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import tool
import progver
from parseconfig import Config
config = Config(__file__, progver.VERSION, [
['mksrc', 'Make kernel source'],
['prepare', 'Prepare kernel source'],
['emergesrc', 'Build kernel source package'],
['build', 'Build kernel & modules'],
['initrd', 'Build initrd'],
['mkucodes', 'Build ucodes'],
['install', 'Install kernel']
])
config.parse(sys.argv)
rc = None
if config.cmd == 'mksrc':
rc = tool.make_source(config)
elif config.cmd == 'prepare':
rc = tool.prepare_source(config)
if rc:
sys.exit(rc)