Add --nomacboot option
Needed for systems without hfsplus support.
This commit is contained in:
parent
d96ae3245c
commit
6f3d8b55f3
@ -11,7 +11,9 @@ install boot/grub/splash.xpm.gz ${EFIBOOTDIR}
|
|||||||
|
|
||||||
## actually make the EFI images
|
## actually make the EFI images
|
||||||
${make_efiboot("images/efiboot.img")}
|
${make_efiboot("images/efiboot.img")}
|
||||||
${make_efiboot("images/macboot.img", imgtype="apple")}
|
%if domacboot:
|
||||||
|
${make_efiboot("images/macboot.img", imgtype="apple")}
|
||||||
|
%endif
|
||||||
|
|
||||||
## This is kinda gross, but then... so's EFI.
|
## This is kinda gross, but then... so's EFI.
|
||||||
<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">
|
<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">
|
||||||
|
@ -53,7 +53,10 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
<%
|
<%
|
||||||
efiarch = 'X64' if basearch=='x86_64' else 'IA32'
|
efiarch = 'X64' if basearch=='x86_64' else 'IA32'
|
||||||
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
|
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
|
||||||
for img in ("images/efiboot.img", "images/macboot.img"):
|
images = ["images/efiboot.img"]
|
||||||
|
if domacboot:
|
||||||
|
images.append("images/macboot.img")
|
||||||
|
for img in images:
|
||||||
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
|
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
|
||||||
efigraft += " {0}={1}/{0}".format(img,outroot)
|
efigraft += " {0}={1}/{0}".format(img,outroot)
|
||||||
efihybrid="--uefi --mac"
|
efihybrid="--uefi --mac"
|
||||||
|
@ -130,7 +130,7 @@ class Lorax(BaseLoraxClass):
|
|||||||
|
|
||||||
def run(self, ybo, product, version, release, variant="", bugurl="",
|
def run(self, ybo, product, version, release, variant="", bugurl="",
|
||||||
isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None,
|
isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None,
|
||||||
remove_temp=False):
|
domacboot=True, remove_temp=False):
|
||||||
|
|
||||||
assert self._configured
|
assert self._configured
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class Lorax(BaseLoraxClass):
|
|||||||
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
|
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
|
||||||
inroot=installroot, outroot=self.outputdir,
|
inroot=installroot, outroot=self.outputdir,
|
||||||
runtime=runtime, isolabel=isolabel,
|
runtime=runtime, isolabel=isolabel,
|
||||||
templatedir=templatedir)
|
domacboot=domacboot, templatedir=templatedir)
|
||||||
|
|
||||||
logger.info("rebuilding initramfs images")
|
logger.info("rebuilding initramfs images")
|
||||||
dracut_args=["--xz", "--add", "anaconda", "--omit", "plymouth",
|
dracut_args=["--xz", "--add", "anaconda", "--omit", "plymouth",
|
||||||
|
@ -151,14 +151,14 @@ class RuntimeBuilder(object):
|
|||||||
class TreeBuilder(object):
|
class TreeBuilder(object):
|
||||||
'''Builds the arch-specific boot images.
|
'''Builds the arch-specific boot images.
|
||||||
inroot should be the installtree root (the newly-built runtime dir)'''
|
inroot should be the installtree root (the newly-built runtime dir)'''
|
||||||
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, templatedir=None):
|
def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, templatedir=None):
|
||||||
# NOTE: if you pass an arg named "runtime" to a mako template it'll
|
# NOTE: if you pass an arg named "runtime" to a mako template it'll
|
||||||
# clobber some mako internal variables - hence "runtime_img".
|
# clobber some mako internal variables - hence "runtime_img".
|
||||||
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
|
||||||
runtime_base=basename(runtime),
|
runtime_base=basename(runtime),
|
||||||
inroot=inroot, outroot=outroot,
|
inroot=inroot, outroot=outroot,
|
||||||
basearch=arch.basearch, libdir=arch.libdir,
|
basearch=arch.basearch, libdir=arch.libdir,
|
||||||
isolabel=isolabel, udev=udev_escape)
|
isolabel=isolabel, udev=udev_escape, domacboot=domacboot)
|
||||||
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
|
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
|
||||||
self._runner.defaults = self.vars
|
self._runner.defaults = self.vars
|
||||||
self.templatedir = templatedir
|
self.templatedir = templatedir
|
||||||
|
@ -74,6 +74,8 @@ def main(args):
|
|||||||
help="build architecture", metavar="STRING")
|
help="build architecture", metavar="STRING")
|
||||||
optional.add_option("--volid", default=None,
|
optional.add_option("--volid", default=None,
|
||||||
help="volume id", metavar="STRING")
|
help="volume id", metavar="STRING")
|
||||||
|
optional.add_option("--nomacboot", help="",
|
||||||
|
action="store_false", default=True, dest="domacboot")
|
||||||
|
|
||||||
# add the option groups to the parser
|
# add the option groups to the parser
|
||||||
parser.add_option_group(required)
|
parser.add_option_group(required)
|
||||||
@ -126,7 +128,7 @@ def main(args):
|
|||||||
lorax.run(yb, opts.product, opts.version, opts.release,
|
lorax.run(yb, opts.product, opts.version, opts.release,
|
||||||
opts.variant, opts.bugurl, opts.isfinal,
|
opts.variant, opts.bugurl, opts.isfinal,
|
||||||
workdir=tempdir, outputdir=outputdir, buildarch=opts.buildarch,
|
workdir=tempdir, outputdir=outputdir, buildarch=opts.buildarch,
|
||||||
volid=opts.volid, remove_temp=True)
|
volid=opts.volid, domacboot=opts.domacboot, remove_temp=True)
|
||||||
|
|
||||||
|
|
||||||
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
||||||
|
Loading…
Reference in New Issue
Block a user