git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@281 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Tim Yamin 20 years ago
parent 38f0e76f3d
commit 5ed6e170ce

@ -495,7 +495,7 @@ merge_initramfs_cpio_archives(){
[ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' ] || [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' ] ||
[ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' ] && [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' ] &&
cp ${TEMP}/initramfs-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz
} }
clear_cpio_dir(){ clear_cpio_dir(){

@ -90,6 +90,7 @@ gen_kerncache_extract_kernel()
cp "${TEMP}/kernelz-${ARCH}-${KV}" "/boot/kernelz-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy the kernel binary to /boot!' cp "${TEMP}/kernelz-${ARCH}-${KV}" "/boot/kernelz-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy the kernel binary to /boot!'
fi fi
cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy System.map to /boot!' cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy System.map to /boot!'
}
gen_kerncache_extract_modules() gen_kerncache_extract_modules()
{ {

@ -162,8 +162,8 @@ findnfsmount() {
fi fi
if [ "${NFSROOT}" != '' ]; then if [ "${NFSROOT}" != '' ]; then
if [ "${CDROOT}" != '' ]; then if [ "${CDROOT}" != '0' ]; then
good_msg "Attempting to mount NFS CD image on ${NFSPATH}" good_msg "Attempting to mount NFS CD image on ${NFSROOT}"
mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}/mnt/cdrom mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}/mnt/cdrom
if [ "$?" = '0' ]; then if [ "$?" = '0' ]; then
REAL_ROOT="/dev/nfs" REAL_ROOT="/dev/nfs"
@ -171,7 +171,7 @@ findnfsmount() {
bad_msg "NFS Mounting failed. Is the path corrent ?" bad_msg "NFS Mounting failed. Is the path corrent ?"
fi fi
else else
good_msg "Attemping to mount NFS root on ${NFSPATH}" good_msg "Attemping to mount NFS root on ${NFSROOT}"
mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT} mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}
if [ "$?" = '0' ]; then if [ "$?" = '0' ]; then
REAL_ROOT="/dev/nfs" REAL_ROOT="/dev/nfs"
@ -440,6 +440,11 @@ startVolumes() {
then then
if [ -e '/bin/vgscan' -a -e '/bin/vgchange' ] if [ -e '/bin/vgscan' -a -e '/bin/vgchange' ]
then then
for dev in ${RAID_DEVICES}
do
setup_md_device "${dev}"
done
good_msg "Scanning for Volume Groups" good_msg "Scanning for Volume Groups"
/bin/vgscan --ignorelockingfailure --mknodes 2>/dev/null /bin/vgscan --ignorelockingfailure --mknodes 2>/dev/null
good_msg "Activating Volume Groups" good_msg "Activating Volume Groups"
@ -510,12 +515,15 @@ cdupdate() {
} }
setup_md_device() { setup_md_device() {
[ -z "${REAL_ROOT}" ] && return # LiveCD local device
[ -z "$1" ] && device="${REAL_ROOT}" || device="$1"
[ -z "${device}" ] && return # LiveCD
if [ `echo ${REAL_ROOT}|sed -e 's#\(/dev/md\)[[:digit:]]\+#\1#'` = "/dev/md" ] if [ `echo ${device}|sed -e 's#\(/dev/md\)[[:digit:]]\+#\1#'` = "/dev/md" ]
then then
good_msg 'Detected real_root as a md device. Setting up the device node...' good_msg 'Detected real_root as a md device. Setting up the device node...'
MD_NUMBER=`echo ${REAL_ROOT}|sed -e 's#/dev/md\([[:digit:]]\+\)#\1#'` MD_NUMBER=`echo ${device}|sed -e 's#/dev/md\([[:digit:]]\+\)#\1#'`
if [ ! -e /dev/md${MD_NUMBER} ] if [ ! -e /dev/md${MD_NUMBER} ]
then then
mknod /dev/md${MD_NUMBER} b 9 ${MD_NUMBER} >/dev/null 2>&1 mknod /dev/md${MD_NUMBER} b 9 ${MD_NUMBER} >/dev/null 2>&1

@ -153,6 +153,10 @@ do
;; ;;
# /dev/md # /dev/md
lvmraid\=*)
RAID_DEVICES="${RAID_DEVICES} `parse_opt ${x}`"
;;
part\=*) part\=*)
MDPART=`parse_opt "${x}"` MDPART=`parse_opt "${x}"`
;; ;;

@ -2,7 +2,7 @@
# Genkernel v3 # Genkernel v3
PATH="/bin:/usr/bin:/sbin:/usr/sbin" PATH="/bin:/usr/bin:/sbin:/usr/sbin"
GK_V='3.2.12' GK_V='3.3.1'
TMPDIR='/var/tmp/genkernel' TMPDIR='/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.
@ -28,7 +28,7 @@ source ${GK_BIN}/gen_bootloader.sh || gen_die "Could not read ${GK_BIN}/gen_boot
TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
trap_cleanup(){ trap_cleanup(){
#Call exit code of 1 for failure # Call exit code of 1 for failure
cleanup cleanup
exit 1 exit 1
} }
@ -381,7 +381,7 @@ then
[ "${GENSPLASH}" -eq '1' ] && print_info 1 "add \"vga=791 splash=silent,theme:${GENSPLASH_THEME} CONSOLE=/dev/tty1 quiet\" if you use a gensplash framebuffer ]" [ "${GENSPLASH}" -eq '1' ] && print_info 1 "add \"vga=791 splash=silent,theme:${GENSPLASH_THEME} CONSOLE=/dev/tty1 quiet\" if you use a gensplash framebuffer ]"
[ "${BOOTSPLASH}" -eq '1' ] && print_info 1 'add "vga=791 splash=silent" if you use a bootsplash framebuffer' [ "${BOOTSPLASH}" -eq '1' ] && print_info 1 'add "vga=791 splash=silent" if you use a bootsplash framebuffer'
[ "${LVM2}" -eq '1' ] && print_info 1 'add "dolvm2" for lvm2 support' [ "${LVM2}" -eq '1' ] && print_info 1 'add "dolvm2" for lvm2 support'
[ "${EVMS2}" -eq '1' ] && print_info 1 'add "doevms" for evms support' [ "${EVMS2}" -eq '1' ] && print_info 1 'add "doevms2" for evms support'
[ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support' [ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support'
[ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"' [ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"'
[ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support' [ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support'

@ -1,4 +1,4 @@
.TH GENKERNEL "8" "July 2005" "genkernel 3.2.0" "Gentoo Linux" .TH GENKERNEL "8" "July 2005" "genkernel 3.3" "Gentoo Linux"
.SH NAME .SH NAME
genkernel \- the Gentoo Linux automatic kernel compiler. genkernel \- the Gentoo Linux automatic kernel compiler.
.SH SYNOPSIS .SH SYNOPSIS
@ -272,3 +272,12 @@ and should be assigned to kernel@gentoo.org. Please check if an
existing bug documents the same issue before opening a new bug. Issues existing bug documents the same issue before opening a new bug. Issues
for kernel sources not supported by Gentoo should go to their relevant for kernel sources not supported by Gentoo should go to their relevant
authors. authors.
.SH AUTHORS
Tim Yamin
.B <plasmaroo@gentoo.org>
.sp
Eric Edgar
.B <rocket@gentoo.org>
.sp
NFS Support by Thomas Seiler
.B <thseiler@gmail.com>

@ -24,4 +24,4 @@ UTILS_AS=as
UTILS_LD=ld UTILS_LD=ld
COMPRESS_INITRD=yes COMPRESS_INITRD=yes
GENERATE_Z_IMAGE=1

Loading…
Cancel
Save