From fb6fa99c0da96a45d458b2ffa0b9b2fe8890ac36 Mon Sep 17 00:00:00 2001 From: VG Date: Sun, 6 Nov 2016 17:32:20 +0100 Subject: move to a subdir since this repo will have other debootstrap scripts --- extract-kernel.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 extract-kernel.py (limited to 'extract-kernel.py') diff --git a/extract-kernel.py b/extract-kernel.py deleted file mode 100755 index 71dde88..0000000 --- a/extract-kernel.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/python3 - - -import os -import shutil -import subprocess -import sys - -def get_vmlinuz_path(): - return os.path.join('mnt', os.readlink('mnt/vmlinuz').lstrip('/')) - -def get_initrd_path(): - return os.path.join('mnt', os.readlink('mnt/initrd.img').lstrip('/')) - -if not os.path.exists('mnt'): - os.mkdir('mnt') - -subprocess.run([ - 'guestmount', - '-a', 'unstable-armhf.qcow2', - '-m', '/dev/sda1', - '--ro', - 'mnt']) -print(get_vmlinuz_path()) -print(get_initrd_path()) - -shutil.copyfile(get_vmlinuz_path(), 'vmlinuz', follow_symlinks=True) -shutil.copyfile(get_initrd_path(), 'initrd.img', follow_symlinks=True) - -subprocess.run(['fusermount', '-u', 'mnt']) -- cgit v1.2.3