View | Details | Raw Unified
Collapse All | Expand All

(-) genkernel-3.4.5/gen_cmdline.sh (+12 lines)
 Lines 77-82   longusage() { Link Here 
  echo "	--lvm2			Include LVM2 support"
  echo "	--lvm2			Include LVM2 support"
#  echo "	--unionfs		Include UNIONFS support"
#  echo "	--unionfs		Include UNIONFS support"
  echo "	--dmraid		Include DMRAID support"
  echo "	--dmraid		Include DMRAID support"
  echo "	--suspend		Include userspace suspend/resume (uswsusp) support"
  echo "	--slowusb		Enables extra pauses for slow USB CD boots"
  echo "	--slowusb		Enables extra pauses for slow USB CD boots"
  echo "	--bootloader=grub	Add new kernel to GRUB configuration"
  echo "	--bootloader=grub	Add new kernel to GRUB configuration"
  echo "	--linuxrc=<file>	Specifies a user created linuxrc"
  echo "	--linuxrc=<file>	Specifies a user created linuxrc"
 Lines 226-231   parse_cmdline() { Link Here 
		      CMD_LVM2=1
		      CMD_LVM2=1
		      print_info 2 "CMD_LVM2: $CMD_LVM2"
		      print_info 2 "CMD_LVM2: $CMD_LVM2"
	      ;;
	      ;;
	      --suspend)
		      if [ ! -e /etc/suspend.conf ]
		      then
			echo 'Error: --suspend requires sys-power/suspend to be installed'
			echo '       on the host system; try "emerge sys-power/suspend".'
			echo '       Once installed, configure the resume settings in /etc/suspend.conf'
			exit 1
		      fi
	      	      CMD_SUSPEND=1
		      print_info 2 "CMD_SUSPEND: $CMD_SUSPEND"
	      ;;
	      --no-busybox)
	      --no-busybox)
		      CMD_NO_BUSYBOX=1
		      CMD_NO_BUSYBOX=1
		      print_info 2 "CMD_NO_BUSYBOX: $CMD_NO_BUSYBOX"
		      print_info 2 "CMD_NO_BUSYBOX: $CMD_NO_BUSYBOX"
(-) genkernel-3.4.5/gen_compile.sh (-13 / +52 lines)
 Lines 187-194   compile_generic() { Link Here 
	local RET
	local RET
	[ "$#" -lt '2' ] &&
	[ "$#" -lt '2' ] &&
		gen_die 'compile_generic(): improper usage!'
		gen_die 'compile_generic(): improper usage!'
	local target=${1}
	local argstype=${2}
	if [ "${2}" = 'kernel' ] || [ "${2}" = 'runtask' ]
	if [ "${argstype}" = 'kernel' ] || [ "${argstype}" = 'runtask' ]
	then
	then
		export_kernel_args
		export_kernel_args
		MAKE=${KERNEL_MAKE}
		MAKE=${KERNEL_MAKE}
 Lines 197-238   compile_generic() { Link Here 
		export_utils_args
		export_utils_args
		MAKE=${UTILS_MAKE}
		MAKE=${UTILS_MAKE}
	fi
	fi
	case "$2" in
	case "${argstype}" in
		kernel) ARGS="`compile_kernel_args`" ;;
		kernel) ARGS="`compile_kernel_args`" ;;
		utils) ARGS="`compile_utils_args`" ;;
		utils) ARGS="`compile_utils_args`" ;;
		*) ARGS="" ;; # includes runtask
		*) ARGS="" ;; # includes runtask
	esac
	esac
		
	shift 2
	# the eval usage is needed in the next set of code
	# the eval usage is needed in the next set of code
	# as ARGS can contain spaces and quotes, eg:
	# as ARGS can contain spaces and quotes, eg:
	# ARGS='CC="ccache gcc"'
	# ARGS='CC="ccache gcc"'
	if [ "${2}" == 'runtask' ]
	if [ "${argstype}" == 'runtask' ]
	then
	then
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${1}" 1 0 1
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${target} $*" 1 0 1
		eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${1}
		eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${target} $*
		RET=$?
		RET=$?
	elif [ "${DEBUGLEVEL}" -gt "1" ]
	elif [ "${DEBUGLEVEL}" -gt "1" ]
	then
	then
		# Output to stdout and debugfile
		# Output to stdout and debugfile
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $*" 1 0 1
		eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} 2>&1 | tee -a ${DEBUGFILE}
		eval ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $* 2>&1 | tee -a ${DEBUGFILE}
		RET=${PIPESTATUS[0]}
		RET=${PIPESTATUS[0]}
	else
	else
		# Output to debugfile only
		# Output to debugfile only
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1} $*" 1 0 1
		eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} >> ${DEBUGFILE} 2>&1
		eval ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $* >> ${DEBUGFILE} 2>&1
		RET=$?
		RET=$?
	fi
	fi
	[ "${RET}" -ne '0' ] &&
	[ "${RET}" -ne '0' ] &&
		gen_die "Failed to compile the \"${1}\" target..."
		gen_die "Failed to compile the \"${target}\" target..."
	unset MAKE
	unset MAKE
	unset ARGS
	unset ARGS
	if [ "${2}" = 'kernel' ]
	if [ "${argstype}" = 'kernel' ]
	then
	then
		unset_kernel_args
		unset_kernel_args
	elif [ "${2}" = 'utils' ]
	elif [ "${argstype}" = 'utils' ]
	then
	then
		unset_utils_args
		unset_utils_args
	fi
	fi
 Lines 529-534   compile_dmraid() { Link Here 
	fi
	fi
}
}
compile_suspend() {
	[ -f "${SUSPEND_BINCACHE}" ] && return
	[ -f "${SUSPEND_SRCTAR}" ] ||
		gen_die "Could not find SUSPEND source tarball: ${SUSPEND_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
	cd ${TEMP}
	rm -rf ${SUSPEND_DIR} > /dev/null
	/bin/tar -zxpf ${SUSPEND_SRCTAR} ||
		gen_die 'Could not extract SUSPEND source tarball!'
	[ -d "${SUSPEND_DIR}" ] ||
		gen_die "SUSPEND directory ${DMRAID_DIR} is invalid!"
	cd "${SUSPEND_DIR}"
	if [ -f "${GK_SHARE}/pkg/suspend-0.5-Makefile.patch" ]
	then
		patch -p1 -i \
			${GK_SHARE}/pkg/suspend-0.5-Makefile.patch \
			|| gen_die "Failed patching suspend"
	fi
	print_info 1 'suspend: >> Compiling...'
	compile_generic '' utils CC_FLAGS= LD_FLAGS=
	print_info 1 '         >> Copying to bincache...'
	mkdir -p "${TEMP}/bincache/etc"
	mkdir -p "${TEMP}/bincache/sbin"
	cp -f /etc/suspend.conf "${TEMP}/bincache/etc" ||
		gen_die 'Could not copy suspend.conf'
	cp -f resume "${TEMP}/bincache/sbin" ||
		gen_die 'Could not copy resume binary'
	cd "${TEMP}/bincache"
	/bin/tar -cjf "${SUSPEND_BINCACHE}" * ||
		gen_die 'Could not create suspend binary cache'
	cd "${TEMP}"
	rm -rf bincache suspend-0.5
}
compile_modutils() {
compile_modutils() {
	# I've disabled dietlibc support for the time being since the
	# I've disabled dietlibc support for the time being since the
	# version we use misses a few needed system calls.
	# version we use misses a few needed system calls.
(-) genkernel-3.4.5/gen_configkernel.sh (+7 lines)
 Lines 120-123   config_kernel() { Link Here 
	then
	then
		sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_FB_SPLASH is.*/CONFIG_FB_SPLASH=y/g'
		sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_FB_SPLASH is.*/CONFIG_FB_SPLASH=y/g'
	fi
	fi
	# This check isn't complete: SOFTWARE_SUSPEND has extra deps on some systems such as CPU hotplug
	if isTrue ${CMD_SUSPEND}
	then
		sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_SOFTWARE_SUSPEND is.*/CONFIG_SOFTWARE_SUSPEND=y/g'
	fi
}
}
(-) genkernel-3.4.5/gen_determineargs.sh (+9 lines)
 Lines 212-217   determine_real_args() { Link Here 
	UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"`
	UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"`
	UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"`
	UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"`
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
	SUSPEND_BINCACHE=`cache_replace "${SUSPEND_BINCACHE}"`
  
  
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
 Lines 230-235   determine_real_args() { Link Here 
	UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"`
	UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"`
	UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
	UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
	SUSPEND_BINCACHE=`arch_replace "${SUSPEND_BINCACHE}"`
	
	
	if [ "${CMD_BOOTSPLASH}" != '' ]
	if [ "${CMD_BOOTSPLASH}" != '' ]
	then
	then
 Lines 423-428   determine_real_args() { Link Here 
	else
	else
		LVM2=0
		LVM2=0
	fi
	fi
	if isTrue "${CMD_SUSPEND}"
	then
		SUSPEND=1
	else
		SUSPEND=0
	fi
	
	
	if isTrue "${CMD_EVMS2}"
	if isTrue "${CMD_EVMS2}"
	then
	then
(-) genkernel-3.4.5/generic/initrd.scripts (+12 lines)
 Lines 743-748   setup_unionfs() { Link Here 
	fi
	fi
}
}
suspend_resume() {
	[ -x /sbin/resume ] || return 0
	/sbin/resume
	local ret=$?
	if [ "${ret}" -eq 0 ]; then
		exit 0
	fi
	return 0
}
suspend2_resume() {
suspend2_resume() {
	if [ -d /proc/suspend2 ] || [ -d /sys/power/suspend2 ]; then
	if [ -d /proc/suspend2 ] || [ -d /sys/power/suspend2 ]; then
		local splash_theme
		local splash_theme
(-) genkernel-3.4.5/generic/linuxrc (+1 lines)
 Lines 250-255   fi Link Here 
# Run debug shell if requested
# Run debug shell if requested
rundebugshell
rundebugshell
suspend_resume
suspend2_resume
suspend2_resume
if [ "${CDROOT}" -eq '1' ]
if [ "${CDROOT}" -eq '1' ]
(-) genkernel-3.4.5/genkernel.conf (+6 lines)
 Lines 142-144   E2FSPROGS_VER="VERSION_E2FSPROGS" Link Here 
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
SUSPEND_VER="VERSION_SUSPEND"
SUSPEND_DIR="suspend-${SUSPEND_VER}"
SUSPEND_SRCTAR="${GK_SHARE}/pkg/suspend-${SUSPEND_VER}.tar.gz"
SUSPEND_BINCACHE="%%CACHE%%/suspend-${SUSPEND_VER}-%%ARCH%%.tar.bz2"
(-) genkernel-3.4.5/gen_initramfs.sh (+26 lines)
 Lines 173-178   create_unionfs_tools_cpio(){ Link Here 
	fi										        
	fi										        
}
}
create_suspend_cpio(){
	[ "${SUSPEND}" = '1' ] || return
	if [ -d "${TEMP}/initramfs-suspend-temp" ];
	then
		rm -r "${TEMP}/initramfs-suspend-temp/"
	fi
	print_info 1 'SUSPEND: Adding support (compiling binaries)...'
	compile_suspend
	mkdir -p "${TEMP}/initramfs-suspend-temp/"
	/bin/tar -jxpf "${SUSPEND_BINCACHE}" -C "${TEMP}/initramfs-suspend-temp" ||
		gen_die "Could not extract suspend binary cache!"
	cd "${TEMP}/initramfs-suspend-temp/"
	find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-suspend-${SUSPEND_VER}.cpio.gz
}
create_dmraid_cpio(){
create_dmraid_cpio(){
	# DMRAID
	# DMRAID
	if [ "${DMRAID}" = '1' ]
	if [ "${DMRAID}" = '1' ]
 Lines 510-515   merge_initramfs_cpio_archives(){ Link Here 
	then
	then
		MERGE_LIST="${MERGE_LIST} initramfs-unionfs-${UNIONFS_VER}-modules-${KV}.cpio.gz"
		MERGE_LIST="${MERGE_LIST} initramfs-unionfs-${UNIONFS_VER}-modules-${KV}.cpio.gz"
	fi
	fi
	if [ "${SUSPEND}" -eq '1' -a -e "${CACHE_CPIO_DIR}/initramfs-suspend-${SUSPEND_VER}.cpio.gz" ]
	then
		MERGE_LIST="${MERGE_LIST} initramfs-suspend-${SUSPEND_VER}.cpio.gz"
	fi
	if [ "${EVMS2}" -eq '1' -a -e "${CACHE_CPIO_DIR}/initramfs-evms2.cpio.gz" ]
	if [ "${EVMS2}" -eq '1' -a -e "${CACHE_CPIO_DIR}/initramfs-evms2.cpio.gz" ]
	then
	then
		MERGE_LIST="${MERGE_LIST} initramfs-evms2.cpio.gz"
		MERGE_LIST="${MERGE_LIST} initramfs-evms2.cpio.gz"
 Lines 616-621   create_initramfs() { Link Here 
	    print_info 1 "        >> Creating unionfs tools cpio archive..."
	    print_info 1 "        >> Creating unionfs tools cpio archive..."
	    create_unionfs_tools_cpio
	    create_unionfs_tools_cpio
	fi
	fi
	if [ "${SUSPEND}" -eq '1' ]
	then
	    print_info 1 "        >> Creating suspend cpio archive..."
	    create_suspend_cpio
	fi
	
	
	if [ "${LVM2}" -eq '1' ]
	if [ "${LVM2}" -eq '1' ]
	then
	then
(-) genkernel-3.4.5/genkernel.8 (+7 lines)
 Lines 186-191   Add in LVM2 support from static binaries Link Here 
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\-\-suspend\fR
.RS
Add support for userspace suspend/resume (uswsusp). This option requires
Linux 2.6.17 or newer, \fBsys-power/suspend\fR installed on the host system,
and resume configured in \fB/etc/suspend.conf\fR.
.RE
.TP
\fB\-\-no-udev\fR
\fB\-\-no-udev\fR
Force devfs on 2.6 series kernels. Not recommended or supported.
Force devfs on 2.6 series kernels. Not recommended or supported.
.TP
.TP