bb2e09ef71ac105c70b52df67cb9b46637b7cb01
[vuplus_openvuplus_3.0] / meta-bsp / recipes-kernel / linux / linux-vuplus-3.9.6.inc
1 DESCRIPTION = "Linux kernel for vuplus"
2 SECTION = "kernel"
3 LICENSE = "GPL"
4 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
5
6 KV = "3.9.6"
7
8 INC_PR = "r4"
9 SRCREV = ""
10
11 MODULE = "linux-3.9.6"
12
13 SRC_URI += "http://archive.vuplus.com/download/kernel/stblinux-${KV}.tar.bz2 \
14         file://fix_fuse_for_linux_mips_3-9.patch \
15         file://rt2800usb_fix_warn_tx_status_timeout_to_dbg.patch \
16         file://${MACHINE}_defconfig \
17         "
18
19 inherit kernel
20
21 S = "${WORKDIR}/linux"
22
23 RREPLACES_${PN} = "linux-vuplus"
24 RCONFLICTS_${PN} = "linux-vuplus"
25
26 export OS = "Linux"
27 KERNEL_IMAGETYPE = "vmlinux"
28 KERNEL_OUTPUT = "vmlinux"
29 KERNEL_OBJECT_SUFFIX = "ko"
30 KERNEL_IMAGEDEST = "tmp"
31
32 FILES_kernel-image = "/${KERNEL_IMAGEDEST}/vmlinux.gz /${KERNEL_IMAGEDEST}/autoexec.bat"
33
34 do_configure_prepend() {
35         oe_machinstall -m 0644 ${WORKDIR}/${MACHINE}_defconfig ${WORKDIR}/defconfig
36 }
37
38 kernel_do_install_append() {
39         install -d ${D}/${KERNEL_IMAGEDEST}
40         install -m 0755 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}
41         gzip ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}
42 }
43
44 kernel_do_compile() {
45         unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
46         oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
47         if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
48                 gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
49         fi
50 }
51
52 pkg_postinst_kernel-image () {
53         if [ -d /proc/stb ] ; then
54                 flash_erase /dev/mtd1 0 0
55                 nandwrite -p /dev/mtd1 /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}.gz
56         fi
57         rm -f /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}.gz
58         true
59 }
60
61 FILESEXTRAPATHS_prepend := "${THISDIR}/linux-vuplus-${KV}:"
62
63 SRC_URI[md5sum] = "33142378c8387a87190156be1cb1a254"
64 SRC_URI[sha256sum] = "47799db9e2658906e532981ec8111a915426b8453762561029733f2406c3e297"
65
66