>> 3.2.0. Add spock's gensplash fixes, fix initrd startup 'find: ...' errors.
authorTim Yamin <plasmaroo@gentoo.org>
Fri, 8 Jul 2005 22:36:36 +0000 (22:36 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Fri, 8 Jul 2005 22:36:36 +0000 (22:36 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@241 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_cmdline.sh
gen_initramfs.sh
generic/initrd.defaults
generic/initrd.scripts
generic/linuxrc
genkernel
genkernel.8
genkernel.conf
x86/busy-config
x86_64/busy-config

index 09b2df2110cae1c5fcc2e751675e5cefb714547d..12d281fa94753e3210c227b54fb08c43dd98acc6 100755 (executable)
@@ -62,9 +62,10 @@ longusage() {
   echo "  Initialization"
   echo "       --bootsplash=<theme>    Force bootsplash 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 "       --evms2                 Include EVMS2 support"
-  echo "                                --> 'emerge evms' in the host operating system first"
+  echo "                               --> 'emerge evms' in the host operating system first"
   echo "       --lvm2                  Include LVM2 support"
   echo "       --unionfs               Include UNIONFS support"
   echo "       --dmraid                Include DMRAID support"
@@ -75,22 +76,21 @@ longusage() {
   echo "       --cachedir=<dir>        Override the default cache location"
   echo "       --tempdir=<dir>         Location of Genkernel's temporary directory"
   echo "  Output Settings"
-  echo "        --kernname=<...>       tag the kernel and initrd with a name"
-  echo "                               if not defined the option defaults to genkernel"
+  echo "        --kernname=<...>       Tag the kernel and initrd with a name:"
+  echo "                               If not defined the option defaults to 'genkernel'"
   echo "        --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
   echo "                                No modules outside of the initrd will be"
   echo "                                included..."
   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 "                                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 "                               If there is a valid kerncache no checks will be made"
   echo "                               against a kernel source tree"
-  echo "        --initramfs-overlay=<dir>      directory structure to include in the initramfs"
-  echo "                               Only available on 2.6 kernels that dont use bootsplash"
-
-
+  echo "        --initramfs-overlay=<dir>"
+  echo "                               Directory structure to include in the initramfs,"
+  echo "                               only available on 2.6 kernels that don't use bootsplash"
 }
 
 usage() {
@@ -292,6 +292,10 @@ parse_cmdline() {
                      CMD_GENSPLASH=0
                      print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
              ;;
+             --gensplash-res=*)
+                     GENSPLASH_RES=`parse opt "$*"`
+                     print info 2 "GENSPLASH_RES: $GENSPLASH_RES"
+             ;;
              --install)
                      CMD_NOINSTALL=0
                      print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"
index 77cc2cc446fd20124679379e28ea99986b7b40ea..bd52559b8d13af99e809e89cdd263e6a8617e0fb 100644 (file)
@@ -32,6 +32,7 @@ create_base_layout_cpio() {
        cd ${TEMP}/initramfs-base-temp/dev
        mknod -m 660 console c 5 1
        mknod -m 660 null c 1 3
+       mknod -m 600 tty1 c 4 1
        cd "${TEMP}/initramfs-base-temp/"
        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
@@ -250,7 +251,21 @@ create_gensplash(){
                        [ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default
                        print_info 1 "  >> Installing gensplash [ using the ${GENSPLASH_THEME} theme ]..."
                        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
                        print_warning 1 '               >> No splash detected; skipping!'
                fi
index 462be6351bcfcf67a93a5a8c038f92a95d19593c..6ab71ba4ec75941bd366c39e7ff32199e6679280 100644 (file)
@@ -74,6 +74,7 @@ REAL_ROOT=''
 CDROOT=0
 CDROOT_DEV=''
 NEW_ROOT="/newroot"
+CONSOLE="/dev/console"
 
 # Only sections that are in by default or those that
 # are not module groups need to be defined here...
index 783a5530dc36d01e0b9a92e0ad65d9d7b3af6200..2209669e571b735e33dd734a59169aa1accf4a1b 100644 (file)
@@ -207,6 +207,7 @@ test_success() {
        # If last command failed send error message and fall back to a shell    
        if [ "$?" != '0' ]
        then
+               splash 'verbose'
                bad_msg 'Failed to $1; failing back to the shell...'
                run_shell
        fi
@@ -477,6 +478,7 @@ cdupdate() {
        ${NEW_ROOT}/mnt/cdrom/cdupdate.sh
        if [ "$?" != '0' ]
        then
+           splash 'verbose'
            bad_msg "FAILED TO EXECUTE cdupdate.sh"
            run_shell
        fi
index 171596696fd12bd4c506652e49b6cf1b187d00b3..a47c21ccd7d669edefc2c428df2cd5f839334259 100644 (file)
@@ -6,8 +6,13 @@
 . /etc/initrd.defaults
 . /etc/initrd.scripts
 
+splash() {
+       return 0
+}
+[ -e /etc/initrd.splash ] && . /etc/initrd.splash
+
 # Clean input/output
-exec >/dev/console </dev/console 2>&1
+exec >${CONSOLE} <${CONSOLE} 2>&1
 
 if [ "$$" != '1' ]
 then
@@ -133,9 +138,17 @@ do
          MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`"
          export MLIST
          ;;
+
+      # Redirect output to a specific tty
+      CONSOLE\=*)
+         CONSOLE=`parse_opt "${x}"`
+         exec >${CONSOLE} <${CONSOLE} 2>&1
+         ;;
   esac
 done
 
+splash 'init'
+
 detect_sbp2_devices
 cmdline_hwopts
 
@@ -196,6 +209,7 @@ then
        done
        cp /dev/null ${NEW_ROOT}/dev
        cp /dev/console ${NEW_ROOT}/dev
+       cp /dev/tty1 ${NEW_ROOT}/dev
        sdelay
 
        bootstrapCD
@@ -530,6 +544,7 @@ EOF
 elif [ "$0" = '/init' ]
 then
        [ ! -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)..."
 
        cd ${CHROOT}
@@ -540,7 +555,7 @@ then
                umount /proc || echo '*: Failed to unmount the initrd /proc!'
        echo -n '.'
 
-       exec <dev/console >dev/console 2>&1
+       exec <${CONSOLE} >${CONSOLE} 2>&1
        echo '.'
 
        # Cleanup initramfs in the background
@@ -563,17 +578,16 @@ then
        INITRAMFS_FILES=`echo ${INITRAMFS_FILES}|sed -e "s|newroot||g"`
        for i in ${INITRAMFS_FILES}
        do
-               for j in `/bin/busybox find /$i`
+               for j in `/bin/busybox find /$i 2>/dev/null`
                do
-                       #/bin/busybox echo "$j"
                        if /bin/busybox [ ! -d "$j" -a "$j" != "/bin/busybox" ]
                        then
                                /bin/busybox rm "$j"
                        fi
                done
-               for j in `/bin/busybox find /$i`
+               for j in `/bin/busybox find /$i 2>/dev/null`
                do
-                       if /bin/busybox [ -d ${j} -a "${j}" != "/bin" ]
+                       if /bin/busybox [ -d "${j}" -a "${j}" != "/bin" -a "${j}" != "/dev" ]
                        then
                                /bin/busybox rm -r "$j"
                        fi
@@ -582,13 +596,15 @@ then
        # End initramfs cleanup
 
        # 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 /sbin/init ${REAL_INIT}
 EOF
 
 fi
 
+splash 'verbose'
+
 echo 'A fatal error has probably occured since /sbin/init did not'
 echo 'boot correctly. Trying to open a shell...'
 echo
index c27a4bbed585d1bcdbd4d3e306bed66f54f608af..2312d463dcc1fe7339be5710bfb924099cc3d147 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -2,7 +2,8 @@
 # Genkernel v3
 
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.2.0_pre14'
+GK_V='3.2.0'
+
 TEMP='/var/tmp/genkernel'
 TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.
 
index f525f7fa3b64c3a5773adb3a821ccdeef08b8719..5585f978e087e5bd0de740939c98c0c1f617618f 100644 (file)
@@ -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
 genkernel \- the Gentoo Linux automatic kernel compiler.
 .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
 bootsplash support but not installing anything.
 .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:
 .PP
 .I \fBall\fR
 .RS
 Build all steps - the kernel, modules, and the initrd.
 .RE
+.I \fBbzImage\fR
+.RS
+Build only the kernel.
+.RE
 .I \fBkernel\fR
 .RS
 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<...>
 Run the specified arguments in the current environment after the kernel and
 modules have been compiled.
-.TP
-\fB\-\-udev\fR
-Add in udev support to the initrd.
 .PP
 .BR Kernel \ Locations
 .TP
@@ -169,14 +170,27 @@ rather than the default theme specified in your gensplash
 configuration. If \fB\-\-no-gensplash\fR is specified, then
 gensplash is disabled.
 .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
 .RS
 Add in LVM2 support from static binaries if they exist on the system,
 or compile static LVM2 binaries if static ones do not exist.
 .RE
 .TP
-\fB\-\-no\-evms2\fR
-Don't add in EVMS2 support if it is available on the system.
+\fB\-\-unionfs\fR
+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
 .BR Internals
 .TP
@@ -203,16 +217,16 @@ initrd will be included...
 File to output a .tar.bz2'd modules after the callbacks have run
 .TP
 \fB\-\-kerncache=\fR<tbz2>
-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,"
+File to output a .tar.bz2'd kernel, contents of /lib/modules/ and the kernel config.
+\fBNOTE\fR: This is created before the callbacks are run.
 .TP
 \fB\-\-no\-kernel\-sources=\fR<tbz2>
 This option is only valid if kerncache is defined
 If there is a valid kerncache no checks will be made
-against a kernel source tree
+against a kernel source tree.
 .TP
 \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
 archive as a parameter.
 .SH INITRD OPTIONS
@@ -222,18 +236,8 @@ bootloader, which the initrd scripts would recognize.
 \fBreal_root=\fR<...>
 Specifies the device node of the root filesystem to mount.
 .TP
-\fBdevfs\fR
-.RS
-Turns on devfs support.
-.RE
-.TP
-\fBnodevfs\fR
-Turns off devfs support.
-.TP
-\fBnoudev\fR
-.RS
-Turns off udev support.
-.RE
+\fBdodmraid=\fR<...>
+Passes arguments to dmraid on bootup.
 .TP
 \fBreal_init=\fR<...>
 Passes arguments to init on bootup.
index f9ad233fb0303c6636a545bd83b3534ad949c6cf..8955c4076eab9b0301b720b5a1e22e0a1b0ea041 100755 (executable)
@@ -90,7 +90,7 @@ DEVFSD_DIR="devfsd"
 DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_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_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2"
 UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2"
index e3c1bb9fb521d1c1c8b30f43e9a3d21545d331f8..7bcc06615d3ec996a51d911d6081db01768701bc 100644 (file)
@@ -158,7 +158,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
 #
 # Console Utilities
 #
-# CONFIG_CHVT is not set
+CONFIG_CHVT=y
 CONFIG_CLEAR=y
 # CONFIG_DEALLOCVT is not set
 CONFIG_DUMPKMAP=y
index e3c1bb9fb521d1c1c8b30f43e9a3d21545d331f8..7bcc06615d3ec996a51d911d6081db01768701bc 100644 (file)
@@ -158,7 +158,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
 #
 # Console Utilities
 #
-# CONFIG_CHVT is not set
+CONFIG_CHVT=y
 CONFIG_CLEAR=y
 # CONFIG_DEALLOCVT is not set
 CONFIG_DUMPKMAP=y