>> 3.2.0. Add spock's gensplash fixes, fix initrd startup 'find: ...' errors.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@241 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Tim Yamin 20 years ago
parent af8f8f0931
commit 914dc2a937

@ -62,6 +62,7 @@ longusage() {
echo " Initialization" echo " Initialization"
echo " --bootsplash=<theme> Force bootsplash using <theme>" echo " --bootsplash=<theme> Force bootsplash using <theme>"
echo " --gensplash=<theme> Force gensplash using <theme>" echo " --gensplash=<theme> Force gensplash using <theme>"
echo " --gensplash-res=<res> Select gensplash resolutions"
echo " --do-keymap-auto Forces keymap selection at boot" echo " --do-keymap-auto Forces keymap selection at boot"
echo " --evms2 Include EVMS2 support" echo " --evms2 Include EVMS2 support"
echo " --> 'emerge evms' in the host operating system first" echo " --> 'emerge evms' in the host operating system first"
@ -75,22 +76,21 @@ longusage() {
echo " --cachedir=<dir> Override the default cache location" echo " --cachedir=<dir> Override the default cache location"
echo " --tempdir=<dir> Location of Genkernel's temporary directory" echo " --tempdir=<dir> Location of Genkernel's temporary directory"
echo " Output Settings" echo " Output Settings"
echo " --kernname=<...> tag the kernel and initrd with a name" echo " --kernname=<...> Tag the kernel and initrd with a name:"
echo " if not defined the option defaults to genkernel" echo " If not defined the option defaults to 'genkernel'"
echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:" echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
echo " No modules outside of the initrd will be" echo " No modules outside of the initrd will be"
echo " included..." echo " included..."
echo " --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the callbacks have run" echo " --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the callbacks have run"
echo " --kerncache=<tbz2> File to output a .tar.bz2'd kernel," echo " --kerncache=<tbz2> File to output a .tar.bz2'd kernel,"
echo " contents of /lib/modules/ and the kernel config" echo " contents of /lib/modules/ and the kernel config"
echo " NOTE: This is created before the callbacks are run," echo " NOTE: This is created before the callbacks are run!"
echo " --no-kernel-sources This option is only valid if kerncache is defined" echo " --no-kernel-sources This option is only valid if kerncache is defined"
echo " If there is a valid kerncache no checks will be made" echo " If there is a valid kerncache no checks will be made"
echo " against a kernel source tree" echo " against a kernel source tree"
echo " --initramfs-overlay=<dir> directory structure to include in the initramfs" echo " --initramfs-overlay=<dir>"
echo " Only available on 2.6 kernels that dont use bootsplash" echo " Directory structure to include in the initramfs,"
echo " only available on 2.6 kernels that don't use bootsplash"
} }
usage() { usage() {
@ -292,6 +292,10 @@ parse_cmdline() {
CMD_GENSPLASH=0 CMD_GENSPLASH=0
print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH" print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
;; ;;
--gensplash-res=*)
GENSPLASH_RES=`parse opt "$*"`
print info 2 "GENSPLASH_RES: $GENSPLASH_RES"
;;
--install) --install)
CMD_NOINSTALL=0 CMD_NOINSTALL=0
print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL" print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"

