diff options
-rw-r--r-- | classes/kernel.oeclass | 9 | ||||
-rw-r--r-- | linux/linux-mtx-1_2.4.24.oe | 43 |
2 files changed, 49 insertions, 3 deletions
diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass index f34299f6cf..8fa1db8fd3 100644 --- a/classes/kernel.oeclass +++ b/classes/kernel.oeclass @@ -15,6 +15,7 @@ KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}" KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}" KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" # # configuration @@ -77,8 +78,10 @@ kernel_do_install() { else oenote "no modules to install" fi + + install -d ${D}/${KERNEL_IMAGEDEST} install -d ${D}/boot - install -m 0644 ${KERNEL_OUTPUT} ${D}/boot/${KERNEL_IMAGETYPE}-${PV} + install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV} install -m 0644 System.map ${D}/boot/System.map-${PV} install -m 0644 .config ${D}/boot/config-${PV} install -d ${D}/etc/modutils @@ -89,11 +92,11 @@ kernel_do_configure() { } pkg_postinst_kernel () { - update-alternatives --install /boot/zImage zImage /boot/zImage-${PV} ${KERNEL_PRIORITY} || true + update-alternatives --install /${KERNEL_IMAGEDEST}/zImage zImage /${KERNEL_IMAGEDEST}/zImage-${PV} ${KERNEL_PRIORITY} || true } pkg_postrm_kernel () { - update-alternatives --remove zImage /boot/zImage-${PV} || true + update-alternatives --remove zImage /${KERNEL_IMAGEDEST}/zImage-${PV} || true } inherit cml1 diff --git a/linux/linux-mtx-1_2.4.24.oe b/linux/linux-mtx-1_2.4.24.oe index e69de29bb2..96de77bb88 100644 --- a/linux/linux-mtx-1_2.4.24.oe +++ b/linux/linux-mtx-1_2.4.24.oe @@ -0,0 +1,43 @@ +DESCRIPTION = "Linux kernel for MTX-1 (MeshCube)" +MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>" +LICENSE = "GPL" +KV = "2.4.24" +PV = "${KV}" +PACKAGE_ARCH = "mtx-1" +RDEPENDS = "mtd" + +SRC_URI = "cvs://anoncvs:anoncvs@meshcube.org/data/cvs;module=kernel/linux" + +S = "${WORKDIR}/linux" + +inherit kernel + +ARCH = "mips" +KERNEL_OUTPUT = "arch/mips/zboot/images/mtx-1.flash.bin" +KERNEL_IMAGETYPE = "zImage.flash.bin" +KERNEL_IMAGEDEST = "tmp" + +do_configure_prepend() { + install -m 0644 ${S}/arch/mips/defconfig-mtx-1 ${S}/.config +} + +pkg_postinst_kernel() { +if test "x$D" != "x"; then + exit 1 +else + echo "*** flashing kernel ***" + flashcp -v /tmp/zImage.flash.bin-${KV} /dev/mtd/2 + echo "*** done. please reboot ***" +fi +} + +FILES_kernel += " /tmp" + +do_deploy() { + install -d ${DEPLOY_DIR}/images + install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR}/images/${MACHINE}-${KV}-${KERNEL_IMAGETYPE}-${DATETIME} +} + +do_deploy[dirs] = "${S}" + +addtask deploy before do_build after do_compile
\ No newline at end of file |