Support duo4k.
[vuplus_openvuplus_3.0] / meta-bsp / recipes-kernel / linux / linux-vuplus-4.1.45.inc
1 DESCRIPTION = "Linux kernel for vuplus"
2 SECTION = "kernel"
3 LICENSE = "GPLv2"
4 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
5
6 PE = "1"
7 KV = "4.1.45"
8
9 INC_PR = "r0"
10 SRCREV = ""
11
12 MODULE = "linux-4.1.45"
13
14 KERNEL_CONFIG = "${MACHINE}_defconfig"
15
16 KSRC_VER = "4.1-1.17"
17
18 SRC_URI = " \
19         http://archive.vuplus.com/download/kernel/stblinux-${KSRC_VER}.tar.bz2 \
20         file://${KERNEL_CONFIG} \
21         file://linux_dvb_adapter.patch \
22         file://linux_dvb-core.patch \
23         file://linux_4_1_45_dvbs2x.patch \
24 "
25
26 inherit kernel
27
28 S = "${WORKDIR}/linux"
29
30 RREPLACES_${PN} = "linux-vuplus"
31 RCONFLICTS_${PN} = "linux-vuplus"
32
33 export OS = "Linux"
34 KERNEL_IMAGETYPE = "zImage"
35 KERNEL_OBJECT_SUFFIX = "ko"
36 KERNEL_IMAGEDEST = "tmp"
37 KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
38
39 FILES_kernel-image = "/${KERNEL_IMAGEDEST}/zImage"
40
41 do_configure_prepend() {
42         oe_machinstall -m 0644 ${WORKDIR}/${KERNEL_CONFIG} ${WORKDIR}/defconfig
43 }
44
45 kernel_do_install_append() {
46         install -d ${D}/${KERNEL_IMAGEDEST}
47         install -m 0755 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}
48 }
49
50 kernel_do_compile() {
51         unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
52         oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
53         if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
54                 gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
55         fi
56 }
57
58 pkg_postinst_kernel-image () {
59         if [ -d /proc/stb ] ; then
60                 dd if=/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} of=/dev/${DEV_KERNEL}
61         fi
62         rm -f /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}
63         true
64 }
65
66 pkg_postrm_kernel-image () {
67 }
68
69 FILESEXTRAPATHS_prepend := "${THISDIR}/linux-vuplus-${KV}:"
70
71 SRC_URI[md5sum] = "7b5617dc7ec01ff4347b5b50d9d46f0f"
72 SRC_URI[sha256sum] = "18ecc79522f6b975c96cca7975eb31db93d2e8cfea6755451bba0a1a28feb0bd"