FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 08-25-2011, 01:29 PM
Matthew Garrett
 
Default pungi: Add support for generating EFI-bootable USB images

Right now our hybrid images aren't bootable via EFI when written
directly to a USB stick. This patch adds the necessary argument to the
isohybrid call, and in addition will perform appropriate setup to make
the image bootable on older EFI Macs if the tree has a macboot image.
This requires syslinux 4.02-5 or later.

diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py
index e183b9c..ac2f7f0 100644
--- a/src/pypungi/__init__.py
+++ b/src/pypungi/__init__.py
@@ -1002,6 +1002,9 @@ class Pungi(pypungi.PungiBase):
efibootargs = ['-eltorito-alt-boot', '-e', 'images/efiboot.img',
'-no-emul-boot']

+ macbootargs = ['-eltorito-alt-boot', '-e', 'images/macboot.img',
+ '-no-emul-boot']
+
ia64bootargs = ['-b', 'images/boot.img', '-no-emul-boot']

ppcbootargs = ['-part', '-hfs', '-r', '-l', '-sysid', 'PPC', '-no-desktop', '-allow-multidot', '-chrp-boot']
@@ -1016,6 +1019,8 @@ class Pungi(pypungi.PungiBase):

sparcbootargs = ['-G', '/boot/isofs.b', '-B', '...', '-s', '/boot/silo.conf', '-sparc-label', '"sparc"']

+ isohybrid = ['/usr/bin/isohybrid']
+
# Check the size of the tree
# This size checking method may be bunk, accepting patches...
if not self.config.get('pungi', 'arch') == 'source':
@@ -1044,6 +1049,10 @@ class Pungi(pypungi.PungiBase):
extraargs.extend(x86bootargs)
if self.config.get('pungi', 'arch') == 'x86_64':
extraargs.extend(efibootargs)
+ isohybrid.append('-u')
+ if os.path.exists(os.path.join(self.topdir, 'images', 'macboot.img')):
+ extraargs.extend(macbootargs)
+ isohybrid.append('-m')
elif self.config.get('pungi', 'arch') == 'ia64':
extraargs.extend(ia64bootargs)
elif self.config.get('pungi', 'arch') == 'ppc':
@@ -1061,7 +1070,9 @@ class Pungi(pypungi.PungiBase):
self.config.get('pungi', 'version'), self.config.get('pungi', 'arch')))

extraargs.extend(['-o', isofile])
-
+
+ isohybrid.append(isofile)
+
if not self.config.get('pungi', 'arch') == 'source':
extraargs.append(self.topdir)
else:
@@ -1072,7 +1083,7 @@ class Pungi(pypungi.PungiBase):

# Run isohybrid on the iso
if os.path.exists("/usr/bin/isohybrid"):
- subprocess.call(["/usr/bin/isohybrid", isofile])
+ pypungi.util._doRunCommand(isohybrid, self.logger)

# implant md5 for mediacheck on all but source arches
if not self.config.get('pungi', 'arch') == 'source':


--
Matthew Garrett | mjg59@srcf.ucam.org
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-25-2011, 06:03 PM
Jesse Keating
 
Default pungi: Add support for generating EFI-bootable USB images

On Aug 25, 2011, at 6:29 AM, Matthew Garrett wrote:
>
> Right now our hybrid images aren't bootable via EFI when written
> directly to a USB stick. This patch adds the necessary argument to the
> isohybrid call, and in addition will perform appropriate setup to make
> the image bootable on older EFI Macs if the tree has a macboot image.
> This requires syslinux 4.02-5 or later.

This looks fine to me. I'll push it upstream and ask dgilmore to do a build when convenient.

- jlk

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 07:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org