# Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 21 Jun 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_determineargs.sh,
+ gen_funcs.sh, genkernel, genkernel.8, genkernel.conf:
+ Added two patches from John R. Graham <john_r_graham@mindspring.com> from
+ bug #180161. This should fix bug #180161, bug #144703, and bug #150697.
+
21 Jun 2007; Chris Gianelloni <wolf31o2@gentoo.org> x86/kernel-config-2.6:
Added USB Printer support for bug #176543.
then
MRPROPER="${CMD_MRPROPER}"
fi
+
if [ "${CMD_MENUCONFIG}" != '' ]
then
MENUCONFIG="${CMD_MENUCONFIG}"
fi
+
if [ "${CMD_CLEAN}" != '' ]
then
CLEAN="${CMD_CLEAN}"
fi
fi
- if isTrue "${CMD_OLDCONFIG}"
+ if [ "${CMD_OLDCONFIG}" != '' ]
+ then
+ OLDCONFIG="${CMD_OLDCONFIG}"
+ fi
+
+ if isTrue "${OLDCONFIG}"
then
OLDCONFIG=1
else
fi
# We only erase the old image when it is the exact same version as the
- # current image. Different version old images are left behind. This is
- # consistent with how "make install" of the manual kernel build works.
- if [ "${currDestImage}.old" == "${prevDestImage}" ]
+ # current and new images. Different version old images are left behind.
+ # This is consistent with how "make install" of the manual kernel build
+ # works.
+ if [ "${currDestImage}" == "${fullDestName}" -a \
+ "${prevDestImage}" == "${currDestImage}.old" ]
then
#
- # Case for current / old of the same base version.
+ # Case for new, currrent, and old of the same base version.
#
print_info 5 " Same base version. May have to delete old image to make room."
- if [ "${prevDestImageExists}" -eq '1' ]
- then
- print_info 5 " Deleting old identical version ${symlinkName}."
- rm -f "${BOOTDIR}/${prevDestImage}"
- fi
- if [ "${currDestImageExists}" -eq '1' ]
+ if [ "${currDestImageExists}" -eq '1' ]
then
+ if [ "${prevDestImageExists}" -eq '1' ]
+ then
+ print_info 5 " Deleting old identical version ${symlinkName}."
+ rm -f "${BOOTDIR}/${prevDestImage}"
+ fi
print_info 5 " Moving ${BOOTDIR}/${currDestImage}"
print_info 5 " to ${BOOTDIR}/${currDestImage}.old"
mv "${BOOTDIR}/${currDestImage}" "${BOOTDIR}/${currDestImage}.old" ||
#
# Case for current / old not of the same base version.
#
- print_info 5 " Different base version. Do not delete old iamges."
+ print_info 5 " Different base version. Do not delete old images."
if [ "${currDestImageExists}" -eq 1 ]
then
prevDestImage="${currDestImage}"
- currDestImage="${fullDestName}"
fi
+ currDestImage="${fullDestName}"
fi
print_info 5 " Copying ${symlinkName}: ${newSrceImage}"
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
GK_V='3.4.8'
+# Set the default for TMPDIR. May be modified by genkernel.conf or the
+# --tempdir command line option.
TMPDIR='/var/tmp/genkernel'
-TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
+
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.
small_die() {
source ${GK_BIN}/gen_package.sh || gen_die "Could not read ${GK_BIN}/gen_package.sh"
source ${GK_BIN}/gen_bootloader.sh || gen_die "Could not read ${GK_BIN}/gen_bootloader.sh"
+TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
+
trap_cleanup(){
# Call exit code of 1 for failure
cleanup
possible is given.
.TP
\fB\-\-debugfile=\fR<outfile>
-This outputs full debugging data; regardless of --debuglevel to the file
-<outfile>. By default this is
+This outputs debugging data to the file <outfile>. By default this is
.I /var/log/genkernel.log\fR.
.TP
\fB\-\-\fR[no\-]\fBcolor\fR
\fB\-\-arch\-override=\fR<arch>
Force the architecture settings described by the <arch> profile
instead of autodetecting the running architecture.
+.TP
+\fB\-\-tempdir=\fR<dir>
+Sets genkernel's temporary working directory to <dir>.
.PP
.BR Output \ Settings
.TP
# ===========GENKERNEL BASIC CONFIGURATION=============
+# Run 'make oldconfig' before compiling this kernel?
+# If set to "yes", also suppresses the fetch of the kernel .config file from
+# /etc/kernels, thus preserving the .config file in /usr/src/linux.
+# OLDCONFIG="no"
+
# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="no"
# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"
+# Make symlinks in BOOTDIR automatically?
+# SYMLINK="no"
+
# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"
# %%ARCH%% - Final determined architecture
# %%CACHE%% - Final determined cache location
+# Set genkernel's temporary work directory. Default is /var/tmp/genkernel
+# TMPDIR="/var/tmp/genkernel"
+
# Set the boot directory, default is /boot
#BOOTDIR="/boot"