From 3a36a1b434463496d43ccfd96a12046392b0d906 Mon Sep 17 00:00:00 2001 From: Les Aker Date: Tue, 9 Sep 2014 08:31:20 -0400 Subject: [PATCH] add support for -r none --- README.md | 6 ++++-- roller.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f670ca3..5abaa2b 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,10 @@ Roller provides a pythonic Kernel object for configuring and compiling kernels, * -n, --new-revision: set new revision to create * "next" will automatically increment to the next revision * Omit this to build directly from the selected config without modification - * -c, --config: kernel version to get the initial configuration from. (defaults to current running version) - * -r, --config-revision: kernel revision to use for initial configuration. (defaults to "current", which uses /proc/config.gz) + * -c, --config: kernel version to get the initial configuration from (defaults to current running version) + * -r, --config-revision: kernel revision to use for initial configuration + * "current", which is the default, will use /proc/config.gz + * "none" will base configuration on `make allnoconfig` rather than using current or a saved config file * -s, --skip-install: don't install kernel to /boot * -p, --patch: Open a shell before configuration to allow patching the kernel tree * -b, --build-dir: Set path to use for downloading/extracting kernel (defaults to /tmp) diff --git a/roller.py b/roller.py index 7900680..5f484d4 100755 --- a/roller.py +++ b/roller.py @@ -325,7 +325,11 @@ def configure(self, merge_method='oldconfig'): subprocess.call(['make', 'mrproper'], stdout=devnull()) except: raise EnvironmentError('Failed to clean your kernel tree') - if self.config_revision == 'current': + if self.config_revision == 'none': + self.log('Using allnoconfig for initial configuration') + subprocess.call(['make', 'allnoconfig']) + return + elif self.config_revision == 'current': self.log('Inserting config from current system kernel') with gzip.open('/proc/config.gz') as old_config: with open('.config', 'wb') as new_config: