commit:     f2fbce01954b6fadc3d18d7e9dba2934bdf204aa
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 23 14:14:54 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 23 14:14:54 2017 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=f2fbce01

grs/Kernel.p: add arch on the kernel directive line

 grs/Interpret.py | 2 +-
 grs/Kernel.py    | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/grs/Interpret.py b/grs/Interpret.py
index ab16cfa..45eca5f 100644
--- a/grs/Interpret.py
+++ b/grs/Interpret.py
@@ -227,7 +227,7 @@ class Interpret(Daemon):
                 elif verb == 'pivot':
                     semantic_action(_line, objs, 1, _pc.pivot, objs[0], _md)
                 elif verb == 'kernel':
-                    semantic_action(_line, objs, 0, _ke.kernel)
+                    semantic_action(_line, objs, 0, _ke.kernel, objs[0])
                 elif verb == 'tarit':
                     # 'tarit' can either be just a verb, or a 'verb obj' pair.
                     if len(objs):

diff --git a/grs/Kernel.py b/grs/Kernel.py
index cd2ecee..fe411bd 100644
--- a/grs/Kernel.py
+++ b/grs/Kernel.py
@@ -69,7 +69,7 @@ class Kernel():
         return (gentoo_version, pkg_name, has_modules)
 
 
-    def kernel(self):
+    def kernel(self, arch='x86_64'):
         """ This emerges the kernel sources to a directory outside of the
             fledgeling system's portage configroot, builds and installs it
             to yet another external directory, bundles the kernel and modules
@@ -108,8 +108,8 @@ class Kernel():
 
         # Build and install the image outside the portage configroot so
         # we can both rsync it in *and* tarball it for downloads via grsup.
-        # TODO: add more options (eg splash and firmware), which can be
-        # specified vi the kernel line in the build script.
+        # NOTE: more options (eg splash and firmware), can be specified
+        # via the kernel line in the build script.
         cmd = 'genkernel '
         cmd += '--logfile=/dev/null '
         cmd += '--no-save-config '
@@ -122,6 +122,7 @@ class Kernel():
         cmd += '--bootdir=%s '       % boot_dir
         cmd += '--module-prefix=%s ' % image_dir
         cmd += '--modprobedir=%s '   % modprobe_dir
+        cmd += '--arch-override=%s ' % arch
         if has_modules:
             cmd += 'all'
         else:

Reply via email to