@ -32,6 +32,7 @@ create_base_layout_cpio() {
cd ${TEMP}/initramfs-base-temp/dev cd ${TEMP}/initramfs-base-temp/dev
mknod -m 660 console c 5 1 mknod -m 660 console c 5 1
mknod -m 660 null c 1 3 mknod -m 660 null c 1 3
mknod -m 600 tty1 c 4 1
cd "${TEMP}/initramfs-base-temp/" cd "${TEMP}/initramfs-base-temp/"
find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_DIR}/cpio/initramfs-base-layout.cpio.gz find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_DIR}/cpio/initramfs-base-layout.cpio.gz
rm -rf "${TEMP}/initramfs-base-temp" > /dev/null rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
@ -250,7 +251,21 @@ create_gensplash(){
[ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default [ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default
print_info 1 " >> Installing gensplash [ using the ${GENSPLASH_THEME} theme ]..." print_info 1 " >> Installing gensplash [ using the ${GENSPLASH_THEME} theme ]..."
cd / cd /
splash_geninitramfs -g ${CACHE_DIR}/cpio/initramfs-splash-${KV}.cpio.gz ${GENSPLASH_THEME} local tmp=""
[ -n "${GENSPLASH_RES}" ] && tmp="-r ${GENSPLASH_RES}"
splash_geninitramfs -g ${CACHE_DIR}/cpio/initramfs-splash-${KV}.cpio.gz ${tmp} ${GENSPLASH_THEME}
if [ -e "/usr/share/splashutils/initrd.splash" ]; then
if [ -d "${TEMP}/initramfs-gensplash-temp" ]
then
rm -r "${TEMP}/initramfs-gensplash-temp/"
fi
mkdir -p "${TEMP}/initramfs-gensplash-temp/etc"
cd "${TEMP}/initramfs-gensplash-temp/"
gunzip -c ${CACHE_DIR}/cpio/initramfs-splash-${KV}.cpio.gz | cpio -idm --quiet -H newc
cp "/usr/share/splashutils/initrd.splash" "${TEMP}/initramfs-gensplash-temp/etc"
find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_DIR}/cpio/initramfs-splash-${KV}.cpio.gz
rm -r "${TEMP}/initramfs-gensplash-temp/"
fi
else else
print_warning 1 ' >> No splash detected; skipping!' print_warning 1 ' >> No splash detected; skipping!'
fi fi

@ -74,6 +74,7 @@ REAL_ROOT=''
CDROOT=0 CDROOT=0
CDROOT_DEV='' CDROOT_DEV=''
NEW_ROOT="/newroot" NEW_ROOT="/newroot"
CONSOLE="/dev/console"
# Only sections that are in by default or those that # Only sections that are in by default or those that
# are not module groups need to be defined here... # are not module groups need to be defined here...

@ -207,6 +207,7 @@ test_success() {
# If last command failed send error message and fall back to a shell # If last command failed send error message and fall back to a shell
if [ "$?" != '0' ] if [ "$?" != '0' ]
then then
splash 'verbose'
bad_msg 'Failed to $1; failing back to the shell...' bad_msg 'Failed to $1; failing back to the shell...'
run_shell run_shell
fi fi
@ -477,6 +478,7 @@ cdupdate() {
${NEW_ROOT}/mnt/cdrom/cdupdate.sh ${NEW_ROOT}/mnt/cdrom/cdupdate.sh
if [ "$?" != '0' ] if [ "$?" != '0' ]
then then
splash 'verbose'
bad_msg "FAILED TO EXECUTE cdupdate.sh" bad_msg "FAILED TO EXECUTE cdupdate.sh"
run_shell run_shell
fi fi

@ -6,8 +6,13 @@
. /etc/initrd.defaults . /etc/initrd.defaults
. /etc/initrd.scripts . /etc/initrd.scripts
splash() {
return 0
}
[ -e /etc/initrd.splash ] && . /etc/initrd.splash
# Clean input/output # Clean input/output
exec >/dev/console </dev/console 2>&1 exec >${CONSOLE} <${CONSOLE} 2>&1
if [ "$$" != '1' ] if [ "$$" != '1' ]
then then
@ -133,9 +138,17 @@ do
MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`" MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`"
export MLIST export MLIST
;; ;;
# Redirect output to a specific tty
CONSOLE\=*)
CONSOLE=`parse_opt "${x}"`
exec >${CONSOLE} <${CONSOLE} 2>&1
;;
esac esac
done done
splash 'init'
detect_sbp2_devices detect_sbp2_devices
cmdline_hwopts cmdline_hwopts
@ -196,6 +209,7 @@ then
done done
cp /dev/null ${NEW_ROOT}/dev cp /dev/null ${NEW_ROOT}/dev
cp /dev/console ${NEW_ROOT}/dev cp /dev/console ${NEW_ROOT}/dev
cp /dev/tty1 ${NEW_ROOT}/dev
sdelay sdelay
bootstrapCD bootstrapCD
@ -530,6 +544,7 @@ EOF
elif [ "$0" = '/init' ] elif [ "$0" = '/init' ]
then then
[ ! -e /${CHROOT}/dev/console ] && mknod /${CHROOT}/dev/console c 5 1 [ ! -e /${CHROOT}/dev/console ] && mknod /${CHROOT}/dev/console c 5 1
[ ! -e /${CHROOT}/dev/tty1 ] && mknod /${CHROOT}/dev/tty1 c 4 1
echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)..." echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)..."
cd ${CHROOT} cd ${CHROOT}
@ -540,7 +555,7 @@ then
umount /proc || echo '*: Failed to unmount the initrd /proc!' umount /proc || echo '*: Failed to unmount the initrd /proc!'
echo -n '.' echo -n '.'
exec <dev/console >dev/console 2>&1 exec <${CONSOLE} >${CONSOLE} 2>&1
echo '.' echo '.'
# Cleanup initramfs in the background # Cleanup initramfs in the background
@ -563,17 +578,16 @@ then
INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|newroot||g"` INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|newroot||g"`
for i in ${INITRAMFS_FILES} for i in ${INITRAMFS_FILES}
do do
for j in `/bin/busybox find /$i` for j in `/bin/busybox find /$i 2>/dev/null`
do do
#/bin/busybox echo "$j"
if /bin/busybox [ ! -d "$j" -a "$j" != "/bin/busybox" ] if /bin/busybox [ ! -d "$j" -a "$j" != "/bin/busybox" ]
then then
/bin/busybox rm "$j" /bin/busybox rm "$j"
fi fi
done done
for j in `/bin/busybox find /$i` for j in `/bin/busybox find /$i 2>/dev/null`
do do
if /bin/busybox [ -d ${j} -a "${j}" != "/bin" ] if /bin/busybox [ -d "${j}" -a "${j}" != "/bin" -a "${j}" != "/dev" ]
then then
/bin/busybox rm -r "$j" /bin/busybox rm -r "$j"
fi fi
@ -582,13 +596,15 @@ then
# End initramfs cleanup # End initramfs cleanup
# Start the real root init # Start the real root init
(/bin/busybox sleep 2;/bin/busybox rm /bin/busybox) & (/bin/busybox sleep 3; /bin/busybox rm /dev -r; /bin/busybox rm /bin/busybox) &
exec /bin/busybox chroot . /bin/sh <<- EOF exec /bin/busybox chroot . /bin/sh <<- EOF
exec /sbin/init ${REAL_INIT} exec /sbin/init ${REAL_INIT}
EOF EOF
fi fi
splash 'verbose'
echo 'A fatal error has probably occured since /sbin/init did not' echo 'A fatal error has probably occured since /sbin/init did not'
echo 'boot correctly. Trying to open a shell...' echo 'boot correctly. Trying to open a shell...'
echo echo

@ -2,7 +2,8 @@
# Genkernel v3 # Genkernel v3
PATH="/bin:/usr/bin:/sbin:/usr/sbin" PATH="/bin:/usr/bin:/sbin:/usr/sbin"
GK_V='3.2.0_pre14' GK_V='3.2.0'
TEMP='/var/tmp/genkernel' TEMP='/var/tmp/genkernel'
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified. TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.

@ -1,4 +1,4 @@
.TH GENKERNEL "8" "June 2005" "genkernel 3.2.0" "Gentoo Linux" .TH GENKERNEL "8" "July 2005" "genkernel 3.2.0" "Gentoo Linux"
.SH NAME .SH NAME
genkernel \- the Gentoo Linux automatic kernel compiler. genkernel \- the Gentoo Linux automatic kernel compiler.
.SH SYNOPSIS .SH SYNOPSIS
@ -23,13 +23,17 @@ This would produce a kernel, asking you what how to configure it
to your desire, leaving alone any existing compiled object files, enabling to your desire, leaving alone any existing compiled object files, enabling
bootsplash support but not installing anything. bootsplash support but not installing anything.
.SH ACTIONS .SH ACTIONS
An action tells Genkernel what you want it to do - the following An action tells genkernel what you want it to do - the following
actions are supported: actions are supported:
.PP .PP
.I \fBall\fR .I \fBall\fR
.RS .RS
Build all steps - the kernel, modules, and the initrd. Build all steps - the kernel, modules, and the initrd.
.RE .RE
.I \fBbzImage\fR
.RS
Build only the kernel.
.RE
.I \fBkernel\fR .I \fBkernel\fR
.RS .RS
Build only the kernel and the modules. Build only the kernel and the modules.
@ -107,9 +111,6 @@ Implies \fB\-\-no\-clean\fR, and thus \fB\-\-no\-mrproper\fR, running a
\fB\-\-callback=\fR<...> \fB\-\-callback=\fR<...>
Run the specified arguments in the current environment after the kernel and Run the specified arguments in the current environment after the kernel and
modules have been compiled. modules have been compiled.
.TP
\fB\-\-udev\fR
Add in udev support to the initrd.
.PP .PP
.BR Kernel \ Locations .BR Kernel \ Locations
.TP .TP
@ -169,14 +170,27 @@ rather than the default theme specified in your gensplash
configuration. If \fB\-\-no-gensplash\fR is specified, then configuration. If \fB\-\-no-gensplash\fR is specified, then
gensplash is disabled. gensplash is disabled.
.TP .TP
\fB\-\-gensplash-res=\fR<resolutions>
Optionally select gensplash resolutions to include.
.TP
\fB\-\-evms2\fR
Add in EVMS2 support from static binaries if they exist on the system:
you should run "emerge evms2" first.
.TP
\fB\-\-lvm2\fR \fB\-\-lvm2\fR
.RS .RS
Add in LVM2 support from static binaries if they exist on the system, Add in LVM2 support from static binaries if they exist on the system,
or compile static LVM2 binaries if static ones do not exist. or compile static LVM2 binaries if static ones do not exist.
.RE .RE
.TP .TP
\fB\-\-no\-evms2\fR \fB\-\-unionfs\fR
Don't add in EVMS2 support if it is available on the system. Add unionfs support.
.TP
\fB\-\-dmraid\fR
Add DMRAID support.
.TP
\fB\-\-linuxrc=\fR<file>
Use <file> for the linuxrc instead of the genkernel linuxrc.
.PP .PP
.BR Internals .BR Internals
.TP .TP
@ -203,16 +217,16 @@ initrd will be included...
File to output a .tar.bz2'd modules after the callbacks have run File to output a .tar.bz2'd modules after the callbacks have run
.TP .TP
\fB\-\-kerncache=\fR<tbz2> \fB\-\-kerncache=\fR<tbz2>
File to output a .tar.bz2'd kernel, contents of /lib/modules/ and the kernel config File to output a .tar.bz2'd kernel, contents of /lib/modules/ and the kernel config.
NOTE: This is created before the callbacks are run," \fBNOTE\fR: This is created before the callbacks are run.
.TP .TP
\fB\-\-no\-kernel\-sources=\fR<tbz2> \fB\-\-no\-kernel\-sources=\fR<tbz2>
This option is only valid if kerncache is defined This option is only valid if kerncache is defined
If there is a valid kerncache no checks will be made If there is a valid kerncache no checks will be made
against a kernel source tree against a kernel source tree.
.TP .TP
\fB\-\-initramfs\-overlay=\fR<dir> \fB\-\-initramfs\-overlay=\fR<dir>
Directory structure to inject into the initramfs Directory structure to inject into the initramfs.
Only available on 2.6 kernels that don't use bootsplash; use a CPIO Only available on 2.6 kernels that don't use bootsplash; use a CPIO
archive as a parameter. archive as a parameter.
.SH INITRD OPTIONS .SH INITRD OPTIONS
@ -222,18 +236,8 @@ bootloader, which the initrd scripts would recognize.
\fBreal_root=\fR<...> \fBreal_root=\fR<...>
Specifies the device node of the root filesystem to mount. Specifies the device node of the root filesystem to mount.
.TP .TP
\fBdevfs\fR \fBdodmraid=\fR<...>
.RS Passes arguments to dmraid on bootup.
Turns on devfs support.
.RE
.TP
\fBnodevfs\fR
Turns off devfs support.
.TP
\fBnoudev\fR
.RS
Turns off udev support.
.RE
.TP .TP
\fBreal_init=\fR<...> \fBreal_init=\fR<...>
Passes arguments to init on bootup. Passes arguments to init on bootup.

@ -90,7 +90,7 @@ DEVFSD_DIR="devfsd"
DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2" DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2"
DEVFSD_CONF_BINCACHE="%%CACHE%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2" DEVFSD_CONF_BINCACHE="%%CACHE%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2"
UDEV_VER="058" UDEV_VER="054"
UDEV_DIR="udev-${UDEV_VER}" UDEV_DIR="udev-${UDEV_VER}"
UDEV_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2" UDEV_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2"
UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2" UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2"

@ -158,7 +158,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
# #
# Console Utilities # Console Utilities
# #
# CONFIG_CHVT is not set CONFIG_CHVT=y
CONFIG_CLEAR=y CONFIG_CLEAR=y
# CONFIG_DEALLOCVT is not set # CONFIG_DEALLOCVT is not set
CONFIG_DUMPKMAP=y CONFIG_DUMPKMAP=y

@ -158,7 +158,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
# #
# Console Utilities # Console Utilities
# #
# CONFIG_CHVT is not set CONFIG_CHVT=y
CONFIG_CLEAR=y CONFIG_CLEAR=y
# CONFIG_DEALLOCVT is not set # CONFIG_DEALLOCVT is not set
CONFIG_DUMPKMAP=y CONFIG_DUMPKMAP=y

Loading…
Cancel
Save