diff options
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 0000000000..f697e70aa4 --- /dev/null +++ b/meta/classes/deploy.bbclass | |||
@@ -0,0 +1,11 @@ | |||
1 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" | ||
2 | SSTATETASKS += "do_deploy" | ||
3 | do_deploy[sstate-name] = "deploy-${PN}" | ||
4 | do_deploy[sstate-inputdirs] = "${DEPLOYDIR}" | ||
5 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" | ||
6 | |||
7 | python do_deploy_setscene () { | ||
8 | sstate_setscene(d) | ||
9 | } | ||
10 | addtask do_deploy_setscene | ||
11 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" | ||
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index f6989bb872..10e5c2a571 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -16,7 +16,7 @@ python __anonymous () { | |||
16 | bb.data.setVar("DEPENDS", depends, d) | 16 | bb.data.setVar("DEPENDS", depends, d) |
17 | } | 17 | } |
18 | 18 | ||
19 | inherit kernel-arch | 19 | inherit kernel-arch deploy |
20 | 20 | ||
21 | PACKAGES_DYNAMIC += "kernel-module-*" | 21 | PACKAGES_DYNAMIC += "kernel-module-*" |
22 | PACKAGES_DYNAMIC += "kernel-image-*" | 22 | PACKAGES_DYNAMIC += "kernel-image-*" |
@@ -475,34 +475,29 @@ KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME | |||
475 | KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" | 475 | KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" |
476 | 476 | ||
477 | do_deploy() { | 477 | do_deploy() { |
478 | install -d ${DEPLOY_DIR_IMAGE} | 478 | install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin |
479 | install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin | ||
480 | package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin | ||
481 | if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then | 479 | if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then |
482 | tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib | 480 | tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib |
483 | fi | 481 | fi |
484 | 482 | ||
485 | if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then | 483 | if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then |
486 | if test -e arch/${ARCH}/boot/compressed/vmlinux ; then | 484 | if test -e arch/${ARCH}/boot/compressed/vmlinux ; then |
487 | ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin | 485 | ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin |
488 | 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 | 486 | 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 |
489 | rm -f linux.bin | 487 | rm -f linux.bin |
490 | else | 488 | else |
491 | ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin | 489 | ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin |
492 | rm -f linux.bin.gz | 490 | rm -f linux.bin.gz |
493 | gzip -9 linux.bin | 491 | gzip -9 linux.bin |
494 | 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 | 492 | 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 |
495 | rm -f linux.bin.gz | 493 | rm -f linux.bin.gz |
496 | fi | 494 | fi |
497 | package_stagefile_shell ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin | ||
498 | fi | 495 | fi |
499 | 496 | ||
500 | cd ${DEPLOY_DIR_IMAGE} | 497 | cd ${DEPLOYDIR} |
501 | rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin | 498 | rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin |
502 | ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin | 499 | ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin |
503 | package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}.bin | ||
504 | } | 500 | } |
505 | 501 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" | |
506 | do_deploy[dirs] = "${B}" | ||
507 | 502 | ||
508 | addtask deploy before do_package after do_install | 503 | addtask deploy before do_package after do_install |