diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-08-05 13:25:20 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-19 20:06:25 +0100 |
commit | 369920107edd8ae2487d71a324072fcfaba0731e (patch) | |
tree | 14aea71394438111dd1eda29db443ce9784aa314 /meta/classes | |
parent | 29ca8936493b2044c6926becca0ffcf3747b2528 (diff) | |
download | openembedded-core-369920107edd8ae2487d71a324072fcfaba0731e.tar.gz openembedded-core-369920107edd8ae2487d71a324072fcfaba0731e.tar.bz2 openembedded-core-369920107edd8ae2487d71a324072fcfaba0731e.tar.xz openembedded-core-369920107edd8ae2487d71a324072fcfaba0731e.zip |
deploy.bbclass: use new style staging for deploy tasks
All tasks which implement a do_deploy should inherit this class to have the
changes in the deploy task staged.
Update recipes which include a do_deploy function to inherit this class and
to use DEPLOYDIR rather than DEPLOY_DIR_IMAGE.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/deploy.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/kernel.bbclass | 19 |
2 files changed, 18 insertions, 12 deletions
diff --git a/meta/classes/deploy.bbclass b/meta/classes/deploy.bbclass new file mode 100644 index 000000000..f697e70aa --- /dev/null +++ b/meta/classes/deploy.bbclass @@ -0,0 +1,11 @@ +DEPLOYDIR = "${WORKDIR}/deploy-${PN}" +SSTATETASKS += "do_deploy" +do_deploy[sstate-name] = "deploy-${PN}" +do_deploy[sstate-inputdirs] = "${DEPLOYDIR}" +do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" + +python do_deploy_setscene () { + sstate_setscene(d) +} +addtask do_deploy_setscene +do_deploy[dirs] = "${DEPLOYDIR} ${B}" diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index f6989bb87..10e5c2a57 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -16,7 +16,7 @@ python __anonymous () { bb.data.setVar("DEPENDS", depends, d) } -inherit kernel-arch +inherit kernel-arch deploy PACKAGES_DYNAMIC += "kernel-module-*" PACKAGES_DYNAMIC += "kernel-image-*" @@ -475,34 +475,29 @@ KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin - package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin + install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib + tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib fi if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 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 ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin + uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin 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 ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin + uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin rm -f linux.bin.gz fi - package_stagefile_shell ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin fi - cd ${DEPLOY_DIR_IMAGE} + cd ${DEPLOYDIR} rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin - package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}.bin } - -do_deploy[dirs] = "${B}" +do_deploy[dirs] = "${DEPLOYDIR} ${B}" addtask deploy before do_package after do_install |