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 > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 01-30-2011, 09:31 PM
Peter Jones
 
Default Get rid of stuff Lorax replaces.

long live mk-images. Long live buildinstall.
---
scripts/Makefile.am | 6 +-
scripts/buildinstall | 254 --------
scripts/buildinstall.functions | 151 -----
scripts/getkeymaps | 75 ---
scripts/mk-images | 553 ----------------
scripts/mk-images.alpha | 119 ----
scripts/mk-images.efi | 258 --------
scripts/mk-images.ia64 | 160 -----
scripts/mk-images.ppc | 174 -----
scripts/mk-images.s390 | 61 --
scripts/mk-images.sparc | 172 -----
scripts/mk-images.x86 | 162 -----
scripts/scrubtree | 56 --
scripts/upd-instroot | 1362 ----------------------------------------
14 files changed, 2 insertions(+), 3561 deletions(-)
delete mode 100755 scripts/buildinstall
delete mode 100755 scripts/buildinstall.functions
delete mode 100755 scripts/getkeymaps
delete mode 100755 scripts/mk-images
delete mode 100644 scripts/mk-images.alpha
delete mode 100644 scripts/mk-images.efi
delete mode 100644 scripts/mk-images.ia64
delete mode 100644 scripts/mk-images.ppc
delete mode 100644 scripts/mk-images.s390
delete mode 100644 scripts/mk-images.sparc
delete mode 100644 scripts/mk-images.x86
delete mode 100755 scripts/scrubtree
delete mode 100755 scripts/upd-instroot

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 329a2fc..cf4901e 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -18,10 +18,8 @@
# Author: David Cantrell <dcantrell@redhat.com>

scriptsdir = $(libexecdir)/$(PACKAGE_NAME)
-dist_scripts_SCRIPTS = upd-instroot mk-images buildinstall
- buildinstall.functions scrubtree getkeymaps
- makestamp.py maketreeinfo.py upd-updates
-dist_scripts_DATA = mk-images.* pyrc.py
+dist_scripts_SCRIPTS = makestamp.py maketreeinfo.py upd-updates
+dist_scripts_DATA = pyrc.py
dist_noinst_SCRIPTS = getlangnames.py upd-bootimage upd-initrd upd-kernel
makeupdates

