check for loop devices and fix debug printing

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@39 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Brad House 21 years ago
parent e66948ab42
commit 586760c4d8

@ -191,10 +191,11 @@ compile_modules() {
compile_kernel() { compile_kernel() {
[ "${KERNEL_MAKE}" = "" ] && gen_die "KERNEL_MAKE undefined. Don't know how to compile kernel for arch." [ "${KERNEL_MAKE}" = "" ] && gen_die "KERNEL_MAKE undefined. Don't know how to compile kernel for arch."
cd ${KERNEL_DIR} cd ${KERNEL_DIR}
print_info 1 "kernel: Starting compile of linux ${KV} ${KERNEL_MAKE}" print_info 1 "kernel: Starting compile of linux ${KV} ${KERNEL_MAKE_DIRECTIVE}"
compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel
if [ "${KERNEL_MAKE_DIRECTIVE_2}" != "" ] if [ "${KERNEL_MAKE_DIRECTIVE_2}" != "" ]
then then
print_info 1 "kernel: Starting suppliment compile of linux ${KV} ${KERNEL_MAKE_DIRECTIVE_2}"
compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel
fi fi
cp "${KERNEL_BINARY}" "/boot/kernel-${KV}" || gen_die "Could not copy kernel binary to boot" cp "${KERNEL_BINARY}" "/boot/kernel-${KV}" || gen_die "Could not copy kernel binary to boot"
@ -219,7 +220,7 @@ compile_busybox() {
# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" # UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
# fi # fi
print_info 1 "Busybox: make oldconfig" print_info 1 "Busybox: make oldconfig"
compile_generic "oldconfig" utils yes "" | compile_generic "oldconfig" utils
print_info 1 "Busybox: make all" print_info 1 "Busybox: make all"
compile_generic "all" utils compile_generic "all" utils
# Busybox and dietlibc don't play nice right now # Busybox and dietlibc don't play nice right now

@ -167,3 +167,14 @@ gen_die() {
fi fi
exit 1 exit 1
} }
has_loop() {
if [ -e "/dev/loop0" -o -e "/dev/loop/0" ]
then
# We found devfs or standard dev loop device, assume
# loop is compiled into the kernel or the module is loaded
return 0
else
return 1
fi
}

@ -50,6 +50,13 @@ determine_real_args
print_info 1 "ARCH: ${ARCH}" print_info 1 "ARCH: ${ARCH}"
print_info 1 "KERNEL VER: ${KV}" print_info 1 "KERNEL VER: ${KV}"
if !has_loop
then
print_info 1 "Your kernel does not appear to have loop device support. "
print_info 1 "Please 'modprobe loop' if it is a module before running genkernel"
gen_die "----Load loop support----"
fi
# Configure kernel # Configure kernel
config_kernel config_kernel

Loading…
Cancel
Save