Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 321520 Details for
Bug 431214
dev-util/catalyst: add qemu support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
qemu patch v2
catalyst-qemu.diff (text/plain), 5.98 KB, created by
Cédric Caron
on 2012-08-16 21:52:46 UTC
(
hide
)
Description:
qemu patch v2
Filename:
MIME Type:
Creator:
Cédric Caron
Created:
2012-08-16 21:52:46 UTC
Size:
5.98 KB
patch
obsolete
>diff --git a/catalyst b/catalyst >index 7114097..f26132f 100755 >--- a/catalyst >+++ b/catalyst >@@ -131,6 +131,10 @@ def parse_config(myconfig): > print "Icecream compiler cluster support enabled." > conf_values["ICECREAM"]="1" > >+ if "qemu" in string.split(conf_values["options"]): >+ print "Qemu support enabled." >+ conf_values["QEMU"]="1" >+ > if "kerncache" in string.split(conf_values["options"]): > print "Kernel cache support enabled." > conf_values["KERNCACHE"]="1" >diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py >index 39653a4..1375945 100644 >--- a/modules/catalyst_support.py >+++ b/modules/catalyst_support.py >@@ -207,6 +207,7 @@ valid_config_file_values.append("KERNCACHE") > valid_config_file_values.append("CCACHE") > valid_config_file_values.append("DISTCC") > valid_config_file_values.append("ICECREAM") >+valid_config_file_values.append("QEMU") > valid_config_file_values.append("ENVSCRIPT") > valid_config_file_values.append("AUTORESUME") > valid_config_file_values.append("FETCH") >diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py >index c4ef239..4526120 100644 >--- a/modules/generic_stage_target.py >+++ b/modules/generic_stage_target.py >@@ -138,6 +138,7 @@ class generic_stage_target(generic_target): > self.set_dest_path() > self.set_stage_path() > self.set_target_path() >+ self.set_crossroot_path() > > self.set_controller_file() > self.set_action_sequence() >@@ -439,6 +440,10 @@ class generic_stage_target(generic_target): > if not os.path.exists(self.settings["autoresume_path"]): > os.makedirs(self.settings["autoresume_path"],0755) > >+ def set_crossroot_path(self): >+ self.settings["crossroot_path"]=normpath(self.settings["storedir"]+\ >+ "/crossroot/") >+ > def set_controller_file(self): > self.settings["controller_file"]=normpath(self.settings["sharedir"]+\ > "/targets/"+self.settings["target"]+"/"+self.settings["target"]+\ >@@ -458,7 +463,7 @@ class generic_stage_target(generic_target): > """ Default action sequence for run method """ > self.settings["action_sequence"]=["unpack","unpack_snapshot",\ > "config_profile_link","setup_confdir","portage_overlay",\ >- "base_dirs","bind","chroot_setup","setup_environment",\ >+ "base_dirs","qemu_setup","bind","chroot_setup","setup_environment",\ > "run_local","preclean","unbind","clean"] > # if self.settings.has_key("TARBALL") or \ > # not self.settings.has_key("FETCH"): >@@ -1034,6 +1039,34 @@ class generic_stage_target(generic_target): > "Could not backup /etc/portage/make.conf",env=self.env) > touch(self.settings["autoresume_path"]+"chroot_setup") > >+ def qemu_setup(self): >+ if not self.settings.has_key("QEMU"): >+ return >+ >+ if self.settings.has_key("AUTORESUME") \ >+ and os.path.exists(self.settings["autoresume_path"]+"qemu_setup"): >+ print "Resume point detected, skipping qemu_setup operation..." >+ else: >+ print "Setting up qemu..." >+ >+ if self.settings["crosscompile"]: >+ cmd("mkdir -p "+self.settings["crossroot_path"]) >+ cmd('USE="static static-libs -acl -nls -idn -ssl" emerge --oneshot --noreplace --quiet --root='+self.settings["crossroot_path"]+" app-arch/tar app-arch/bzip2 app-arch/gzip sys-apps/findutils sys-apps/sed sys-devel/make",\ >+ "Could not build static binaries",env=self.env) >+ >+ cmd("cp /usr/bin/qemu-static-"+self.settings["hostarch"]+" "+self.settings["chroot_path"]+\ >+ "usr/bin",\ >+ "Could not copy qemu-static-"+self.settings["hostarch"],env=self.env) >+ cmd("cp "+self.settings["sharedir"]+"/targets/support/qemu-binfmt "+self.settings["chroot_path"]+\ >+ "usr/bin/qemu-static-"+self.settings["hostarch"]+"-binfmt",\ >+ "Could not copy qemu-binfmt",env=self.env) >+ >+ touch(self.settings["autoresume_path"]+"qemu_setup") >+ >+ self.mounts.append("/crossroot") >+ self.mountmap["/crossroot"]=\ >+ self.settings["crossroot_path"] >+ > def fsscript(self): > if self.settings.has_key("AUTORESUME") \ > and os.path.exists(self.settings["autoresume_path"]+"fsscript"): >@@ -1090,6 +1123,15 @@ class generic_stage_target(generic_target): > "clean script failed.",env=self.env) > touch(self.settings["autoresume_path"]+"clean") > >+ """ Clean up qemu """ >+ if self.settings.has_key("QEMU") and self.settings["crosscompile"]: >+ cmd("rm -f "+self.settings["stage_path"]+"/usr/bin/qemu-static-"+self.settings["hostarch"],\ >+ "Could not remove qemu-static-"+self.settings["hostarch"],env=self.env) >+ cmd("rm -f "+self.settings["stage_path"]+"/usr/bin/qemu-static-"+self.settings["hostarch"]+"-binfmt",\ >+ "Could not remove qemu-static-"+self.settings["hostarch"]+"-binfmt",env=self.env) >+ cmd("rmdir "+self.settings["stage_path"]+"/crossroot",\ >+ "Could not remove crossroot directory",env=self.env) >+ > def empty(self): > if self.settings.has_key("AUTORESUME") \ > and os.path.exists(self.settings["autoresume_path"]+"empty"): >diff --git a/modules/stage4_target.py b/modules/stage4_target.py >index 591f9b2..4bc2805 100644 >--- a/modules/stage4_target.py >+++ b/modules/stage4_target.py >@@ -26,7 +26,7 @@ class stage4_target(generic_stage_target): > def set_action_sequence(self): > self.settings["action_sequence"]=["unpack","unpack_snapshot",\ > "config_profile_link","setup_confdir","portage_overlay",\ >- "bind","chroot_setup","setup_environment","build_packages",\ >+ "qemu_setup","bind","chroot_setup","setup_environment","build_packages",\ > "build_kernel","bootloader","root_overlay","fsscript",\ > "preclean","rcupdate","unmerge","unbind","remove","empty",\ > "clean"]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 431214
:
321204
|
321206
| 321520