aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-03-30 00:43:05 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-04-20 10:29:29 +0200
commit4d1182b1aa762d19e49be8200e7fcd6a15b8bcd9 (patch)
tree7d29741d757a0d7ef7906aa346bdc14e93e08487
parenta351df325e5c310f5e6dc1df58c8d14dd2b4028e (diff)
downloadmeta-openembedded-contrib-4d1182b1aa762d19e49be8200e7fcd6a15b8bcd9.tar.gz
meta-openembedded-contrib-4d1182b1aa762d19e49be8200e7fcd6a15b8bcd9.tar.bz2
meta-openembedded-contrib-4d1182b1aa762d19e49be8200e7fcd6a15b8bcd9.zip
kernel.bbclass: resync with oe-core version
* 4 spaces for anonymous python * don't recreate uImage if it already exists Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/classes/kernel.bbclass64
1 files changed, 33 insertions, 31 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index cfcd5e9697..4d394c7d63 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -11,20 +11,20 @@ INITRAMFS_IMAGE ?= ""
INITRAMFS_TASK ?= ""
python __anonymous () {
- kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
- if kerneltype == 'uImage':
- depends = d.getVar("DEPENDS", True)
- depends = "%s u-boot-mkimage-native" % depends
- d.setVar("DEPENDS", depends)
+ kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
+ if kerneltype == 'uImage':
+ depends = d.getVar("DEPENDS", True)
+ depends = "%s u-boot-mkimage-native" % depends
+ d.setVar("DEPENDS", depends)
- image = d.getVar('INITRAMFS_IMAGE', True)
- if image:
- d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
+ image = d.getVar('INITRAMFS_IMAGE', True)
+ if image:
+ d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
- machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
+ machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
- if machine_kernel_pr:
- d.setVar('PR', machine_kernel_pr)
+ if machine_kernel_pr:
+ d.setVar('PR', machine_kernel_pr)
}
inherit kernel-arch deploy
@@ -507,34 +507,36 @@ do_sizecheck() {
addtask sizecheck before do_install after do_compile
+KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+# Don't include the DATETIME variable in the sstate package signatures
+KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
+KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+
do_uboot_mkimage() {
if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
- ENTRYPOINT=${UBOOT_ENTRYPOINT}
- if test -n "${UBOOT_ENTRYSYMBOL}"; then
- ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
- awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
- fi
- if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
- ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
- uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
- rm -f linux.bin
- else
- ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
- rm -f linux.bin.gz
- gzip -9 linux.bin
- uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
- rm -f linux.bin.gz
+ if test ! -e arch/${ARCH}/boot/uImage ; then
+ ENTRYPOINT=${UBOOT_ENTRYPOINT}
+ if test -n "${UBOOT_ENTRYSYMBOL}"; then
+ ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+ awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+ fi
+ if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+ ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+ rm -f linux.bin
+ else
+ ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+ rm -f linux.bin.gz
+ gzip -9 linux.bin
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+ rm -f linux.bin.gz
+ fi
fi
fi
}
addtask uboot_mkimage before do_install after do_compile
-KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
-# Don't include the DATETIME variable in the sstate package signatures
-KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
-KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
-
kernel_do_deploy() {
install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then