# ChangeLog for gentoo/src/catalyst
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.230 2005/04/20 21:31:15 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.231 2005/04/21 14:23:11 rocket Exp $
+
+ 21 Apr 2005; Eric Edgar <rocket@gentoo.org> modules/catalyst_support.py,
+ modules/embedded_target.py, modules/generic_stage_target.py,
+ modules/grp_target.py, modules/livecd_stage1_target.py,
+ modules/livecd_stage2_target.py, modules/netboot_target.py,
+ modules/stage4_target.py, modules/tinderbox_target.py,
+ targets/embedded/embedded-chroot.sh,
+ targets/embedded/embedded-controller.sh,
+ targets/livecd-stage1/livecd-stage1-controller.sh,
+ -targets/livecd-stage2/livecd-stage2-bootloader.sh,
+ -targets/livecd-stage2/livecd-stage2-cdfs.sh,
+ targets/livecd-stage2/livecd-stage2-controller.sh,
+ -targets/livecd-stage2/livecd-stage2-iso.sh,
+ targets/stage4/stage4-chroot.sh, targets/stage4/stage4-controller.sh,
+ +targets/support/bootloader-setup.sh, targets/support/chroot-functions.sh,
+ +targets/support/create-iso.sh, targets/support/filesystem-functions.sh,
+ targets/support/functions.sh, targets/support/livecdfs-update.sh,
+ +targets/support/target_image_setup.sh:
+ embedded target cleanups ... iso,bootloader,target_setup generalizations,
+ minor code fixes
20 Apr 2005; Chris Gianelloni <wolf31o2@gentoo.org>
targets/livecd-stage2/livecd-stage2-controller.sh,
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.38 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.39 2005/04/21 14:23:11 rocket Exp $
-import sys,string,os,types,re,traceback,md5
+import sys,string,os,types,re,signal,traceback,md5
# a function to turn a string of non-printable characters into a string of
# hex characters
def hexify(str):
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/embedded_target.py,v 1.10 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/embedded_target.py,v 1.11 2005/04/21 14:23:11 rocket Exp $
"""
This class works like a 'stage3'. A stage2 tarball is unpacked, but instead
if addlargs.has_key("embedded/fs-type"):
self.valid_values.append("embedded/fs-ops")
- self.set_build_kernel_vars(addlargs)
-
generic_stage_target.__init__(self,spec,addlargs)
- self.settings["image_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/image"
- def build_fs(self):
- try:
- if self.settings.has_key("embedded/fs-type"):
- cmd("/bin/bash "+self.settings["controller_file"]+" package","filesystem packaging failed")
- except CatalystError:
- self.unbind()
- raise CatalystError, "embedded filesystem creation aborting due to error."
-
- # this code is mostly duplication from the livecd stage2 module
- def pre_build_fs(self):
- try:
- if self.settings.has_key("embedded/fs-prepare"):
- cmd("/bin/bash "+self.settings["embedded/fs-prepare"], "pre filesystem packaging cause an error in execution")
- except CatalystError:
- self.unbind()
- raise CatalystError, "embedded pre filesystem creation script aborting due to error"
-
- def post_build_fs(self):
- try:
- if self.settings.has_key("embedded/fs-finish"):
- cmd("/bin/bash "+self.settings["embedded/fs-finish"], "pre filesystem packaging cause an error in execution")
- except CatalystError:
- self.unbind()
- raise CatalystError, "embedded post filesystem creation script aborting due to error"
+ self.set_build_kernel_vars(addlargs)
def set_action_sequence(self):
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","bind","chroot_setup",\
- "setup_environment","build_packages","build_kernel","unmerge","unbind",\
- "remove","empty","clean","pre_build_fs","build_fs","post_build_fs","clear_autoresume"]
+ "config_profile_link","setup_confdir","portage_overlay","bind","chroot_setup",\
+ "setup_environment","build_kernel","build_packages","bootloader","unmerge","unbind",\
+ "remove","empty","clean","livecd_update","target_setup","create_iso","clear_autoresume"]
def set_stage_path(self):
self.settings["stage_path"]=self.settings["chroot_path"]+"/tmp/mergeroot"
def set_root_path(self):
self.settings["root_path"]="/tmp/mergeroot"
print "embedded root path is "+self.settings["root_path"]
+
def set_dest_path(self):
self.settings["destpath"]=self.settings["chroot_path"]+self.settings["root_path"]
- def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
-
def register(foo):
foo.update({"embedded":embedded_target})
return foo
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.32 2005/04/15 16:49:45 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.33 2005/04/21 14:23:11 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
self.set_target_subpath()
# set paths
+ self.set_autoresume_path()
self.set_snapshot_path()
- self.set_target_path()
self.set_source_path()
self.set_chroot_path()
- self.set_autoresume_path()
self.set_root_path()
self.set_dest_path()
self.set_stage_path()
+ self.set_target_path()
self.set_controller_file()
self.set_action_sequence()
self.set_iso_volume_id()
self.set_build_kernel_vars(addlargs)
self.set_fsscript()
+ self.set_install_mask()
self.set_rcadd()
self.set_rcdel()
+ self.set_cdtar()
+ self.set_fstype()
+ self.set_fsops()
+ self.set_iso()
+ self.set_packages()
+ self.set_target_file()
+ self.set_target_iso_path()
+
# this next line checks to make sure that the specified variables exist on disk.
file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
if self.makeconf.has_key("CXXFLAGS"):
print "Using CXXFLAGS setting from seed stage"
self.settings["CXXFLAGS"]=self.makeconf["CXXFLAGS"]
-
+
+ def set_install_mask(self):
+ if self.settings.has_key("install_mask"):
+ if type(self.settings["install_mask"]) != types.StringType:
+ self.settings["install_mask"]=string.join(self.settings["install_mask"])
+
def set_spec_prefix(self):
self.settings["spec_prefix"]=self.settings["target"]
"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+ if self.settings.has_key("AUTORESUME") \
+ and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
+ print "Resume point detected, skipping target path setup operation..."
+ else:
+ # first clean up any existing target stuff
+ if os.path.exists(self.settings["target_path"]):
+ cmd("rm -rf "+self.settings["target_path"],
+ "Could not remove existing directory: "+self.settings["target_path"])
+ touch(self.settings["autoresume_path"]+"setup_target_path")
+
+ if not os.path.exists(self.settings["target_path"]):
+ os.makedirs(self.settings["target_path"])
+
+ def set_target_file(self):
+ if not os.path.exists(self.settings["target_path"]+"/tarball/"):
+ os.makedirs(self.settings["target_path"]+"/tarball/")
+ self.settings["target_file"]=self.settings["target_path"]+"/tarball/"+self.settings["target"]+"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]+".tar.bz2"
+
+ def set_target_iso_path(self):
+ if self.settings.has_key("iso"):
+ print "setting up iso path"
+ if not os.path.exists(self.settings["target_path"]+"/iso/"):
+ os.makedirs(self.settings["target_path"]+"/iso/")
+ self.settings["target_iso_path"]=self.settings["target_path"]+"/iso/"
def set_fsscript(self):
if self.settings.has_key(self.settings["spec_prefix"]+"/fsscript"):
self.settings["rcdel"]=self.settings[self.settings["spec_prefix"]+"/rcdel"]
del self.settings[self.settings["spec_prefix"]+"/rcdel"]
+ def set_cdtar(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/cdtar"):
+ self.settings["cdtar"]=self.settings[self.settings["spec_prefix"]+"/cdtar"]
+ del self.settings[self.settings["spec_prefix"]+"/cdtar"]
+
+ def set_iso(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/iso"):
+ self.settings["iso"]=self.settings[self.settings["spec_prefix"]+"/iso"]
+ del self.settings[self.settings["spec_prefix"]+"/iso"]
+
+ def set_fstype(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/cdfstype"):
+ print "\n\n\nWarning!!!"+self.settings["spec_prefix"]+"/cdfstype" + "is deprecated and may be removed."
+ print "\tUse "+self.settings["spec_prefix"]+"/fstype" + "instead.\n\n\n"
+ self.settings["fstype"]=self.settings[self.settings["spec_prefix"]+"/cdfstype"]
+ del self.settings[self.settings["spec_prefix"]+"/cdfstype"]
+
+ if self.settings.has_key(self.settings["spec_prefix"]+"/fstype"):
+ self.settings["fstype"]=self.settings[self.settings["spec_prefix"]+"/fstype"]
+ del self.settings[self.settings["spec_prefix"]+"/fstype"]
+
+ if not self.settings.has_key("fstype"):
+ self.settings["fstype"]="normal"
+
+ def set_fsops(self):
+ if self.settings.has_key("fstype"):
+ self.valid_values.append("fsops")
+ if self.settings.has_key(self.settings["spec_prefix"]+"/fs-ops"):
+ print "\n\n\nWarning!!!"+self.settings["spec_prefix"]+"/fs-ops" + "is deprecated and may be removed."
+ print "\tUse "+self.settings["spec_prefix"]+"/fsops" + "instead.\n\n\n"
+ self.settings["fsops"]=self.settings[self.settings["spec_prefix"]+"/fs-ops"]
+ del self.settings[self.settings["spec_prefix"]+"/fs-ops"]
+
+ if self.settings.has_key(self.settings["spec_prefix"]+"/fsops"):
+ self.settings["fsops"]=self.settings[self.settings["spec_prefix"]+"/fsops"]
+ del self.settings[self.settings["spec_prefix"]+"/fsops"]
+
def set_source_path(self):
self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
if os.path.isfile(self.settings["source_path"]):
def set_mounts(self):
pass
+ def set_packages(self):
+ if self.settings.has_key("iso")
+ self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools")
+
def set_root_path(self):
# ROOT= variable for emerges
self.settings["root_path"]="/"
print "Creating stage tarball..."
- cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["stage_path"]+\
+ cmd("tar cjf "+self.settings["target_file"]+" -C "+self.settings["stage_path"]+\
" .","Couldn't create stage tarball")
touch(self.settings["autoresume_path"]+"capture")
and os.path.exists(self.settings["autoresume_path"]+"target_setup"):
print "Resume point detected, skipping target_setup operation..."
else:
- cmd("/bin/bash "+self.settings["controller_file"]+" cdfs","CDFS script failed.")
+ print "Setting up filesystems per filesystem type"
+ cmd("/bin/bash "+self.settings["controller_file"]+" target_image_setup "+ self.settings["target_iso_path"],"target_image_setup script failed.")
touch(self.settings["autoresume_path"]+"target_setup")
def setup_overlay(self):
else:
if self.settings.has_key(self.settings["spec_prefix"]+"/overlay"):
cmd("rsync -a "+self.settings[self.settings["spec_prefix"]+"/overlay"]+"/* "+\
- self.settings["target_path"], self.settings["spec_prefix"]+"overlay copy failed.")
+ self.settings["target_iso_path"], self.settings["spec_prefix"]+"overlay copy failed.")
touch(self.settings["autoresume_path"]+"setup_overlay")
def create_iso(self):
print "Resume point detected, skipping create_iso operation..."
else:
# create the ISO - this is the preferred method (the iso scripts do not always work)
- if self.settings.has_key(self.settings["spec_prefix"]+"/iso"):
+ if self.settings.has_key("iso"):
cmd("/bin/bash "+self.settings["controller_file"]+" iso "+\
- self.settings[self.settings["spec_prefix"]+"/iso"],"ISO creation script failed.")
- touch(self.settings["autoresume_path"]+"create_iso")
+ self.settings["iso"],"ISO creation script failed.")
+ touch(self.settings["autoresume_path"]+"create_iso")
def build_packages(self):
if self.settings.has_key("AUTORESUME") \
except CatalystError:
self.unbind()
raise CatalystError,self.settings["spec_prefix"] + "build aborting due to error."
- touch(self.settings["autoresume_path"]+"build_packages")
def build_kernel(self):
if self.settings.has_key("AUTORESUME") \
print "Resume point detected, skipping bootloader operation..."
else:
try:
- cmd("/bin/bash "+self.settings["controller_file"]+" bootloader",\
+ cmd("/bin/bash "+self.settings["controller_file"]+" bootloader " + self.settings["target_iso_path"],\
"Bootloader runscript failed.")
touch(self.settings["autoresume_path"]+"bootloader")
except CatalystError:
self.unbind()
raise CatalystError,"Runscript aborting due to error."
+ def livecd_update(self):
+ if self.settings.has_key("AUTORESUME") \
+ and os.path.exists(self.settings["autoresume_path"]+"livecd_update"):
+ print "Resume point detected, skipping build_packages operation..."
+ else:
+ try:
+ self.bind()
+ cmd("/bin/bash "+self.settings["controller_file"]+" livecd-update",\
+ "livecd-update failed.")
+ self.unbind()
+ touch(self.settings["autoresume_path"]+"livecd_update")
+
+ except CatalystError:
+ self.unbind()
+ raise CatalystError,"build aborting due to livecd_update error."
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.9 2005/04/18 14:11:23 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.10 2005/04/21 14:23:11 rocket Exp $
"""
The builder class for GRP (Gentoo Reference Platform) builds.
generic_stage_target.__init__(self,spec,addlargs)
- def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
-
def run_local(self):
for pkgset in self.settings["grp"]:
# example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep"
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","bind","chroot_setup",\
"setup_environment","run_local","unmerge","unbind",\
- "remove","empty"]
+ "remove","empty","clear_autoresume"]
def set_use(self):
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.9 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.10 2005/04/21 14:23:11 rocket Exp $
"""
Builder class for LiveCD stage1.
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
- "preclean","fsscript","unmerge","unbind",\
- "remove","empty","clean","clear_autoresume"]
+ "unbind", "clean","clear_autoresume"]
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.35 2005/04/20 20:29:03 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.36 2005/04/21 14:23:11 rocket Exp $
"""
Builder class for a LiveCD stage2 build.
class livecd_stage2_target(generic_stage_target):
def __init__(self,spec,addlargs):
- self.required_values=["boot/kernel","livecd/cdfstype"]
+ self.required_values=["boot/kernel","livecd/fstype"]
self.valid_values=[]
"gamecd/conf","livecd/users","portage_overlay"])
generic_stage_target.__init__(self,spec,addlargs)
-
- file_locate(self.settings, ["livecd/cdtar","controller_file"])
-
+
+ if not self.settings.has_key("livecd/type"):
+ self.settings["livecd/type"] = "generic-livecd"
- def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
-
+ file_locate(self.settings, ["cdtar","controller_file"])
+
def set_source_path(self):
self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
if os.path.isfile(self.settings["source_path"]):
touch(self.settings["autoresume_path"]+"unpack")
def run_local(self):
- # first clean up any existing target stuff
- if os.path.exists(self.settings["target_path"]):
- print "cleaning previous livecd-stage2 build"
- cmd("rm -rf "+self.settings["target_path"],
- "Could not remove existing directory: "+self.settings["target_path"])
-
- if not os.path.exists(self.settings["target_path"]):
- os.makedirs(self.settings["target_path"])
-
# what modules do we want to blacklist?
if self.settings.has_key("livecd/modblacklist"):
try:
"bind","chroot_setup","setup_environment","run_local",\
"root_overlay","build_kernel","bootloader","preclean",\
"fsscript","rcupdate","unmerge","unbind","remove",\
- "empty","target_setup",\
+ "empty","livecd_update","target_setup",\
"setup_overlay","create_iso","clear_autoresume"]
def register(foo):
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/netboot_target.py,v 1.2 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/netboot_target.py,v 1.3 2005/04/21 14:23:11 rocket Exp $
"""
Builder class for a netboot build.
if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
self.settings[envvar] = "-Os -pipe"
- def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
# def set_root_path(self):
# # ROOT= variable for emerges
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.3 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.4 2005/04/21 14:23:11 rocket Exp $
"""
Builder class for LiveCD stage1.
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
- "build_kernel","root_overlay","preclean","rcupdate","fsscript",\
- "unmerge","unbind","remove","empty",\
- "clean","capture","clear_autoresume"]
+ "build_kernel","bootloader","root_overlay","preclean","rcupdate",\
+ "fsscript","unmerge","unbind","remove","empty",\
+ "clean","capture","livecd_update","target_setup","create_iso",\
+ "clear_autoresume"]
def register(foo):
foo.update({"stage4":stage4_target})
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.8 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.9 2005/04/21 14:23:11 rocket Exp $
"""
builder class for the tinderbox target
self.unbind()
raise CatalystError,"Tinderbox aborting due to error."
- def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
-
def register(foo):
foo.update({"tinderbox":tinderbox_target})
return foo
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.14 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.15 2005/04/21 14:23:11 rocket Exp $
. /tmp/chroot-functions.sh
# setup the environment
export FEATURES="${clst_myfeatures}"
export CONFIG_PROTECT="-*"
-export clst_myemergeopts="${clst_myemergeopts} -O"
+#export clst_myemergeopts="${clst_myemergeopts} -O"
export USE="${clst_embedded_use}"
-
+export DESTROOT=${clst_root_path}
+export clst_root_path=/
## START BUILD
-run_emerge "${clst_embedded_packages}"
+run_emerge "${clst_myemergeopts}" -o "${clst_embedded_packages}"
+
+#export clst_myemergeopts="${clst_myemergeopts} -B"
+#run_emerge "${clst_embedded_packages}"
+
+export clst_root_path=${DESTROOT}
+export clst_myemergeopts="${clst_myemergeopts} -1 -O"
+INSTALL_MASK="${clst_install_mask}" run_emerge "${clst_embedded_packages}"
+
+
#!/bin/bash
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.2 2005/04/21 14:23:11 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
preclean)
;;
- package)
- export root_fs_path="${clst_chroot_path}/tmp/mergeroot"
- install -d ${clst_image_path}
+# package)
+# export root_fs_path="${clst_chroot_path}/tmp/mergeroot"
+# install -d ${clst_image_path}
- ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh ${clst_embedded_fs_type} || exit 1
- imagesize=`du -sk ${clst_image_path}/root.img | cut -f1`
- echo "Created ${clst_embedded_fs_type} image at ${clst_image_path}/root.img"
- echo "Image size: ${imagesize}k"
+# ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh ${clst_embedded_fs_type} || exit 1
+# imagesize=`du -sk ${clst_image_path}/root.img | cut -f1`
+# echo "Created ${clst_embedded_fs_type} image at ${clst_image_path}/root.img"
+# echo "Image size: ${imagesize}k"
- ;;
+# ;;
kernel)
shift
exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
- extract_kernels ${clst_target_path}/kernels
;;
+
+ target_image_setup)
+ shift
+ ${clst_sharedir}/targets/support/target_image_setup.sh $1
+
+ ;;
+ livecd-update)
+ # now, finalize and tweak the livecd fs (inside of the chroot)
+ exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+ ;;
+
+ bootloader)
+ shift
+ # Here is where we poke in our identifier
+ touch $1/livecd
+
+ ${clst_sharedir}/targets/support/bootloader-setup.sh $1
+ ;;
+ iso)
+ shift
+ ${clst_sharedir}/targets/support/create-iso.sh $1
+ ;;
+
+
clean)
;;
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.5 2005/04/20 19:48:29 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.6 2005/04/21 14:23:11 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
## START RUNSCRIPT
case $1 in
- preclean)
- echo "Cleared out by wolf31o2... this is a placeholder, BIATCH!!!"
- ;;
-
- rc-update)
- exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
- ;;
-
- fsscript)
- exec_in_chroot ${clst_fsscript}
- ;;
-
build_packages)
shift
export clst_packages="$*"
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2-cdfs.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
-. ${clst_sharedir}/targets/support/functions.sh
-. ${clst_sharedir}/targets/support/filesystem-functions.sh
-#. ${clst_sharedir}/targets/${clst_target}/${clst_mainarch}-archscript.sh
-
-#source ${clst_livecd_archscript}
-## START RUNSCRIPT
-
-loopret=1
-case ${clst_livecd_cdfstype} in
- normal)
- create_normal_loop
- loopret=$?
- ;;
- zisofs)
- create_zisofs
- loopret=$?
- ;;
- noloop)
- create_noloop
- loopret=$?
- ;;
- gcloop)
- create_gcloop
- loopret=$?
- ;;
- squashfs)
- create_squashfs
- loopret=$?
- ;;
-esac
-exit $loopret
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.7 2005/04/20 21:31:15 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.8 2005/04/21 14:23:11 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
exit 1
fi
fi
-
+ ;;
+ livecd-update)
# now, finalize and tweak the livecd fs (inside of the chroot)
exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
-
+
+
# move over the xinitrc (if applicable)
# this is moved here, so we can override any default xinitrc
if [ -n "${clst_livecd_xinitrc}" ]
cp -a ${clst_livecd_xinitrc} ${clst_chroot_path}/etc/X11/xinit/xinitrc
fi
;;
-
rc-update)
exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
;;
;;
bootloader)
+ shift
# Here is where we poke in our identifier
- touch ${clst_target_path}/livecd
+ touch $1/livecd
- ${clst_sharedir}/targets/livecd-stage2/livecd-stage2-bootloader.sh
+ ${clst_sharedir}/targets/support/bootloader-setup.sh $1
;;
- cdfs)
- ${clst_sharedir}/targets/livecd-stage2/livecd-stage2-cdfs.sh
+ target_image_setup)
+ shift
+ ${clst_sharedir}/targets/support/target_image_setup.sh $1
;;
iso)
shift
- ${clst_sharedir}/targets/livecd-stage2/livecd-stage2-iso.sh $1
+ ${clst_sharedir}/targets/support/create-iso.sh $1
;;
esac
exit 0
#turn off auto-use:
export USE_ORDER="env:pkg:conf:defaults"
+echo "Bringing system up to date using profile specific use flags"
+GRP_STAGE23_USE="$(portageq envvar GRP_STAGE23_USE)"
+export USE="-* ${clst_HOSTUSE} ${GRP_STAGE23_USE}"
+run_emerge -u system
+
+
+echo "Emerging packages using stage4 use flags"
+if [ -n "${clst_stage4_use}" ]
+then
+ export USE="-* ${clst_HOSTUSE} ${GRP_STAGE23_USE}"
+else
+ USE="${clst_stage4_use}"
+fi
+
run_emerge "${clst_packages}"
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.2 2005/04/11 20:05:40 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.3 2005/04/21 14:23:11 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
exec_in_chroot ${clst_fsscript}
;;
+ livecd-update)
+ # now, finalize and tweak the livecd fs (inside of the chroot)
+ exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+ ;;
+
+ bootloader)
+ shift
+ # Here is where we poke in our identifier
+ touch $1/livecd
+
+ ${clst_sharedir}/targets/support/bootloader-setup.sh $1
+ ;;
+
+ target_image_setup)
+ shift
+ #${clst_sharedir}/targets/livecd-stage2/livecd-stage2-cdfs.sh
+ ${clst_sharedir}/targets/support/target_image_setup.sh $1
+ ;;
+
+ iso)
+
+ shift
+ ${clst_sharedir}/targets/support/create-iso.sh $1
+ ;;
clean)
exit 0
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2-bootloader.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.1 2005/04/21 14:23:12 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
-#. ${clst_sharedir}/targets/${clst_target}/${clst_mainarch}-archscript.sh
-#source ${clst_livecd_archscript}
-## START RUNSCRIPT
-extract_cdtar
-extract_kernels ${clst_target_path}/boot
+# $1 is the destination root
+
+extract_cdtar $1
+extract_kernels $1/boot
check_dev_manager
check_filesystem_type
case ${clst_mainarch} in
alpha)
- acfg=${clst_target_path}/etc/aboot.conf
+ acfg=$1/etc/aboot.conf
bctr=0
for x in ${clst_boot_kernel}
do
arm)
;;
hppa)
- icfg=${clst_target_path}/boot/palo.conf
- kmsg=${clst_target_path}/boot/kernels.msg
- hmsg=${clst_target_path}/boot/help.msg
+ icfg=$1/boot/palo.conf
+ kmsg=$1/boot/kernels.msg
+ hmsg=$1/boot/help.msg
echo "--commandline=0/${first} initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts}" >> ${icfg}
echo "--bootloader=boot/iplboot" >> ${icfg}
echo "--ramdisk=boot/${x}.igz" >> ${icfg}
# but the following suffices for now:
;;
sparc*)
- scfg=${clst_target_path}/boot/silo.conf
+ scfg=$1/boot/silo.conf
echo "default=\"help\"" > ${scfg}
echo "message=\"/boot/boot.msg\"" >> ${scfg}
echo -e "label=\"help\"" >> ${scfg}
;;
x86)
- if [ -e ${clst_target_path}/boot/isolinux.bin ]
+ if [ -e $1/boot/isolinux.bin ]
then
# the rest of this function sets up the config file for isolinux
- icfg=${clst_target_path}/boot/isolinux.cfg
- kmsg=${clst_target_path}/boot/kernels.msg
- hmsg=${clst_target_path}/boot/help.msg
+ icfg=$1/boot/isolinux.cfg
+ kmsg=$1/boot/kernels.msg
+ hmsg=$1/boot/help.msg
echo "default ${first}" > ${icfg}
echo "timeout 150" >> ${icfg}
echo "prompt 1" >> ${icfg}
echo " ${x}-nofb" >> ${kmsg}
done
- if [ -f ${clst_target_path}/boot/memtest86 ]
+ if [ -f $1/boot/memtest86 ]
then
echo >> $icfg
echo " memtest86" >> $kmsg
fi
fi
- if [ -e ${clst_target_path}/boot/grub/stage2_eltorito ]
+ if [ -e $1/boot/grub/stage2_eltorito ]
then
- icfg=${clst_target_path}/boot/grub/grub.conf
- hmsg=${clst_target_path}/boot/grub/help.msg
+ icfg=$1/boot/grub/grub.conf
+ hmsg=$1/boot/grub/help.msg
echo "default 1" > ${icfg}
echo "timeout 150" >> ${icfg}
echo >> ${icfg}
echo "kernel /boot/${x} ${default_append_line} vga=791 dokeymap splash=silent" >> ${icfg}
fi
- if [ -e ${clst_target_path}/boot/${x}.igz ]
+ if [ -e $1/boot/${x}.igz ]
then
echo "initrd /boot/${x}.igz" >> ${icfg}
fi
echo >> ${icfg}
echo "title ${x} [ No FrameBuffer ]" >> ${icfg}
echo "kernel ${x} /boot/${x} ${default_append_line}" >> ${icfg}
- if [ -e ${clst_target_path}/boot/${x}.igz ]
+ if [ -e $1/boot/${x}.igz ]
then
echo "initrd /boot/${x}.igz" >> ${icfg}
fi
done
- if [ -f ${clst_target_path}/boot/memtest86 ]
+ if [ -f $1/boot/memtest86 ]
then
echo >> ${icfg}
echo "title memtest86" >> ${icfg}
}
check_genkernel_version(){
- genkernel_version=$(genkernel --version)
- genkernel_version_major=${genkernel_version%%.*}
- genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.}
- genkernel_version_minor=${genkernel_version_minor_sub%%.*}
- genkernel_version_sub=${genkernel_version##*.}
- if [ -n "${genkernel_version}" -a "${genkernel_version_major}" -eq '3' -a "${genkernel_version_minor}" -ge '2' ]
+ if [ -x `which genkernel` ]
then
- echo "Genkernel version ${genkernel_version} found ... continuing"
+ genkernel_version=$(genkernel --version)
+ genkernel_version_major=${genkernel_version%%.*}
+ genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.}
+ genkernel_version_minor=${genkernel_version_minor_sub%%.*}
+ genkernel_version_sub=${genkernel_version##*.}
+ if [ -n "${genkernel_version}" -a "${genkernel_version_major}" -eq '3' -a "${genkernel_version_minor}" -ge '2' ]
+ then
+ echo "Genkernel version ${genkernel_version} found ... continuing"
+ else
+ echo "ERROR: Your genkernel version is too low in your seed stage. genkernel version 3.2.0"
+ echo "or greater is required."
+ exit 1
+ fi
else
- echo "ERROR: Your genkernel version is too low in your seed stage. genkernel version 3.2.0"
- echo "or greater is required."
- exit 1
+ exit 1
fi
}
install -d ${ROOT}
fi
fi
- echo "ROOT=${ROOT} emerge ...."
}
run_emerge() {
if [ -n "${clst_VERBOSE}" ]
then
+ echo "ROOT=${ROOT} emerge ${clst_myemergeopts} -vpt $@" || exit 1
emerge ${clst_myemergeopts} -vpt $@ || exit 3
echo "Press any key within 15 seconds to pause the build..."
read -s -t 15 -n 1
read -s -n 1
fi
fi
+ echo "emerge ${clst_myemergeopts} $@" || exit 1
emerge ${clst_myemergeopts} $@ || exit 1
}
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2-iso.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.1 2005/04/21 14:23:12 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
#. ${clst_sharedir}/targets/${clst_target}/${clst_mainarch}-archscript.sh
alpha)
# this is for the livecd-final target, and calls the proper
# command to build the iso file
- case ${clst_livecd_cdfstype} in
+ case ${clst_fstype} in
zisofs)
- mkisofs -J -R -l -z -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -z -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
;;
*)
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
;;
esac
isomarkboot ${1} /boot/bootlx
;;
hppa)
#this is for the livecd-stage2 target, and calls the proper command to build the iso file
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
palo -f boot/palo.conf -C ${1}
;;
ppc)
# The name of the iso should be retrieved from the specs. For now, asssume GentooPPC_2004.0
- mkisofs -J -r -l -netatalk -hfs -probe -map ${clst_target_path}/boot/map.hfs -part -no-desktop -hfs-iso_volume_id \
- "${clst_iso_volume_id}" -hfs-bless ${clst_target_path}/boot -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}
+ mkisofs -J -r -l -netatalk -hfs -probe -map ${clst_target_iso_path}/boot/map.hfs -part -no-desktop -hfs-iso_volume_id \
+ "${clst_iso_volume_id}" -hfs-bless ${clst_target_iso_path}/boot -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path}
;;
sparc)
# this is for the livecd-final target, and calls the proper
# command to build the iso file
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -G ${clst_target_path}/boot/isofs.b -B ... ${clst_target_path} \
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -G ${clst_target_iso_path}/boot/isofs.b -B ... ${clst_target_iso_path} \
|| die "Cannot make ISO image"
;;
# Only silo 1.2.x seems to work for most hardware
# Seems silo 1.3.x+ breaks on newer machines
# when booting from CD (current as of silo 1.4.8)
- mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp
+ mv ${clst_target_iso_path}/boot/mkisofs.sparc.fu /tmp
/tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' \
-s '/boot/silo.conf' -abstract 'Gentoo Linux Sparc' -copyright 'Gentoo Foundation' \
-P 'Gentoo Linux Sparc' -p 'Gentoo Linux Sparc' -V "${clst_iso_volume_id}" \
- -A 'G entoo Linux Sparc' ${clst_target_path} || die "Cannot make ISO image"
+ -A 'G entoo Linux Sparc' ${clst_target_iso_path} || die "Cannot make ISO image"
rm /tmp/mkisofs.sparc.fu
;;
#this is for the livecd-stage2 target, and calls the proper command
# to build the iso file
#
- if [ -e ${clst_target_path}/boot/isolinux.bin ]
+ if [ -e ${clst_target_iso_path}/boot/isolinux.bin ]
then
- case ${clst_livecd_cdfstype} in
+ case ${clst_fstype} in
zisofs)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/isolinux.bin -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table -z ${clst_target_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table -z ${clst_target_iso_path} || die "Cannot make ISO image"
;;
*)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/isolinux.bin -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table ${clst_target_iso_path} || die "Cannot make ISO image"
;;
esac
- fi
-
- if [ -e ${clst_target_path}/boot/grub/stage2_eltorito ]
+ elif [ -e ${clst_target_iso_path}/boot/grub/stage2_eltorito ]
then
- case ${clst_livecd_cdfstype} in
+ case ${clst_fstype} in
zisofs)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table -z ${clst_target_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table -z ${clst_target_iso_path} || die "Cannot make ISO image"
;;
*)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table ${clst_target_iso_path} || die "Cannot make ISO image"
+ ;;
+ esac
+ else
+ case ${clst_fstype} in
+ zisofs)
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} \
+ -z ${clst_target_iso_path} || die "Cannot make ISO image"
+ ;;
+ *)
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} \
+ ${clst_target_iso_path} || die "Cannot make ISO image"
;;
esac
fi
# Dont forget to update functions.sh check_looptype
-
+# $1 is the target directory for the filesystem
create_normal_loop() {
- export source_path="${clst_chroot_path}"
- export destination_path="${clst_target_path}"
- export loopname="livecd.loop"
+ export source_path="${clst_destpath}"
+ export destination_path="$1"
+ export loopname="image.loop"
#We get genkernel-built kernels and initrds in place, create the loopback fs on
#$clst_target_path, mount it, copy our bootable filesystem over, umount it, and
create_zisofs() {
- rm -rf "${clst_target_path}/zisofs" > /dev/null 2>&1
+ rm -rf "$1/zisofs" > /dev/null 2>&1
echo "Creating zisofs..."
- mkzftree -z 9 -p2 "${clst_chroot_path}" "${clst_target_path}/zisofs" || die "Could not run mkzftree, did you emerge zisofs"
+ mkzftree -z 9 -p2 "${clst_destpath}" "$1/zisofs" || die "Could not run mkzftree, did you emerge zisofs"
}
create_noloop() {
echo "Copying files for image (no loop)..."
- cp -a "${clst_chroot_path}"/* "${clst_target_path}" || die "Could not copy files to image (no loop)"
+ cp -a "${clst_destpath}"/* "$1" || die "Could not copy files to image (no loop)"
}
create_gcloop() {
echo "Creating gcloop..."
+ export loopname="image.gloop"
create_normal_loop
- compress_gcloop_ucl -b 131072 -c 10 "${clst_target_path}/livecd.loop" "${clst_target_path}/livecd.gcloop" || die "compress_gcloop_ucl failed, did you emerge gcloop?"
- rm -f "${clst_target_path}/livecd.loop"
+ compress_gcloop_ucl -b 131072 -c 10 "$1/livecd.loop" "$1/livecd.gcloop" || die "compress_gcloop_ucl failed, did you emerge gcloop?"
+ rm -f "$1/livecd.loop"
# only a gcloop image should exist in target path
}
create_squashfs() {
echo "Creating squashfs..."
- mksquashfs "${clst_chroot_path}" "${clst_target_path}/livecd.squashfs" -noappend || die "mksquashfs failed, did you emerge squashfs-tools?"
+ export loopname="image.squashfs"
+ mksquashfs "${clst_destpath}" "$1/${loopname}" ${clst_fs_ops} -noappend || die "mksquashfs failed, did you emerge squashfs-tools?"
}
+create_jffs() {
+ echo "Creating jffs..."
+ export loopname="image.jffs"
+ #fs_check /usr/sbin/mkfs.jffs jffs sys-fs/mtd
+ mkfs.jffs -d ${clst_destpath} -o $1/${loopname} ${clst_fs_ops} || die "Could not create a jffs filesystem"
+}
+
+create_jffs2(){
+ echo "Creating jffs2..."
+ export loopname="image.jffs"
+ #fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd
+ mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fs_ops} || die "Could not create a jffs2 filesystem"
+}
+
+create_cramfs(){
+ echo "Creating cramfs..."
+ export loopname="image.cramfs"
+ #fs_check /sbin/mkcramfs cramfs sys-fs/cramfs
+ mkcramfs ${clst_fs_ops} ${clst_destpath} $1/${loopname} || die "Could not create a cramfs filesystem"
+}
# which will normally contains a pre-built binary
# boot-loader/filesystem skeleton for the ISO.
- cdtar=${clst_livecd_cdtar}
- [ -z "${cdtar}" ] && die "Required key livecd/cdtar not defined, exiting"
- tar xjpf ${cdtar} -C ${clst_target_path} || die "Couldn't extract cdtar ${cdtar}"
+ cdtar=${clst_cdtar}
+ [ -z "${cdtar}" ] && die "Required key cdtar not defined, exiting"
+ tar xjpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
}
extract_kernels() {
check_dev_manager(){
# figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "udev" ]
+ if [ "${clst_livecd_devmanager}" == "devfs" ]
then
- cmdline_opts="${cmdline_opts} udev nodevfs"
- else
cmdline_opts="${cmdline_opts} noudev devfs"
+ else
+ cmdline_opts="${cmdline_opts} udev nodevfs"
fi
}
check_filesystem_type(){
- case ${clst_livecd_cdfstype} in
+ case ${clst_fstype} in
normal)
- cmdline_opts="${cmdline_opts} looptype=normal loop=/livecd.loop"
+ cmdline_opts="${cmdline_opts} looptype=normal loop=/image.loop"
;;
zisofs)
cmdline_opts="${cmdline_opts} looptype=zisofs loop=/zisofs"
noloop)
;;
gcloop)
- cmdline_opts="${cmdline_opts} looptype=gcloop loop=/livecd.gcloop"
+ cmdline_opts="${cmdline_opts} looptype=gcloop loop=/image.gcloop"
;;
squashfs)
- cmdline_opts="${cmdline_opts} looptype=squashfs loop=/livecd.squashfs"
- ;;
+ cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs"
+ ;;
+ jffs)
+ cmdline_opts="${cmdline_opts} looptype=jffs loop=/image.jffs"
+ ;;
+ jffs2)
+ cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2"
+ ;;
+ cramfs)
+ cmdline_opts="${cmdline_opts} looptype=cramfs loop=/image.cramfs"
+ ;;
esac
}
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.10 2005/04/20 21:31:15 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.11 2005/04/21 14:23:12 rocket Exp $
-/usr/sbin/env-update
-source /etc/profile
+. /tmp/chroot-functions.sh
+update_env_settings
# allow root logins to the livecd by default
if [ -e /etc/sshd/sshd_config ]
echo "gentoo" > /etc/dnsdomainname
echo "127.0.0.1 livecd.gentoo livecd localhost" > /etc/hosts
;;
+ *)
+ echo "catalyst-livecd" > /etc/hostname
+ echo "gentoo" > /etc/dnsdomainname
+ echo "127.0.0.1 catalyst-livecd.gentoo livecd localhost" > /etc/hosts
+ ;;
esac
# Add any users
fi
# setup sudoers
-sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
+if [ -f /etc/sudoers ]
+then
+ sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
+fi
# we want the first user to be used when auto-starting X
if [ -n "${clst_livecd_users}" -a -e /etc/startx ]
rm -rf /usr/livecd/profiles/{co*,default-{1*,a*,b*,d*,h*,i*,m*,p*,s*,x*},g*,hardened-*,n*,x*}
mv -f /etc/gconf /usr/livecd
mv -f /var/db /usr/livecd
+ ;;
generic-livecd )
# This is my hack to reduce tmpfs usage
mkdir -p /usr/livecd
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+. ${clst_sharedir}/targets/support/functions.sh
+. ${clst_sharedir}/targets/support/filesystem-functions.sh
+
+# Make the directory if it doesnt exist
+mkdir -p $1
+
+loopret=1
+case ${clst_fstype} in
+ normal)
+ create_normal_loop $1
+ loopret=$?
+ ;;
+ zisofs)
+ create_zisofs $1
+ loopret=$?
+ ;;
+ noloop)
+ create_noloop $1
+ loopret=$?
+ ;;
+ gcloop)
+ create_gcloop $1
+ loopret=$?
+ ;;
+ squashfs)
+ create_squashfs $1
+ loopret=$?
+ ;;
+ jffs)
+ create_jffs $1
+ loopret=$?
+ ;;
+ jffs2)
+ create_jffs2 $1
+ loopret=$?
+ ;;
+ cramfs)
+ create_cramfs $1
+ loopret=$?
+ ;;
+esac
+exit $loopret