Commit 64fe3aea authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

commented out redundant kernel building in the bundle function

parent 41086664
...@@ -148,6 +148,47 @@ do_bundle_initramfs_old () { ...@@ -148,6 +148,47 @@ do_bundle_initramfs_old () {
fi fi
} }
do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
echo "Creating a kernel image with a bundled initramfs..."
copy_initramfs
# Backing up kernel image relies on its type(regular file or symbolic link)
tmp_path=""
for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
if [ -h ${KERNEL_OUTPUT_DIR}/$imageType ] ; then
linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$imageType`
realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$imageType`
cp -f $realpath $realpath.bak
#mv -f $realpath $realpath.bak
tmp_path=$tmp_path" "$imageType"#"$linkpath"#"$realpath
elif [ -f ${KERNEL_OUTPUT_DIR}/$imageType ]; then
#mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.bak
cp -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.bak
tmp_path=$tmp_path" "$imageType"##"
fi
done
use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
# Disable
#kernel_do_compile
# Restoring kernel image
for tp in $tmp_path ; do
imageType=`echo $tp|cut -d "#" -f 1`
linkpath=`echo $tp|cut -d "#" -f 2`
realpath=`echo $tp|cut -d "#" -f 3`
if [ -n "$realpath" ]; then
mv -f $realpath $realpath.initramfs
mv -f $realpath.bak $realpath
ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$imageType.initramfs
else
mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.initramfs
mv -f ${KERNEL_OUTPUT_DIR}/$imageType.bak ${KERNEL_OUTPUT_DIR}/$imageType
fi
done
fi
}
# Override kernel_do_compile used by do_bundle_initramfs in kernel.bbclass # Override kernel_do_compile used by do_bundle_initramfs in kernel.bbclass
# Added ${PARALLEL_MAKE} only # Added ${PARALLEL_MAKE} only
kernel_do_compile_old() { kernel_do_compile_old() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment