|
|
@ -78,7 +78,13 @@ gen_kerncache()
|
|
|
|
cd "${KERNEL_DIR}"
|
|
|
|
cd "${KERNEL_DIR}"
|
|
|
|
cp "${tmp_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}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then
|
|
|
|
|
|
|
|
# Support --kernel-config=/proc/config.gz, mainly
|
|
|
|
|
|
|
|
zcat "${KERNEL_CONFIG}" > "${TEMP}/kerncache/config-${ARCH}-${KV}.orig"
|
|
|
|
|
|
|
|
else
|
|
|
|
cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig"
|
|
|
|
cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig"
|
|
|
|
|
|
|
|
fi
|
|
|
|
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
|
|
|
@ -180,7 +186,16 @@ gen_kerncache_is_valid()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1)
|
|
|
|
test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
test2=$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1)
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
test2=$("${CONFGREP}" -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${test1}" == "${test2}" ]
|
|
|
|
if [ "${test1}" == "${test2}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|