diff --git a/scripts/buildinstall b/scripts/buildinstall
deleted file mode 100755
index 65e5fb3..0000000
--- a/scripts/buildinstall
+++ /dev/null
@@ -1,254 +0,0 @@
-#!/bin/bash
-#
-# buildinstall
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-die() {
- [ -n "$TREEDIR" ] && rm -rf $TREEDIR
- [ -n "$BUILDINSTDIR" ] && rm -rf $BUILDINSTDIR
- [ -n "$yumconf" ] && rm -rf $yumconf
- echo "Aborting buildinstall"
- echo "$@"
- exit 1
-}
-
-usage() {
- echo "Usage: buildinstall --version <version> --brand <brand> --product <product> --release <comment> [--output outputdir] <root>" >&2
- exit 1
-}
-
-CWD="$(pwd)"
-ISBETA="false"
-
-while [ $# -gt 0 ]; do
- case $1 in
- # general options affecting how we build things
- --nogr)
- NOGRSTR="--nogr"
- shift
- ;;
- --debug)
- DEBUGSTR="--debug"
- shift
- ;;
- --localscripts)
- LOCALSCRIPTS="yes"
- shift
- ;;
-
- # release information
- --version)
- VERSION=$2
- shift; shift
- ;;
- --release)
- RELEASESTR=$2
- shift; shift
- ;;
- --product)
- PRODUCTSTR=$2
- shift; shift
- ;;
- --brand)
- BRANDSTR=$2
- shift; shift
- ;;
- --variant)
- VARIANT=$2
- shift; shift
- ;;
- --bugurl)
- BUGURL=$2
- shift; shift
- ;;
- --output)
- OUTPUT=$2
- shift; shift
- ;;
- --updates)
- UPDATES=$2
- shift; shift
- ;;
- --mirrorlist)
- MIRRORLIST="$MIRRORLIST $2"
- shift; shift
- ;;
- --isbeta)
- ISBETA="true"
- shift
- ;;
-
- *)
- if [ -z "$REPO" ]; then
- REPO=$1
- else
- EXTRA_REPOS="$EXTRA_REPOS $1"
- fi
- shift
- ;;
- esac
-done
-
-if [ -z "$PRODUCTSTR" ]; then
- usage
-fi
-
-if [ -z "$VERSION" ]; then
- usage
-fi
-
-if [ -z "$REPO" ]; then
- usage
-fi
-
-if [ -z "$RELEASESTR" ]; then
- usage
-fi
-
-if [ -z "$BUGURL" ]; then
- BUGURL="your distribution provided bug reporting tool."
-fi
-
-if [[ "$REPO" =~ ^/ ]]; then
- [ -n "$OUTPUT" ] || OUTPUT=$REPO
- REPO="file://$REPO"
-fi
-
-if [ -z "$OUTPUT" ]; then
- usage
-fi
-
-if [ ! -d "$OUTPUT" ]; then
- mkdir -p $OUTPUT
-fi
-
-# The first -release and -logos package we are going to look for is the lowercase
-if [ -z "$BRANDSTR" ]; then
- BRANDSTR="`echo $PRODUCTSTR | tr '[:upper:]' '[:lower:]'`"
-fi
-export brandpkgname="$BRANDSTR"
-
-BUILDINSTDIR=$(mktemp -d ${TMPDIR:-/tmp}/buildinstall.tree.XXXXXX)
-TREEDIR=$(mktemp -d ${TMPDIR:-/tmp}/treedir.XXXXXX)
-CACHEDIR=$(mktemp -d ${TMPDIR:-/tmp}/yumcache.XXXXXX)
-
-yumconf=$(mktemp ${TMPDIR:-/tmp}/yum.conf.XXXXXX)
-cat > $yumconf <<EOF
-[main]
-cachedir=$CACHEDIR
-keepcache=0
-gpgcheck=0
-plugins=0
-reposdir=
-tsflags=nodocs
-
-[anacondarepo]
-name=anaconda repo
-baseurl=$REPO
-enabled=1
-EOF
-
-n=1
-for r in $EXTRA_REPOS; do
- if [[ $r =~ ^/ ]]; then
- r="file://$r"
- fi
- cat >> $yumconf <<EOF
-
-[anaconda-extrarepo-$n]
-name=anaconda extra repo $n
-baseurl=$r
-enabled=1
-EOF
- let n++
-done
-
-n=1
-for l in $MIRRORLIST; do
- cat >> $yumconf <<EOF
-
-[anaconda-mirrorlistrepo-$n]
-name=anaconda mirrorlist repo $n
-mirrorlist=$l
-enabled=1
-EOF
- let n++
-done
-
-echo "Running buildinstall..."
-
-if [ "$LOCALSCRIPTS" = "yes" ]; then
- UPD_INSTROOT="$CWD/upd-instroot"
- MK_IMAGES="$CWD/mk-images"
- MK_TREEINFO="$CWD/maketreeinfo.py"
- MK_STAMP="$CWD/makestamp.py"
- BUILDINSTALL="$CWD/buildinstall"
-else
- pushd $BUILDINSTDIR
- BUILDARCH=`repoquery -c $yumconf --qf "%{ARCH}
" anaconda`
- # lets use rpmutils to make sure we have the canonical basearch
- # BUILDARCH != BASEARCH (e.g. i586 != i386, sparcv9 != sparc)
- BASEARCH=`python -c "import rpmUtils.arch;
- print rpmUtils.arch.getBaseArch(myarch=rpmUtils.arch.get CanonArch(skipRpmPlatform = True));"`
- yumdownloader -c $yumconf anaconda || exit 1
- rpm2cpio anaconda*rpm | cpio --quiet -iumd './usr*'
- rm -f anaconda*rpm
- popd
-
- UPD_INSTROOT=./upd-instroot
- MK_IMAGES=./mk-images
- MK_TREEINFO=./maketreeinfo.py
- MK_STAMP=./makestamp.py
- BUILDINSTALL=./buildinstall
-
- for f in $UPD_INSTROOT $MK_IMAGES $MK_STAMP $MK_TREEINFO $BUILDINSTALL; do
- if [ -n "$UPDATES" -a -f $UPDATES/usr/libexec/anaconda/$f ]; then
- cp -a $UPDATES/usr/libexec/anaconda/$f* $BUILDINSTDIR/
- elif [ ! -f $f ]; then
- cp -a $BUILDINSTDIR/usr/libexec/anaconda/$f* $BUILDINSTDIR/
- else
- cp -a $f* $BUILDINSTDIR/
- fi
- done
-
- UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
- MK_IMAGES=$BUILDINSTDIR/mk-images
- MK_TREEINFO=$BUILDINSTDIR/maketreeinfo.py
- MK_STAMP=$BUILDINSTDIR/makestamp.py
- BUILDINSTALL=$BUILDINSTDIR/buildinstall
-fi
-
-if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi
-
-echo "Building images..."
-$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install $yumconf || die "upd-instroot failed"
-
-echo "Writing .treeinfo file..."
-# NOTE --arch must match MK_IMAGES or the resulting treeinfo will be invalid
-$MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"} --version=$VERSION --arch=$BASEARCH --outfile=$OUTPUT/.treeinfo
-
-# FIXME: need to update mk-images to take the yumconf
-echo "Making images: $PWD"
-echo $MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf
-$MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf || die "image creation failed"
-
-echo "Writing .discinfo file"
-$MK_STAMP --releasestr="$RELEASESTR" --arch=$BASEARCH --outfile=$OUTPUT/.discinfo
-
-rm -rf $TREEDIR $BUILDINSTDIR
-rm -f $yumconf
diff --git a/scripts/buildinstall.functions b/scripts/buildinstall.functions
deleted file mode 100755
index 6c142ce..0000000
--- a/scripts/buildinstall.functions
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/bin/bash
-
-# pulled right out of mkinitrd....
-export LD_HWCAP_MASK=0
-DSO_DEPS=""
-LDSO=""
-get_dso_deps() {
- root="$1" ; shift
- bin="$1" ; shift
- LDSODIR="$1" ; shift
- DSO_DEPS=""
-
- declare -a FILES
- declare -a NAMES
- [ -z "$LDSODIR" ] && LDSODIR=$LIBDIR
-
- # this is a hack, but the only better way requires binutils or elfutils
- # be installed. i.e., we need readelf to find the interpretter.
- if [ -n "$LDSO" ]; then
- $LDSO --verify $root/$bin >/dev/null 2>&1
- case $? in
- [02]) ;;
- *) unset LDSO ;;
- esac
- fi
- if [ -z "$LDSO" ]; then
- for ldso in $root/$LDSODIR/ld*.so* ; do
- [ -L $ldso ] && continue
- [ -x $ldso ] || continue
- $ldso --verify $root/$bin >/dev/null 2>&1
- case $? in
- [02]) LDSO=$(echo $ldso |sed -e "s,$root,,") ; break ;;
- esac
- done
- fi
-
- # I still hate shell.
- declare -i n=0
- while read NAME I0 FILE ADDR I1 ; do
- [ "$FILE" == "not" ] && FILE="$FILE $ADDR"
- NAMES[$n]="$NAME"
- FILES[$n]="$FILE"
- let n++
-
- # try to find a generic version
- local basedir=$(dirname $(dirname "$FILE"))
- local basefile=$(basename "$FILE")
- if [ -f "$basedir/$basefile" ]; then
- NAMES[$n]="$NAME"
- FILES[$n]="$basedir/$basefile"
- let n++
- fi
- done << EOF
- $(/usr/sbin/chroot $root env --unset=LD_LIBRARY_PATH
- LD_TRACE_PRELINKING=1 LD_WARN=
- LD_TRACE_LOADED_OBJECTS=1 $LDSO $bin)
-EOF
-
- [ ${#FILES[*]} -eq 0 ] && return 1
-
- # we don't want the name of the binary in the list
- if [ "${FILES[0]}" == "$bin" ]; then
- FILES[0]=""
- NAMES[0]=""
- [ ${#FILES[*]} -eq 1 ] && return 1
- fi
-
- declare -i n=0
- while [ $n -lt ${#FILES[*]} ]; do
- FILE="${FILES[$n]}"
- if [ "$FILE" == "not found" ]; then
- echo "WARNING: The dynamic object $bin requires ${NAMES[$n]} n order to properly function."
- continue
- fi
- case "$FILE" in
- /lib*)
- TLIBDIR=`echo "$FILE" | sed 's,(/lib[^/]*)/.*$,1,'`
- BASE=`basename "$FILE"`
- # Prefer nosegneg libs over direct segment accesses on i686.
- if [ -f "$TLIBDIR/i686/nosegneg/$BASE" ]; then
- FILE="$TLIBDIR/i686/nosegneg/$BASE"
- # Otherwise, prefer base libraries rather than their optimized
- # variants.
- elif [ -f "$TLIBDIR/$BASE" ]; then
- FILE="$TLIBDIR/$BASE"
- fi
- ;;
- esac
- dynamic="yes"
- let n++
- done
-
- DSO_DEPS="${FILES[@]}"
-
- for l in $(/usr/sbin/chroot $root find /$LDSODIR -maxdepth 1 -type l -name ld*.so*); do
- [ "$(/usr/sbin/chroot $root readlink -f $l)" == "$LDSO" ] && DSO_DEPS="$DSO_DEPS $l"
- done
- if [ "$(uname -m)" == "s390x" ]; then
- for l in $(/usr/sbin/chroot $root find /lib -maxdepth 1 -type l -name ld*.so*); do
- [ "$(/usr/sbin/chroot $root readlink -f $l)" == "$LDSO" ] && DSO_DEPS="$DSO_DEPS $l"
- done
- fi
-
- [ -n "$DEBUG" ] && echo "DSO_DEPS for $bin are $DSO_DEPS"
-}
-
-instFile() {
- FILE=$1
- DESTROOT=$2
-
- [ -n "$DEBUG" ] && echo "Installing $FILE"
- if [ -e $DESTROOT/$FILE -o -L $DESTROOT/$FILE ]; then
- return
- elif [ ! -d $DESTROOT/`dirname $FILE` ]; then
- mkdir -p $DESTROOT/`dirname $FILE`
- fi
- if [ -L $FILE ]; then
- cp -al $FILE $DESTROOT/`dirname $FILE`
- instFile ./`dirname $FILE`/`readlink $FILE` $DESTROOT
- return
- else
- cp -aL $FILE $DESTROOT/`dirname $FILE`
- fi
-
- f=$(file $FILE)
- echo $f | egrep -q ": (setuid )?ELF" &&
- echo $f | egrep -qv "statically linked" && {
- if echo $f | grep -q " 64-bit " ; then
- get_dso_deps $(pwd) "$FILE" lib64
- else
- get_dso_deps $(pwd) "$FILE" lib
- fi
- local DEPS="$DSO_DEPS"
- for x in $DEPS ; do
- instFile ./$x $DESTROOT
- done
- }
- unset f
-}
-
-instDir() {
- DIR=$1
- DESTROOT=$2
-
- [ -n "$DEBUG" ] && echo "Installing $DIR"
- if [ -d $DESTROOT/$DIR -o -h $DESTROOT/$DIR ]; then
- return
- fi
- cp -a --parents $DIR $DESTROOT/
-}
-
diff --git a/scripts/getkeymaps b/scripts/getkeymaps
deleted file mode 100755
index 137ae5e..0000000
--- a/scripts/getkeymaps
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# getkeymaps
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-ARCH=$1
-if [ -z "$ARCH" ]; then
- echo "usage: $0 <arch>"
- exit 1
-fi
-
-if [ "$ARCH" = "x86_64" -o "$ARCH" = "s390x" -o "$ARCH" = "ppc64" ]; then
- LIBDIR=lib64
-else
- LIBDIR=lib
-fi
-
-TOPDIR=`pwd`
-OUTPUT=$2
-if [ -z "$OUTPUT" ]; then
- echo "No output specified, using ${TMPDIR:-/tmp}/keymaps-$ARCH.$$"
- OUTPUT=${TMPDIR:-/tmp}/keymaps-$ARCH.$$
-fi
-
-UTILDIR=$3
-if [ -z "$UTILDIR" ]; then
- READMAP=../utils/readmap
- MAPSHDR=$TOPDIR/../utils/mapshdr
-else
- READMAP=$UTILDIR/usr/libexec/anaconda/readmap
- MAPSHDR=$UTILDIR/usr/libexec/anaconda/mapshdr
-fi
-
-TMP=${TMPDIR:-/tmp}/keymaps.$$
-
-rm -rf $TMP
-mkdir -p $TMP
-
-if [ $ARCH = "sparc" ]; then
- PATTERN={i386,sun}
-else
- PATTERN=i386
-fi
-
-MAPS=$(python -c "import system_config_keyboard.keyboard_models ; system_config_keyboard.keyboard_models.get_support ed_models()")
-
-for map in $MAPS ; do
- eval find /lib/kbd/keymaps/$PATTERN -name "$map.map*.gz" | while read n; do
- /bin/loadkeys `basename $n .gz` >/dev/null
- $READMAP $TMP/`basename $n .map.gz`.map
- done
-done
-
-loadkeys us
-
-rm -f $TMP/defkeymap* $TMP/ANSI* $TMP/lt.map
-
-(cd $TMP; $MAPSHDR *.map) > $TMP/hdr
-cat $TMP/hdr $TMP/*.map | gzip -9 > $OUTPUT
-rm -rf $TMP
diff --git a/scripts/mk-images b/scripts/mk-images
deleted file mode 100755
index 7d842f4..0000000
--- a/scripts/mk-images
+++ /dev/null
@@ -1,553 +0,0 @@
-#!/bin/bash
-#
-# mk-images
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-LANG=C
-
-PATH=$PATH:/sbin:/usr/sbin
-IMAGEUUID=$(date +%Y%m%d%H%M).$(uname -i)
-TMPDIR=${TMPDIR:-/tmp}
-
-usage () {
- echo "usage: mk-images <pkgsrc> <toplevel> <template> <imgdir> <buildarch> <productname> <version>"
- exit 0
-}
-
-DEBUG=""
-BUILDARCH=`uname -m`
-BOOTISO="boot.iso"
-ISBETA="false"
-
-while [ $# -gt 0 ]; do
- case $1 in
- --debug)
- DEBUG="--debug"
- shift
- ;;
- --noiso)
- BOOTISO=""
- shift
- ;;
- --isbeta)
- ISBETA="true"
- shift
- ;;
- --arch)
- BUILDARCH=$2
- shift; shift
- ;;
- --imgdir)
- IMGPATH=$2
- shift; shift
- ;;
- --product)
- PRODUCT=$2
- shift; shift
- ;;
- --version)
- VERSION=$2
- shift; shift
- ;;
- --bugurl)
- BUGURL=$2
- shift; shift
- ;;
- --output)
- TOPDESTPATH=$2
- shift; shift
- ;;
- --nogr)
- echo "*** DeprecationWarning: ignoring --nogr option." >&2
- shift
- ;;
- --mindir)
- echo "*** DeprecationWarning: ignoring --mindir option." >&2
- shift; shift
- ;;
- --stg2dir)
- echo "*** DeprecationWarning: please use --imgdir instead of --stg2dir." >&2
- shift; shift
- ;;
- *)
- yumconf=$1
- shift
- ;;
- esac
-done
-
-if [ -z "$TOPDESTPATH" -o -z "$IMGPATH" -o -z "$PRODUCT" -o -z "$VERSION" ]; then usage; fi
-
-TOPDIR=$(echo $0 | sed "s,/[^/]*$,,")
-if [ $TOPDIR = $0 ]; then
- $TOPDIR="."
-fi
-TOPDIR=$(cd $TOPDIR; pwd)
-
-# modules that are needed. this is the generic "needed for every arch" stuff
-COMMONMODS="fat vfat nfs sunrpc lockd floppy cramfs loop edd pcspkr squashfs ipv6 8021q virtio_pci netconsole"
-UMSMODS="ums-jumpshot ums-datafab ums-freecom ums-usbat ums-sddr55 ums-onetouch ums-alauda ums-karma ums-sddr09 ums-cypress"
-USBMODS="$UMSMODS ohci-hcd uhci-hcd ehci-hcd usbhid mousedev usb-storage sd_mod sr_mod ub appletouch bcm5974"
-FIREWIREMODS="ohci1394 sbp2 fw-ohci fw-sbp2 firewire-sbp2 firewire-ohci"
-SDMODS="mmc-block sdhci sdhci-pci"
-IDEMODS="ide-cd ide-cd_mod"
-SCSIMODS="sr_mod sg st sd_mod scsi_mod iscsi_tcp iscsi_ibft scsi_wait_scan cxgb3i bnx2i be2iscsi"
-FSMODS="fat msdos vfat ext2 ext3 ext4 reiserfs jfs xfs gfs2 cifs fuse btrfs hfsplus"
-LVMMODS="dm-mod dm-zero dm-snapshot dm-mirror dm-multipath dm-round-robin dm-crypt"
-RAIDMODS="raid0 raid1 raid5 raid6 raid456 raid10 linear"
-CRYPTOMODS="sha256_generic cbc xts lrw aes_generic crypto_blkcipher crc32c ecb arc4"
-PCMCIASOCKMODS="yenta_socket i82365 tcic pcmcia"
-INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS $CRYPTOMODS $COMMONMODS $PCMCIASOCKMODS $SDMODS =scsi =net =drm"
-
-. $(dirname $0)/buildinstall.functions
-
-# Set, verify, and create paths
-IMAGEPATH=$TOPDESTPATH/images
-FULLMODPATH=$TMPDIR/instimagemods.$$
-FINALFULLMODPATH=$IMGPATH/modules
-INSTIMGPATH=$TOPDESTPATH/images
-KERNELBASE=$TMPDIR/updboot.kernel.$$
-
-KERNELNAME=vmlinuz
-if [ "$BUILDARCH" = "ia64" ]; then
- KERNELDIR="/boot/efi/EFI/redhat"
-else
- KERNELDIR="/boot"
-fi
-
-if [ "$BUILDARCH" = "sparc64" ]; then
- BASEARCH=sparc
-elif [ "$BUILDARCH" = "ppc64" ]; then
- BASEARCH=ppc
-else
- BASEARCH=$BUILDARCH
-fi
-
-# explicit block size setting for some arches (FIXME: we compose
-# ppc64-ish trees as ppc, so we have to set the "wrong" block size)
-if [ "$BUILDARCH" = "sparc64" ]; then
- CRAMBS="--blocksize 8192"
-elif [ "$BUILDARCH" = "sparc" ]; then
- CRAMBS="--blocksize 4096"
-else
- CRAMBS=""
-fi
-
-if [ "$BUILDARCH" = "x86_64" -o "$BUILDARCH" = "s390x" -o "$BUILDARCH" = "ppc64" ]; then
- LIBDIR=lib64
-else
- LIBDIR=lib
-fi
-
-rm -rf $IMAGEPATH
-rm -rf $FULLMODPATH
-rm -rf $FINALFULLMODPATH
-rm -rf $KERNELBASE
-mkdir -p $IMAGEPATH
-mkdir -p $FULLMODPATH
-mkdir -p $FINALFULLMODPATH
-mkdir -p $KERNELBASE
-mkdir -p $INSTIMGPATH
-
-# Stuff that we need
-TRIMPCIIDS=$IMGPATH/usr/libexec/anaconda/trimpciids
-GETKEYMAPS=$IMGPATH/usr/libexec/anaconda/getkeymaps
-LIBEXECBINDIR=$IMGPATH/usr/libexec/anaconda
-ADDRSIZE=$IMGPATH/usr/$LIBDIR/anaconda/addrsize
-MKS390CDBOOT=$IMGPATH/usr/$LIBDIR/anaconda/mk-s390-cdboot
-GENMODINFO=$IMGPATH/usr/libexec/anaconda/genmodinfo
-SCREENFONT=$IMGPATH/usr/share/anaconda/screenfont-${BASEARCH}.gz
-MODLIST=$IMGPATH/usr/libexec/anaconda/modlist
-MODINFO=$TMPDIR/modinfo-$BUILDARCH.$$
-LOADERBINDIR=$IMGPATH/usr/$LIBDIR/anaconda
-BOOTDISKDIR=$IMGPATH/usr/share/anaconda/boot
-LANGTABLE=$IMGPATH/usr/share/anaconda/lang-table
-PCIIDS=$IMGPATH/usr/share/hwdata/pci.ids
-XDRIVERS=$IMGPATH/usr/share/hwdata/videoaliases
-XDRIVERDESCS=$IMGPATH/usr/share/hwdata/videodrivers
-
-REQUIREMENTS="$TRIMPCIIDS $PCIIDS $XDRIVERDESCS $GENMODINFO
- $LANGTABLE $GETKEYMAPS"
-
-dieLater=
-for n in $REQUIREMENTS; do
- if [ ! -f $n ]; then
- echo "$n doesn't exist"
- dieLater=1
- fi
-done
-
-for n in $BOOTDISKDIR; do
- if [ ! -d $n ]; then
- echo "$n doesn't exist"
- dieLater=1
- fi
-done
-
-if [ -n "$dieLater" ]; then exit 1; fi
-
-if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then
- # go ahead and create the keymaps so we only have to do it once
- if [ -f $IMGPATH/usr/share/anaconda/keymaps-override-$BASEARCH ]; then
- echo "Found keymap override, using it"
- cp $IMGPATH/usr/share/anaconda/keymaps-override-$BASEARCH $IMGPATH/etc/keymaps.gz
- else
- echo "Running: $GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH"
- $GETKEYMAPS $BUILDARCH $IMGPATH/etc/keymaps.gz $IMGPATH
- if [ $? != 0 ]; then
- echo "Unable to create keymaps and thus can't create initrd."
- exit 1
- fi
- fi
-fi
-
-findPackage() {
- name=$1
-
- pkg=$(repoquery --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}" -c $yumconf --archlist=$KERNELARCH $name.$KERNELARCH)
- if [ -n "$pkg" ]; then
- echo $pkg
- return
- fi
- echo "cannot find package $name" >&2
-}
-
-rundepmod () {
- where=$1
-
- $FAKEARCH /sbin/depmod -a -F $KERNELROOT/boot/System.map-$version
- -b $where $version
-}
-
-# This loops to make sure it resolves dependencies of dependencies of...
-resdeps () {
- items="$*"
-
- deplist=""
- for item in $items ; do
- deps=$(awk -F ':' "/$item.ko: / { print gensub(".*/$item.ko: ","","g") }" $KERNELROOT/lib/modules/$version/modules.dep)
- for dep in $deps ; do
- depfile=${dep##*/}
- depname=${dep%%.ko}
- deplist="$deplist $depname"
- done
- done
- items=$(for n in $items $deplist; do echo $n; done | sort -u)
- echo $items
-}
-
-expandModuleSet() {
- SET=""
- for name in $1; do
- char=$(echo $name | cut -c1)
- if [ $char = '=' ]; then
- NAME=$(echo $name | cut -c2-)
- if [ "$NAME" = "ata" ]; then
- SET="$SET $(egrep '(ata|ahci)' $KERNELROOT/lib/modules/$version/modules.block |sed -e 's/.ko//')"
- elif [ "$NAME" = "scsi" ]; then
- SET="$SET $(sed -e 's/.ko//' $KERNELROOT/lib/modules/$version/modules.block)"
- elif [ "$NAME" = "net" ]; then
- SET="$SET $(sed -e 's/.ko//' $KERNELROOT/lib/modules/$version/modules.networking)"
- else
- # Ignore if group list does not exist
- if [ -e $KERNELROOT/lib/modules/$version/modules.$NAME ]; then
- SET="$SET $(sed -e 's/.ko//' $KERNELROOT/lib/modules/$version/modules.$NAME)"
- fi
- fi
- else
- SET="$SET $name"
- fi
- done
-
- echo $SET
-}
-
-makemoduletree() {
- MMB_DIR=$1
- MMB_MODULESET=$(resdeps $2)
-
- mkdir -p $MMB_DIR/lib
- mkdir -p $MMB_DIR/modules
- mkdir -p $MMB_DIR/firmware
- ln -snf ../modules $MMB_DIR/lib/modules
- ln -snf ../firmware $MMB_DIR/lib/firmware
-
- echo "Copying kernel modules..."
- # might not be the first kernel we are building the image for, remove the target dir's contents
- rm -rf $MMB_DIR/lib/modules/*
- cp -a $KERNELROOT/lib/modules/* $MMB_DIR/lib/modules/
- echo "Removing extraneous modules..."
- find $MMB_DIR/lib/modules/ -name *.ko | while read module ; do
- m=${module##*/}
- modname=${m%%.ko}
- echo $MMB_MODULESET | grep -wq $modname || {
- rm -f $module
- }
- done
-
- echo "Copying required firmware..."
- find $MMB_DIR/lib/modules/ -name *.ko | while read module ; do
- for fw in $(modinfo -F firmware $module); do
- dest=$MMB_DIR/firmware/$fw
- destdir=$(dirname $dest)
-
- # Some firmware files are expected to be in their own directories.
- if [ ! -d $destdir ]; then
- mkdir -p $destdir
- fi
-
- cp $KERNELROOT/lib/firmware/$fw $dest
- done
- done
-
- # Copy in driver firmware we know we'll want during installation. This is
- # required for modules which still don't (or can't) export information
- # about what firmware files they require.
- for module in $MODSET ; do
- case $module in
- ipw2100)
- cp $KERNELROOT/lib/firmware/ipw2100* $MMB_DIR/firmware
- ;;
- ipw2200)
- cp $KERNELROOT/lib/firmware/ipw2200* $MMB_DIR/firmware
- ;;
- iwl3945)
- cp $KERNELROOT/lib/firmware/iwlwifi-3945* $MMB_DIR/firmware
- ;;
- atmel)
- cp $KERNELROOT/lib/firmware/atmel_*.bin $MMB_DIR/firmware
- ;;
- zd1211rw)
- cp -r $KERNELROOT/lib/firmware/zd1211 $MMB_DIR/firmware
- ;;
- esac
- done
-
- # create depmod.conf to support DDs
- mkdir -p $MMB_DIR/etc/depmod.d
- cat > $MMB_DIR/etc/depmod.d/dd.conf << EOF
-search updates built-in
-EOF
-
- # clean up leftover cruft
- find -H $MMB_DIR/lib/modules -type d -exec rmdir -f {} ; 2>/dev/null
- $MODLIST --modinfo-file $MODINFO --ignore-missing --modinfo
- $MMB_MODULESET > $MMB_DIR/lib/modules/module-info
- # compress modules
- find -H $MMB_DIR/lib/modules -type f -name *.ko -exec gzip -9 {} ;
- rundepmod $MMB_DIR
- rm -f $MMB_DIR/lib/modules/*/modules.*map
- rm -f $MMB_DIR/lib/modules/*/{build,source}
-
- # create the pci.ids, from modules.alias and the X driver aliases
- awk '!/^( |#)/ { print ;if ($0 == "ffff Illegal Vendor ID") nextfile; }' < $PCIIDS |
- $TRIMPCIIDS $MMB_DIR/lib/modules/*/modules.alias $XDRIVERS/* > ../pci.ids
-}
-
-
-makeproductfile() {
- root=$1
-
- rm -f $root/.buildstamp
- cat > $root/.buildstamp << EOF
-[Main]
-BugURL=$BUGURL
-IsBeta=$ISBETA
-Product=$PRODUCT
-UUID=$IMAGEUUID
-Version=$VERSION
-EOF
-}
-
-makeinitrd() {
- INITRDMODULES=""
- KEEP=""
- OUTFILE=""
-
- while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
- if [ $1 = "--dest" ]; then
- OUTFILE=$2
- shift; shift
- continue
- elif [ $1 = "--keep" ]; then
- KEEP=yes
- shift
- continue
- elif [ $1 = "--modules" ]; then
- INITRDMODULES=$2
- shift; shift
- continue
- fi
- echo "Unknown option passed to makeinitrd"
- exit 1
- done
-
- if [ -z "$INITRDMODULES" ]; then
- echo "warning: no loader modules specified!" >&2
- fi
-
- MBD_FSIMAGE=$TMPDIR/makebootdisk.initrdimage.$$
- MBD_BOOTTREE=$TMPDIR/makebootdisk.tree.$$
-
- if [ -n "$INITRDMODULES" ]; then
- MODSET=`expandModuleSet "$INITRDMODULES"`
- makemoduletree $IMGPATH "$MODSET"
- fi
-
- makeproductfile $IMGPATH
-
- rm -f $MBD_FSIMAGE
- (cd $IMGPATH; find . |cpio --quiet -c -o) |gzip -9 > $MBD_FSIMAGE
-
- size=$(du $MBD_FSIMAGE | awk '{ print $1 }')
-
- echo "Wrote $MBD_FSIMAGE (${size}k compressed)"
-
- if [ -n "$OUTFILE" ]; then
- mkdir -p `dirname $OUTFILE`
- cp -a $MBD_FSIMAGE $OUTFILE
- fi
-
- if [ -z "$KEEP" ]; then
- rm -rf $MBD_FSIMAGE $MBD_BOOTTREE
- fi
-}
-
-doPostImages() {
- /bin/true
-}
-
-# this gets overloaded if we're on an EFI-capable arch (... with grub)
-makeEfiImages()
-{
- echo "Not on an EFI capable machine; skipping EFI images."
- /bin/true
-}
-
-# source the architecture specific mk-images file so we can call functions
-# in it
-if [ ${BUILDARCH} = s390x ]; then
- # FIXME: this is a bad hack for s390, but better than copying for now
- source $TOPDIR/mk-images.s390
-elif [ ${BUILDARCH} = ppc64 ]; then
- # ... and similar for ppc64
- source $TOPDIR/mk-images.ppc
-elif [ ${BUILDARCH} = "x86_64" ]; then
- export UEFI_BOOT_ISO="no"
- source $TOPDIR/mk-images.x86
- source $TOPDIR/mk-images.efi
-elif [ ${BUILDARCH} = "i386" ]; then
- source $TOPDIR/mk-images.x86
-elif [ ${BUILDARCH} = "sparc64" -o ${BUILDARCH} = "sparcv9" ]; then
- source $TOPDIR/mk-images.sparc
-else
- source $TOPDIR/mk-images.${BUILDARCH}
-fi
-
-# Find the kernel, unpack it, and verify it
-kerneltags="kernel"
-efiarch=""
-arches="$BUILDARCH"
-if [ "$BUILDARCH" = "ppc" ]; then
- arches="ppc64 ppc"
-elif [ "$BUILDARCH" = "i386" ]; then
- arches="i586"
- efiarch="ia32"
- kerneltags="kernel kernel-PAE"
- kernelxen="kernel-PAE"
-elif [ "$BUILDARCH" = "x86_64" ]; then
- kerneltags="kernel"
- efiarch="x64"
-elif [ "$BUILDARCH" = "ia64" ]; then
- kerneltags="kernel"
- efiarch="ia64"
-elif [ "$BUILDARCH" = "sparc" -o "$BUILDARCH" = "sparcv9" -o "$BUILDARCH" = "sparc64" ]; then
- arches="sparc64"
-fi
-
-foundakernel=""
-for KERNELARCH in $arches; do
- for kernelvers in $kerneltags; do
- kpackage=$(findPackage $kernelvers)
- if [ "$KERNELARCH" = "i586" -a -z "$kpackage" ]; then
- echo "No i586 kernel, trying i686..."
- KERNELARCH="i686"
- kpackage=$(findPackage $kernelvers)
- fi
-
- if [ -z "$kpackage" ]; then
- echo "Unable to find kernel package $kernelvers"
- continue
- fi
-
- yumdownloader -c $yumconf --archlist=$KERNELARCH $kpackage
- kpackage="$kpackage.rpm"
- if [ ! -f "$kpackage" ]; then
- echo "kernel ($kernelvers) doesn't exist for $KERNELARCH. skipping"
- continue
- fi
-
- KERNELROOT=$KERNELBASE/$KERNELARCH
- mkdir -p $KERNELROOT
- rm -rf $KERNELROOT/* # in case we already populated the dir for a previous kernel tag
-
- foundakernel="yes"
-
- if [ "$BUILDARCH" = "ia64" ]; then
- vmlinuz=$(rpm --nodigest --nosignature -qpl $kpackage |grep ^/boot/efi/EFI/redhat/vmlinuz | head -n 1)
- version=${vmlinuz##/boot/efi/EFI/redhat/vmlinuz-}
- else
- vmlinuz=$(rpm --nodigest --nosignature -qpl $kpackage |grep ^/boot/vmlinuz | head -n 1)
- version=${vmlinuz##/boot/vmlinuz-}
- fi
- arch=$(rpm --nodigest --nosignature --qf '%{ARCH}
' -qp $kpackage)
-
- rpm2cpio $kpackage | (cd $KERNELROOT; cpio --quiet -iumd)
- rm -f $kpackage
- # expand out any available firmware too
- for p in $(repoquery -c $yumconf '*firmware*') ; do
- yumdownloader -c $yumconf $p
- rpm2cpio *firmware*.rpm | (cd $KERNELROOT; cpio --quiet -iumd)
- rm -f *firmware*.rpm
- done
-
- if [ ! -d "$KERNELROOT/lib/modules/$version" ]; then
- echo "$KERNELROOT/lib/modules/$version is not a valid modules directory" 2>&1
- exit 1
- fi
-
- if [ ! -f "$KERNELROOT/$KERNELDIR/${KERNELNAME}-$version" ]; then
- echo "$KERNELROOT/$KERNELDIR/${KERNELNAME}-$version does not exist"
- exit 1
- fi
-
- allmods=$(find $KERNELROOT/lib/modules/$version -name *.ko)
-
- rundepmod $KERNELROOT
- $GENMODINFO $KERNELROOT/lib/modules/$version > $MODINFO
-
- # make the boot images
- makeBootImages
-
- makeEfiImages $yumconf
- done
-done
-
-doPostImages
-
-cd $TOPDIR
diff --git a/scripts/mk-images.alpha b/scripts/mk-images.alpha
deleted file mode 100644
index 7bb6696..0000000
--- a/scripts/mk-images.alpha
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# mk-images.alpha
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-INITRDMODS="tgafb crc32 $INITRDMODS"
-
-###FSMODS="msdos vfat ext3 reiserfs jfs xfs"
-###IDEMODS="cdrom ide-cd"
-###SCSIMODS="cdrom scsi_mod sd_mod sg sr_mod st"
-###USBMODS="ohci-hcd uhci-hcd hid usb-storage sd_mod sr_mod"
-###LATEUSBMODS="mousedev usb-storage"
-###SECSTAGE="md raid0 raid1 raid5 dm-mod srm_env $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS"
-NETMODULES="e100 tulip 8139too tulip 3c509 3c59x dl2k eepro epic100 ewrk3 hamachi natsemi ne2k-pci ns83820 starfire yellowfin de4x5 depca acenic tg3"
-
-SCSIMODULES="$SCSIMODS qlogicisp DAC960 cpqfc BusLogic 3w-xxxx dmx3191d dpt_i2o megaraid ncr53c8xx sym53c8xx qlogicfc qla2x00 qla1280 cciss cpqarray aic7xxx aha1740 megaraid"
-
-###ISOMODULES="ehci-hcd ieee1394 ohci1394 sbp2"
-
-prepareBootImage() {
- echo "ALPHA: prepareBootImage() is called"
- dd if=/dev/zero of=$MBD_TMPIMAGE bs=1k count=$BOOTDISKSIZE 2>/dev/null
- echo y | /sbin/mke2fs -b 1024 -r 0 -O none $MBD_TMPIMAGE > /dev/null 2>/dev/null
- LODEV=`findloopdevice $MBD_TMPIMAGE`
- e2writeboot $LODEV $BOOTDISKDIR/bootlx
- mount $LODEV -t ext2 $MBD_BOOTTREE
- mkdir -p $MBD_BOOTTREE/etc
- cat > $MBD_BOOTTREE/etc/aboot.conf <<EOF
-#
-# Fedora Linux aboot configuration options:
-#
-# 0 - Boot the Fedora Linux installer using a 2.6 kernel
-# 1 - Boot the Fedora Linux installer in non graphical mode
-# 2 - Boot the Fedora Linux installer in text only mode on ttyS0
-# for installation control via the serial port
-# 3 - Boot in rescue mode
-#
-0:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 root=/dev/fd0
-1:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 text root=/dev/fd0
-2:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=ttyS0 text root=/dev/fd0
-3:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 rescue root=/dev/fd0
-
-EOF
- cat > $MBD_BOOTTREE/etc/milo.conf <<EOF
-image=/vmlinux.gz
- label=linux
- root=/dev/fd0
- append="load_ramdisk=1 prompt_ramdisk=1"
-EOF
- zcat $KERNELROOT/boot/vmlinuz-* | gzip -9 > $MBD_BOOTTREE/vmlinux.gz
- umount $LODEV
- losetup -d $LODEV
- mount -o loop -t ext2 $MBD_TMPIMAGE $MBD_BOOTTREE
-}
-
-makeBootImages() {
- echo "Building boot images for kernel $kernelvers"
-
- mkdir -p $TOPDESTPATH/boot
- cp $BOOTDISKDIR/bootlx $TOPDESTPATH/boot
-
- mkdir -p $TOPDESTPATH/etc
- cat > $TOPDESTPATH/etc/aboot.conf <<EOF
-#
-# Fedora Linux aboot configuration options:
-#
-# 0 - Boot the Fedora Linux installer using a 2.6 kernel
-# 1 - Boot the Fedora Linux installer with kernel messages sent to ttyS0
-# 2 - Boot the Fedora Linux installer in text only mode
-# 3 - Boot the Fedora Linux installer in text only rescue mode
-#
-0:/kernels/vmlinux.gz initrd=/images/initrd.img
-1:/kernels/vmlinux.gz initrd=/images/initrd.img console=ttyS0
-2:/kernels/vmlinux.gz initrd=/images/initrd.img text
-3:/kernels/vmlinux.gz initrd=/images/initrd.img rescue
-
-EOF
-
- mkdir -p $TOPDESTPATH/kernels
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/kernels/vmlinux.gz
-
- makeinitrd --initrdto $TOPDESTPATH/images/ramdisk.img
- --modules "$NETMODULES $SCSIMODULES"
-
- echo "List of init modules: $INITRDMODS"
-
- makeinitrd --dest $TOPDESTPATH/images/initrd.img
- --modules "$INITRDMODS"
-
-# makebootdisk --bootdisksize 4096 --kernelto $TOPDESTPATH/kernels/vmlinux.gz
-# --imagename generic.img
-
-
- if [ -f $KERNELPATH/kernel-jensen-*.rpm ]; then
- KJ_PKG=$KERNELPATH/kernel-jensen-*.rpm
- KJ_DIR=/tmp/kernelj.dir.$$
- mkdir -p $KJ_DIR
- rpm2cpio $KJ_PKG | (cd $KJ_DIR; cpio --quiet -iumd ./boot/vmlinuz-*)
- cp $KJ_DIR/boot/vmlinuz-* $TOPDESTPATH/kernels/vmlinuz.j
- rm -rf $KJ_DIR
- fi
-
-# makedriverdisk --padsize 1440 "Supplemental Block Device Drivers" "drvblock" "$SCSIMODULES $EXTRASCSI +scsi"
-# makedriverdisk --padsize 1440 "Supplemental Network Device Drivers" "drvnet" "$NETMODULES $EXTRANET +net"
-}
diff --git a/scripts/mk-images.efi b/scripts/mk-images.efi
deleted file mode 100644
index 025f34f..0000000
--- a/scripts/mk-images.efi
+++ /dev/null
@@ -1,258 +0,0 @@
-#
-# mk-images.efi
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-makeefibootdisk()
-{
- partimg=$1 && shift
- target=$1 && shift
-
- if [ ! -f $1 ]; then
- return
- fi
-
- local partsize=$(/bin/ls -l $partimg | awk '{ print $5; }')
- local disksize=$((17408 + $partsize + 17408))
- disksize=$(($disksize + $(($disksize % 512))))
- local diskimg=$(mktemp /tmp/efidisk.img.XXXXXX)
- dd if=/dev/zero of=$diskimg count=1 bs=$disksize
- MAKEDEV /dev/loop
- local loop=$(losetup -v -f $diskimg | awk '{ print $4 }')
- echo "loop is $loop"
- ls -l $loop
- dmsetup create efiboot$$ --table "0 $(($disksize / 512)) linear $loop 0"
- dmsetup mknodes efiboot$$
- echo "efiboot$$ should exist"
- ls -l /dev/mapper/efiboot$$*
- parted --script /dev/mapper/efiboot$$ mklabel gpt unit b mkpart '"EFI System Partition"' fat32 17408 $((17408 + $partsize)) set 1 boot on
- dmsetup mknodes efiboot$$p1 || :
- echo "efiboot$$p1 should exist"
- ls -l /dev/mapper/efiboot$$*
- dmsetup ls
- dmsetup table
- dd if=$partimg of=/dev/mapper/efiboot$$p1
- echo "dd-ing $partimg to /dev/mapper/efiboot$$p1"
- # the next two lines seem to depend on the exact version of parted :/
- dmsetup remove -f /dev/mapper/efiboot$$p1 || :
- dmsetup remove -f /dev/mapper/efiboot$$
- losetup -d $loop
-
- mv -v $diskimg $target
- chmod a+r $target
-}
-
-#makeefibootimage required for EFI bootloader dosfs image
-makeefibootimage() {
- echo "in makeefibootimage: makeefibootimage $@"
- MBD_FILENAME=""
- KERNELFILE=""
- INITRDFILE=""
- grubpkg=""
- MBD_TMPIMAGE=${TMPDIR:-/tmp}/makebootdisk.image.$$
- MBD_BOOTTREE=${TMPDIR:-/tmp}/makebootdisk.tree.$$
- MBD_BOOTTREE_TMP=$MBD_BOOTTREE'_tmp'
- while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
- if [ $1 = "--kernel" ]; then
- KERNELFILE=$2
- shift; shift
- continue
- elif [ $1 = "--kernelpath" ]; then
- KERNELPATH=$2
- shift; shift
- continue
- elif [ $1 = "--initrd" ]; then
- INITRDFILE=$2
- shift; shift
- continue
- elif [ $1 = "--initrdpath" ]; then
- INITRDPATH=$2
- shift; shift
- continue
- elif [ $1 = "--imagename" ]; then
- MBD_FILENAME=$IMAGEPATH/$2
- shift; shift
- continue
- elif [ $1 = "--grubpkg" ]; then
- grubpkg=$2
- echo "grubpkg=$grubpkg"
- shift; shift
- continue
- fi
- echo "Unknown option passed to makebootdisk: "$1""
- exit 1
- done
-
- if [ -z "$MBD_FILENAME" ]; then
- echo "No imagename passed"
- exit 1
- fi
-
- MBD_FSIMAGE="$INITRDFILE"
-
- mkdir -p $MBD_BOOTTREE
- mkdir -p $MBD_BOOTTREE_TMP
- rm -rf $MBD_BOOTTREE_TMP
- mkdir -p $MBD_TMPIMAGE
-
- # provided by the mk-image.$ARCH file
- prepareEfiImage
-
- left=$(df $MBD_BOOTTREE | tail -n1)
- left=$(echo $left | awk '{print $4'})
-
- umount $MBD_BOOTTREE
-
- if [ -n "$EXTRAKERNELPATH" ]; then
- mkdir -p `dirname $EXTRAKERNELPATH`
- cp -f $KERNELROOT/$KERNELDIR/${KERNELNAME}-* $EXTRAKERNELPATH
- fi
-
- mkdir -p `dirname $MBD_FILENAME`
- rm -rf $MBD_TMPIMAGE $MBD_MNTPOINT $MBD_BOOTTREE
- if [ -z "$INITRDFILE" -a -n "$MBD_FSIMAGE" ]; then
- rm -f $MBD_FSIMAGE
- fi
-
- chmod a+r $MBD_FILENAME
- echo "Wrote $MBD_FILENAME (${left}k free)"
-}
-
-# prepare and build an efiboot.img.
-prepareEfiImage() {
- echo "in prepareEfiImage"
- prepareEfiTree || return 1
-
- # dynamically calculate the size of the dosfs
- BOOTDISKSIZE=$(du -kcs $MBD_BOOTTREE_TMP | tail -n1 | awk '{print $1}')
- BOOTDISKSIZE=$(expr $BOOTDISKSIZE + 100)
- echo "The size of the efiboot.img dosfs is ${BOOTDISKSIZE}k"
- mkdosfs -n ANACONDA -C $MBD_FILENAME $BOOTDISKSIZE >/dev/null
- mount -o loop,shortname=winnt,umask=0077 -t vfat $MBD_FILENAME $MBD_BOOTTREE
- cp -R $MBD_BOOTTREE_TMP/* $MBD_BOOTTREE
-}
-
-# prepare a directory with the kernel, initrd, and various message files
-# used to populate the efi boot image
-prepareEfiTree() {
- echo "in prepareEfiTree"
- mkdir -p $MBD_BOOTTREE_TMP/EFI/BOOT
-
- cp -av $BOOTDISKDIR/*.conf $MBD_BOOTTREE_TMP/EFI/BOOT/
- [ -n "$KERNELFILE" ] && cp -av $KERNELFILE $MBD_BOOTTREE_TMP/EFI/BOOT/vmlinuz
- [ -n "$INITRDFILE" ] && cp -av $INITRDFILE $MBD_BOOTTREE_TMP/EFI/BOOT/initrd.img
- [ -z "$KERNELPATH" ] && KERNELPATH="/EFI/BOOT/vmlinuz"
- [ -z "$INITRDPATH" ] && INITRDPATH="/EFI/BOOT/initrd.img"
-
- SPLASHPATH="/EFI/BOOT/splash.xpm.gz"
- sed -e "s/@PRODUCT@/$PRODUCT/g"
- -e "s/@VERSION@/$VERSION/g"
- -e "s,@KERNELPATH@,$KERNELPATH,g"
- -e "s,@INITRDPATH@,$INITRDPATH,g"
- -e "s,@SPLASHPATH@,$SPLASHPATH,g"
- -i $MBD_BOOTTREE_TMP/EFI/BOOT/grub.conf
-
- ydcmd="yumdownloader -c $yumconf $grubpkg"
- echo "(grubpkg) $ydcmd"
- $ydcmd
- rpm2cpio $grubpkg.rpm | (cd $KERNELROOT; cpio --quiet -iumd)
- cp -av $KERNELROOT/boot/efi/EFI/redhat/grub.efi $MBD_BOOTTREE_TMP/EFI/BOOT/grub.efi
-
- # The first generation Mactel machines get the bootloader name wrong
- # as per the spec. Awesome, guys.
- if [ "$efiarch" == "ia32" ]; then
- cp -av $MBD_BOOTTREE_TMP/EFI/BOOT/grub.efi $MBD_BOOTTREE_TMP/EFI/BOOT/BOOT.efi
- cp -av $MBD_BOOTTREE_TMP/EFI/BOOT/grub.conf $MBD_BOOTTREE_TMP/EFI/BOOT/BOOT.conf
- fi
-
- local tmpefiarch=${efiarch}
- case ${efiarch} in
- x64) tmpefiarch="X64" ;;
- ia32) tmpefiarch="IA32" ;;
- esac
- mv -v $MBD_BOOTTREE_TMP/EFI/BOOT/grub.efi $MBD_BOOTTREE_TMP/EFI/BOOT/BOOT${tmpefiarch}.efi
- mv -v $MBD_BOOTTREE_TMP/EFI/BOOT/grub.conf $MBD_BOOTTREE_TMP/EFI/BOOT/BOOT${tmpefiarch}.conf
-
- artpkg=$(repoquery --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}" -c $yumconf --whatprovides ${brandpkgname}-logos | grep -v generic-logos | head -1)
- if [ -z "$artpkg" ]; then
- argpkg="generic-logos"
- fi
-
- ydcmd="yumdownloader -c ${yumconf} ${artpkg}"
- echo "(artpkg) $ydcmd"
- $ydcmd
- rpm2cpio ${artpkg}.rpm | (cd $KERNELROOT; cpio --quiet -iumd)
- cp -av $KERNELROOT/boot/grub/splash.xpm.gz $MBD_BOOTTREE_TMP/$SPLASHPATH
-
- # if we don't have a kernel or initrd, we're making a CD image and we need
- # to mirror EFI/ to the cd.
- if [ -z "$KERNELFILE" -a -z "$INITRDFILE" ]; then
- cp -av $MBD_BOOTTREE_TMP/EFI/ $TOPDESTPATH/EFI/
- rm -f $TOPDESTPATH/EFI/BOOT/*.efi
- fi
-}
-
-makeEfiImages() {
- echo "in makeEfiImages"
- yumconf="$1"
- echo "Making EFI images ($PWD)"
- if [ "$kernelvers" != "$kernelxen" ]; then
- local grubarch=${efiarch}
- case ${efiarch} in
- ia32) grubarch=i?86 ;;
- x64) grubarch=x86_64 ;;
- esac
-
- grubpkg=$(repoquery --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}" -c $yumconf grub.$grubarch)
-
- if [ -z "$grubpkg" ]; then
- echo "cannot find package grub.$grubarch" >&2
- return 1
- fi
- echo "Building efiboot.img for ${efiarch}/$KERNELARCH at $TOPDESTPATH/images/efiboot.img"
- echo "grubpkg: ${grubpkg}"
-
- makeefibootimage
- --imagename efiboot.img
- --kernel $TOPDESTPATH/images/pxeboot/vmlinuz
- --initrd $TOPDESTPATH/images/pxeboot/initrd.img
- --grubpkg ${grubpkg}
- local ret=$?
- if [ $ret -ne 0 ]; then
- echo "makeefibootimage (1) failed" >&2
- return $ret
- fi
-
- makeefibootdisk $TOPDESTPATH/images/efiboot.img $TOPDESTPATH/images/efidisk.img
- local ret=$?
- [ $ret -eq 0 ] || return $ret
- rm -vf $TOPDESTPATH/images/efiboot.img
-
- # make a boot image with just boot*.efi in it...
- makeefibootimage
- --imagename efiboot.img
- --kernelpath /images/pxeboot/vmlinuz
- --initrdpath /images/pxeboot/initrd.img
- --grubpkg ${grubpkg}
- local ret=$?
- if [ $ret -ne 0 ]; then
- echo "makeefibootimage (2) failed" >&2
- fi
- return $ret
- fi
- return 0
-}
diff --git a/scripts/mk-images.ia64 b/scripts/mk-images.ia64
deleted file mode 100644
index d11083b..0000000
--- a/scripts/mk-images.ia64
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# mk-images.ia64
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#makebootdisk required for EFI bootloader dosfs image
-makebootdisk() {
- EXTRAKERNELPATH=""
- INITRDFLAGS=""
- MBD_FILENAME=""
- INITRDFILE=""
- MBD_TMPIMAGE=${TMPDIR:-/tmp}/makebootdisk.image.$$
- MBD_BOOTTREE=${TMPDIR:-/tmp}/makebootdisk.tree.$$
- MBD_BOOTTREE_TMP=$MBD_BOOTTREE'_tmp'
- while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
- if [ $1 = "--kernelto" ]; then
- EXTRAKERNELPATH=$2
- shift; shift
- continue
- elif [ $1 = "--initrdflags" ]; then
- INITRDFLAGS=$2
- shift; shift
- continue
- elif [ $1 = "--initrd" ]; then
- INITRDFILE=$2
- shift; shift
- continue
- elif [ $1 = "--imagename" ]; then
- MBD_FILENAME=$IMAGEPATH/$2
- shift; shift
- continue
- fi
- echo "Unknown option passed to makebootdisk"
- exit 1
- done
-
- if [ -z "$MBD_FILENAME" ]; then
- echo "No imagename passed"
- exit 1
- fi
-
- if [ -n "$INITRDFILE" ]; then
- MBD_FSIMAGE="$INITRDFILE"
- elif [ -n "$INITRDFLAGS" ]; then
- eval makeinitrd --keep $INITRDFLAGS
- fi
-
- mkdir -p $MBD_BOOTTREE
- mkdir -p $MBD_BOOTTREE_TMP
- rm -rf $MBD_BOOTTREE_TMP
- mkdir -p $MBD_TMPIMAGE
-
- # provided by the mk-image.$ARCH file
- prepareBootImage
-
- left=$(df $MBD_BOOTTREE | tail -n1)
- left=$(echo $left | awk '{print $4'})
-
- umount $MBD_BOOTTREE
-
- if [ -n "$EXTRAKERNELPATH" ]; then
- mkdir -p `dirname $EXTRAKERNELPATH`
- cp -f $KERNELROOT/$KERNELDIR/${KERNELNAME}-* $EXTRAKERNELPATH
- fi
-
- mkdir -p `dirname $MBD_FILENAME`
- rm -rf $MBD_TMPIMAGE $MBD_MNTPOINT $MBD_BOOTTREE
- if [ -z "$INITRDFILE" ]; then
- rm -f $MBD_FSIMAGE
- fi
-
- echo "Wrote $MBD_FILENAME (${left}k free)"
-}
-
-prepareBootImage() {
-
- prepareBootTree
-
- # dynamically calculate the size of the dosfs
- BOOTDISKSIZE=$(du -kcs $MBD_BOOTTREE_TMP | tail -n1 | awk '{print $1}')
- BOOTDISKSIZE=$(expr $BOOTDISKSIZE + 100)
- echo "The size of the boot.img dosfs is $BOOTDISKSIZE"
- mkdosfs -n ANACONDA -C $MBD_FILENAME $BOOTDISKSIZE >/dev/null
- mount -o loop -t vfat $MBD_FILENAME $MBD_BOOTTREE
- cp -R $MBD_BOOTTREE_TMP/* $MBD_BOOTTREE
-}
-
-prepareBootTree() {
- mkdir -p $MBD_BOOTTREE_TMP/EFI/boot
- cp $MBD_FSIMAGE $MBD_BOOTTREE_TMP/EFI/boot/initrd.img
-
- cp -a $BOOTDISKDIR/* $MBD_BOOTTREE_TMP/EFI/boot/
- cp $KERNELROOT/boot/efi/EFI/redhat/vmlinuz-* $MBD_BOOTTREE_TMP/EFI/boot/vmlinuz
-
- cp $MBD_BOOTTREE_TMP/EFI/boot/elilo.efi $MBD_BOOTTREE_TMP/EFI/boot/bootia64.efi
- cat > $MBD_BOOTTREE_TMP/EFI/boot/elilo.conf << EOF
-prompt
-timeout=50
-relocatable
-
-image=vmlinuz
- label=linux
- read-only
- initrd=initrd.img
-EOF
-
- # make a copy in the root of the image
- cp $MBD_BOOTTREE_TMP/EFI/boot/* $MBD_BOOTTREE_TMP
-}
-
-makeBootImages() {
- # Because ia64 boxes use EFI there needs to be a boot.img dosfs.
- echo "making boot.img for EFI bootloader"
- makebootdisk --kernelto $TOPDESTPATH/kernels/vmlinuz
- --imagename boot.img
- --initrdflags '--dest $TOPDESTPATH/images/ramdisk.img
- --modules "$INITRDMODS sgiioc4" '
-
-
- mkdir -p $TOPDESTPATH/images/pxeboot
- makeinitrd --dest $TOPDESTPATH/images/pxeboot/initrd.img
- --modules "$INITRDMODS sgiioc4"
- [ $? = 0 ] || exit 1
- mv $TOPDESTPATH/kernels/vmlinuz $TOPDESTPATH/images/pxeboot/vmlinuz
- rmdir $TOPDESTPATH/kernels
-
- # make a pxe dir with kernel + initrd
- cat << __EOT__ >> $TOPDESTPATH/.treeinfo
-[images-$KERNELARCH]
-kernel = images/pxeboot/vmlinuz
-initrd = images/pxeboot/initrd.img
-boot.img = images/boot.img
-
-[images-xen]
-kernel = images/pxeboot/vmlinuz
-initrd = images/pxeboot/initrd.img
-
-__EOT__
-}
-
-doPostImages() {
- if [ -n "$BOOTISO" ]; then
- mkisofs -quiet -o $TOPDESTPATH/images/$BOOTISO -b boot.img -no-emul-boot -R -J -V "$PRODUCT" -T -graft-points boot.img=$TOPDESTPATH/images/boot.img
- implantisomd5 $TOPDESTPATH/images/$BOOTISO
- fi
-}
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
deleted file mode 100644
index a17af3c..0000000
--- a/scripts/mk-images.ppc
+++ /dev/null
@@ -1,174 +0,0 @@
-#
-# mk-images.ppc
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-makeBootImages() {
- echo "Building boot images for kernel $kernelvers"
- FAKEARCH=""
-
- if [ "$KERNELARCH" = "ppc64" ]; then
- mkdir -p $TOPDESTPATH/ppc/ppc64
- echo "Building $KERNELARCH initrd"
- makeinitrd --dest $TOPDESTPATH/ppc/ppc64/ramdisk.image.gz
- --modules "$INITRDMODS spufs viocd gpio_mdio"
-
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/ppc64/vmlinuz
- sed -e "s/%BITS%/64/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/"
- $BOOTDISKDIR/yaboot.conf.in > $TOPDESTPATH/ppc/ppc64/yaboot.conf
-
- cat << __EOT__ >> $TOPDESTPATH/.treeinfo
-[images-$KERNELARCH]
-kernel = ppc/ppc64/vmlinuz
-initrd = ppc/ppc64/ramdisk.image.gz
-__EOT__
-
- if [ -x $IMGPATH/usr/bin/mkzimage -a -r $IMGPATH/usr/share/ppc64-utils/zImage.stub ]; then
- mkdir -p $TOPDESTPATH/images/netboot
- pushd $TOPDESTPATH/ppc/ppc64
- cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/ppc64/zImage.lds
- $IMGPATH/usr/bin/mkzimage $TOPDESTPATH/ppc/ppc64/vmlinuz no no $TOPDESTPATH/ppc/ppc64/ramdisk.image.gz $IMGPATH/usr/share/ppc64-utils/zImage.stub $TOPDESTPATH/images/netboot/ppc64.img
- rmdir $TOPDESTPATH/images/netboot || :
- rm -f $TOPDESTPATH/ppc/ppc64/zImage.lds
- popd
- if [ -f $TOPDESTPATH/images/netboot/ppc64.img ]; then
- echo "zimage = images/netboot/ppc64.img" >> $TOPDESTPATH/.treeinfo
- fi
- elif [ -x $IMGPATH/usr/sbin/wrapper -a -r $IMGPATH/usr/$LIBDIR/kernel-wrapper/wrapper.a ]; then
- mkdir -p $TOPDESTPATH/images/netboot
- $IMGPATH/usr/sbin/wrapper -o $TOPDESTPATH/images/netboot/ppc64.img
- -i $TOPDESTPATH/ppc/ppc64/ramdisk.image.gz
- -D $IMGPATH/usr/$LIBDIR/kernel-wrapper
- $TOPDESTPATH/ppc/ppc64/vmlinuz
- rmdir $TOPDESTPATH/images/netboot || :
- if [ -f $TOPDESTPATH/images/netboot/ppc64.img ]; then
- echo "zimage = images/netboot/ppc64.img" >> $TOPDESTPATH/.treeinfo
- fi
- fi
-
- echo >> $TOPDESTPATH/.treeinfo
-
-
- elif [ "$KERNELARCH" = "ppc" ]; then
- FAKEARCH="ppc"
- mkdir -p $TOPDESTPATH/ppc/ppc32
- mkdir -p $TOPDESTPATH/ppc/mac
-
- echo "Building ppc initrd"
- makeinitrd --dest $TOPDESTPATH/ppc/ppc32/ramdisk.image.gz
- --modules "$INITRDMODS"
-
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/ppc32/vmlinuz
- sed -e "s/%BITS%/32/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/"
- $BOOTDISKDIR/yaboot.conf.in > $TOPDESTPATH/ppc/ppc32/yaboot.conf
-
- cat << __EOT__ >> $TOPDESTPATH/.treeinfo
-[images-$KERNELARCH]
-kernel = ppc/ppc32/vmlinuz
-initrd = ppc/ppc32/ramdisk.image.gz
-__EOT__
- if [ -x $IMGPATH/usr/bin/mkzimage -a -r $IMGPATH/usr/share/ppc64-utils/zImage.stub ]; then
- mkdir -p $TOPDESTPATH/images/netboot
- pushd $TOPDESTPATH/ppc/ppc32
- cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/ppc32/zImage.lds
- $IMGPATH/usr/bin/mkzimage $TOPDESTPATH/ppc/ppc32/vmlinuz no no $TOPDESTPATH/ppc/ppc32/ramdisk.image.gz $IMGPATH/usr/share/ppc64-utils/zImage.stub $TOPDESTPATH/images/netboot/ppc32.img
- rmdir $TOPDESTPATH/images/netboot || :
- rm -f $TOPDESTPATH/ppc/ppc32/zImage.lds
- popd
- if [ -f $TOPDESTPATH/images/netboot/ppc32.img ]; then
- echo "zimage = images/netboot/ppc32.img" >> $TOPDESTPATH/.treeinfo
- fi
- elif [ -x $IMGPATH/usr/sbin/wrapper -a -r $IMGPATH/usr/$LIBDIR/kernel-wrapper/wrapper.a ]; then
- mkdir -p $TOPDESTPATH/images/netboot
- $IMGPATH/usr/sbin/wrapper -o $TOPDESTPATH/images/netboot/ppc32.img
- -i $TOPDESTPATH/ppc/ppc32/ramdisk.image.gz
- -D $IMGPATH/usr/$LIBDIR/kernel-wrapper
- $TOPDESTPATH/ppc/ppc32/vmlinuz
- rmdir $TOPDESTPATH/images/netboot || :
- if [ -f $TOPDESTPATH/images/netboot/ppc32.img ]; then
- echo "zimage = images/netboot/ppc32.img" >> $TOPDESTPATH/.treeinfo
- fi
- fi
- echo >> $TOPDESTPATH/.treeinfo
-
- else
- echo "Unknown kernel arch: $KERNELARCH"
- fi
-}
-
-doPostImages() {
- mkdir -p $TOPDESTPATH/etc
- mkdir -p $TOPDESTPATH/ppc/chrp
-
- # Create ofboot.b and bootinfo.txt files, and yaboot binaries for Mac and CHRP
- cp $BOOTDISKDIR/bootinfo.txt $TOPDESTPATH/ppc/bootinfo.txt
- cp $IMGPATH/usr/share/anaconda/boot/efika.forth $TOPDESTPATH/ppc/efika.forth
-
- if [ -d $TOPDESTPATH/ppc/mac ]; then
- cp $BOOTDISKDIR/ofboot.b $TOPDESTPATH/ppc/mac/ofboot.b
- cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/mac/yaboot
- fi
-
- if [ -d $TOPDESTPATH/ppc/chrp ]; then
- cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/chrp/yaboot
- $IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/chrp/yaboot
- fi
-
- # IBM firmware can't handle boot scripts properly, so for biarch installs
- # we use a yaboot.conf which asks the user to select 32-bit or 64-bit kernel.
- if [ -r $TOPDESTPATH/ppc/ppc32/yaboot.conf -a -r $TOPDESTPATH/ppc/ppc64/yaboot.conf ]; then
- # Both kernels exist. Copy the biarch yaboot.conf into place.
- sed -e "s/%BITS%/32/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/"
- $BOOTDISKDIR/yaboot.conf.3264 > $TOPDESTPATH/etc/yaboot.conf
- else
- # Copy the one that exists, assuming one does exist
- cp $TOPDESTPATH/ppc/ppc??/yaboot.conf $TOPDESTPATH/etc
- fi
-
- if [ -z "$BOOTISO" ]; then
- return
- fi
-
- # Copy it all into the isopath for the boot CD
- mkdir -p $TOPDESTPATH/isopath
- cp -r $TOPDESTPATH/{ppc,etc} $TOPDESTPATH/isopath
-
- # We want the ppc32 prep image in the boot.iso too.
- if [ -d $TOPDESTPATH/images/netboot ]; then
- mkdir -p $TOPDESTPATH/isopath/images
- cp -r $TOPDESTPATH/images/netboot $TOPDESTPATH/isopath/images
- rm -f $TOPDESTPATH/isopath/images/ppc64.img
- fi
-
- if [ -r $TOPDESTPATH/isopath/images/netboot/ppc32.img ]; then
- PREPBOOT="-prep-boot images/netboot/ppc32.img"
- fi
-
- if [ -d $TOPDESTPATH/isopath/ppc/mac ]; then
- MACBOOT="-hfs-volid $VERSION -hfs-bless $TOPDESTPATH/isopath/ppc/mac"
- fi
-
- # Create the boot.iso
- mkisofs -o $TOPDESTPATH/images/$BOOTISO -chrp-boot -U $PREPBOOT
- -part -hfs -T -r -l -J -A "$PRODUCT $VERSION" -sysid PPC
- -V "PBOOT" -volset "$VERSION" -volset-size 1 -volset-seqno 1
- $MACBOOT
- -map $BOOTDISKDIR/mapping -magic $BOOTDISKDIR/magic
- -no-desktop -allow-multidot -graft-points $TOPDESTPATH/isopath
- implantisomd5 $TOPDESTPATH/images/$BOOTISO
- rm -rf $TOPDESTPATH/isopath
-}
diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390
deleted file mode 100644
index 50cd717..0000000
--- a/scripts/mk-images.s390
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# mk-images.s390
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-# initrd.img load address for generic.ins LPAR booting
-# See https://bugzilla.redhat.com/show_bug.cgi?id=546422 for details.
-INITRD_ADDRESS=0x02000000
-
-getAllS390ModuleNames() {
- s390dir="${KERNELROOT}/lib/modules/${version}/kernel/drivers/s390"
- if [ -d "${s390dir}" ]; then
- find ${s390dir} -type f -name "*.ko" | while read line ; do
- echo "$(basename ${line} .ko)"
- done | sort | uniq | tr '
' ' '
- else
- echo "*** ERROR: ${s390dir} is missing, this tree probably won't have a working initrd.img" >&2
- fi
-}
-
-makeBootImages() {
- makeinitrd --dest $TOPDESTPATH/images/initrd.img
- --modules "$INITRDMODS $(getAllS390ModuleNames)"
- $ADDRSIZE $INITRD_ADDRESS $TOPDESTPATH/images/initrd.img $TOPDESTPATH/images/initrd.addrsize
- cp -vf $KERNELROOT/boot/${KERNELNAME}-${version} $TOPDESTPATH/images/kernel.img
-
- cp -v $BOOTDISKDIR/redhat.exec $TOPDESTPATH/images/redhat.exec
- cp -v $BOOTDISKDIR/generic.prm $TOPDESTPATH/images/generic.prm
- sed -e "s|@INITRD_LOAD_ADDRESS@|$INITRD_ADDRESS|g" < $BOOTDISKDIR/generic.ins > $TOPDESTPATH/generic.ins
-
- $MKS390CDBOOT
- -i $TOPDESTPATH/images/kernel.img
- -r $TOPDESTPATH/images/initrd.img
- -p $TOPDESTPATH/images/generic.prm
- -o $TOPDESTPATH/images/cdboot.img
-
- cat << __EOT__ >> $TOPDESTPATH/.treeinfo
-[images-$KERNELARCH]
-kernel = images/kernel.img
-initrd = images/initrd.img
-initrd.addrsize = images/initrd.addrsize
-generic.prm = images/generic.prm
-generic.ins = generic.ins
-cdboot.img = images/cdboot.img
-
-__EOT__
-}
diff --git a/scripts/mk-images.sparc b/scripts/mk-images.sparc
deleted file mode 100644
index 1955329..0000000
--- a/scripts/mk-images.sparc
+++ /dev/null
@@ -1,172 +0,0 @@
-#
-# mk-images.sparc
-#
-# Copyright (C) 2008 Tom "spot" Callaway <tcallawa@redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-# modules that are needed. this is the generic "needed for every arch" stuff
-TFTPCOMMONMODS="nfs sunrpc lockd cramfs loop squashfs ipv6"
-TFTPUSBMODS="ohci-hcd uhci-hcd ehci-hcd hid mousedev usb-storage"
-TFTPFSMODS="ext2 ext3 ext4dev lock_nolock cifs"
-INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS $CRYPTOMODS $COMMONMODS $PCMCIASOCKMODS =scsi =net"
-TFTPINITRDMODS="$TFTPCOMMONMODS $TFTPUSBMODS $IDEMODS $SCSIMODS $TFTPFSMODS $LVMMODS $CRYPTOMODS"
-SPARCCOMMONMODS="openpromfs sermouse"
-SPARCSCSIMODS="qlogicpti esp sym53c8xx qlogicisp mptbase mptscsih mptfc mptsas qla2xxx pata_cmd64x pata_ali"
-SPARCNETMODS="cassini e1000 e1000e sunbmac sungem sunhme sunlance sunqe sunvnet tg3 tulip"
-SPARCMODS="$SPARCCOMMONMODS $SPARCSCSIMODS $SPARCNETMODS"
-
-TILO=$IMGPATH/usr/bin/tilo
-SILO=$IMGPATH/usr/sbin/silo
-
-# This is a disgusting hack. Unfortunately, it's the only way we can get files out of the tftpinitrd without worse hacks.
-
-makeproductfile() {
- root=$1
-
- rm -f $root/.buildstamp
- cat > $root/.buildstamp << EOF
-[Main]
-BugURL=$BUGURL
-IsBeta=$ISBETA
-Product=$PRODUCT
-UUID=$IMAGEUUID
-Version=$VERSION
-EOF
-
- if [ "$AMITFTP" = "1" ]; then
- rm -rf $root/modules/*/kernel/drivers/isdn/i4l/isdn.ko*
- rm -rf $root/modules/*/kernel/drivers/isdn/isdnloop/isdnloop.ko*
- rm -rf $root/modules/*/kernel/drivers/media/common/ir-common.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/bt8xx/bttv.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/btcx-risc.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/v4l1-compat.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/videodev.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/videobuf-core.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/compat_ioctl32.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/videobuf-dma-sg.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/v4l2-common.ko*
- rm -rf $root/modules/*/kernel/drivers/media/video/tveeprom.ko*
- rm -rf $root/modules/*/kernel/drivers/media/common/ir-common.ko*
- rm -rf $root/modules/*/kernel/drivers/media/dvb/bt8xx/bt878.ko*
- rm -rf $root/modules/*/kernel/drivers/media/dvb/bt8xx/dst.ko*
- rm -rf $root/modules/*/kernel/drivers/media/dvb/dvb-core/dvb-core.ko*
- rm -rf $root/firmware/ql2100_fw.bin
- rm -rf $root/firmware/ql2300_fw.bin
- rm -rf $root/firmware/ql2322_fw.bin
- rm -rf $root/firmware/ql2400_fw.bin
- rm -rf $root/firmware/ql2400_fw.bin_mid
- fi
-}
-
-
-maketftp() {
- while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
- if [ $1 = "--kernel" ]; then
- TFTPKERNEL=$2
- shift; shift
- continue
- elif [ $1 = "--initrdfrom" ]; then
- TFTPINITRD=$2
- shift; shift
- continue
- elif [ $1 = "--imagename" ]; then
- TFTPIMAGE=$2
- shift; shift
- continue
- elif [ $1 = "--systemmap" ]; then
- TFTPSYSMAP=$2
- shift; shift
- continue
- fi
- echo "bad argument $1 passed to maketftp"
- exit 1
- done
-
- echo "Making a $KERNELARCH tftp image: $TFTPIMAGE"
-
- elftoaout $TFTPKERNEL -o $TFTPIMAGE
- if [ "$KERNELARCH" = "sparc" ]; then
- piggyback $TFTPIMAGE $TFTPSYSMAP $TFTPINITRD
- e
 
Old 01-30-2011, 09:34 PM
Peter Jones
 
Default Get rid of stuff Lorax replaces.

On 01/30/2011 05:31 PM, Peter Jones wrote:

long live mk-images. Long live buildinstall.


We can't actually apply this yet, unfortunately, but hopefully this
should make it ready.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-31-2011, 08:55 AM
Jon Masters
 
Default Get rid of stuff Lorax replaces.

On Sun, 2011-01-30 at 17:34 -0500, Peter Jones wrote:
> On 01/30/2011 05:31 PM, Peter Jones wrote:
> > long live mk-images. Long live buildinstall.
>
> We can't actually apply this yet, unfortunately, but hopefully this
> should make it ready.

Awesome! Thanks Peter.

Jon.


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-31-2011, 04:05 PM
David Cantrell
 
Default Get rid of stuff Lorax replaces.

On Sun, 30 Jan 2011, Peter Jones wrote:


On 01/30/2011 05:31 PM, Peter Jones wrote:

long live mk-images. Long live buildinstall.


We can't actually apply this yet, unfortunately, but hopefully this
should make it ready.


Yeah, once the secondary arch stuff is moved from mk-images.* over to
lorax, we can drop these.

--
David Cantrell <dcantrell@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-08-2011, 02:57 PM
Chris Lumens
 
Default Get rid of stuff Lorax replaces.

> long live mk-images. Long live buildinstall.

I can't ACK this hard enough.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:32 PM.

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