aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@funtoo.org>2011-05-22 18:02:08 -0600
committerDaniel Robbins <drobbins@funtoo.org>2011-05-22 18:02:08 -0600
commitbdba153830844f5fcbed4a89398730bb5f56a98e (patch)
treedd644d53ddad8cd951a042c79d5b09b09ba80b2f
parentsome more safety and debug improvements to dynagrab (diff)
downloadgenkernel-bdba153830844f5fcbed4a89398730bb5f56a98e.tar.gz
genkernel-bdba153830844f5fcbed4a89398730bb5f56a98e.tar.bz2
genkernel-bdba153830844f5fcbed4a89398730bb5f56a98e.zip
implement --fullname option, document --fullname, --build-src and --build-dst options in man page
-rw-r--r--doc/genkernel.8.txt33
-rwxr-xr-xgen_bootloader.sh14
-rwxr-xr-xgen_cmdline.sh4
-rwxr-xr-xgen_compile.sh8
-rwxr-xr-xgen_determineargs.sh3
-rwxr-xr-xgen_initramfs.sh2
-rwxr-xr-xgen_package.sh6
-rw-r--r--genkernel.854
8 files changed, 87 insertions, 37 deletions
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 14acd66..32b89e3 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -158,8 +158,20 @@ KERNEL COMPILATION
KERNEL LOCATIONS
~~~~~~~~~~~~~~~~
*--kerneldir*=<dir>::
- This specifies the location of the kernel sources; the default
- is '/usr/src/linux'.
+ This specifies the location of both the kernel sources and the
+ location to use for building the kernel. It defaults to
+ '/usr/src/linux'. Note that Funtoo Linux genkernel now allows
+ these locations -- source and build directory -- to be set
+ separately. See --build-src and --build-dst below.
+
+*--build-src*=<dir>::
+ This specifies the location of the kernel sources to be built.
+ It defaults to the --kerneldir setting if not specified.
+
+*--build-dst*=<dir>::
+ This specifies the location of the target directory in which to
+ build the kernel sources. It defaults to the --kerneldir setting
+ if not specified.
*--kernel-config*=<file>::
This specifies a kernel configuration file to use for compilation;
@@ -320,9 +332,20 @@ INTERNALS
OUTPUT SETTINGS
~~~~~~~~~~~~~~~
*--kernname*=<...>::
- Tag the kernel and initrd with a name, if not defined this
- option defaults to genkernel
-
+ This option is used to change part of the suffix appended to the
+ kernel and initrd that defaults to "genkernel". The full suffix
+ is set by the --fullname option -- see below. Note that in Funtoo
+ Linux, this is considered a somewhat deprecated option and --fullname should
+ typically be used instead.
+
+*--fullname*=<...>::
+ This option is used to set the full suffix for the kernel and
+ initrd/initramfs. It is appended to the kernel and initramfs with
+ a hyphen. This option defaults to {kernname}-{arch}-{KV} where
+ {kernname} is the --kernname setting, or "genkernel" if not set and
+ KV is the version of the kernel from the kernel MAKEFILE with the
+ EXTRAVERSION from the kernel Makefile appended to it.
+
*--minkernpackage*=<tbz2>::
File to output a .tar.bz2'd kernel and initrd: no modules outside
of the initrd will be included...
diff --git a/gen_bootloader.sh b/gen_bootloader.sh
index dcb13b2..46e81ce 100755
--- a/gen_bootloader.sh
+++ b/gen_bootloader.sh
@@ -65,12 +65,12 @@ set_bootloader_grub() {
echo "title=Funtoo Linux ($KV)" >> ${GRUB_CONF}
if [ "${BUILD_INITRD}" = '0' ]
then
- echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
+ echo -e "\tkernel /kernel-${FULLNAME} root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
else
- echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=/dev/ram0 init=/linuxrc real_root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
+ echo -e "\tkernel /kernel-${FULLNAME} root=/dev/ram0 init=/linuxrc real_root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
if [ "${PAT}" -gt '4' ]
then
- echo -e "\tinitrd /initramfs-${KNAME}-${ARCH}-${KV}" >> ${GRUB_CONF}
+ echo -e "\tinitrd /initramfs-${FULLNAME}-${KV}" >> ${GRUB_CONF}
fi
fi
echo >> ${GRUB_CONF}
@@ -92,14 +92,14 @@ set_bootloader_grub() {
}
set_bootloader_grub_duplicate_default_replace_kernel_initrd() {
- sed -r -e "/^[[:space:]]*kernel/s/kernel-[[:alnum:][:punct:]]+/kernel-${KNAME}-${ARCH}-${KV}/" - |
- sed -r -e "/^[[:space:]]*initrd/s/init(rd|ramfs)-[[:alnum:][:punct:]]+/init\1-${KNAME}-${ARCH}-${KV}/"
+ sed -r -e "/^[[:space:]]*kernel/s/kernel-[[:alnum:][:punct:]]+/kernel-${FULLNAME}/" - |
+ sed -r -e "/^[[:space:]]*initrd/s/init(rd|ramfs)-[[:alnum:][:punct:]]+/init\1-${FULLNAME}/"
}
set_bootloader_grub_check_for_existing_entry() {
local GRUB_CONF=$1
- if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}" &&
- grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}"
+ if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${FULLNAME}\([[:space:]]\|$\)" "${GRUB_CONF}" &&
+ grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${FULLNAME}\([[:space:]]\|$\)" "${GRUB_CONF}"
then
return 0
fi
diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 86028e1..aa15dff 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -497,6 +497,10 @@ parse_cmdline() {
CMD_KERNNAME=`parse_opt "$*"`
print_info 2 "KERNNAME: ${CMD_KERNNAME}"
;;
+ --fullname=*)
+ CMD_FULLNAME=`parse_opt "$*"`
+ print_info 2 "FULLNAME: ${CMD_FULLNAME}"
+ ;;
--symlink)
CMD_SYMLINK=1
print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
diff --git a/gen_compile.sh b/gen_compile.sh
index ecb9540..efc308c 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -330,11 +330,11 @@ compile_kernel() {
then
copy_image_with_preserve "kernel" \
"${tmp_kernel_binary}" \
- "kernel-${KNAME}-${ARCH}-${KV}"
+ "kernel-${FULLNAME}"
copy_image_with_preserve "System.map" \
"${BUILD_DST}/System.map" \
- "System.map-${KNAME}-${ARCH}-${KV}"
+ "System.map-${FULLNAME}"
if isTrue "${GENZIMAGE}"
then
@@ -343,9 +343,9 @@ compile_kernel() {
"kernelz-${KV}"
fi
else
- cp "${tmp_kernel_binary}" "${TMPDIR}/kernel-${KNAME}-${ARCH}-${KV}" ||
+ cp "${tmp_kernel_binary}" "${TMPDIR}/kernel-${FULLNAME}" ||
gen_die "Could not copy the kernel binary to ${TMPDIR}!"
- cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" ||
+ cp "System.map" "${TMPDIR}/System.map-${FULLNAME}" ||
gen_die "Could not copy System.map to ${TMPDIR}!"
if isTrue "${GENZIMAGE}"
then
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 2ad9a05..39c1577 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -226,4 +226,7 @@ determine_real_args() {
fi
get_KV
+
+ set_config_with_override 2 FULLNAME CMD_FULLNAME "${KNAME}-${ARCH}-${KV}"
+ echo "DEBUG FULLNAME: $FULLNAME"
}
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index c4320ce..97af30f 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -722,7 +722,7 @@ create_initramfs() {
then
copy_image_with_preserve "initramfs" \
"${TMPDIR}/initramfs-${KV}" \
- "initramfs-${KNAME}-${ARCH}-${KV}"
+ "initramfs-${FULLNAME}"
fi
fi
}
diff --git a/gen_package.sh b/gen_package.sh
index 610769b..632f0c8 100755
--- a/gen_package.sh
+++ b/gen_package.sh
@@ -107,18 +107,18 @@ gen_kerncache_extract_kernel()
/bin/tar -f ${KERNCACHE} -C ${TEMP} -xj
copy_image_with_preserve "kernel" \
"${TEMP}/kernel-${ARCH}-${KV}" \
- "kernel-${KNAME}-${ARCH}-${KV}"
+ "kernel-${FULLNAME}"
if isTrue "${GENZIMAGE}"
then
copy_image_with_preserve "kernelz" \
"${TEMP}/kernelz-${ARCH}-${KV}" \
- "kernelz-${KNAME}-${ARCH}-${KV}"
+ "kernelz-${FULLNAME}"
fi
copy_image_with_preserve "System.map" \
"${TEMP}/System.map-${ARCH}-${KV}" \
- "System.map-${KNAME}-${ARCH}-${KV}"
+ "System.map-${FULLNAME}"
}
gen_kerncache_extract_modules()
diff --git a/genkernel.8 b/genkernel.8
index 6dbc475..7bfb9a3 100644
--- a/genkernel.8
+++ b/genkernel.8
@@ -2,12 +2,12 @@
.\" Title: genkernel
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.76.0 <http://docbook.sf.net/>
-.\" Date: 03/09/2011
-.\" Manual: genkernel 3.4.12.6-r3
-.\" Source: genkernel 3.4.12.6-r3
+.\" Date: 05/22/2011
+.\" Manual: genkernel 3.4.15-funtoo
+.\" Source: genkernel 3.4.15-funtoo
.\" Language: English
.\"
-.TH "GENKERNEL" "8" "03/09/2011" "genkernel 3\&.4\&.12\&.6\-r3" "genkernel 3\&.4\&.12\&.6\-r3"
+.TH "GENKERNEL" "8" "05/22/2011" "genkernel 3\&.4\&.15\-funtoo" "genkernel 3\&.4\&.15\-funtoo"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -161,7 +161,7 @@ will be automatically mounted if it is not already mounted before the ramdisk an
Manages, or does not manage, symlinks in
\fI/boot\fR
like the manual kernel "make install" process does\&. A kernel (or, depending on options, kernelz) symlink will link to the most recently built kernel image and a kernel\&.old (or kernelz\&.old) symlink will link to the second most recently built image, if one exists\&. Similar symlinks (both * and
-\fB\&.old) are managed for initramfs and System\&.map\&. The corresponding work products (i\&.e\&., the actual kernel and initamfs images, and System\&.map) are also managed accordingly\&. NOTE: Specifying *\-\-symlink\fR
+\fB\&.old) are managed for initramfs and System\&.map\&. The corresponding work products (i\&.e\&., the actual kernel and initramfs images, and System\&.map) are also managed accordingly\&. NOTE: Specifying *\-\-symlink\fR
does nothing unless
\fB\-\-install\fR
is also specified\&.
@@ -202,8 +202,18 @@ This builds a monolithic kernel without any modules on any initial ramdisks\&.
.PP
\fB\-\-kerneldir\fR=<dir>
.RS 4
-This specifies the location of the kernel sources; the default is
-\fI/usr/src/linux\fR\&.
+This specifies the location of both the kernel sources and the location to use for building the kernel\&. It defaults to
+\fI/usr/src/linux\fR\&. Note that Funtoo Linux genkernel now allows these locations \(em source and build directory \(em to be set separately\&. See \-\-build\-src and \-\-build\-dst below\&.
+.RE
+.PP
+\fB\-\-build\-src\fR=<dir>
+.RS 4
+This specifies the location of the kernel sources to be built\&. It defaults to the \-\-kerneldir setting if not specified\&.
+.RE
+.PP
+\fB\-\-build\-dst\fR=<dir>
+.RS 4
+This specifies the location of the target directory in which to build the kernel sources\&. It defaults to the \-\-kerneldir setting if not specified\&.
.RE
.PP
\fB\-\-kernel\-config\fR=<file>
@@ -329,14 +339,19 @@ Add in LVM support from static binaries if they exist on the system, or compile
.PP
\fB\-\-mdadm\fR
.RS 4
-Copy
-\fI/etc/mdadm\&.conf\fR
-and mdadm/mdmon binaries to initramfs\&. Without sys\-fs/mdadm[static] installed, this will compile mdadm for you\&.
+Include mdadm/mdmon support\&. Without sys\-fs/mdadm[static] installed, this will compile mdadm for you\&.
+.RE
+.PP
+\fB\-\-mdadm\-config\fR=<file>
+.RS 4
+Use <file> as configfile for MDADM\&. By default the ramdisk will be built
+\fBwithout\fR
+an mdadm\&.conf and will auto\-detect arrays during boot\-up\&.
.RE
.PP
\fB\-\-dmraid\fR
.RS 4
-Add DMRAID support\&.
+Include DMRAID support\&.
.RE
.PP
\fB\-\-multipath\fR
@@ -349,11 +364,6 @@ Include Multipath support
Include iSCSI support
.RE
.PP
-\fB\-\-slowusb\fR
-.RS 4
-Enables extra pauses for slow USB CD boots\&.
-.RE
-.PP
\fB\-\-bootloader\fR=\fBgrub\fR
.RS 4
Add new kernel to GRUB configuration\&.
@@ -439,7 +449,12 @@ Clear all tmp files and caches after genkernel has run\&.
.PP
\fB\-\-kernname\fR=<\&...>
.RS 4
-Tag the kernel and initrd with a name, if not defined this option defaults to genkernel
+This option is used to change part of the suffix appended to the kernel and initrd that defaults to "genkernel"\&. The full suffix is set by the \-\-fullname option \(em see below\&. Note that in Funtoo Linux, this is considered a somewhat deprecated option and \-\-fullname should typically be used instead\&.
+.RE
+.PP
+\fB\-\-fullname\fR=<\&...>
+.RS 4
+This option is used to set the full suffix for the kernel and initrd/initramfs\&. It is appended to the kernel and initramfs with KV is the version of the kernel from the kernel MAKEFILE with the EXTRAVERSION from the kernel Makefile appended to it\&.
.RE
.PP
\fB\-\-minkernpackage\fR=<tbz2>
@@ -574,6 +589,11 @@ Activate LVM volumes on bootup
Activate SCSI devices on bootup, necessary when SCSI support is compiled as modules and you\(cqre using SCSI or SATA devices\&.
.RE
.PP
+\fBnoslowusb\fR
+.RS 4
+By default genkernel pause for 10 seconds if it finds a attached usb\-storage device to give them time to initiate\&. This option skips that pause\&.
+.RE
+.PP
\fBkeymap\fR=\fIMAP\fR
.RS 4
Set keymap to