Add boot_once support to bootool
From: Ryan Stutsman <stutsman@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>
The INSTALL file from upstream specifies a way to generate a
monolithic script for boottool. Attached is such a monolithic version
of the upstream boottool (client/tools/boottool). This new version
adds support for boot-once in GRUB.
The following patch makes it so that kernels installed by autotest are
boot-once by default.
git-svn-id: http://test.kernel.org/svn/autotest/trunk@568 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index c75947f..2d10651 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -384,14 +384,16 @@
return arch
- def boot(self, args=''):
+ def boot(self, args='', once=True):
""" install and boot this kernel, do not care how
just make it happen.
"""
# Install this kernel.
self.install()
- self.add_to_bootloader(args=args)
+ self.add_to_bootloader(args=args, tag='autotest')
+ if once:
+ self.job.bootloader.boot_once('autotest')
# Boot it.
self.job.reboot()