2 commits - docs/livecd-creator.pod imgcreate/creator.py imgcreate/live.py imgcreate/yuminst.py Makefile tools/livecd-creator
by Brian C. Lane
Makefile | 2 +-
docs/livecd-creator.pod | 10 +++++++++-
imgcreate/creator.py | 11 +++++++----
imgcreate/live.py | 6 +++---
imgcreate/yuminst.py | 17 +++++++++++++++--
tools/livecd-creator | 25 ++++++++++++++-----------
6 files changed, 49 insertions(+), 22 deletions(-)
New commits:
commit bc27dbd5b98f8e690b84dc85a40868ae74665915
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Jan 5 10:38:59 2011 -0800
Version 15.3
diff --git a/Makefile b/Makefile
index 5a8a9ea..0340df1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 15.2
+VERSION = 15.3
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit 86653488f170be16b9b9dcb7a11310422b0e80e7
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Jan 5 10:18:47 2011 -0800
Change releasever to a command line option (#667474)
The release version of the running system may not be the release you
want to build the livecd for, or the rpmdb may not be accessable from
the build environment (koji and chroot) so set the value to use for
$releasever in kickstart repo url's by passing --releasever=VER
If $releasever is used and no --releasever is passed it will try to
use the system's version. Under some circumstances (chroot environments
like koji) this isn't possible so an error will be raised.
diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index 553f865..dd70fb9 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -47,6 +47,10 @@ currently requires a custom kernel to produce a functional image. lzo works with
is used, the -comp option is not passed to mksquashfs to allow the use of
older versions of mksquashfs.
+=item --releasever=VER
+
+Set the value to substitute for $releasever in kickstart repo urls
+
=back
=head1 SYSTEM DIRECTORY OPTIONS
@@ -81,12 +85,16 @@ livecd-creator \
=head1 REPO EXTENSIONS
livecd-creator provides for some extensions to the repo commands similar
-to what yum supports. The strings $arch, $basearch and $releveasever
+to what yum supports. The strings $arch, $basearch and $releasever
are replaced with the system arch, basearch and release version respectively.
+When no --releasever is passed it defaults to the current system's version.
The allows the use of repo commands such as the following:
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
+Note that in a chroot environment (like koji) the rpmdb is not available,
+so either don't use $releasever in that case, or pass --releasever=VER
+
=head1 CONTRIBUTORS
David Zeuthen, Jeremy Katz, Douglas McClendon and a team of many other contributors. See the AUTHORS file in the source distribution for the complete list of credits.
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 1f1e5b8..4d0e59d 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -51,7 +51,7 @@ class ImageCreator(object):
"""
- def __init__(self, ks, name):
+ def __init__(self, ks, name, releasever=None):
"""Initialize an ImageCreator instance.
ks -- a pykickstart.KickstartParser instance; this instance will be
@@ -61,6 +61,7 @@ class ImageCreator(object):
name -- a name for the image; used for e.g. image filenames or
filesystem labels
+ releasever -- Value to substitute for $releasever in repo urls
"""
self.ks = ks
"""A pykickstart.KickstartParser instance."""
@@ -68,6 +69,8 @@ class ImageCreator(object):
self.name = name
"""A name for the image."""
+ self.releasever = releasever
+
self.tmpdir = "/var/tmp"
"""The directory in which all temporary files will be created."""
@@ -634,7 +637,7 @@ class ImageCreator(object):
"""
yum_conf = self._mktemp(prefix = "yum.conf-")
- ayum = LiveCDYum()
+ ayum = LiveCDYum(releasever=self.releasever)
ayum.setup(yum_conf, self._instroot)
for repo in kickstart.get_repos(self.ks, repo_urls):
@@ -793,7 +796,7 @@ class LoopImageCreator(ImageCreator):
"""
- def __init__(self, ks, name, fslabel = None):
+ def __init__(self, ks, name, fslabel=None, releasever=None):
"""Initialize a LoopImageCreator instance.
This method takes the same arguments as ImageCreator.__init__() with
@@ -802,7 +805,7 @@ class LoopImageCreator(ImageCreator):
fslabel -- A string used as a label for any filesystems created.
"""
- ImageCreator.__init__(self, ks, name)
+ ImageCreator.__init__(self, ks, name, releasever=releasever)
self.__fslabel = None
self.fslabel = fslabel
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 5e47159..93a4b4e 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -38,13 +38,13 @@ class LiveImageCreatorBase(LoopImageCreator):
"""
- def __init__(self, *args):
+ def __init__(self, ks, name, fslabel=None, releasever=None):
"""Initialise a LiveImageCreator instance.
- This method takes the same arguments as ImageCreator.__init__().
+ This method takes the same arguments as LoopImageCreator.__init__().
"""
- LoopImageCreator.__init__(self, *args)
+ LoopImageCreator.__init__(self, ks, name, fslabel=fslabel, releasever=releasever)
self.compress_type = "gzip"
"""mksquashfs compressor to use."""
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 92b8f45..82a5788 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -45,8 +45,12 @@ class TextProgress(object):
self.emit(logging.INFO, "...OK\n")
class LiveCDYum(yum.YumBase):
- def __init__(self):
+ def __init__(self, releasever=None):
+ """
+ releasever = optional value to use in replacing $releasever in repos
+ """
yum.YumBase.__init__(self)
+ self.releasever = releasever
def doFileLogSetup(self, uid, logfile):
# don't do the file log for the livecd as it can lead to open fds
@@ -138,7 +142,16 @@ class LiveCDYum(yum.YumBase):
# takes a variable and substitutes like yum configs do
option = option.replace("$basearch", rpmUtils.arch.getBaseArch())
option = option.replace("$arch", rpmUtils.arch.getCanonArch())
- option = option.replace("$releasever", yum.config._getsysver("/", "redhat-release"))
+ # If the url includes $releasever substitute user's value or
+ # current system's version.
+ if option.find("$releasever") > -1:
+ if self.releasever:
+ option = option.replace("$releasever", self.releasever)
+ else:
+ try:
+ option = option.replace("$releasever", yum.config._getsysver("/", "redhat-release"))
+ except yum.Errors.YumBaseError:
+ raise CreatorError("$releasever in repo url, but no releasever set")
return option
repo = yum.yumRepo.YumRepository(name)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index afe592f..18c50cd 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -40,16 +40,19 @@ def parse_options(args):
help="Path or url to kickstart config file")
imgopt.add_option("-b", "--base-on", type="string", dest="base_on",
help="Add packages to an existing live CD iso9660 image.")
- imgopt.add_option("-f", "--fslabel", type="string", dest="fs_label",
+ imgopt.add_option("-f", "--fslabel", type="string", dest="fslabel",
help="File system label (default based on config name)")
# Provided for img-create compatibility
- imgopt.add_option("-n", "--name", type="string", dest="fs_label",
+ imgopt.add_option("-n", "--name", type="string", dest="fslabel",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--image-type", type="string", dest="image_type",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--compression-type", type="string", dest="compress_type",
help="Compression type recognized by mksquashfs (default gzip, lzma needs custom kernel, lzo needs a 2.6.36+ kernel)",
default="gzip")
+ imgopt.add_option("", "--releasever", type="string", dest="releasever",
+ default=None,
+ help="Value to substitute for $releasever in kickstart repo urls")
parser.add_option_group(imgopt)
# options related to the config of your system
@@ -97,9 +100,9 @@ def parse_options(args):
if options.base_on and not os.path.isfile(options.base_on):
raise Usage("Image file '%s' does not exist" %(options.base_on,))
if options.image_type == 'livecd':
- if options.fs_label and len(options.fs_label) > imgcreate.FSLABEL_MAXLEN:
+ if options.fslabel and len(options.fslabel) > imgcreate.FSLABEL_MAXLEN:
raise Usage("CD labels are limited to 32 characters")
- if options.fs_label and options.fs_label.find(" ") != -1:
+ if options.fslabel and options.fslabel.find(" ") != -1:
raise Usage("CD labels cannot contain spaces.")
return options
@@ -122,25 +125,25 @@ def main():
print >> sys.stderr, "You must run %s as root" % sys.argv[0]
return 1
- if options.fs_label:
- fs_label = options.fs_label
- name = fs_label
+ if options.fslabel:
+ fslabel = options.fslabel
+ name = fslabel
else:
name = imgcreate.build_name(options.kscfg, options.image_type + "-")
- fs_label = imgcreate.build_name(options.kscfg,
+ fslabel = imgcreate.build_name(options.kscfg,
options.image_type + "-",
maxlen = imgcreate.FSLABEL_MAXLEN,
suffix = "%s-%s" %(os.uname()[4], time.strftime("%Y%m%d%H%M")))
- logging.info("Using label '%s' and name '%s'" % (fs_label, name))
+ logging.info("Using label '%s' and name '%s'" % (fslabel, name))
ks = imgcreate.read_kickstart(options.kscfg)
if options.image_type == 'livecd':
- creator = imgcreate.LiveImageCreator(ks, name, fs_label)
+ creator = imgcreate.LiveImageCreator(ks, name, fslabel=fslabel, releasever=options.releasever)
elif options.image_type == 'image':
- creator = imgcreate.LoopImageCreator(ks, name, fs_label)
+ creator = imgcreate.LoopImageCreator(ks, name, fslabel=fslabel, releasever=options.releasever)
else:
# Cannot happen, we validate this when parsing options.
logging.error(u"'%s' is not a valid image type" % options.image_type)
13 years, 3 months
Automatic root login on livecd
by msacks
Hello List,
I am creating a diagnostic livecd that will run a custom script as
soon as it boots.
I'd like to bypass the login screen altogether and automatically log
in as the root user.
I was considering creating a custom rpm with the following lines in
the following files like so:
/etc/gdm/custom.conf AutomaticLoginEnable=true
AutomaticLogin=root
and my /etc/pam.d/gdm
#auth required pam_succeed_if.so user != root quiet
Is there a better way to achieve this than customizing these config
files and over-writing them in an RPM?
Thanks in advance.
13 years, 3 months
[PATCH 1/2] Change releasever to a command line option (#667474)
by Brian C. Lane
The release version of the running system may not be the release you
want to build the livecd for, or the rpmdb may not be accessable from
the build environment (koji and chroot) so set the value to use for
$releasever in kickstart repo url's by passing --releasever=VER
---
docs/livecd-creator.pod | 6 +++++-
imgcreate/creator.py | 11 +++++++----
imgcreate/live.py | 6 +++---
imgcreate/yuminst.py | 12 ++++++++++--
tools/livecd-creator | 25 ++++++++++++++-----------
5 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index 553f865..76099fe 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -47,6 +47,10 @@ currently requires a custom kernel to produce a functional image. lzo works with
is used, the -comp option is not passed to mksquashfs to allow the use of
older versions of mksquashfs.
+=item --releasever=VER
+
+Set the value to substitute for $releasever in kickstart repo urls
+
=back
=head1 SYSTEM DIRECTORY OPTIONS
@@ -81,7 +85,7 @@ livecd-creator \
=head1 REPO EXTENSIONS
livecd-creator provides for some extensions to the repo commands similar
-to what yum supports. The strings $arch, $basearch and $releveasever
+to what yum supports. The strings $arch, $basearch and $releasever (when --releasever is set)
are replaced with the system arch, basearch and release version respectively.
The allows the use of repo commands such as the following:
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 1f1e5b8..4d0e59d 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -51,7 +51,7 @@ class ImageCreator(object):
"""
- def __init__(self, ks, name):
+ def __init__(self, ks, name, releasever=None):
"""Initialize an ImageCreator instance.
ks -- a pykickstart.KickstartParser instance; this instance will be
@@ -61,6 +61,7 @@ class ImageCreator(object):
name -- a name for the image; used for e.g. image filenames or
filesystem labels
+ releasever -- Value to substitute for $releasever in repo urls
"""
self.ks = ks
"""A pykickstart.KickstartParser instance."""
@@ -68,6 +69,8 @@ class ImageCreator(object):
self.name = name
"""A name for the image."""
+ self.releasever = releasever
+
self.tmpdir = "/var/tmp"
"""The directory in which all temporary files will be created."""
@@ -634,7 +637,7 @@ class ImageCreator(object):
"""
yum_conf = self._mktemp(prefix = "yum.conf-")
- ayum = LiveCDYum()
+ ayum = LiveCDYum(releasever=self.releasever)
ayum.setup(yum_conf, self._instroot)
for repo in kickstart.get_repos(self.ks, repo_urls):
@@ -793,7 +796,7 @@ class LoopImageCreator(ImageCreator):
"""
- def __init__(self, ks, name, fslabel = None):
+ def __init__(self, ks, name, fslabel=None, releasever=None):
"""Initialize a LoopImageCreator instance.
This method takes the same arguments as ImageCreator.__init__() with
@@ -802,7 +805,7 @@ class LoopImageCreator(ImageCreator):
fslabel -- A string used as a label for any filesystems created.
"""
- ImageCreator.__init__(self, ks, name)
+ ImageCreator.__init__(self, ks, name, releasever=releasever)
self.__fslabel = None
self.fslabel = fslabel
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 5e47159..93a4b4e 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -38,13 +38,13 @@ class LiveImageCreatorBase(LoopImageCreator):
"""
- def __init__(self, *args):
+ def __init__(self, ks, name, fslabel=None, releasever=None):
"""Initialise a LiveImageCreator instance.
- This method takes the same arguments as ImageCreator.__init__().
+ This method takes the same arguments as LoopImageCreator.__init__().
"""
- LoopImageCreator.__init__(self, *args)
+ LoopImageCreator.__init__(self, ks, name, fslabel=fslabel, releasever=releasever)
self.compress_type = "gzip"
"""mksquashfs compressor to use."""
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 92b8f45..da035ec 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -45,8 +45,12 @@ class TextProgress(object):
self.emit(logging.INFO, "...OK\n")
class LiveCDYum(yum.YumBase):
- def __init__(self):
+ def __init__(self, releasever=None):
+ """
+ releasever = optional value to use in replacing $releasever in repos
+ """
yum.YumBase.__init__(self)
+ self.releasever = releasever
def doFileLogSetup(self, uid, logfile):
# don't do the file log for the livecd as it can lead to open fds
@@ -138,7 +142,11 @@ class LiveCDYum(yum.YumBase):
# takes a variable and substitutes like yum configs do
option = option.replace("$basearch", rpmUtils.arch.getBaseArch())
option = option.replace("$arch", rpmUtils.arch.getCanonArch())
- option = option.replace("$releasever", yum.config._getsysver("/", "redhat-release"))
+ if option.find("$releasever") > -1:
+ if self.releasever:
+ option = option.replace("$releasever", self.releasever)
+ else:
+ raise CreatorError("$releasever in repo url, but no releasever set")
return option
repo = yum.yumRepo.YumRepository(name)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index afe592f..18c50cd 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -40,16 +40,19 @@ def parse_options(args):
help="Path or url to kickstart config file")
imgopt.add_option("-b", "--base-on", type="string", dest="base_on",
help="Add packages to an existing live CD iso9660 image.")
- imgopt.add_option("-f", "--fslabel", type="string", dest="fs_label",
+ imgopt.add_option("-f", "--fslabel", type="string", dest="fslabel",
help="File system label (default based on config name)")
# Provided for img-create compatibility
- imgopt.add_option("-n", "--name", type="string", dest="fs_label",
+ imgopt.add_option("-n", "--name", type="string", dest="fslabel",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--image-type", type="string", dest="image_type",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--compression-type", type="string", dest="compress_type",
help="Compression type recognized by mksquashfs (default gzip, lzma needs custom kernel, lzo needs a 2.6.36+ kernel)",
default="gzip")
+ imgopt.add_option("", "--releasever", type="string", dest="releasever",
+ default=None,
+ help="Value to substitute for $releasever in kickstart repo urls")
parser.add_option_group(imgopt)
# options related to the config of your system
@@ -97,9 +100,9 @@ def parse_options(args):
if options.base_on and not os.path.isfile(options.base_on):
raise Usage("Image file '%s' does not exist" %(options.base_on,))
if options.image_type == 'livecd':
- if options.fs_label and len(options.fs_label) > imgcreate.FSLABEL_MAXLEN:
+ if options.fslabel and len(options.fslabel) > imgcreate.FSLABEL_MAXLEN:
raise Usage("CD labels are limited to 32 characters")
- if options.fs_label and options.fs_label.find(" ") != -1:
+ if options.fslabel and options.fslabel.find(" ") != -1:
raise Usage("CD labels cannot contain spaces.")
return options
@@ -122,25 +125,25 @@ def main():
print >> sys.stderr, "You must run %s as root" % sys.argv[0]
return 1
- if options.fs_label:
- fs_label = options.fs_label
- name = fs_label
+ if options.fslabel:
+ fslabel = options.fslabel
+ name = fslabel
else:
name = imgcreate.build_name(options.kscfg, options.image_type + "-")
- fs_label = imgcreate.build_name(options.kscfg,
+ fslabel = imgcreate.build_name(options.kscfg,
options.image_type + "-",
maxlen = imgcreate.FSLABEL_MAXLEN,
suffix = "%s-%s" %(os.uname()[4], time.strftime("%Y%m%d%H%M")))
- logging.info("Using label '%s' and name '%s'" % (fs_label, name))
+ logging.info("Using label '%s' and name '%s'" % (fslabel, name))
ks = imgcreate.read_kickstart(options.kscfg)
if options.image_type == 'livecd':
- creator = imgcreate.LiveImageCreator(ks, name, fs_label)
+ creator = imgcreate.LiveImageCreator(ks, name, fslabel=fslabel, releasever=options.releasever)
elif options.image_type == 'image':
- creator = imgcreate.LoopImageCreator(ks, name, fs_label)
+ creator = imgcreate.LoopImageCreator(ks, name, fslabel=fslabel, releasever=options.releasever)
else:
# Cannot happen, we validate this when parsing options.
logging.error(u"'%s' is not a valid image type" % options.image_type)
--
1.7.3.4
13 years, 3 months
$releasever substitution
by Brian C. Lane
dgilmore brought it to my attention that the code to grab releasever for
the substitution doesn't work inside a chroot -- the rpm database isn't
available for reading.
Another issue with it is that by pulling from the host's rpmdb it isn't
very flexible. What if you wanted to pull from a repo with a different
release?
I think the best solution is to add a command-line --releasever=XXX to
livecd-creator, that way it can be easily specified.
Does anyone have a better idea?
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
13 years, 3 months
No root device found, on MS Virtual PC
by Lars Bjørndal
Hello list!
I've built an Fedora 13 livecd. Trying to boot it, it works well from a
real pc. From a virtual machine from MS Virtual PC, however, I get the
error message: "No root device found, sleeping for ever". The graphical
boot is turned on, so there is no other messages on screen.
My questions is:
1. How can I disable graphical boot when building the livecd?
2. Do someone know why the virtual machine cannot boot the livecd, even
though it works on a real pc?
Thanks, and best regards,
Lars
13 years, 3 months
Re: [Fedora-livecd-list] [livecd-tools] * Tue Jan 04 2011 Dennis Gilmore <dennis@ausil.us> - 15.2-2 - patch to drop support of releasever in
by Bruno Wolff III
On Tue, Jan 04, 2011 at 22:47:23 +0000,
Dennis Gilmore <ausil(a)fedoraproject.org> wrote:
> commit 5b013e64189bec33960bca20dfbe61fc4826d168
> Author: Dennis Gilmore <dennis(a)ausil.us>
> Date: Tue Jan 4 16:47:02 2011 -0600
>
> * Tue Jan 04 2011 Dennis Gilmore <dennis(a)ausil.us> - 15.2-2
> - patch to drop support of releasever in urls it destroys image creation in koji
>
Is this a short term change? I was planning to use releasever in kickstart
files once we switched pointing to rawhide to point to f15.
Maybe this can be fixed on the koji side?
13 years, 3 months
auto-biarch (x86_64 + i686) LiveDVD patch + ISO
by Jan Kratochvil
Hi,
finally created a LiveDVD ISO automatically booting x86_64 OS on x86_64
(and i686 otherwise). Regular users will not notice there exists any new arch
while they will benefit from the full performance of their PC:
http://people.redhat.com/jkratoch/x86bilive-2009062000.tar.gz (71KB)
It uses live_dir=LiveOS-x86_64 vs. live_dir=LiveOS-i686 to boot the image.
The syslinux patch provides "default-{x86_64,i386}" keywords in isolinux.cfg.
livecd-iso-to-disk is not patched/compatible with such image.
livecd-creator should create such ISO on a single run, not by merging the
output of two livecd-creator runs by a 3rd party app.
Regards,
Jan
Reasons:
* I still did not understand why I have to carry with me two media - both
x86_64 and i386 - when all the data perfectly fit on a single media.
* Why I have to try to boot x86_64 first to find out if the specific machine
is x86_64? Even common programmers do not know it, "Windows XP works here".
* The OS must "just work", it must be fun and easy. Requiring a special
technical decision before even starting the OS download is a showstopper.
* Checked that a regular user will on http://fedoraproject.org/get-fedora
still download terrible performance degradation of 32-bit OS although her
hadware is in 70%-95%(?) of cases x86_64. x86_64 is here for 6 years now.
* Arguing x86 may be faster than x86_64... I did not find any such case,
x86_64 is a more modern arch (more registers, PIC for free, better ABI).
We already hit the 2GB address space limitations. x86_64 is the future.
* All the friends of mine have 8Mbit+ ADSL and TB disks downloading many DVD
disks so some several more hundreds of MB are not something to notice.
mkisofs -f -J -r -hide-rr-moved -hide-joliet-trans-tbl -V Fedora-11-x86bi-Live -o ../x86bilive.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-info-table -boot-load-size 4 .
mount -r -o loop Fedora-11-x86_64-Live.iso x86_64/
mount -r -o loop Fedora-11-i686-Live.iso i686/
x86bilive:
total 4
lrwxrwxrwx 1 root root 13 2009-06-18 21:10 GPL -> ../x86_64/GPL
lrwxrwxrwx 1 root root 14 2009-06-18 21:11 LiveOS-i686 -> ../i686/LiveOS/
lrwxrwxrwx 1 root root 16 2009-06-18 21:10 LiveOS-x86_64 -> ../x86_64/LiveOS/
lrwxrwxrwx 1 root root 16 2009-06-18 21:10 README -> ../x86_64/README
drwxr-xr-x 2 root root 4096 2009-06-20 21:44 isolinux/
x86bilive/isolinux:
total 184
lrwxrwxrwx 1 root root 30 2009-06-18 21:13 boot.cat -> ../../x86_64/isolinux/boot.cat
lrwxrwxrwx 1 root root 31 2009-06-18 21:17 ii686 -> ../../i686/isolinux/initrd0.img
-rw-r--r-- 1 root root 14336 2009-06-20 21:45 isolinux.bin
-r--r--r-- 1 root root 1411 2009-06-20 21:44 isolinux.cfg
lrwxrwxrwx 1 root root 33 2009-06-18 21:13 ix8664 -> ../../x86_64/isolinux/initrd0.img
lrwxrwxrwx 1 root root 28 2009-06-18 21:17 ki686 -> ../../i686/isolinux/vmlinuz0
lrwxrwxrwx 1 root root 30 2009-06-18 21:13 kx8664 -> ../../x86_64/isolinux/vmlinuz0
lrwxrwxrwx 1 root root 29 2009-06-18 21:13 memtest -> ../../x86_64/isolinux/memtest
lrwxrwxrwx 1 root root 32 2009-06-18 21:13 splash.jpg -> ../../x86_64/isolinux/splash.jpg
-r--r--r-- 1 root root 159888 2009-06-20 20:48 vesamenu.c32
isolinux.cfg:
default vesamenu.c32
timeout 100
menu background splash.jpg
menu title Welcome to Fedora-11-x86bi-Live!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label linux0
menu label x86_64 Boot
kernel kx8664
append initrd=ix8664 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-x86_64 ro liveimg quiet rhgb
menu default-x86_64
label check0
menu label x86_64 Verify and Boot
kernel kx8664
append initrd=ix8664 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-x86_64 ro liveimg quiet rhgb check
label linux1
menu label i686 Boot
kernel ki686
append initrd=ii686 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-i686 ro liveimg quiet rhgb
menu default-i386
label check1
menu label i686 Verify and Boot
kernel ki686
append initrd=ii686 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-i686 ro liveimg quiet rhgb check
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0xffff
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ defaults.patch 20 Jun 2009 20:10:46 -0000
@@ -0,0 +1,175 @@
+--- syslinux-3.75-orig/com32/menu/Makefile 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/Makefile 2009-06-20 19:21:32.000000000 +0200
+@@ -24,7 +24,7 @@ MODULES = menu.c32 vesamenu.c32
+ TESTFILES =
+
+ COMMONOBJS = menumain.o readconfig.o passwd.o drain.o printmsg.o colors.o \
+- background.o refstr.o execute.o
++ background.o refstr.o execute.o verify_cpu.o
+
+ all: $(MODULES) $(TESTFILES)
+
+--- syslinux-3.75-orig/com32/menu/menu.h 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/menu.h 2009-06-20 19:21:32.000000000 +0200
+@@ -224,4 +224,9 @@ void execute(const char *cmdline, enum k
+ /* drain.c */
+ void drain_keyboard(void);
+
++/* verify_cpu.S */
++#if defined(__i386__) || defined(__x86_64__)
++int verify_cpu(void);
++#endif
++
+ #endif /* MENU_H */
+--- syslinux-3.75-orig/com32/menu/readconfig.c 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/readconfig.c 2009-06-20 20:23:24.000000000 +0200
+@@ -656,11 +656,22 @@ static void parse_config_file(FILE *f)
+ m->parent_entry->displayname = refstr_get(m->title);
+ }
+ }
+- } else if ( looking_at(p, "default") ) {
+- if (ld.label) {
+- ld.menudefault = 1;
+- } else if (m->parent_entry) {
+- m->parent->defentry = m->parent_entry->entry;
++ } else if ( looking_at(p, "default")
++#if defined(__i386__) || defined(__x86_64__)
++ || looking_at(p, "default-i386")
++ || looking_at(p, "default-x86_64")
++#endif
++ ) {
++#if defined(__i386__) || defined(__x86_64__)
++ if (! ( ( looking_at(p, "default-i386") && verify_cpu () == 0 ) ||
++ ( looking_at(p, "default-x86_64") && verify_cpu () != 0 ) ) )
++#endif
++ {
++ if (ld.label) {
++ ld.menudefault = 1;
++ } else if (m->parent_entry) {
++ m->parent->defentry = m->parent_entry->entry;
++ }
+ }
+ } else if ( looking_at(p, "hide") ) {
+ ld.menuhide = 1;
+--- syslinux-3.75-orig/com32/menu/verify_cpu.S 1970-01-01 01:00:00.000000000 +0100
++++ syslinux-3.75-defaults/com32/menu/verify_cpu.S 2009-06-20 20:30:27.000000000 +0200
+@@ -0,0 +1,119 @@
++/* https://lists.linux-foundation.org/pipermail/fastboot/2006-November/01188... */
++#if defined(__i386__) || defined(__x86_64__)
++ .globl verify_cpu
++verify_cpu:
++ push %ebx
++ push %esi
++ push %edi
++ push %ebp
++ call Xverify_cpu
++ pop %ebp
++ pop %edi
++ pop %esi
++ pop %ebx
++ ret
++
++/*
++ *
++ * verify_cpu.S
++ *
++ * 14 Nov 2006 Vivek Goyal: Created the file
++ *
++ * This is a common code for verification whether CPU supports
++ * long mode and SSE or not. It is not called directly instead this
++ * file is included at various places and compiled in that context.
++ * Following are the current usage.
++ *
++ * This file is included by both 16bit and 32bit code.
++ *
++ * arch/x86_64/boot/setup.S : Boot cpu verification (16bit)
++ * arch/x86_64/boot/compressed/head.S: Boot cpu verification (32bit)
++ * arch/x86_64/kernel/trampoline.S: secondary processor verfication (16bit)
++ * arch/x86_64/kernel/acpi/wakeup.S:Verfication at resume (16bit)
++ *
++ * verify_cpu, returns the status of cpu check in register %eax.
++ * 0: Success 1: Failure
++ *
++ * The caller needs to check for the error code and take the action
++ * appropriately. Either display a message or halt.
++ */
++
++Xverify_cpu:
++
++ pushfl # Save caller passed flags
++ pushl $0 # Kill any dangerous flags
++ popfl
++
++ /* minimum CPUID flags for x86-64 */
++ /* see http://www.x86-64.org/lists/discuss/msg02971.html */
++#define SSE_MASK ((1<<25)|(1<<26))
++#define REQUIRED_MASK1 ((1<<0)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<8)|\
++ (1<<13)|(1<<15)|(1<<24))
++#define REQUIRED_MASK2 (1<<29)
++ pushfl # standard way to check for cpuid
++ popl %eax
++ movl %eax,%ebx
++ xorl $0x200000,%eax
++ pushl %eax
++ popfl
++ pushfl
++ popl %eax
++ cmpl %eax,%ebx
++ jz verify_cpu_no_longmode # cpu has no cpuid
++
++ movl $0x0,%eax # See if cpuid 1 is implemented
++ cpuid
++ cmpl $0x1,%eax
++ jb verify_cpu_no_longmode # no cpuid 1
++
++ xor %di,%di
++ cmpl $0x68747541,%ebx # AuthenticAMD
++ jnz verify_cpu_noamd
++ cmpl $0x69746e65,%edx
++ jnz verify_cpu_noamd
++ cmpl $0x444d4163,%ecx
++ jnz verify_cpu_noamd
++ mov $1,%di # cpu is from AMD
++
++verify_cpu_noamd:
++ movl $0x1,%eax # Does the cpu have what it takes
++ cpuid
++ andl $REQUIRED_MASK1,%edx
++ xorl $REQUIRED_MASK1,%edx
++ jnz verify_cpu_no_longmode
++
++ movl $0x80000000,%eax # See if extended cpuid is implemented
++ cpuid
++ cmpl $0x80000001,%eax
++ jb verify_cpu_no_longmode # no extended cpuid
++
++ movl $0x80000001,%eax # Does the cpu have what it takes
++ cpuid
++ andl $REQUIRED_MASK2,%edx
++ xorl $REQUIRED_MASK2,%edx
++ jnz verify_cpu_no_longmode
++
++verify_cpu_sse_test:
++ movl $1,%eax
++ cpuid
++ andl $SSE_MASK,%edx
++ cmpl $SSE_MASK,%edx
++ je verify_cpu_sse_ok
++ test %di,%di
++ jz verify_cpu_no_longmode # only try to force SSE on AMD
++ movl $0xc0010015,%ecx # HWCR
++ rdmsr
++ btr $15,%eax # enable SSE
++ wrmsr
++ xor %di,%di # don't loop
++ jmp verify_cpu_sse_test # try again
++
++verify_cpu_no_longmode:
++ popfl # Restore caller passed flags
++ movl $1,%eax
++ ret
++verify_cpu_sse_ok:
++ popfl # Restore caller passed flags
++ xorl %eax, %eax
++ ret
++#endif
--- syslinux.spec 16 Apr 2009 18:11:30 -0000 1.59
+++ syslinux.spec 20 Jun 2009 20:10:46 -0000
@@ -7,6 +7,7 @@ License: GPLv2+
Group: Applications/System
URL: http://syslinux.zytor.com/
Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_vers...
+Patch9: defaults.patch
ExclusiveArch: %{ix86} x86_64
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nasm >= 0.98.38-1, perl, netpbm-progs
@@ -33,12 +34,18 @@ MEMDISK, which loads legacy operating sy
%prep
%setup -q -n syslinux-%{tarball_version}
+%patch9 -p1
%build
CFLAGS="-Werror -Wno-unused -finline-limit=2000"
export CFLAGS
# If you make clean here, we lose the provided syslinux.exe
#make clean
+rm -f com32/menu/vesamenu.c32
+make -C com32/lib libcom32.a
+make -C com32/gpllib libcom32gpl.a
+make -C com32/menu vesamenu.c32
+test -f com32/menu/vesamenu.c32
make installer
make -C sample tidy
13 years, 3 months