diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-08-19 22:16:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-21 14:49:42 +0100 |
commit | 2a72190ba7b7ed629c587fe6e727a2ad6645e68b (patch) | |
tree | 86fa3ac85a3f3ccf43cbbaba0370af5b3d7b6fd2 | |
parent | 0fb0eea041f14226ffcffeb41dc1e26f3856d304 (diff) | |
download | poky-2a72190ba7b7ed629c587fe6e727a2ad6645e68b.tar.gz |
kernel.bbclass: rename type variable to imageType
* to avoid confusion with "type" command in shell
(From OE-Core rev: 8d454ea754c96561257b1cc011fa638ceaa771db)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel.bbclass | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 3c8aa5911f..6b734be2b6 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -235,31 +235,31 @@ do_bundle_initramfs () { | |||
235 | copy_initramfs | 235 | copy_initramfs |
236 | # Backing up kernel image relies on its type(regular file or symbolic link) | 236 | # Backing up kernel image relies on its type(regular file or symbolic link) |
237 | tmp_path="" | 237 | tmp_path="" |
238 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do | 238 | for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do |
239 | if [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then | 239 | if [ -h ${KERNEL_OUTPUT_DIR}/$imageType ] ; then |
240 | linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$type` | 240 | linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$imageType` |
241 | realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$type` | 241 | realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$imageType` |
242 | mv -f $realpath $realpath.bak | 242 | mv -f $realpath $realpath.bak |
243 | tmp_path=$tmp_path" "$type"#"$linkpath"#"$realpath | 243 | tmp_path=$tmp_path" "$imageType"#"$linkpath"#"$realpath |
244 | elif [ -f ${KERNEL_OUTPUT_DIR}/$type ]; then | 244 | elif [ -f ${KERNEL_OUTPUT_DIR}/$imageType ]; then |
245 | mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.bak | 245 | mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.bak |
246 | tmp_path=$tmp_path" "$type"##" | 246 | tmp_path=$tmp_path" "$imageType"##" |
247 | fi | 247 | fi |
248 | done | 248 | done |
249 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio | 249 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio |
250 | kernel_do_compile | 250 | kernel_do_compile |
251 | # Restoring kernel image | 251 | # Restoring kernel image |
252 | for tp in $tmp_path ; do | 252 | for tp in $tmp_path ; do |
253 | type=`echo $tp|cut -d "#" -f 1` | 253 | imageType=`echo $tp|cut -d "#" -f 1` |
254 | linkpath=`echo $tp|cut -d "#" -f 2` | 254 | linkpath=`echo $tp|cut -d "#" -f 2` |
255 | realpath=`echo $tp|cut -d "#" -f 3` | 255 | realpath=`echo $tp|cut -d "#" -f 3` |
256 | if [ -n "$realpath" ]; then | 256 | if [ -n "$realpath" ]; then |
257 | mv -f $realpath $realpath.initramfs | 257 | mv -f $realpath $realpath.initramfs |
258 | mv -f $realpath.bak $realpath | 258 | mv -f $realpath.bak $realpath |
259 | ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs | 259 | ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$imageType.initramfs |
260 | else | 260 | else |
261 | mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.initramfs | 261 | mv -f ${KERNEL_OUTPUT_DIR}/$imageType ${KERNEL_OUTPUT_DIR}/$imageType.initramfs |
262 | mv -f ${KERNEL_OUTPUT_DIR}/$type.bak ${KERNEL_OUTPUT_DIR}/$type | 262 | mv -f ${KERNEL_OUTPUT_DIR}/$imageType.bak ${KERNEL_OUTPUT_DIR}/$imageType |
263 | fi | 263 | fi |
264 | done | 264 | done |
265 | fi | 265 | fi |
@@ -365,10 +365,10 @@ kernel_do_install() { | |||
365 | # | 365 | # |
366 | install -d ${D}/${KERNEL_IMAGEDEST} | 366 | install -d ${D}/${KERNEL_IMAGEDEST} |
367 | install -d ${D}/boot | 367 | install -d ${D}/boot |
368 | for type in ${KERNEL_IMAGETYPES} ; do | 368 | for imageType in ${KERNEL_IMAGETYPES} ; do |
369 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION} | 369 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} ${D}/${KERNEL_IMAGEDEST}/${imageType}-${KERNEL_VERSION} |
370 | if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then | 370 | if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then |
371 | ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type} | 371 | ln -sf ${imageType}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${imageType} |
372 | fi | 372 | fi |
373 | done | 373 | done |
374 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} | 374 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} |
@@ -640,10 +640,10 @@ do_sizecheck() { | |||
640 | die "Invalid KERNEL_IMAGE_MAXSIZE: ${KERNEL_IMAGE_MAXSIZE}, should be an integer (The unit is Kbytes)" | 640 | die "Invalid KERNEL_IMAGE_MAXSIZE: ${KERNEL_IMAGE_MAXSIZE}, should be an integer (The unit is Kbytes)" |
641 | fi | 641 | fi |
642 | at_least_one_fits= | 642 | at_least_one_fits= |
643 | for type in ${KERNEL_IMAGETYPES} ; do | 643 | for imageType in ${KERNEL_IMAGETYPES} ; do |
644 | size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$type | awk '{print $1}'` | 644 | size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'` |
645 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then | 645 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then |
646 | bbwarn "This kernel $type (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device." | 646 | bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device." |
647 | else | 647 | else |
648 | at_least_one_fits=y | 648 | at_least_one_fits=y |
649 | fi | 649 | fi |
@@ -666,9 +666,9 @@ kernel_do_deploy() { | |||
666 | mkdir "$deployDir" | 666 | mkdir "$deployDir" |
667 | fi | 667 | fi |
668 | 668 | ||
669 | for type in ${KERNEL_IMAGETYPES} ; do | 669 | for imageType in ${KERNEL_IMAGETYPES} ; do |
670 | base_name=${type}-${KERNEL_IMAGE_NAME} | 670 | base_name=${imageType}-${KERNEL_IMAGE_NAME} |
671 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} $deployDir/${base_name}.bin | 671 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin |
672 | done | 672 | done |
673 | if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then | 673 | if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then |
674 | mkdir -p ${D}/lib | 674 | mkdir -p ${D}/lib |
@@ -676,18 +676,18 @@ kernel_do_deploy() { | |||
676 | ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz | 676 | ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz |
677 | fi | 677 | fi |
678 | 678 | ||
679 | for type in ${KERNEL_IMAGETYPES} ; do | 679 | for imageType in ${KERNEL_IMAGETYPES} ; do |
680 | base_name=${type}-${KERNEL_IMAGE_NAME} | 680 | base_name=${imageType}-${KERNEL_IMAGE_NAME} |
681 | symlink_name=${type}-${KERNEL_IMAGE_LINK_NAME} | 681 | symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME} |
682 | ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin | 682 | ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin |
683 | ln -sf ${base_name}.bin $deployDir/${type} | 683 | ln -sf ${base_name}.bin $deployDir/${imageType} |
684 | done | 684 | done |
685 | 685 | ||
686 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then | 686 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then |
687 | for type in ${KERNEL_IMAGETYPES} ; do | 687 | for imageType in ${KERNEL_IMAGETYPES} ; do |
688 | initramfs_base_name=${type}-${INITRAMFS_NAME} | 688 | initramfs_base_name=${imageType}-${INITRAMFS_NAME} |
689 | initramfs_symlink_name=${type}-${INITRAMFS_LINK_NAME} | 689 | initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} |
690 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin | 690 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin |
691 | ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin | 691 | ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin |
692 | done | 692 | done |
693 | fi | 693 | fi |