summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-02-06 15:27:26 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-02-06 15:27:26 +0000
commit82eaabce95e8c2965b9110999e8bcc62f1662a96 (patch)
tree0724fd916ab081e0109117ebac9ec7f44e25539c /meta/classes/kernel.bbclass
parentf1d8a0fe94c0eb809d6b1bcccfb2c9a4ccb06977 (diff)
downloadpoky-82eaabce95e8c2965b9110999e8bcc62f1662a96.tar.gz
kernel.bbclass: added deploy task from linux.inc recipe
- creation of modules.tgz - uImage mangling with uboot-mkimage - symlinking built kernel git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3676 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d2edfd4853..99680ceabd 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -46,6 +46,9 @@ KERNEL_LOCALVERSION ?= ""
46# kernels are generally machine specific 46# kernels are generally machine specific
47PACKAGE_ARCH = "${MACHINE_ARCH}" 47PACKAGE_ARCH = "${MACHINE_ARCH}"
48 48
49# U-Boot support
50UBOOT_ENTRYPOINT ?= "20008000"
51
49kernel_do_compile() { 52kernel_do_compile() {
50 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 53 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
51 oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}" 54 oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
@@ -416,3 +419,34 @@ do_sizecheck() {
416} 419}
417 420
418addtask sizecheck before do_install after do_compile 421addtask sizecheck before do_install after do_compile
422
423KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
424KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${MACHINE}"
425
426do_deploy() {
427 install -d ${DEPLOY_DIR_IMAGE}
428 install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
429 tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
430
431 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
432 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
433 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
434 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
435 rm -f linux.bin
436 else
437 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
438 rm -f linux.bin.gz
439 gzip -9 linux.bin
440 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
441 rm -f linux.bin.gz
442 fi
443 fi
444
445 cd ${DEPLOY_DIR_IMAGE}
446 rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
447 ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
448}
449
450do_deploy[dirs] = "${S}"
451
452addtask deploy before do_package after do_install