Merge branch 'bug-423847'

cleanup-cruft
Sebastian Pipping 13 years ago
commit 08e9d742e2

@ -5,6 +5,18 @@
# Distributed under the GPL v2 # Distributed under the GPL v2
# $Id$ # $Id$
08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh,
genkernel:
Always report used kernel config file
08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_configkernel.sh,
gen_initramfs.sh:
Catch case with no initramfs compression supported by kernel (bug #423847)
08 Jul 2012; Sebastian Pipping <sping@gentoo.org> gen_configkernel.sh,
gen_initramfs.sh:
Fix detection of initramfs compression with bzip2 as best candidate
08 Jul 2012; Sebastian Pipping <sping@gentoo.org> arch/x86/modules_load, 08 Jul 2012; Sebastian Pipping <sping@gentoo.org> arch/x86/modules_load,
arch/x86_64/modules_load, defaults/modules_load: arch/x86_64/modules_load, defaults/modules_load:
Add xts to MODULES_CRYPTO (bug #425028) Add xts to MODULES_CRYPTO (bug #425028)

@ -754,6 +754,13 @@ create_initramfs() {
else else
if isTrue "${COMPRESS_INITRD}" if isTrue "${COMPRESS_INITRD}"
then then
if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then
# Support --kernel-config=/proc/config.gz, mainly
local CONFGREP=zgrep
else
local CONFGREP=grep
fi
cmd_xz=$(type -p xz) cmd_xz=$(type -p xz)
cmd_lzma=$(type -p lzma) cmd_lzma=$(type -p lzma)
cmd_bzip2=$(type -p bzip2) cmd_bzip2=$(type -p bzip2)
@ -772,17 +779,18 @@ create_initramfs() {
for tuple in \ for tuple in \
'CONFIG_RD_XZ cmd_xz xz' \ 'CONFIG_RD_XZ cmd_xz xz' \
'CONFIG_RD_LZMA cmd_lzma lzma' \ 'CONFIG_RD_LZMA cmd_lzma lzma' \
'CONFIG_RD_BZIP2 cmd_bzip2 bzip' \ 'CONFIG_RD_BZIP2 cmd_bzip2 bzip2' \
'CONFIG_RD_GZIP cmd_gzip gzip' \ 'CONFIG_RD_GZIP cmd_gzip gzip' \
'CONFIG_RD_LZO cmd_lzop lzop'; do 'CONFIG_RD_LZO cmd_lzop lzop'; do
set -- ${tuple} set -- ${tuple}
kernel_option=$1 kernel_option=$1
cmd_variable_name=$2 cmd_variable_name=$2
if grep -sq "^${kernel_option}=y" ${KERNEL_DIR}/.config && test -n "${!cmd_variable_name}" ; then if ${CONFGREP} -q "^${kernel_option}=y" "${KERNEL_CONFIG}" && test -n "${!cmd_variable_name}" ; then
compression=$3 compression=$3
[[ ${COMPRESS_INITRD_TYPE} == best ]] && break [[ ${COMPRESS_INITRD_TYPE} == best ]] && break
fi fi
done done
[[ -z "${compression}" ]] && gen_die "None of the initramfs we tried are supported by your kernel (config file \"${KERNEL_CONFIG}\"), strange!?"
;; ;;
*) *)
gen_die "Compression '${COMPRESS_INITRD_TYPE}' unknown" gen_die "Compression '${COMPRESS_INITRD_TYPE}' unknown"

@ -117,6 +117,7 @@ done
# get the real arguments for usage... # get the real arguments for usage...
determine_real_args determine_real_args
determine_config_file
set_kernel_arch set_kernel_arch
@ -129,6 +130,7 @@ check_distfiles
dump_debugcache dump_debugcache
NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..."
print_info 1 ".. with config file ${KERNEL_CONFIG}"
# Check BOOTDIR is mounted # Check BOOTDIR is mounted
if ! isTrue ${CMD_INSTALL} if ! isTrue ${CMD_INSTALL}
@ -352,10 +354,20 @@ then
[ "${ZFS}" = '1' ] && print_warning 1 'add "dozfs" for ZFS volume management support' [ "${ZFS}" = '1' ] && print_warning 1 'add "dozfs" for ZFS volume management support'
[ "${ZFS}" = '1' ] && print_warning 1 'add either "real_root=ZFS" (bootfs autodetection) or "real_root=ZFS=<dataset>" to boot from a ZFS dataset' [ "${ZFS}" = '1' ] && print_warning 1 'add either "real_root=ZFS" (bootfs autodetection) or "real_root=ZFS=<dataset>" to boot from a ZFS dataset'
[ "${ISCSI}" = '1' ] && print_warning 1 'add at least "iscsi_initiatorname=<initiator name> iscsi_target=<target name> and iscsi_address=<target ip>" for iscsi support' [ "${ISCSI}" = '1' ] && print_warning 1 'add at least "iscsi_initiatorname=<initiator name> iscsi_target=<target name> and iscsi_address=<target ip>" for iscsi support'
if [ `grep 'CONFIG_EXT[0-9]_FS=' "${KERNEL_DIR}"/.config | wc -l` -ge 2 ]; then
print_warning 1 'With support for several ext* filesystems around it may be needed to' if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then
print_warning 1 'add "rootfstype=ext3" or "rootfstype=ext4"' # Support --kernel-config=/proc/config.gz, mainly
CONFGREP=zgrep
else
CONFGREP=grep
fi fi
if [ `${CONFGREP} 'CONFIG_EXT[0-9]_FS=' "${KERNEL_CONFIG}" | wc -l` -ge 2 ]; then
print_warning 1 'With support for several ext* filesystems available, it may be needed to'
print_warning 1 'add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.'
fi
unset CONFGREP
fi fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR} [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}

Loading…
Cancel
Save