Merge branch 'master' of git+ssh://git@git.wolf31o2.org/var/gitroot/projs/genkernel

cleanup-cruft
Joshua Jackson 16 years ago
commit b0e53a5283

@ -2,6 +2,11 @@
# Copyright 1999-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS) # Copyright 1999-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
# Distributed under the GPL v2 # Distributed under the GPL v2
20 Feb 2009; Andrew Gaffney <agaffney@gentoo.org> arch/sparc64/config.sh,
gen_compile.sh, gen_funcs.sh, gen_package.sh:
Add support for multiple possible kernel binary paths for gentoo bug
#255085
04 Feb 2009; Andrew Gaffney <agaffney@gentoo.org> defaults/linuxrc: 04 Feb 2009; Andrew Gaffney <agaffney@gentoo.org> defaults/linuxrc:
Comment out the exec line for console=*, since it seems to blow up when Comment out the exec line for console=*, since it seems to blow up when
the param isn't a true device node, such as ttyS0,115200n8 the param isn't a true device node, such as ttyS0,115200n8

@ -5,7 +5,7 @@
# #
KERNEL_MAKE_DIRECTIVE="vmlinux" KERNEL_MAKE_DIRECTIVE="vmlinux"
KERNEL_MAKE_DIRECTIVE_2="image" KERNEL_MAKE_DIRECTIVE_2="image"
KERNEL_BINARY="arch/sparc64/boot/image" KERNEL_BINARY="arch/sparc64/boot/image arch/sparc/boot/image"
COMPRESS_INITRD=yes COMPRESS_INITRD=yes
USECOLOR="no" USECOLOR="no"

@ -976,7 +976,7 @@ setup_unionfs() {
# mkdir -p $CHANGES # mkdir -p $CHANGES
# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION} # mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
good_msg "Creating union mount" good_msg "Creating union mount"
unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
ret=$? ret=$?
if [ "${ret}" -ne 0 ] if [ "${ret}" -ne 0 ]
then then

@ -298,10 +298,18 @@ compile_kernel() {
print_info 1 " >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..." print_info 1 " >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..."
compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel
fi fi
local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
if [ -z "${tmp_kernel_binary}" ]
then
gen_die "Cannot locate kernel binary"
fi
if ! isTrue "${CMD_NOINSTALL}" if ! isTrue "${CMD_NOINSTALL}"
then then
copy_image_with_preserve "kernel" \ copy_image_with_preserve "kernel" \
"${KERNEL_BINARY}" \ "${tmp_kernel_binary}" \
"kernel-${KNAME}-${ARCH}-${KV}" "kernel-${KNAME}-${ARCH}-${KV}"
copy_image_with_preserve "System.map" \ copy_image_with_preserve "System.map" \
@ -311,17 +319,17 @@ compile_kernel() {
if isTrue "${GENZIMAGE}" if isTrue "${GENZIMAGE}"
then then
copy_image_with_preserve "kernelz" \ copy_image_with_preserve "kernelz" \
"${KERNEL_BINARY_2}" \ "${tmp_kernel_binary2}" \
"kernelz-${KV}" "kernelz-${KV}"
fi fi
else else
cp "${KERNEL_BINARY}" "${TMPDIR}/kernel-${KNAME}-${ARCH}-${KV}" || cp "${tmp_kernel_binary}" "${TMPDIR}/kernel-${KNAME}-${ARCH}-${KV}" ||
gen_die "Could not copy the kernel binary to ${TMPDIR}!" gen_die "Could not copy the kernel binary to ${TMPDIR}!"
cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" || cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" ||
gen_die "Could not copy System.map to ${TMPDIR}!" gen_die "Could not copy System.map to ${TMPDIR}!"
if isTrue "${GENZIMAGE}" if isTrue "${GENZIMAGE}"
then then
cp "${KERNEL_BINARY_2}" "${TMPDIR}/kernelz-${KV}" || cp "${tmp_kernel_binary2}" "${TMPDIR}/kernelz-${KV}" ||
gen_die "Could not copy the kernelz binary to ${TMPDIR}!" gen_die "Could not copy the kernelz binary to ${TMPDIR}!"
fi fi
fi fi

@ -524,3 +524,24 @@ check_distfiles() {
fi fi
done done
} }
find_kernel_binary() {
local kernel_binary=$*
local curdir=$(pwd)
cd "${KERNEL_DIR}"
for i in ${kernel_binary}
do
if [ -e "${i}" ]
then
tmp_kernel_binary=$i
break
fi
done
# if [ -z "${tmp_kernel_binary}" ]
# then
# gen_die "Cannot locate kernel binary!"
# fi
cd "${curdir}"
echo "${tmp_kernel_binary}"
}

@ -13,12 +13,18 @@ gen_minkernpackage() {
/bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV} /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV}
fi fi
else else
local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
if [ -z "${tmp_kernel_binary}" ]
then
gen_die "Cannot locate kernel binary"
fi
cd "${KERNEL_DIR}" cd "${KERNEL_DIR}"
cp "${KERNEL_BINARY}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!' cp "${tmp_kernel_binary}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!'
cp ".config" "${TEMP}/minkernpackage/config-${ARCH}-${KV}" || gen_die 'Could not the copy kernel config for the min kernel package!' cp ".config" "${TEMP}/minkernpackage/config-${ARCH}-${KV}" || gen_die 'Could not the copy kernel config for the min kernel package!'
if isTrue "${GENZIMAGE}" if isTrue "${GENZIMAGE}"
then then
cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package" cp "${tmp_kernel_binary2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
fi fi
fi fi
@ -60,15 +66,23 @@ gen_kerncache()
print_info 1 'Creating kernel cache' print_info 1 'Creating kernel cache'
rm -rf "${TEMP}/kerncache" > /dev/null 2>&1 rm -rf "${TEMP}/kerncache" > /dev/null 2>&1
mkdir "${TEMP}/kerncache" || gen_die 'Could not make a directory for the kernel cache!' mkdir "${TEMP}/kerncache" || gen_die 'Could not make a directory for the kernel cache!'
local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
if [ -z "${tmp_kernel_binary}" ]
then
gen_die "Cannot locate kernel binary"
fi
cd "${KERNEL_DIR}" cd "${KERNEL_DIR}"
cp "${KERNEL_BINARY}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!' cp "${tmp_kernel_binary}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!'
cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}"
cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig"
cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}"
if isTrue "${GENZIMAGE}" if isTrue "${GENZIMAGE}"
then then
cp "${KERNEL_BINARY_2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package" cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package"
fi fi
echo "VERSION = ${VER}" > "${TEMP}/kerncache/kerncache.config" echo "VERSION = ${VER}" > "${TEMP}/kerncache/kerncache.config"
echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config" echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config"

Loading…
Cancel
Save