Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304845 Details for
Bug 445642
add ia64 support for livecd-tools
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
add ia64 support for livecd-tools
livecd-tools-ia64.patch (text/plain), 5.12 KB, created by
Zhan, Yi
on 2008-05-08 09:04:19 UTC
(
hide
)
Description:
add ia64 support for livecd-tools
Filename:
MIME Type:
Creator:
Zhan, Yi
Created:
2008-05-08 09:04:19 UTC
Size:
5.12 KB
patch
obsolete
>--- imgcreate/live.py.orig 2008-05-07 06:18:51.000000000 +0800 >+++ imgcreate/live.py 2008-05-07 06:16:46.000000000 +0800 >@@ -677,6 +677,141 @@ class ppc64LiveImageCreator(ppcLiveImage > return ["kernel.ppc"] + \ > ppcLiveImageCreator._get_excluded_packages(self) > >+class ia64LiveImageCreator(LiveImageCreatorBase): >+ """ImageCreator for ia64 machines""" >+ def _get_mkisofs_options(self, isodir): >+ return [ "-b", "boot.img", >+ "-no-emul-boot" ] >+ >+ def _get_required_packages(self): >+ return ["elilo"] + LiveImageCreatorBase._get_required_packages(self) >+ >+ def _get_excluded_packages(self): >+ # kind of hacky, but exclude memtest86+ on ia64 so it can stay in cfg >+ # FIXME: we still have issue to let memtest86+ stay in cfg, >+ # since the package is totally unvailable on ia64 >+ return ["memtest86+"] + LiveImageCreatorBase._get_excluded_packages(self) >+ >+ def _get_kernel_versions(self): >+ def get_version(header): >+ version = None >+ for f in header['filenames']: >+ if f.startswith('/boot/efi/EFI/redhat/vmlinuz-'): >+ version = f[29:] >+ return version >+ >+ ts = rpm.TransactionSet(self._instroot) >+ >+ ret = {} >+ for header in ts.dbMatch('provides', 'kernel'): >+ version = get_version(header) >+ if version is None: >+ continue >+ >+ name = header['name'] >+ if not name in ret: >+ ret[name] = [version] >+ elif not version in ret[name]: >+ ret[name].append(version) >+ >+ return ret >+ >+ def __copy_kernel_and_initramfs(self, destdir, version): >+ bootdir = self._instroot + "/boot/efi/EFI/redhat" >+ >+ shutil.copyfile(bootdir + "/vmlinuz-" + version, >+ destdir + "/vmlinuz") >+ >+ shutil.copyfile(bootdir + "/initrd-" + version + ".img", >+ destdir + "/initrd.img") >+ >+ return True >+ >+ def __copy_background(self, isodest): >+ background_path = self._instroot + \ >+ "/usr/lib/anaconda-runtime/syslinux-vesa-splash.jpg" >+ >+ if not os.path.exists(background_path): >+ return False >+ >+ shutil.copyfile(background_path, isodest) >+ >+ return True >+ >+ def __get_elilo_config (self, **args): >+ print "args =", args >+ return """ >+prompt >+timeout=50 >+relocatable >+ >+image=vmlinuz >+ label=linux >+ read-only >+ initrd=initrd.img >+ append="root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s" >+""" % args >+ >+ def __write_elilo_config (self, destdir, **args): >+ cfg = self.__get_elilo_config(**args) >+ cfgf = open(destdir + "/elilo.conf", "w") >+ cfgf.write(cfg) >+ cfgf.close() >+ >+ def __copy_elilo (self, destdir): >+ bootdir = self._instroot + "/boot/efi/EFI/redhat" >+ >+ shutil.copyfile(bootdir + "/elilo.efi", >+ destdir + "/elilo.efi") >+ >+ shutil.copyfile(bootdir + "/elilo.efi", >+ destdir + "/bootia64.efi") >+ >+ def __generate_bootimg (self, isodir): >+ """generate the boot.img""" >+ bootimg = isodir + "/boot.img" >+ bootimg_size = "40000" # use an arbitrary but large enough size for now >+ >+ args = [ "/sbin/mkdosfs", >+ "-n", "LIVECD", >+ "-C", bootimg, >+ bootimg_size ] >+ >+ ret = subprocess.call(args) >+ if ret != 0: >+ raise CreatorError("'%s' exited with error (%d)" % >+ (string.join(args, " "), ret)) >+ >+ return bootimg >+ >+ def _configure_bootloader(self, isodir): >+ """configure the boot loader""" >+ bootimg = self.__generate_bootimg(isodir) >+ >+ bootimgloop = LoopbackMount(bootimg, self._mkdtemp()) >+ try: >+ bootimgloop.mount() >+ except MountError, e: >+ raise CreatorError("Failed to loopback mount '%s' : %s" % >+ (bootimg, e)) >+ >+ kernel = self._get_kernel_versions().values()[0][0] >+ >+ self.__copy_kernel_and_initramfs(bootimgloop.mountdir, kernel) >+ self.__copy_background(bootimgloop.mountdir + "/splash.jpg") >+ self.__copy_elilo(bootimgloop.mountdir) >+ >+ kernel_options = self._get_kernel_options() >+ print "kernel_options =", kernel_options >+ self.__write_elilo_config(bootimgloop.mountdir, >+ fslabel = self.fslabel, >+ liveargs = kernel_options, >+ extra = "") >+ >+ shutil.copytree(bootimgloop.mountdir, bootimgloop.mountdir + "/EFI/boot") >+ >+ bootimgloop.cleanup() >+ > arch = rpmUtils.arch.getBaseArch() > if arch in ("i386", "x86_64"): > LiveImageCreator = x86LiveImageCreator >@@ -684,5 +819,7 @@ elif arch in ("ppc",): > LiveImageCreator = ppcLiveImageCreator > elif arch in ("ppc64",): > LiveImageCreator = ppc64LiveImageCreator >+elif arch in ("ia64",): >+ LiveImageCreator = ia64LiveImageCreator > else: > raise CreatorError("Architecture not supported!")
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 445642
: 304845