scripts/build-kernel: copy the kernel config (back) to /root after building

This commit is contained in:
Albert Hopkins 2016-08-07 12:46:45 +00:00
parent 7a54cf9e1c
commit caba362013
1 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,10 @@ def uninstall_kernel_package():
subprocess.check_call(EMERGE + USEPKG + ['--depclean', '--with-bdeps=n'])
def backup_kernel_config():
shutil.copy('/usr/src/linux/.config', '/root/kernel.config')
def main():
latest_kernel = get_latest_available_kernel()
current_kernel = get_current_kernel()
@ -116,6 +120,7 @@ def main():
build_kernel()
remove_old_kernels()
install_kernel()
backup_kernel_config()
uninstall_kernel_package()