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